@charset "utf-8";

/* sidebar Box */
#sidebar-box { top: 0px; width: 280px; height: 100%; position: fixed; z-index:99998; background: var(--op-surface, #fff); color: var(--op-text-primary, #333); }
#sidebar-box .sidebar-content { position:relative; padding:0px 15px; overflow:auto; overflow-x:hidden; height:100%; -webkit-overflow-scrolling:touch; }
#sidebar-box .sidebar-head { position:absolute; top:0; left:-1px; width:281px; height:6px; z-index:10; background: var(--op-primary, #3dbf62) !important; }
#sidebar-box .div-title-underline-thin { margin-bottom:8px; font-weight: 700; font-size: 13px; color: var(--op-text-secondary, #64748b); letter-spacing: 0.05em; }

/* Auth Group Buttons (Login, Member, Admin, Logout) */
.sidebar-auth-group {
    display: flex;
    width: 100%;
    gap: 4px;
    margin-bottom: 5px;
}
.sidebar-auth-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    transition: all 0.15s ease;
}
.sidebar-auth-btn:active {
    transform: scale(0.96);
    background: #e2e8f0;
}
.sidebar-auth-btn.btn-highlight {
    background: var(--op-primary, #3dbf62);
    border-color: var(--op-primary, #3dbf62);
    color: #ffffff;
}

/* 4 Quick Icons in Sidebar (CSS Grid) */
.sidebar-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 8px 0 14px;
    text-align: center;
}
.sidebar-quick-grid .quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: inherit;
    padding: 2px 0;
}
.sidebar-quick-grid .quick-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--op-text-primary, #334155);
    margin-top: 6px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.sidebar-quick-grid .quick-item:active .sidebar-q-icon {
    transform: scale(0.92);
}

.sidebar-q-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.15s ease;
}
.q-icon-blue    { background: #dbeafe; color: #2563eb; }
.q-icon-rose    { background: #ffe4e6; color: #e11d48; }
.q-icon-emerald { background: #d1fae5; color: #059669; }
.q-icon-purple  { background: #ede9fe; color: #7c3aed; }

#sidebar-box-mask { display:none; position:fixed; z-index:99997; background:rgba(0,0,0,0.65); left:0; top:0; width:100%; height:100%; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* Sidebar Menu Panels */
#sidebar-box .sidebar-menu { margin:0px; border-top:1px solid #e2e8f0; }
#sidebar-box .sidebar-menu a { display:block; text-decoration: none !important; }
#sidebar-box .sidebar-menu .panel { background: none; margin-top:0px; border: none; box-shadow: none; }
#sidebar-box .sidebar-menu .ca-head { padding: 0px; border-bottom:1px solid #e2e8f0; }
#sidebar-box .sidebar-menu .ca-head > a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--op-text-primary, #1e293b);
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    width: 100%;
}
#sidebar-box .sidebar-menu .ca-head.active > a { color: var(--op-primary, #3dbf62) !important; font-weight: 700 !important; }

#sidebar-box .sidebar-menu .ca-head > a.no-sub::after {
    order: 99;
    margin-left: auto;
    font-family: "FontAwesome";
    content: "\f105";
    color: #94a3b8;
    font-size: 14px;
    padding-right: 4px;
}
#sidebar-box .sidebar-menu .ca-head > a > .ca-href {
    order: 99;
    margin-left: auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
#sidebar-box .sidebar-menu .ca-head > a > .ca-href::after {
    font-family: "FontAwesome";
    content: "\f107";
    color: #94a3b8;
    font-size: 14px;
    transition: transform 0.2s ease;
}
#sidebar-box .sidebar-menu .ca-head.active > a > .ca-href::after {
    transform: rotate(180deg);
    color: var(--op-primary, #3dbf62);
}

.ca-menu-title {
    flex: 1;
    text-align: left;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bullet icon for regular menu items to align with domain icon circles */
.ca-menu-bullet {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 9px;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    flex-shrink: 0;
}
html.theme-dark .ca-menu-bullet {
    background: #22222a;
    border-color: #2d2d38;
    color: #64748b;
}

/* Domain Panel Components (Company, Review, Coupon) */
.sidebar-domain-panel .ca-icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-right: 9px;
    flex-shrink: 0;
}
.sidebar-domain-panel .ca-icon-circle.bg-blue   { background: #eff6ff; color: #2563eb; }
.sidebar-domain-panel .ca-icon-circle.bg-orange { background: #fff7ed; color: #ea580c; }
.sidebar-domain-panel .ca-icon-circle.bg-green  { background: #f0fdf4; color: #16a34a; }

.sidebar-domain-panel .ca-menu-title {
    font-size: 13.5px;
    font-weight: 700;
}
.sidebar-domain-panel .ca-total-badge {
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    background: #f1f5f9;
    color: #64748b;
    flex-shrink: 0;
}

.ca-domain-body {
    padding: 8px 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ca-domain-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
}
.ca-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}
.ca-action-btn.btn-primary-tint {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}
.ca-action-btn.btn-ghost-tint {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
}
.ca-action-btn:active {
    transform: scale(0.98);
}

.ca-domain-categories {
    margin-top: 6px;
}
.ca-domain-group {
    margin-bottom: 8px;
}
.ca-domain-group:last-child {
    margin-bottom: 0;
}
.ca-domain-badge {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
    padding-left: 2px;
}
.ca-domain-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.ca-chip-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 11.5px;
    font-weight: 500;
    color: #334155;
    text-decoration: none !important;
    transition: all 0.1s ease;
}
.ca-chip-item .chip-num {
    font-size: 10px;
    color: #94a3b8;
}
.ca-chip-item:active,
.ca-chip-item.on {
    background: #f0fdf4;
    border-color: #3dbf62;
    color: #166534;
    font-weight: 700;
}

/* Regular Sub Menu (Community, Data, etc.) */
#sidebar-box .sidebar-menu .ca-sub {
    padding: 0;
    margin: 0;
    list-style: none;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
#sidebar-box .sidebar-menu .ca-sub li {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #f1f5f9;
}
#sidebar-box .sidebar-menu .ca-sub li:last-child { border-bottom: 0; }
#sidebar-box .sidebar-menu .ca-sub li a {
    width: 100%;
    font-size: 12.5px;
    color: #475569;
}
#sidebar-box .sidebar-menu .ca-sub li.on a {
    font-weight: 700 !important;
    color: var(--op-primary, #3dbf62) !important;
}
#sidebar-box .sidebar-menu .ca-line { border: 0px; background: #fff; font-weight: bold; }

#sidebar-box .sidebar-search { border:1px solid #eee; background:#fafafa; padding:8px; margin-bottom:10px; }
#sidebar-box .sidebar-search .row { margin-left:-3px; margin-right:-3px; }
#sidebar-box .sidebar-search .row > div { padding-left:3px; padding-right:3px; }

#sidebar-box .sidebar-media { border-bottom:1px solid #eee; margin:0px 0px 8px; padding:0px 0px 8px; line-height:20px; }
#sidebar-box .sidebar-media .media-photo i { background:#eee; border-radius: 50%; padding: 8px; width: 40px; height: 40px; text-align: center; font-size: 22px; display: inline-block; }
#sidebar-box .sidebar-media .media-photo img { border-radius: 50%; width: 40px !important; height: 40px !important; display:inline-block; }
#sidebar-box .sidebar-media .media-info { font-size:12px; color:#888; }
#sidebar-box .sidebar-media .media-info i { margin-left:10px; }

#sidebar-box .sidebar-login label { line-height:12px !important; font-weight: normal; cursor: pointer; letter-spacing: -1px; }
#sidebar-box .sidebar-login .profile .photo { margin-right:12px; }
#sidebar-box .sidebar-login .profile .photo img { width:60px; height:60px; border-radius: 50%; border:0; }
#sidebar-box .sidebar-login .profile .photo i { width:60px; height:60px; font-size:30px; padding:15px 0px 0px; text-align:center; background:#ddd; color:#fff; border-radius: 50%; }
#sidebar-box .sidebar-login .profile h3 { font-size:18px; line-height:32px; padding:0px; margin:0px; letter-spacing:-1px; display:block; text-overflow:ellipsis; white-space:nowrap; word-wrap:normal; overflow:hidden; }
#sidebar-box .sidebar-login .form-group { margin-bottom:10px; }

#sidebar-box .sidebar-list { padding:0px; margin:0px; list-style:none; }
#sidebar-box .sidebar-list a { display:block; padding:4px 15px; border-bottom:1px solid #eee; }
#sidebar-box .sidebar-list.list-links a::after { top: 0px; font-family: "FontAwesome"; float: right; position: relative; content: "\f105"; }
#sidebar-box .sidebar-list.list-links a.no-fa::after { content: ""; }

#sidebar-box .progress { position:relative; border-radius: 0px; height: 28px; overflow: hidden; margin-bottom: 15px; box-shadow: inset 0px 1px 2px rgba(0,0,0,0.1); background-color: rgb(245, 245, 245); -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); }
#sidebar-box .progress .sr-only { margin: 0px 15px; left: 0px; width: auto; height: 28px; line-height: 28px; font-size: 12px; clip: auto; }
#sidebar-box .sr-score { height: 28px; line-height: 28px; font-size: 12px; padding-right:8px; }
#sidebar-box .sr-secret { display:inline-block; padding:0px; margin:0px; line-height:12px; vertical-align:middle; background-repeat: no-repeat; background-position: 0px 0px; width:12px; height:12px; background-image: url('./img/icon_secret.gif'); }

#sidebar-box .sidebar-wing { position:absolute; width:36px; z-index:1; text-align:center; }
#sidebar-box .sidebar-wing-close { background:#fff; font-size: 18px; font-weight: 300 !important; width:36px; height:50px; line-height:50px !important; border:1px solid #ddd; cursor:pointer; }

@media (min-width: 481px) {
	#sidebar-box { right: -320px; border-left:1px solid #ddd; margin-left:40px; }
	#sidebar-box .sidebar-wing { left:0; margin-left:-35px; }
	#sidebar-box .sidebar-wing-close { border-right:0px; }
}
@media (max-width: 480px) {
	#sidebar-box { left: -320px; border-right:1px solid #ddd; margin-right:40px; }
	#sidebar-box .sidebar-wing { right:0; margin-right:-35px; }
	#sidebar-box .sidebar-wing-close { border-left:0px; }
}

@media (min-width: 768px) {
	#sidebar-box { padding-bottom:0px; }
	#sidebar-box .sidebar-wing { top:20%; }
	#sidebar-box .sidebar-wing-icon { border-right:0px; display:block; }
}
@media (max-width: 767px) {
	#sidebar-box { padding-bottom:0px; }
	#sidebar-box .sidebar-wing { top:35%; }
	#sidebar-box .sidebar-wing-icon { display:none; }
}

/* ==========================================================================
   추가: 파트너 전용 메뉴 및 사이드바 공통 컴포넌트 (Phase 3 리팩터링)
   ========================================================================== */

/* 1. 파트너 메뉴 레이아웃 (#sm.partner_menu) */
#sidebar-box #sm.partner_menu {
    border: 0px solid #bcd0c2;
    border-radius: 7px;
    margin-left: -5px;
    margin-bottom: 5px;
}

#sidebar-box #sm.partner_menu .title {
    text-align: center;
}

#sidebar-box #sm.partner_menu .title span {
    color: #ffffff;
    font-weight: bolder;
    font-size: 16px;
}

#sidebar-box #sm.partner_menu .sm_item {
    width: 100%;
    font-weight: bold;
}

#sidebar-box #sm.partner_menu .sm_sub {
    height: 50px;
    line-height: 50px;
}

#sidebar-box #sm.partner_menu .sm_sub_center {
    text-align: center;
    padding: 0px;
}

#sidebar-box #sm.partner_menu .sm_sub_contact {
    height: auto;
    line-height: normal;
    text-align: center;
    margin: 0px;
    padding: 12px;
    vertical-align: middle;
}

#sidebar-box #sm.partner_menu .sm_sub_posting {
    text-align: center;
    padding-left: 0px;
}

/* ==========================================================================
   Modern Partner Business Hub Component (partner.php)
   ========================================================================== */
.sidebar-partner-hub {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 1. Hero Status Card */
.partner-status-card {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
}
.partner-status-card.card-active {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.partner-status-card.card-expired {
    border-color: #fecaca;
    background: #fef2f2;
}
.p-status-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.p-status-badge {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
}
.p-status-dday {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
}
.p-status-dday.dday-active {
    background: #16a34a;
    color: #ffffff;
}
.p-status-dday.dday-expired {
    background: #dc2626;
    color: #ffffff;
}
.p-status-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}
.p-status-label {
    color: #64748b;
}
.p-status-val {
    font-weight: 700;
    color: #0f172a;
}
.p-status-warning {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #fca5a5;
    font-size: 11.5px;
    font-weight: 600;
    color: #b91c1c;
    line-height: 1.4;
}

/* 2. Primary Action Grid (2-Col) */
.partner-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.partner-action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.1s ease;
    text-decoration: none !important;
}
.partner-action-card:active {
    transform: scale(0.98);
    background: #f8fafc;
}
.partner-action-card.card-pay {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.partner-action-card.card-pay:active {
    background: #dbeafe;
}
.partner-action-card.card-confirm {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.partner-action-card.card-confirm:active {
    background: #dcfce7;
}
.action-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-bottom: 6px;
}
.action-card-icon.icon-blue    { background: #dbeafe; color: #2563eb; }
.action-card-icon.icon-emerald { background: #dcfce7; color: #16a34a; }
.action-card-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.action-card-sub {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}

/* 3. Quick Trio (3-Col Buttons) */
.partner-quick-trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.p-trio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.1s ease;
    cursor: pointer;
}
.p-trio-item:active {
    background: #f8fafc;
    transform: scale(0.97);
}
.p-trio-btn {
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-family: inherit;
}
.p-trio-icon {
    font-size: 15px;
    color: #334155;
    margin-bottom: 3px;
}
.p-trio-label {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
}

/* 4. Business Tools Section */
.partner-tools-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.partner-section-title {
    font-size: 10.5px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px 4px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}
.partner-tools-list {
    display: flex;
    flex-direction: column;
}
.partner-tool-item {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 12px;
    text-decoration: none !important;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 12.5px;
    font-weight: 500;
    transition: background 0.1s ease;
}
.partner-tool-item:last-child {
    border-bottom: none;
}
.partner-tool-item:active {
    background: #f8fafc;
    color: var(--op-primary, #16a34a);
}
.tool-icon-wrap {
    width: 24px;
    font-size: 13.5px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
}
.tool-text {
    flex: 1;
}
.tool-badge {
    font-size: 10px;
    font-weight: 700;
    color: #c2410c;
    background: #ffedd5;
    border: 1px solid #fed7aa;
    padding: 1px 6px;
    border-radius: 10px;
    margin-right: 6px;
}
.tool-arrow {
    font-size: 13px;
    color: #cbd5e1;
}

/* 5. Telegram Card */
.partner-telegram-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
}
.p-telegram-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #0284c7;
}
.p-tg-icon {
    font-size: 14px;
}
.p-telegram-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.p-telegram-body .side_menu_company {
    font-size: 12px;
    color: #334155;
}

/* 6. Guest Search Box */
.partner-search-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
}
.p-search-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}
.p-search-input-wrap {
    display: flex;
    align-items: center;
    position: relative;
}
.p-search-input {
    width: 100%;
    height: 38px;
    padding: 0 36px 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: all 0.15s ease;
}
.p-search-input:focus {
    border-color: var(--op-primary, #16a34a);
    background: #ffffff;
}
.p-search-btn {
    position: absolute;
    right: 4px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.p-search-btn:active {
    background: #f1f5f9;
    color: #0f172a;
}


/* 5. 기타 사이드바 컴포넌트 (menu.php, search.php, user.php) */
#sidebar-box .sidebar-stats {
    padding: 0px 15px;
    margin: 0;
    list-style: none;
}

#sidebar-box .sidebar-search .input-group {
    margin-top: 8px;
}

/* ==========================================================================
   Modern User Dashboard Component (user.php)
   ========================================================================== */
.sidebar-user-wrap {
    padding: 0;
}

/* 1. Profile Hero Card */
.sidebar-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.profile-avatar-box {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: block;
}
.profile-avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.profile-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #64748b;
    border: 2px solid #ffffff;
}
.avatar-edit-badge {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0f172a;
    color: #ffffff;
    font-size: 8.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
}
.profile-meta {
    flex: 1;
    min-width: 0;
}
.profile-nick-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}
.profile-nick {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-role-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.profile-role-tag.tag-admin {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.profile-role-tag.tag-partner {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fdba74;
}
.profile-level-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}
.profile-xp-icon {
    display: inline-flex;
    align-items: center;
}
.profile-xp-icon img {
    height: 16px;
    width: auto;
}
.profile-grade-name {
    font-weight: 500;
    color: #475569;
}
.profile-level-badge {
    font-size: 10px;
    font-weight: 700;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 1px 5px;
    border-radius: 4px;
}

/* Partner & Premium Banners */
.sidebar-partner-banner {
    margin-bottom: 10px;
}
.partner-banner-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 600;
    color: #9a3412;
}
.partner-banner-icon {
    font-size: 14px;
    color: #ea580c;
}
.partner-banner-title {
    flex: 1;
}
.partner-dday-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}
.partner-dday-badge.active {
    background: #ea580c;
    color: #ffffff;
}
.partner-dday-badge.expired {
    background: #94a3b8;
    color: #ffffff;
}
.sidebar-premium-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 8px;
    font-size: 12px;
    color: #7e22ce;
    margin-bottom: 10px;
}
.premium-date-badge {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    background: #9333ea;
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
}

/* 2. KPI Summary 4-Col Grid */
.sidebar-user-kpi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}
.kpi-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 3px 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none !important;
    position: relative;
    transition: transform 0.1s ease, border-color 0.1s ease;
}
.kpi-card:active {
    transform: scale(0.97);
    background: #f8fafc;
}
.kpi-card-static:active {
    transform: none;
    background: #ffffff;
}
.kpi-icon {
    font-size: 13px;
    margin-bottom: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}
.kpi-color-gold    { background: #fef9c3; color: #ca8a04; }
.kpi-color-blue    { background: #dbeafe; color: #2563eb; }
.kpi-color-rose    { background: #ffe4e6; color: #e11d48; }
.kpi-color-emerald { background: #dcfce7; color: #16a34a; }

.kpi-value {
    font-size: 12.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    position: relative;
}
.kpi-value .kpi-sub {
    font-size: 9.5px;
    font-weight: 500;
    color: #94a3b8;
}
.kpi-alert-dot {
    position: absolute;
    top: -2px;
    right: -6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ea580c;
}
.kpi-label {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
}

/* 3. Grouped Menu Sections */
.sidebar-user-menus {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.user-menu-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.user-section-title {
    font-size: 10.5px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px 4px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}
.user-menu-list {
    display: flex;
    flex-direction: column;
}
.user-menu-item {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 12px;
    text-decoration: none !important;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 12.5px;
    font-weight: 500;
    transition: background 0.1s ease;
}
.user-menu-item:last-child {
    border-bottom: none;
}
.user-menu-item:active {
    background: #f8fafc;
    color: var(--op-primary, #16a34a);
}
.menu-icon-wrap {
    width: 24px;
    font-size: 13.5px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
}
.menu-text {
    flex: 1;
}
.menu-badge {
    font-size: 10px;
    font-weight: 700;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 1px 6px;
    border-radius: 10px;
    margin-right: 6px;
}
.menu-arrow {
    font-size: 13px;
    color: #cbd5e1;
}

/* Footer Leave Link */
.user-menu-footer {
    text-align: right;
    padding: 6px 4px 2px;
}
.user-leave-link {
    font-size: 11px;
    color: #94a3b8 !important;
    text-decoration: underline !important;
}

/* 4. Guest Login Card */
.sidebar-login-card {
    padding: 6px 0;
}
.sidebar-login-header {
    margin-bottom: 14px;
    text-align: center;
}
.sidebar-login-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
}
.sidebar-login-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}
.sidebar-login-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.sidebar-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.sidebar-field-wrap .field-icon {
    position: absolute;
    left: 12px;
    font-size: 13px;
    color: #94a3b8;
    pointer-events: none;
}
.sidebar-form-input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.sidebar-form-input:focus {
    border-color: var(--op-primary, #16a34a);
    background: #ffffff;
}
.sidebar-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 6px;
}
.sidebar-auto-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}
.sidebar-login-submit {
    width: 100%;
    height: 44px;
    background: var(--op-primary, #16a34a);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.sidebar-login-submit:active {
    opacity: 0.9;
}
.sidebar-auth-help-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 16px;
}
.auth-help-link {
    color: #475569;
    text-decoration: none !important;
    font-weight: 500;
}
.auth-help-link:hover {
    color: var(--op-primary, #16a34a);
}
.auth-help-divider {
    color: #cbd5e1;
}
.sidebar-sns-wrapper {
    margin-bottom: 14px;
}
.sidebar-sns-divider {
    text-align: center;
    position: relative;
    margin-bottom: 10px;
}
.sidebar-sns-divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}
.sidebar-sns-divider span {
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: 0 10px;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}
.sidebar-sns-login {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.sidebar-guest-support {
    text-align: center;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}
.guest-support-link {
    font-size: 12px;
    color: #64748b;
    text-decoration: none !important;
}


/* ==========================================================================
   Sidebar Dark Mode Overrides
   ========================================================================== */
html.theme-dark #sidebar-box,
body.theme-dark #sidebar-box {
    background: #18181d !important;
    color: #e2e8f0 !important;
    border-color: #272730 !important;
}
html.theme-dark #sidebar-box .sidebar-content {
    background: #18181d !important;
}
html.theme-dark #sidebar-box .sidebar-head {
    background: var(--op-primary, #16a34a) !important;
}
html.theme-dark .sidebar-auth-btn {
    background: #22222a;
    border-color: #2e2e38;
    color: #cbd5e1;
}
html.theme-dark .sidebar-auth-btn:active {
    background: #2a2a35;
}
html.theme-dark .sidebar-auth-btn.btn-highlight {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

html.theme-dark .q-icon-blue    { background: #1e3a5f; color: #60a5fa; }
html.theme-dark .q-icon-rose    { background: #4c1d28; color: #fb7185; }
html.theme-dark .q-icon-emerald { background: #133929; color: #4ade80; }
html.theme-dark .q-icon-purple  { background: #3b1d5a; color: #c084fc; }
html.theme-dark #sidebar-box .sidebar-icon-cell span { color: #cbd5e1; }

html.theme-dark #sidebar-box .sidebar-menu { border-top-color: #272730; }
html.theme-dark #sidebar-box .sidebar-menu .ca-head { border-bottom-color: #272730; }
html.theme-dark #sidebar-box .sidebar-menu .ca-head > a { color: #f1f5f9; }
html.theme-dark #sidebar-box .sidebar-menu .ca-head.active > a { color: #4ade80 !important; }

html.theme-dark .sidebar-domain-panel .ca-icon-circle.bg-blue   { background: #1e3a5f; color: #60a5fa; }
html.theme-dark .sidebar-domain-panel .ca-icon-circle.bg-orange { background: #452414; color: #fb923c; }
html.theme-dark .sidebar-domain-panel .ca-icon-circle.bg-green  { background: #133929; color: #4ade80; }
html.theme-dark .sidebar-domain-panel .ca-total-badge { background: #282834; color: #94a3b8; }

html.theme-dark .ca-domain-body {
    background: #141418;
    border-bottom-color: #272730;
}
html.theme-dark .ca-action-btn.btn-primary-tint {
    background: #162a1e;
    border-color: #1e4a30;
    color: #4ade80;
}
html.theme-dark .ca-action-btn.btn-ghost-tint {
    background: #1e1e24;
    border-color: #272730;
    color: #cbd5e1;
}
html.theme-dark .ca-domain-badge { color: #94a3b8; }
html.theme-dark .ca-chip-item {
    background: #1e1e24;
    border-color: #2d2d38;
    color: #e2e8f0;
}
html.theme-dark .ca-chip-item:active,
html.theme-dark .ca-chip-item.on {
    background: #1c3325;
    border-color: #4ade80;
    color: #4ade80;
}

html.theme-dark #sidebar-box .sidebar-menu .ca-sub {
    background: #141418;
    border-bottom-color: #272730;
}
html.theme-dark #sidebar-box .sidebar-menu .ca-sub li {
    border-bottom-color: #1e1e24;
}
html.theme-dark #sidebar-box .sidebar-menu .ca-sub li a {
    color: #cbd5e1;
}
html.theme-dark #sidebar-box .sidebar-menu .ca-sub li.on a {
    color: #4ade80 !important;
}

/* Sidebar User Dashboard Dark Mode Overrides */
html.theme-dark .sidebar-profile-card {
    background: #1c1c24;
    border-color: #2a2a36;
}
html.theme-dark .profile-avatar-placeholder {
    background: #282834;
    color: #94a3b8;
    border-color: #2a2a36;
}
html.theme-dark .profile-avatar-img {
    border-color: #2a2a36;
}
html.theme-dark .avatar-edit-badge {
    background: #16a34a;
    color: #ffffff;
    border-color: #1c1c24;
}
html.theme-dark .profile-nick {
    color: #f1f5f9;
}
html.theme-dark .profile-grade-name {
    color: #94a3b8;
}
html.theme-dark .profile-level-badge {
    background: #133929;
    border-color: #1e5a38;
    color: #4ade80;
}
html.theme-dark .sidebar-partner-banner .partner-banner-link {
    background: #2a1b12;
    border-color: #4a2818;
    color: #fb923c;
}
html.theme-dark .sidebar-premium-banner {
    background: #251633;
    border-color: #432260;
    color: #c084fc;
}
html.theme-dark .sidebar-user-kpi .kpi-card {
    background: #1c1c24;
    border-color: #2a2a36;
}
html.theme-dark .sidebar-user-kpi .kpi-card:active {
    background: #252530;
}
html.theme-dark .sidebar-user-kpi .kpi-card-static:active {
    background: #1c1c24;
}
html.theme-dark .kpi-color-gold    { background: #3b3211; color: #facc15; }
html.theme-dark .kpi-color-blue    { background: #162a45; color: #60a5fa; }
html.theme-dark .kpi-color-rose    { background: #3d1720; color: #fb7185; }
html.theme-dark .kpi-color-emerald { background: #133322; color: #4ade80; }
html.theme-dark .kpi-value {
    color: #f1f5f9;
}
html.theme-dark .kpi-value .kpi-sub {
    color: #64748b;
}
html.theme-dark .kpi-label {
    color: #94a3b8;
}

html.theme-dark .user-menu-section {
    background: #1c1c24;
    border-color: #2a2a36;
}
html.theme-dark .user-section-title {
    background: #17171e;
    border-bottom-color: #242430;
    color: #64748b;
}
html.theme-dark .user-menu-item {
    border-bottom-color: #242430;
    color: #cbd5e1;
}
html.theme-dark .user-menu-item:active {
    background: #242430;
    color: #4ade80;
}
html.theme-dark .menu-icon-wrap {
    color: #94a3b8;
}
html.theme-dark .menu-arrow {
    color: #475569;
}
html.theme-dark .menu-badge {
    background: #133929;
    border-color: #1e5a38;
    color: #4ade80;
}
html.theme-dark .user-leave-link {
    color: #64748b !important;
}

/* Guest Login Dark Mode */
html.theme-dark .sidebar-login-title {
    color: #f1f5f9;
}
html.theme-dark .sidebar-login-desc {
    color: #94a3b8;
}
html.theme-dark .sidebar-form-input {
    background: #141418;
    border-color: #2a2a36;
    color: #f1f5f9;
}
html.theme-dark .sidebar-form-input:focus {
    border-color: #4ade80;
    background: #1c1c24;
}
html.theme-dark .sidebar-login-options {
    color: #94a3b8;
}
html.theme-dark .auth-help-link {
    color: #94a3b8;
}
html.theme-dark .auth-help-link:hover {
    color: #4ade80;
}
html.theme-dark .auth-help-divider {
    color: #3b3b4a;
}
html.theme-dark .sidebar-sns-divider::before {
    background: #2a2a36;
}
html.theme-dark .sidebar-sns-divider span {
    background: #18181d;
    color: #64748b;
}
html.theme-dark .sidebar-guest-support {
    border-top-color: #2a2a36;
}
html.theme-dark .guest-support-link {
    color: #94a3b8;
}

/* Sidebar Partner Hub Dark Mode Overrides */
html.theme-dark .partner-status-card {
    background: #1c1c24;
    border-color: #2a2a36;
}
html.theme-dark .partner-status-card.card-active {
    background: #13241b;
    border-color: #1e4a30;
}
html.theme-dark .partner-status-card.card-expired {
    background: #2b171a;
    border-color: #4a2228;
}
html.theme-dark .p-status-badge {
    color: #94a3b8;
}
html.theme-dark .p-status-val {
    color: #f1f5f9;
}
html.theme-dark .p-status-warning {
    border-top-color: #4a2228;
    color: #fb7185;
}

html.theme-dark .partner-action-card {
    background: #1c1c24;
    border-color: #2a2a36;
}
html.theme-dark .partner-action-card:active {
    background: #252530;
}
html.theme-dark .partner-action-card.card-pay {
    background: #162438;
    border-color: #1e3a5f;
}
html.theme-dark .partner-action-card.card-pay:active {
    background: #1e3555;
}
html.theme-dark .partner-action-card.card-confirm {
    background: #13271c;
    border-color: #1a442b;
}
html.theme-dark .partner-action-card.card-confirm:active {
    background: #193826;
}
html.theme-dark .action-card-title {
    color: #f1f5f9;
}
html.theme-dark .action-card-sub {
    color: #94a3b8;
}

html.theme-dark .p-trio-item {
    background: #1c1c24;
    border-color: #2a2a36;
}
html.theme-dark .p-trio-item:active {
    background: #252530;
}
html.theme-dark .p-trio-icon {
    color: #cbd5e1;
}
html.theme-dark .p-trio-label {
    color: #cbd5e1;
}

html.theme-dark .partner-tools-section {
    background: #1c1c24;
    border-color: #2a2a36;
}
html.theme-dark .partner-section-title {
    background: #17171e;
    border-bottom-color: #242430;
    color: #64748b;
}
html.theme-dark .partner-tool-item {
    border-bottom-color: #242430;
    color: #cbd5e1;
}
html.theme-dark .partner-tool-item:active {
    background: #242430;
    color: #4ade80;
}
html.theme-dark .tool-icon-wrap {
    color: #94a3b8;
}
html.theme-dark .tool-arrow {
    color: #475569;
}
html.theme-dark .tool-badge {
    background: #3b1d11;
    border-color: #5c2d1b;
    color: #fb923c;
}

html.theme-dark .partner-telegram-card {
    background: #1c1c24;
    border-color: #2a2a36;
}
html.theme-dark .p-telegram-header {
    color: #38bdf8;
}
html.theme-dark .p-telegram-body .side_menu_company {
    color: #cbd5e1;
}

html.theme-dark .partner-search-box {
    background: #1c1c24;
    border-color: #2a2a36;
}
html.theme-dark .p-search-title {
    color: #94a3b8;
}
html.theme-dark .p-search-input {
    background: #141418;
    border-color: #2a2a36;
    color: #f1f5f9;
}
html.theme-dark .p-search-input:focus {
    border-color: #4ade80;
    background: #1c1c24;
}
html.theme-dark .p-search-btn {
    color: #94a3b8;
}
html.theme-dark .p-search-btn:active {
    background: #252530;
    color: #f1f5f9;
}




