/* Torach Global – theme + user portal shell (loads after style.css) */
[data-theme="dark"]{
  color-scheme:dark;
  --white:#111d28; --dark:#e8eef3; --light:#0c161f; --muted:#9bacb9; --border:#243545;
  --primary:#2bb589; --primary-dark:#38c99b; --secondary:#5aa9e6; --on-primary:#06231a; --primary-soft:#16372d; --primary-tint:#0f2a24; --secondary-tint:#102236; --primary-ring:#1d5c49; --footer-bg:#0a1a24; --shadow:0 8px 28px rgba(0,0,0,.35);
}
[data-theme="dark"] body{background:var(--light)}
[data-theme="dark"] .btn-primary,[data-theme="dark"] .btn-primary:hover,[data-theme="dark"] .brand-mark,[data-theme="dark"] .wizard-step.active{color:var(--on-primary)}
[data-theme="dark"] .menu-toggle{color:var(--toggle-on,var(--on-primary))}
[data-theme="dark"] .btn-primary:hover{background:#4fd9ae}
[data-theme="dark"] .btn-outline,[data-theme="dark"] .btn-light{background:transparent}
[data-theme="dark"] .hero,[data-theme="dark"] .cta,[data-theme="dark"] .page-banner{background:linear-gradient(120deg,var(--primary-tint),var(--secondary-tint))}
[data-theme="dark"] .eyebrow,[data-theme="dark"] .icon-box{background:var(--primary-soft)}
[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea{background:#0c161f;color:var(--dark);border-color:#2f4458}
[data-theme="dark"] input:focus,[data-theme="dark"] select:focus,[data-theme="dark"] textarea:focus{outline-color:var(--primary-ring)}
[data-theme="dark"] th{background:#162533}
[data-theme="dark"] .wizard-step{background:#1a2b3a}
[data-theme="dark"] .notice{background:#10304a;color:#b9dcf7}
[data-theme="dark"] .badge-success{background:#123d2b;color:#7be0b0}
[data-theme="dark"] .badge-warning{background:#40330c;color:#f2c75c}
[data-theme="dark"] .badge-danger{background:#451a17;color:#ff9d94}
[data-theme="dark"] .badge-info{background:#10304a;color:#9ccdf5}
[data-theme="dark"] .dashboard-sidebar a:hover,[data-theme="dark"] .dashboard-sidebar a.active{background:var(--primary-soft)}
[data-theme="dark"] hr{border-color:var(--border)!important}
[data-theme="dark"] img{filter:brightness(.92)}
body,.card,.site-header,.dashboard-sidebar,input,select,textarea{transition:background-color .2s,color .2s,border-color .2s}

/* Icon buttons */
.icon-btn{position:relative;width:42px;height:42px;display:grid;place-items:center;border-radius:11px;border:1px solid var(--border);background:var(--white);color:var(--dark);cursor:pointer;font-size:16px}
.icon-btn:hover{border-color:var(--primary);color:var(--primary)}
.icon-btn:focus-visible,.user-btn:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.theme-toggle .fa-sun{display:none}
[data-theme="dark"] .theme-toggle .fa-sun{display:inline}
[data-theme="dark"] .theme-toggle .fa-moon{display:none}
.bell-badge{position:absolute;top:-6px;right:-6px;min-width:19px;height:19px;padding:0 5px;border-radius:20px;background:var(--danger);color:#fff;font-size:11px;font-weight:800;display:grid;place-items:center;border:2px solid var(--white)}
.bell-badge[hidden]{display:none}

/* App top bar */
.app-topbar{background:var(--white);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:120}
.app-topbar .inner{height:68px;padding:0 22px;display:flex;align-items:center;gap:12px}
.app-topbar .spacer{flex:1}
.app-topbar .brand{flex:0 1 auto;font-size:18px}
.app-topbar .icon-btn,.app-topbar .user-btn,.app-topbar .sidebar-toggle{flex:none}
.top-link{font-size:14px;font-weight:600;color:var(--dark);padding:0 8px}
.sidebar-toggle{display:none}
.dropdown{position:relative}
.dropdown-panel{position:absolute;right:0;top:calc(100% + 10px);background:var(--white);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);display:none;z-index:200}
.dropdown.open .dropdown-panel{display:block}

/* Notification bell panel */
.notif-panel{width:370px;max-width:calc(100vw - 24px);overflow:hidden}
.notif-head,.notif-foot{display:flex;justify-content:space-between;align-items:center;padding:14px 16px}
.notif-head{border-bottom:1px solid var(--border)}
.notif-head strong{font-size:15px}
.link-btn{background:none;border:0;color:var(--primary);font-weight:700;font-size:13px;cursor:pointer;padding:0}
.notif-list{max-height:340px;overflow-y:auto}
.notif-item{display:flex;gap:12px;padding:13px 16px;border-bottom:1px solid var(--border);color:var(--dark)}
.notif-item:hover{background:var(--light);color:var(--dark)}
.notif-item .ni-icon{flex:none;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary)}
[data-theme="dark"] .notif-item .ni-icon{background:var(--primary-soft)}
.notif-item b{display:block;font-size:14px;line-height:1.35}
.notif-item small{color:var(--muted);font-size:12px}
.notif-item.unread{background:var(--primary-tint)}
.notif-item.unread b::after{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--primary);margin-left:7px}
.notif-empty{padding:28px 16px;text-align:center;color:var(--muted);font-size:14px;display:none}
.notif-foot{justify-content:center;border-top:1px solid var(--border);font-weight:700;font-size:14px}

/* User menu */
.user-btn{display:flex;align-items:center;gap:10px;background:none;border:1px solid var(--border);border-radius:30px;padding:4px 12px 4px 4px;cursor:pointer;color:var(--dark);font-weight:700;font-size:14px}
.avatar{width:34px;height:34px;border-radius:50%;background:var(--primary);color:var(--on-primary);overflow:hidden;flex:none;display:grid;place-items:center;font-size:13px;font-weight:800}
.user-panel{width:230px;padding:8px}
.user-panel .who{padding:10px 12px;border-bottom:1px solid var(--border);margin-bottom:6px}
.user-panel .who b{display:block;font-size:14px}.user-panel .who small{color:var(--muted)}
.user-panel a{display:flex;gap:10px;align-items:center;padding:10px 12px;border-radius:8px;color:var(--dark);font-size:14px;font-weight:600}
.user-panel a:hover{background:var(--light);color:var(--primary)}

/* Sidebar polish */
.dashboard-layout{min-height:calc(100vh - 69px)}
.dashboard-sidebar{position:sticky;top:69px;align-self:start;height:calc(100vh - 69px);overflow-y:auto}
.dashboard-sidebar nav a{display:flex;align-items:center;gap:11px;font-size:14px;font-weight:600}
.dashboard-sidebar nav a i{width:18px;text-align:center;opacity:.85}
.dashboard-sidebar .nav-label{display:block;margin:18px 13px 6px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.8px;color:var(--muted)}
.dashboard-sidebar .nav-label:first-child{margin-top:0}
.nav-count{margin-left:auto;background:var(--danger);color:#fff;font-size:11px;border-radius:20px;padding:1px 7px}
.nav-count[hidden]{display:none}
.sidebar-overlay{display:none}
.notification-item[data-read="unread"]{border-left:4px solid var(--primary)}

@media (max-width:900px){
  .sidebar-toggle{display:grid}
  .dashboard-layout{grid-template-columns:1fr}
  .dashboard-sidebar{position:fixed;left:0;top:69px;width:280px;z-index:150;transform:translateX(-102%);transition:transform .25s;border-right:1px solid var(--border);border-bottom:0;box-shadow:var(--shadow)}
  .dashboard-sidebar nav{display:block}
  body.sidebar-open .dashboard-sidebar{transform:none}
  body.sidebar-open .sidebar-overlay{display:block;position:fixed;inset:69px 0 0 0;background:rgba(0,0,0,.45);z-index:140}
  .user-btn .uname,.top-link{display:none}
  .user-btn{padding:4px}
}
@media (max-width:480px){.app-topbar .inner{padding:0 12px;gap:8px}.app-topbar .brand{font-size:16px}.brand-logo{height:32px;max-width:100px}.icon-btn{width:38px;height:38px}.notif-panel{position:fixed;right:12px;left:12px;width:auto;top:72px}}

/* Password eye toggle */
.pw-wrap{position:relative;display:block}
.pw-wrap input{padding-right:46px;width:100%}
.pw-eye{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;background:none;color:var(--muted);cursor:pointer;border-radius:8px;font-size:15px}
.pw-eye:hover,.pw-eye:focus-visible{color:var(--primary);outline:none;background:rgba(127,127,127,.12)}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
@media(max-width:700px){.grid-2{grid-template-columns:1fr}}
.brand-logo{height:38px;width:auto;max-width:150px;border-radius:8px;object-fit:contain;flex:none}
.avatar img{width:100%;height:100%;object-fit:cover;display:block;filter:none!important}
.photo-card{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.photo-card .avatar{width:88px;height:88px;font-size:28px}
.photo-card form{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
#side .brand-logo{background:#fff;padding:3px;height:44px}

@media (max-width:370px){.app-topbar .brand-text{display:none}}

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
