/*
 * ╔══════════════════════════════════════════════════════════════╗
 * ║   IDCare Pro — Theme Variables & Global Sidebar/Topbar CSS  ║
 * ║   সব পেজ থেকে এই ফাইল include করতে হবে                    ║
 * ║   <?php echo get_stylesheet_directory_uri(); ?>/theme-variables.css
 * ╚══════════════════════════════════════════════════════════════╝
 */

/* ══ DESIGN TOKENS — ID CARE PRO Green Theme ══ */
:root {
    --font-bn:          'SolaimanLipi', 'Tiro Bangla', Arial, sans-serif;

    /* ── Core Colors ── */
    --bg-body:          #e8f0e0;
    --bg-sidebar:       #004d18;
    --bg-sidebar-deep:  #003d12;
    --bg-sidebar-mid:   #005519;
    --bg-topbar:        #004d18;
    --bg-card:          #006622;
    --bg-card-alt:      #007a28;
    --bg-card-inner:    #005519;

    /* ── Accent Colors ── */
    --accent-green:     #4caf50;
    --accent-green-lt:  #81c784;
    --accent-gold:      #f5c518;
    --accent-rose:      #ef5350;
    --accent-purple:    #ce93d8;

    /* ── Text ── */
    --text-primary:     #ffffff;
    --text-secondary:   rgba(255,255,255,0.90);
    --text-muted:       rgba(255,255,255,0.60);
    --text-submenu:     rgba(200,240,210,0.85);

    /* ── Borders ── */
    --border-card:      rgba(255,255,255,0.20);
    --border-green:     rgba(76,175,80,0.30);
    --border-gold:      rgba(245,197,24,0.35);

    /* ── Shadows & Glow ── */
    --shadow-card:      0 4px 20px rgba(0,0,0,0.30);
    --shadow-hover:     0 8px 32px rgba(0,0,0,0.40);
    --glow-green:       0 0 20px rgba(76,175,80,0.30);
    --glow-gold:        0 0 20px rgba(245,197,24,0.25);

    /* ── Transitions ── */
    --transition:       all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ══ BODY ══ */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: var(--font-bn) !important;
    background: var(--bg-body) !important;
    overflow-x: hidden;
}

/* ══ SIDEBAR ══ */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--bg-sidebar-deep), var(--bg-sidebar), var(--bg-sidebar-mid)) !important;
    height: 100vh; position: fixed; top: 0; left: 0; z-index: 1000;
    overflow-y: auto; transition: var(--transition);
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--accent-green); border-radius: 4px; }
.logo-container {
    padding: 15px; text-align: center;
    border-bottom: 1px solid var(--border-green);
}
.logo-container img { max-width: 140px; height: auto; }

/* ══ SIDEBAR NAV LINKS ══ */
.sidebar_nav { list-style: none; padding: 10px 0; }
.sidebar_nav .menuheader {
    color: var(--text-muted); font-size: 11px;
    padding: 14px 15px 6px; text-transform: uppercase;
    letter-spacing: 1px; display: flex; align-items: center; gap: 6px; margin-top: 6px;
}
.menuheader.cat-auto  { color: var(--accent-green-lt); border-bottom: 1px solid rgba(129,199,132,0.25); }
.menuheader.cat-order { color: var(--accent-gold);     border-bottom: 1px solid rgba(245,197,24,0.25); }
.menuheader.cat-account { color: rgba(255,255,255,0.65); border-bottom: 1px solid rgba(255,255,255,0.15); }

.sidebar_nav a, .sidebar a {
    display: block; padding: 10px 15px;
    color: var(--text-primary) !important; text-decoration: none;
    font-family: var(--font-bn) !important; font-size: 15px;
    transition: var(--transition); border-left: 3px solid transparent;
}
.sidebar_nav a:hover, .sidebar a:hover {
    background: rgba(76,175,80,0.25) !important;
    padding-left: 20px; color: #fff !important;
}
.sidebar_nav a.active, .sidebar a.active {
    background: linear-gradient(90deg, rgba(76,175,80,0.35), transparent) !important;
    font-weight: bold; border-left: 3px solid var(--accent-gold) !important;
    border-radius: 0 !important; margin: 0 !important;
}
.sidebar .fa-solid { color: var(--accent-green-lt) !important; font-size: 14px; width: 20px; text-align: center; }

/* ══ DROPDOWN ACCORDION ══ */
.dropdown-item-wrap { position: relative; }
.dropdown-toggle-btn {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 15px; color: var(--text-primary); font-family: var(--font-bn) !important;
    font-size: 15px; cursor: pointer; margin: 2px 8px; border-radius: 8px;
    user-select: none; transition: 0.2s;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border-green);
}
.dropdown-toggle-btn:hover { background: rgba(76,175,80,0.20); border-color: rgba(76,175,80,0.45); }
.dropdown-toggle-btn .menu-left { display: flex; align-items: center; gap: 8px; }
.dropdown-menu-custom {
    background: rgba(0,30,10,0.55); list-style: none; padding: 4px 0;
    display: none; border-left: 2px solid var(--border-green); margin: 0 0 0 20px;
}
.dropdown-menu-custom.open { display: block; animation: idcareSlideDown 0.2s ease; }
@keyframes idcareSlideDown { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
.dropdown-menu-custom li a { padding: 9px 15px 9px 20px; font-size: 14px; color: var(--text-submenu) !important; border-left: 0; }
.dropdown-menu-custom li a:hover { padding-left: 25px; color: #fff !important; background: rgba(76,175,80,0.25); }
.dropdown-menu-custom li a.active { background: rgba(76,175,80,0.25); color: #fff !important; border-left: 0; font-weight: bold; }
.dropdown-arrow { transition: transform 0.3s; font-size: 10px; flex-shrink: 0; }
.dropdown-item-wrap.open .dropdown-arrow { transform: rotate(180deg); }
.dropdown-item-wrap.open > .dropdown-toggle-btn { background: rgba(76,175,80,0.22); border-color: rgba(76,175,80,0.45); }

/* ══ TOPBAR ══ */
.topbar {
    margin-left: 260px;
    background: var(--bg-topbar) !important;
    color: var(--text-primary); padding: 8px 15px;
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 999;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--border-card);
    transition: margin-left 0.3s ease;
}
.toggle-btn {
    background: none; border: none; color: var(--text-primary);
    font-size: 22px; cursor: pointer; width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: 0.2s;
}
.toggle-btn:hover { background: rgba(76,175,80,0.25); }
.topbar-user { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.user-name { font-size: 16px; font-weight: bold; margin: 0; color: var(--text-primary); text-transform: uppercase; }
.topbar .icons { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ══ BALANCE PILL ══ */
#balanceGroup {
    cursor: pointer; display: flex; align-items: center;
    border-radius: 14px; overflow: hidden;
    border: 1px solid var(--border-gold) !important;
    background: linear-gradient(135deg, rgba(245,197,24,0.15), rgba(245,197,24,0.05)) !important;
    box-shadow: var(--glow-gold); transition: var(--transition);
    flex-shrink: 0; max-width: 220px; backdrop-filter: blur(10px);
}
#balanceGroup:hover {
    transform: translateY(-2px);
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 30px rgba(245,197,24,0.35) !important;
    background: linear-gradient(135deg, rgba(245,197,24,0.25), rgba(245,197,24,0.10)) !important;
}
.bal-label, #balanceGroup .bal-label {
    background: linear-gradient(135deg, rgba(245,197,24,0.30), rgba(245,197,24,0.15)) !important;
    color: var(--accent-gold) !important;
    padding: 6px 10px; font-weight: 700; font-size: 14px;
    display: flex; align-items: center; gap: 5px; white-space: nowrap;
    border-right: 1px solid rgba(245,197,24,0.25);
}
.bal-label i { color: var(--accent-gold) !important; }
#balanceBtn {
    background: transparent !important; border: none; color: var(--text-primary) !important;
    padding: 6px 10px; cursor: pointer; font-size: 14px; font-weight: bold;
    min-width: 80px; text-align: center; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    font-family: var(--font-bn) !important;
}

/* ══ NOTICE BAR ══ */
.welcome {
    margin-left: 260px;
    background: var(--bg-sidebar-mid) !important;
    color: var(--text-primary); padding: 6px 0;
    overflow: hidden; white-space: nowrap;
    transition: margin-left 0.3s ease;
    border-bottom: 1px solid var(--border-green);
}
.notice-track { display: inline-block; white-space: nowrap; padding-left: 100%; animation: idcareNoticeMove 50s linear infinite; font-size: 15px; }
.notice-track span { display: inline-block; padding-right: 60px; }
@keyframes idcareNoticeMove { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ══ LAYOUT ══ */
.main-content, .main-wrapper { margin-left: 260px; padding: 20px; min-height: 100vh; transition: margin-left 0.3s ease; }
.overlay-bg { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }
.overlay-bg.show { display: block; }
body.sidebar-hidden .sidebar { left: -260px; }
body.sidebar-hidden .topbar, body.sidebar-hidden .welcome,
body.sidebar-hidden .main-content, body.sidebar-hidden .main-wrapper { margin-left: 0 !important; }

/* ══ LOADER ══ */
.loader-overlay { display: none; position: fixed; inset: 0; background: rgba(232,240,224,0.90); z-index: 9999; justify-content: center; align-items: center; flex-direction: column; gap: 12px; }
.loader-overlay.show { display: flex; }
.spinner { width: 50px; height: 50px; border: 5px solid rgba(0,102,34,0.20); border-top-color: var(--bg-card); border-radius: 50%; animation: idcareSpin 0.8s linear infinite; }
@keyframes idcareSpin { to { transform: rotate(360deg); } }

/* ══ BELL BUTTON ══ */
#idcareBellBtn {
    position: relative; background: rgba(255,255,255,0.10);
    border: 1.5px solid rgba(255,255,255,0.18);
    color: var(--text-primary); font-size: 18px; cursor: pointer;
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background 0.2s;
}
#idcareBellBtn:hover { background: rgba(76,175,80,0.30); }
#idcareNotifBadge {
    display: none; position: absolute; top: -5px; right: -5px;
    background: #e53935; color: #fff; font-size: 10px; font-weight: 900;
    min-width: 18px; height: 18px; border-radius: 50%;
    align-items: center; justify-content: center;
    border: 2px solid var(--bg-topbar); line-height: 1; padding: 0 3px;
    animation: idcarePulseBadge 1.8s infinite;
}
#idcareNotifBadge.show { display: flex; }
@keyframes idcarePulseBadge { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* ══ VIP BADGE ══ */
.lock-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; padding: 2px 6px; border-radius: 10px; margin-left: 6px; background: #c40000; color: #fff; animation: idcarePulseLock 2s ease-in-out infinite; }
.unlock-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; padding: 2px 6px; border-radius: 10px; margin-left: 6px; background: var(--bg-card); color: #fff; }
@keyframes idcarePulseLock { 0%,100%{opacity:1;} 50%{opacity:0.6;} }

/* ══ VIP LOCK OVERLAY ══ */
.balance-lock-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.75); backdrop-filter:blur(6px); z-index:999999; justify-content:center; align-items:center; padding:15px; }
.balance-lock-overlay.show { display:flex; }
.balance-lock-box {
    background: linear-gradient(135deg, var(--bg-sidebar-deep), var(--bg-sidebar));
    border: 2px solid rgba(245,197,24,0.50); border-radius: 20px;
    padding: 36px 28px; max-width: 420px; width: 100%; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5); animation: idcarePopIn 0.3s ease;
}
.balance-lock-box h3 { color: var(--accent-gold); font-size: 1.2rem; margin-bottom: 14px; line-height: 1.6; }
.balance-lock-box p { color: rgba(232,240,224,0.85); font-size: 0.92rem; line-height: 1.9; margin-bottom: 22px; }
.balance-lock-box .lock-btns { display:flex; gap:12px; justify-content:center; }
.lock-btn-close { flex:1; padding:12px; background:rgba(255,255,255,0.08); color:#fff; border:1px solid rgba(255,255,255,0.15); border-radius:10px; font-size:16px; font-weight:bold; cursor:pointer; transition: 0.2s; font-family: var(--font-bn) !important; }
.lock-btn-close:hover { background: rgba(255,255,255,0.15); }
.lock-btn-recharge { flex:1; padding:12px; background:linear-gradient(135deg, var(--accent-gold), #e6b800); color: var(--bg-sidebar-deep); border:none; border-radius:10px; font-size:16px; font-weight:bold; cursor:pointer; transition: 0.2s; font-family: var(--font-bn) !important; }
.lock-btn-recharge:hover { opacity: 0.9; transform: translateY(-1px); }
@keyframes idcarePopIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ══ NOTIFICATION PANEL ══ */
.notif-panel { position: fixed; top: 64px; right: 12px; z-index: 99999; width: 340px; max-width: 96vw; background: #fff; border-radius: 16px; box-shadow: 0 12px 48px rgba(0,77,24,.22); border: 1px solid rgba(0,77,24,.08); overflow: hidden; display: none; }
.notif-panel.show { display: block; animation: idcareNotifIn .22s ease; }
@keyframes idcareNotifIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px 10px; border-bottom: 1px solid rgba(0,77,24,.12); background: linear-gradient(90deg, var(--bg-topbar), var(--bg-card)); }
.notif-head h4 { margin:0; font-size:14px; font-weight:900; color:#fff; }
.notif-mark-all { font-size: 11px; color: var(--accent-gold); font-weight:700; background: none; border: none; cursor: pointer; padding: 0; }
.notif-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid rgba(0,77,24,.04); cursor: pointer; transition: background .15s; }
.notif-item.unread { background: #eef6ec; }
.notif-item:hover { background: #e3f0e0; }

/* ══ RESPONSIVE ══ */
@media (max-width: 992px) {
    .sidebar { left: -260px; box-shadow: 6px 0 30px rgba(0,0,0,0.5); }
    .sidebar.open { left: 0; }
    .topbar, .welcome, .main-content, .main-wrapper { margin-left: 0 !important; }
}
@media (max-width: 768px) {
    .user-name { display: none !important; }
    .topbar { flex-wrap: nowrap; padding: 6px 10px; }
    #balanceBtn { min-width: 50px; font-size: 12px; }
}
