
/* ─── DESIGN TOKENS ─────────────────────────────── */
:root {
  /* Surfaces */
  --bg:         #f2f2f7;
  --bg2:        #e5e5ea;
  --surface:    #ffffff;
  --surface2:   #f8f8fc;
  --surface3:   #f0f0f6;
  --glass:      rgba(255,255,255,0.72);
  --glass2:     rgba(255,255,255,0.5);

  /* Borders */
  --border:     rgba(0,0,0,0.06);
  --border2:    rgba(0,0,0,0.10);
  --border3:    rgba(0,0,0,0.14);

  /* Brand palette */
  --blue:       #0066CC;
  --blue-light: #3395ff;
  --blue-t:     rgba(0,102,204,0.09);
  --blue-t2:    rgba(0,102,204,0.16);
  --green:      #1DB954;
  --green-t:    rgba(29,185,84,0.12);
  --orange:     #F57C00;
  --red:        #E53935;
  --purple:     #7C3AED;
  --indigo:     #4338CA;
  --teal:       #0891B2;
  --rose:       #E11D48;

  /* Text */
  --text1:      #111318;
  --text2:      #2c2c35;
  --text3:      #72727a;
  --text4:      #b0b0bb;

  /* Layout */
  --sidebar-w:  272px;
  --topbar-h:   68px;
  --mob-nav-h:  76px;
  --mob-top-h:  60px;
  --safe-b:     env(safe-area-inset-bottom, 0px);

  /* Refined shadows */
  --sh-xs: 0 1px 2px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.04);
  --sh-sm: 0 1px 3px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.06);
  --sh-md: 0 2px 8px rgba(0,0,0,0.06), 0 10px 28px rgba(0,0,0,0.08);
  --sh-lg: 0 6px 24px rgba(0,0,0,0.08), 0 24px 56px rgba(0,0,0,0.10);
  --sh-xl: 0 12px 40px rgba(0,0,0,0.10), 0 40px 80px rgba(0,0,0,0.12);
  --sh-blue: 0 4px 16px rgba(0,102,204,0.24), 0 1px 4px rgba(0,102,204,0.14);

  /* Typography */
  --font:       'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono:  'DM Mono', 'Menlo', monospace;

  /* Motion */
  --spring: cubic-bezier(0.34,1.56,0.64,1);
  --smooth: cubic-bezier(0.25,0.46,0.45,0.94);
  --ease:   cubic-bezier(0.4,0,0.2,1);
  --snappy: cubic-bezier(0.16,1,0.3,1);
}

[data-theme="dark"] {
  --bg:       #0a0a0f;
  --bg2:      #141419;
  --surface:  #18181f;
  --surface2: #1f1f28;
  --surface3: #262633;
  --glass:    rgba(24,24,31,0.82);
  --glass2:   rgba(24,24,31,0.6);
  --border:   rgba(255,255,255,0.055);
  --border2:  rgba(255,255,255,0.09);
  --border3:  rgba(255,255,255,0.13);
  --blue:       #4DA6FF;
  --blue-light: #74bbff;
  --blue-t:   rgba(77,166,255,0.10);
  --blue-t2:  rgba(77,166,255,0.18);
  --green:    #34D399;
  --green-t:  rgba(52,211,153,0.12);
  --text1:    #f4f4f8;
  --text2:    #c8c8d4;
  --text3:    #64647a;
  --text4:    #3a3a4a;
  --sh-xs: 0 1px 2px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.3);
  --sh-sm: 0 1px 3px rgba(0,0,0,0.4), 0 4px 14px rgba(0,0,0,0.35);
  --sh-md: 0 2px 8px rgba(0,0,0,0.45), 0 10px 28px rgba(0,0,0,0.4);
  --sh-lg: 0 6px 24px rgba(0,0,0,0.5), 0 24px 56px rgba(0,0,0,0.45);
  --sh-blue: 0 4px 16px rgba(77,166,255,0.22), 0 1px 4px rgba(77,166,255,0.12);
}

/* ─── RESET ─────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent }
html { font-size:16px; scroll-behavior:smooth; height:100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text1);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
button { font-family:var(--font); cursor:pointer; border:none; background:none; -webkit-appearance:none; }
input { font-family:var(--font); -webkit-appearance:none; }
a { color:inherit; text-decoration:none; cursor:pointer; }
* { transition: background-color .22s var(--ease), border-color .22s var(--ease), color .18s var(--ease), box-shadow .22s var(--ease), opacity .18s var(--ease); }
svg, svg * { transition: none !important; }
::-webkit-scrollbar { width:0; height:0; }

/* Clickable cards with links */
.clickable-card {
  cursor: pointer;
  position: relative;
  transition: all 0.2s var(--ease);
}

.clickable-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

.clickable-card:active {
  opacity: 0.7;
  transform: translateY(0);
}

.card-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  opacity: 0;
  cursor: pointer;
}

/* Logout button styles */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.logout-btn:hover {
  background: var(--surface3);
  color: var(--red);
  border-color: var(--red);
}

.logout-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mobile logout button styles */
.mob-logout-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.2s var(--ease);
}

.mob-logout-btn:hover {
  background: var(--surface3);
  color: var(--red);
  border-color: var(--red);
}

.mob-logout-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Link styles for nav items */
.sb-item {
  position: relative;
}

.nav-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  opacity: 0;
}

/* ─── SHELL ─────────────────────────────────────── */
.shell { display:flex; min-height:100dvh; width:100%; }

/* ═══════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════ */
.sidebar {
  display: none;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  flex-direction: column;
  position: fixed; top:0; left:0; bottom:0;
  z-index: 300;
  flex-shrink: 0;
  overflow-y: auto;
}
@media(min-width:900px) { .sidebar { display:flex; } }

/* Logo area */
.sb-logo {
  display: flex; align-items: center; gap:12px;
  padding: 28px 22px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  position: relative;
}
.sb-logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(145deg, var(--blue), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-blue);
  flex-shrink: 0;
}
.sb-logo-mark svg { width:20px; height:20px; stroke:#fff; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.sb-logo-wordmark { font-family: var(--font-serif); font-size:22px; color:var(--text1); line-height:1; }
.sb-logo-sub { font-size:10px; font-weight:600; color:var(--text4); letter-spacing:.08em; text-transform:uppercase; margin-top:2px; }

/* Section labels */
.sb-sec-lbl {
  font-size:10px; font-weight:700; color:var(--text4);
  text-transform:uppercase; letter-spacing:.12em;
  padding: 20px 22px 8px;
}

/* Nav items */
.sb-nav { display:flex; flex-direction:column; gap:2px; padding:0 12px; }
.sb-item {
  display:flex; align-items:center; gap:12px;
  padding:9px 12px; border-radius:12px;
  font-size:14px; font-weight:600; color:var(--text3);
  cursor:pointer; position:relative;
}
.sb-item:hover { background:var(--surface2); color:var(--text2); }
.sb-item.active { background:var(--blue-t); color:var(--blue); }
.sb-ico {
  width:34px; height:34px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  background:var(--surface3); flex-shrink:0;
}
.sb-ico svg { width:16px; height:16px; stroke:var(--text3); fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.sb-item.active .sb-ico { background:var(--blue-t2); }
.sb-item.active .sb-ico svg { stroke:var(--blue); }
.sb-item:hover .sb-ico { background:var(--bg2); }
.sb-item:hover .sb-ico svg { stroke:var(--text2); }
.sb-badge {
  margin-left:auto;
  background: var(--red); color:#fff;
  font-size:10px; font-weight:800;
  min-width:18px; height:18px; padding:0 5px;
  border-radius:9px;
  display:flex; align-items:center; justify-content:center;
}
.sb-item.active .sb-badge { background:var(--blue); }

/* User section */
.sb-bottom {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.sb-item-theme { display:flex; align-items:center; gap:12px; padding:9px 12px; border-radius:12px; font-size:14px; font-weight:600; color:var(--text3); cursor:pointer; margin-bottom:2px; position: relative; }
.sb-item-theme:hover { background:var(--surface2); color:var(--text2); }
.sb-item-theme .sb-ico { background:var(--surface3); }
.sb-item-theme:hover .sb-ico { background:var(--bg2); }
.sb-user {
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px; border-radius:12px; cursor:pointer;
  margin-bottom: 8px;
  position: relative;
}
.sb-user:hover { background:var(--surface2); }
.sb-avt {
  width:36px; height:36px; border-radius:50%;
  background: linear-gradient(135deg,var(--blue),var(--purple));
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  font-size:14px; font-weight:800; color:#fff;
}
.sb-uname { font-size:13.5px; font-weight:700; color:var(--text1); }
.sb-urole { font-size:11px; font-weight:500; color:var(--text3); margin-top:1px; }
.sb-umore { margin-left:auto; }
.sb-umore svg { width:14px; height:14px; stroke:var(--text4); fill:none; stroke-width:2; }

/* Logout button in sidebar */
.sb-logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text3);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}

.sb-logout-btn:hover {
  background: var(--surface3);
  color: var(--red);
  border-color: var(--red);
}

.sb-logout-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ═══════════════════════════════════════════════════
   MAIN WRAPPER
══════════════════════════════════════════════════ */
.main {
  flex:1; min-width:0;
  display:flex; flex-direction:column;
  padding-bottom: calc(var(--mob-nav-h) + var(--safe-b));
}
@media(min-width:900px) { .main { margin-left:var(--sidebar-w); padding-bottom:0; } }

/* ═══════════════════════════════════════════════════
   DESKTOP TOPBAR
══════════════════════════════════════════════════ */
.topbar {
  display: none;
  height: var(--topbar-h);
  background: var(--glass);
  backdrop-filter: saturate(200%) blur(28px);
  -webkit-backdrop-filter: saturate(200%) blur(28px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  align-items: center; gap:16px;
  position: sticky; top:0; z-index:100;
}
[data-theme="dark"] .topbar { background: var(--glass); }
@media(min-width:900px) { .topbar { display:flex; } }

.topbar-info { flex:1; }
.topbar-title { font-size:19px; font-weight:700; color:var(--text1); letter-spacing:-.4px; }
.topbar-sub { font-size:12.5px; font-weight:500; color:var(--text3); margin-top:1px; }

.search-wrap { position:relative; width:260px; }
.search-wrap svg { position:absolute; left:12px; top:50%; transform:translateY(-50%); width:15px; height:15px; stroke:var(--text3); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.search-inp {
  width:100%; height:40px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 0 14px 0 36px;
  font-size:13.5px; font-weight:500; color:var(--text1);
  outline: none;
}
.search-inp::placeholder { color:var(--text4); }
.search-inp:focus { border-color:var(--blue); box-shadow:0 0 0 3px var(--blue-t); background:var(--surface); }

.tb-actions { display:flex; align-items:center; gap:8px; }
.tb-btn {
  width:40px; height:40px; border-radius:12px;
  background: var(--surface2); border:1px solid var(--border2);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; position:relative;
}
.tb-btn:hover { background:var(--bg2); }
.tb-btn svg { width:17px; height:17px; stroke:var(--text2); fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.tb-pip {
  position:absolute; top:7px; right:7px;
  width:7px; height:7px; border-radius:50%;
  background:var(--red);
  border:1.5px solid var(--surface2);
}

/* ═══════════════════════════════════════════════════
   MOBILE TOPBAR (MODIFIED)
══════════════════════════════════════════════════ */
.mob-topbar {
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--mob-top-h) + env(safe-area-inset-top, 0px));
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-left: 20px;
  padding-right: 20px;
  gap: 10px;
  position: sticky; top:0; z-index:100;
}
@media(min-width:900px) { .mob-topbar { display:none; } }

.mob-brand { 
  font-family: var(--font-serif); 
  font-size: 22px; 
  color: var(--text1); 
  flex: 1; 
  line-height: 1; 
  position: relative; 
  padding: 8px 0;
}

.mob-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mob-tb-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.2s var(--ease);
}

.mob-tb-btn:hover {
  background: var(--surface3);
}

.mob-tb-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mob-pip {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--surface2);
}

/* ═══════════════════════════════════════════════════
   MOBILE BOTTOM NAV
══════════════════════════════════════════════════ */
.mob-nav {
  display: flex;
  position: fixed; bottom:0; left:0; right:0;
  height: calc(var(--mob-nav-h) + var(--safe-b));
  background: var(--glass);
  backdrop-filter: saturate(200%) blur(32px);
  -webkit-backdrop-filter: saturate(200%) blur(32px);
  border-top: 1px solid var(--border2);
  align-items: flex-start;
  padding-top: 10px;
  padding-bottom: var(--safe-b);
  z-index: 200;
}
@media(min-width:900px) { .mob-nav { display:none; } }

.mob-nav-inner { display:flex; width:100%; justify-content:space-around; align-items:flex-start; padding:0 8px; }
.mob-nav-btn {
  display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:6px 14px; border-radius:12px;
  position:relative; flex:1; max-width:80px;
  cursor: pointer;
}
.mob-nav-ico { width:28px; height:28px; display:flex; align-items:center; justify-content:center; }
.mob-nav-ico svg { width:24px; height:24px; stroke:var(--text4); fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.mob-nav-btn.active .mob-nav-ico svg { stroke:var(--blue); }
.mob-nav-lbl { font-size:10px; font-weight:700; color:var(--text4); letter-spacing:.01em; line-height:1; }
.mob-nav-btn.active .mob-nav-lbl { color:var(--blue); }
.mob-nav-dot { position:absolute; top:4px; right:calc(50% - 18px); width:7px; height:7px; border-radius:50%; background:var(--red); border:1.5px solid var(--bg); }

/* ═══════════════════════════════════════════════════
   PAGES CONTAINER
══════════════════════════════════════════════════ */
.pages { flex:1; padding:20px 18px 0; overflow-x:hidden; }
@media(min-width:900px) { .pages { padding:32px 36px 0; } }
.page { display:none; animation:pgIn .32s var(--smooth) both; width:100%; max-width:100%; }
.page.active { display:block; }
@keyframes pgIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.page-inner { padding-bottom:40px; }

/* ═══════════════════════════════════════════════════
   HOME GRID
══════════════════════════════════════════════════ */
.home-grid { display:grid; grid-template-columns:1fr; gap:16px; }
@media(min-width:900px) { .home-grid { grid-template-columns:1fr 300px; gap:28px; align-items:start; } }
.home-left { display:flex; flex-direction:column; gap:16px; }
.home-right { display:flex; flex-direction:column; gap:18px; }
@media(max-width:899px) { .home-right { display:none; } }

/* ─── Welcome Banner ─── */
.wb {
  background: linear-gradient(128deg, #0052a3 0%, #0a84ff 45%, #6e5ce6 100%);
  border-radius: 24px;
  padding: 24px 22px;
  position: relative; overflow:hidden;
  box-shadow: 0 10px 40px rgba(0,82,163,.28), 0 2px 8px rgba(0,82,163,.16);
  cursor: pointer;
}
@media(max-width:480px) {
  .wb { padding: 18px 16px; }
  .wb-name { font-size: 20px; }
  .wb-stats { gap: 4px; }
  .wb-stat { padding: 8px 4px; }
  .wb-stat-val { font-size: 18px; }
  .wb-stat-lbl { font-size: 8px; }
}
@media(max-width:360px) {
  .wb-stats { grid-template-columns:1fr; }
  .wb-stat { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; }
  .wb-stat-val { margin-right:8px; }
  .wb-stat-lbl { margin-top:0; }
}
.wb::before {
  content:'';
  position:absolute; inset:0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events:none;
}
.wb-orb { position:absolute; border-radius:50%; background:rgba(255,255,255,0.06); pointer-events:none; }
.wb-orb1 { width:200px; height:200px; top:-60px; right:-60px; }
.wb-orb2 { width:120px; height:120px; bottom:-50px; left:-20px; }
.wb-orb3 { width:80px; height:80px; top:20px; left:60%; background:rgba(255,255,255,0.04); }
.wb-c { position:relative; z-index:1; }
.wb-toprow { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:14px; }
.wb-greet { font-size:11px; font-weight:600; color:rgba(255,255,255,0.6); text-transform:uppercase; letter-spacing:.1em; margin-bottom:5px; }
.wb-name { font-family:var(--font-serif); font-size:26px; color:#fff; line-height:1.1; font-style:italic; }
@media(max-width:480px) { .wb-name { font-size:20px; } }
.wb-name-plain { font-family:var(--font); font-size:22px; font-weight:800; color:#fff; letter-spacing:-.4px; line-height:1.1; display:none; }
.wb-avt-circle {
  width:48px; height:48px; border-radius:50%;
  background:rgba(255,255,255,0.16);
  border:1.5px solid rgba(255,255,255,0.28);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
  font-size:17px; font-weight:800; color:#fff;
}
@media(max-width:480px) { .wb-avt-circle { width:40px; height:40px; font-size:14px; } }
.wb-info { display:flex; align-items:center; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.wb-badge {
  display:inline-flex; align-items:center; gap:5px;
  background:rgba(255,255,255,0.16);
  border:.5px solid rgba(255,255,255,0.24);
  border-radius:20px; padding:4px 12px;
  font-size:11px; font-weight:700; color:rgba(255,255,255,0.9);
}
.wb-badge svg { width:9px; height:9px; stroke:rgba(255,255,255,0.9); fill:none; stroke-width:2.3; stroke-linecap:round; stroke-linejoin:round; }
.wb-dept { font-size:11.5px; font-weight:600; color:rgba(255,255,255,0.55); }
.wb-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
@media(max-width:480px) { .wb-stats { gap:6px; } }
.wb-stat {
  background:rgba(255,255,255,0.12);
  border:.5px solid rgba(255,255,255,0.16);
  border-radius:14px; padding:12px 10px; text-align:center;
}
@media(max-width:480px) { .wb-stat { padding:8px 4px; } }
@media(max-width:360px) { .wb-stat { padding:8px 12px; } }
.wb-stat-val { font-size:22px; font-weight:800; color:#fff; letter-spacing:-.5px; line-height:1; }
@media(max-width:480px) { .wb-stat-val { font-size:18px; } }
.wb-stat-lbl { font-size:10px; font-weight:600; color:rgba(255,255,255,0.6); margin-top:3px; }
@media(max-width:480px) { .wb-stat-lbl { font-size:9px; } }

/* ─── Card base ─── */
.card {
  background: var(--surface);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  position: relative;
}
.card-hd {
  display:flex; align-items:center; justify-content:space-between;
  padding: 18px 20px 0;
  margin-bottom: 14px;
}
.card-title { font-size:15px; font-weight:700; color:var(--text1); letter-spacing:-.2px; }
.card-action { font-size:13px; font-weight:600; color:var(--blue); cursor:pointer; position: relative; z-index: 20; }

/* ─── Stats strip ─── */
.stats-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
@media(max-width:480px) { .stats-3 { gap:6px; } }
.stat-c {
  background:var(--surface);
  border-radius:18px;
  border:1px solid var(--border);
  box-shadow:var(--sh-xs);
  padding:16px 12px; text-align:center;
  position: relative;
  cursor: pointer;
}
@media(max-width:480px) { .stat-c { padding:12px 6px; } }
.stat-ico {
  width:38px; height:38px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 10px;
}
@media(max-width:480px) { .stat-ico { width:32px; height:32px; } }
.stat-ico svg { width:18px; height:18px; fill:none; stroke:#fff; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
@media(max-width:480px) { .stat-ico svg { width:16px; height:16px; } }
.stat-val { font-size:24px; font-weight:800; color:var(--text1); letter-spacing:-.6px; line-height:1; }
@media(max-width:480px) { .stat-val { font-size:20px; } }
.stat-val small { font-size:13px; font-weight:700; }
.stat-lbl { font-size:10.5px; font-weight:600; color:var(--text3); margin-top:4px; }
@media(max-width:480px) { .stat-lbl { font-size:9px; } }

/* ─── App rows ─── */
.apps-stack { display:flex; flex-direction:column; gap:6px; padding:0 14px 14px; }
.app-row {
  background:var(--surface2);
  border-radius:16px;
  border:1px solid var(--border);
  display:flex; align-items:center; gap:13px;
  padding:12px 14px; cursor:pointer;
  position:relative; overflow:hidden;
}
@media(max-width:480px) { .app-row { padding:10px 12px; gap:10px; } }
@media(min-width:900px) {
  .app-row { transition:transform .2s var(--spring), box-shadow .2s, background .18s; }
  .app-row:hover { transform:translateY(-2px); box-shadow:var(--sh-md); background:var(--surface); }
}
.app-row:active { opacity:0.72; }
.app-ico { width:48px; height:48px; border-radius:14px; display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:0 2px 8px rgba(0,0,0,0.14); }
@media(max-width:480px) { .app-ico { width:40px; height:40px; } }
.app-ico svg { width:23px; height:23px; fill:none; stroke:#fff; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
@media(max-width:480px) { .app-ico svg { width:20px; height:20px; } }
.app-info { flex:1; min-width:0; }
.app-name { font-size:14px; font-weight:700; color:var(--text1); margin-bottom:3px; }
.app-desc { font-size:12px; font-weight:500; color:var(--text3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media(max-width:480px) { .app-desc { font-size:11px; } }
.app-rr { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.app-tag { font-size:10px; font-weight:700; padding:3px 8px; border-radius:7px; white-space:nowrap; display:none; }
@media(min-width:900px) { .app-tag { display:inline-flex; } }
.app-arr {
  width:26px; height:26px; border-radius:8px;
  background:var(--surface3);
  display:flex; align-items:center; justify-content:center;
}
.app-arr svg { width:12px; height:12px; stroke:var(--text3); fill:none; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }

/* ─── Profile card ─── */
.pc-top {
  background: linear-gradient(135deg, var(--surface2), var(--surface3));
  padding:18px 20px; display:flex; align-items:center; gap:14px;
  border-bottom:1px solid var(--border);
  position: relative;
}
@media(max-width:480px) { .pc-top { padding:14px 16px; gap:10px; } }
.pc-avt {
  width:52px; height:52px; border-radius:50%;
  background:linear-gradient(135deg,var(--blue),var(--purple));
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; box-shadow:var(--sh-blue);
  font-size:18px; font-weight:800; color:#fff;
}
@media(max-width:480px) { .pc-avt { width:44px; height:44px; font-size:15px; } }
.pc-name { font-size:16px; font-weight:800; color:var(--text1); letter-spacing:-.3px; }
@media(max-width:480px) { .pc-name { font-size:14px; } }
.pc-id { font-family:var(--font-mono); font-size:11px; font-weight:500; color:var(--text3); margin-top:3px; }
@media(max-width:480px) { .pc-id { font-size:10px; } }
.pc-status { margin-left:auto; display:flex; align-items:center; gap:5px; background:var(--green-t); border-radius:20px; padding:5px 11px; flex-shrink:0; }
@media(max-width:480px) { .pc-status { padding:4px 8px; } }
.pc-dot { width:6px; height:6px; border-radius:50%; background:var(--green); animation:pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow:0 0 0 0 rgba(29,185,84,.4); } 50% { box-shadow:0 0 0 4px rgba(29,185,84,.0); } }
.pc-stxt { font-size:11px; font-weight:700; color:var(--green); }
@media(max-width:480px) { .pc-stxt { font-size:10px; } }
.pc-row { display:flex; align-items:center; gap:14px; padding:13px 20px; border-bottom:1px solid var(--border); cursor: pointer; position: relative; }
@media(max-width:480px) { .pc-row { padding:11px 16px; gap:10px; } }
.pc-row:last-child { border-bottom:none; }
.pc-row:hover { background: var(--surface2); }
.pc-ico { width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
@media(max-width:480px) { .pc-ico { width:28px; height:28px; } }
.pc-ico svg { width:16px; height:16px; fill:none; stroke:#fff; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
@media(max-width:480px) { .pc-ico svg { width:14px; height:14px; } }
.pc-lbl { font-size:10.5px; font-weight:600; color:var(--text3); margin-bottom:2px; }
.pc-val { font-size:13.5px; font-weight:600; color:var(--text1); }
@media(max-width:480px) { .pc-val { font-size:12px; } }
.pc-txt { min-width:0; flex:1; overflow:hidden; }
.pc-val { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ─── Right widgets ─── */
.widget { background:var(--surface); border-radius:22px; border:1px solid var(--border); box-shadow:var(--sh-sm); overflow:hidden; }
.widget-hd { display:flex; align-items:center; justify-content:space-between; padding:18px 18px 14px; border-bottom:1px solid var(--border); }
.widget-title { font-size:14px; font-weight:700; color:var(--text1); }
.widget-action { font-size:12px; font-weight:600; color:var(--blue); cursor:pointer; position: relative; z-index: 20; }

/* Calendar */
.cal-hd { background:linear-gradient(135deg,var(--blue),var(--indigo)); padding:18px 20px; cursor: pointer; position: relative; }
.cal-month-txt { font-family:var(--font-serif); font-size:20px; color:#fff; font-style:italic; }
.cal-year-txt { font-size:11px; font-weight:600; color:rgba(255,255,255,0.6); margin-top:2px; }
.cal-grid { padding:14px 16px; }
.cal-dlabels { display:grid; grid-template-columns:repeat(7,1fr); margin-bottom:6px; }
.cal-dlbl { text-align:center; font-size:10px; font-weight:700; color:var(--text4); padding:3px 0; }
.cal-days { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.cal-day { aspect-ratio:1; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11.5px; font-weight:600; color:var(--text3); cursor:pointer; position: relative; }
.cal-day:hover { background:var(--surface2); color:var(--text1); }
.cal-day.other { color:var(--text4); opacity:.35; }
.cal-day.today { background:var(--blue); color:#fff; font-weight:800; box-shadow:0 2px 10px rgba(0,102,204,.35); }
.cal-day.has-ev { position:relative; }
.cal-day.has-ev::after { content:''; position:absolute; bottom:2px; left:50%; transform:translateX(-50%); width:3px; height:3px; border-radius:50%; background:var(--orange); }
.cal-day.past { opacity:.38; }
.cal-evs { padding:0 16px 16px; display:flex; flex-direction:column; gap:7px; }
.cal-ev { display:flex; align-items:center; gap:10px; background:var(--surface2); border-radius:12px; padding:10px 12px; border:1px solid var(--border); cursor: pointer; position: relative; }
.cal-ev:hover { background:var(--surface3); }
.cal-ev-bar { width:3px; height:30px; border-radius:2px; flex-shrink:0; }
.cal-ev-title { font-size:12px; font-weight:700; color:var(--text1); }
.cal-ev-time { font-size:10.5px; font-weight:500; color:var(--text3); margin-top:1px; }

/* Quick actions */
.qa-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:0 16px 16px; }
.qa-btn {
  display:flex; flex-direction:column; align-items:center; gap:9px;
  background:var(--surface2); border-radius:16px; padding:16px 10px;
  border:1px solid var(--border); cursor:pointer; position: relative;
}
.qa-btn:hover { background:var(--surface3); }
.qa-btn:active { opacity:0.7; }
.qa-ico { width:38px; height:38px; border-radius:12px; display:flex; align-items:center; justify-content:center; }
.qa-ico svg { width:18px; height:18px; fill:none; stroke:#fff; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.qa-lbl { font-size:12px; font-weight:700; color:var(--text2); text-align:center; }

/* Progress */
.prog-list { padding:14px 16px 16px; display:flex; flex-direction:column; gap:14px; }
.prog-item {
  cursor: pointer;
  position: relative;
}
.prog-item:hover .prog-name { color: var(--blue); }
.prog-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; }
.prog-name { font-size:13px; font-weight:700; color:var(--text1); }
.prog-pct { font-size:12px; font-weight:700; color:var(--text3); }
.prog-bar { height:7px; background:var(--surface3); border-radius:10px; overflow:hidden; }
.prog-fill { height:100%; border-radius:10px; width:0; transition:width 1.2s var(--smooth); }

/* ═══════════════════════════════════════════════════
   PAGE HEADER (mobile)
══════════════════════════════════════════════════ */
.pg-hd { margin-bottom:20px; }
.pg-title { font-family:var(--font-serif); font-size:28px; color:var(--text1); letter-spacing:-.3px; line-height:1.1; font-style:italic; }
.pg-sub { font-size:13.5px; font-weight:500; color:var(--text3); margin-top:4px; }
@media(min-width:900px) { .pg-hd { display:none; } }

/* ═══════════════════════════════════════════════════
   NOTIFICATIONS PAGE
══════════════════════════════════════════════════ */
.nf-chips { display:flex; gap:7px; margin-bottom:18px; flex-wrap:wrap; }
.nf-chip {
  padding:7px 16px; border-radius:20px;
  font-size:12.5px; font-weight:700;
  border:1px solid var(--border2);
  color:var(--text3); background:var(--surface);
  cursor:pointer; white-space:nowrap; position: relative;
}
.nf-chip.active { background:var(--blue); color:#fff; border-color:var(--blue); box-shadow:0 3px 12px rgba(0,102,204,.24); }
.nf-chip:active { opacity:0.7; }

.notif-stack { display:flex; flex-direction:column; gap:8px; }
.notif-r {
  background:var(--surface);
  border-radius:18px;
  border:1px solid var(--border);
  box-shadow:var(--sh-xs);
  display:flex; align-items:flex-start; gap:13px;
  padding:15px 16px; position:relative; overflow:hidden;
  cursor: pointer;
}
@media(max-width:480px) { .notif-r { padding:12px 14px; gap:10px; } }
.notif-r.unread { border-left:3px solid var(--blue); padding-left:14px; }
.notif-r.unread::before { content:''; position:absolute; inset:0; background:rgba(0,102,204,0.025); pointer-events:none; }
.notif-r:hover { background:var(--surface2); }
.notif-ico { width:42px; height:42px; border-radius:13px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
@media(max-width:480px) { .notif-ico { width:36px; height:36px; } }
.notif-ico svg { width:20px; height:20px; fill:none; stroke:#fff; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
@media(max-width:480px) { .notif-ico svg { width:18px; height:18px; } }
.notif-body { flex:1; min-width:0; }
.notif-title { font-size:14px; font-weight:700; color:var(--text1); margin-bottom:4px; line-height:1.3; }
@media(max-width:480px) { .notif-title { font-size:13px; } }
.notif-desc { font-size:12.5px; font-weight:500; color:var(--text2); line-height:1.55; margin-bottom:8px; }
@media(max-width:480px) { .notif-desc { font-size:11.5px; } }
.notif-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.notif-time { font-size:10.5px; font-weight:600; color:var(--text4); display:flex; align-items:center; gap:3px; }
.notif-time svg { width:10px; height:10px; stroke:var(--text4); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.notif-cat { font-size:10px; font-weight:700; padding:3px 8px; border-radius:6px; }
.u-pip { width:8px; height:8px; border-radius:50%; background:var(--blue); flex-shrink:0; margin-top:3px; box-shadow:0 0 0 3px rgba(0,102,204,.15); }

/* ═══════════════════════════════════════════════════
   EXPLORE / NEWS
══════════════════════════════════════════════════ */
.explore-grid { display:grid; grid-template-columns:1fr; gap:14px; }
@media(min-width:900px) {
  .explore-grid { grid-template-columns:1fr 1fr; gap:18px; }
  .explore-grid .news-card:first-child { grid-column:1/-1; }
}
.news-card {
  background:var(--surface);
  border-radius:22px;
  border:1px solid var(--border);
  box-shadow:var(--sh-sm);
  overflow:hidden;
  cursor: pointer;
  position: relative;
}
@media(min-width:900px) {
  .news-card { transition:transform .22s var(--spring), box-shadow .22s; }
  .news-card:hover { transform:translateY(-4px); box-shadow:var(--sh-lg); }
}
.news-card:active { opacity:0.85; }
.news-vis { display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; }
.news-vis.tall { height:170px; }
.news-vis.short { height:130px; }
@media(min-width:900px) { .news-vis.tall { height:210px; } .news-vis.short { height:150px; } }
.news-feat-badge {
  position:absolute; top:14px; left:14px;
  background:rgba(255,255,255,0.18);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  border:.5px solid rgba(255,255,255,0.28);
  border-radius:20px; padding:5px 13px;
  font-size:10.5px; font-weight:800; color:#fff;
  letter-spacing:.05em; text-transform:uppercase;
}
.news-vis-ico {
  width:62px; height:62px; border-radius:20px;
  background:rgba(255,255,255,0.14);
  display:flex; align-items:center; justify-content:center;
  backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,0.2);
}
.news-vis-ico svg { width:30px; height:30px; fill:none; stroke:#fff; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.news-body { padding:16px 18px 18px; }
.news-tag { display:inline-flex; align-items:center; font-size:10px; font-weight:800; padding:4px 10px; border-radius:7px; margin-bottom:9px; letter-spacing:.05em; text-transform:uppercase; }
.news-title { font-size:16.5px; font-weight:800; color:var(--text1); letter-spacing:-.3px; line-height:1.3; margin-bottom:7px; }
.news-desc { font-size:13px; font-weight:500; color:var(--text3); line-height:1.6; margin-bottom:14px; }
.news-foot { display:flex; align-items:center; justify-content:space-between; }
.news-date { font-size:11px; font-weight:600; color:var(--text4); }
.read-btn {
  display:inline-flex; align-items:center; gap:5px;
  padding:8px 18px; border-radius:20px;
  font-size:12.5px; font-weight:700; font-family:var(--font); color:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,0.14);
  cursor: pointer;
  position: relative;
  z-index: 20;
}
.read-btn:active { opacity:0.8; }
.read-btn svg { width:11px; height:11px; stroke:#fff; fill:none; stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round; }

/* ═══════════════════════════════════════════════════
   SCHEDULE PAGE
══════════════════════════════════════════════════ */
.sched-day { margin-bottom:26px; }
.sched-day-lbl {
  font-size:11px; font-weight:800; color:var(--text4);
  text-transform:uppercase; letter-spacing:.1em;
  margin-bottom:12px; display:flex; align-items:center; gap:10px;
}
.sched-day-lbl::after { content:''; flex:1; height:1px; background:var(--border2); }
.sched-items { display:flex; flex-direction:column; gap:9px; }
.sched-item {
  background:var(--surface); border-radius:18px;
  border:1px solid var(--border); box-shadow:var(--sh-xs);
  display:flex; align-items:stretch; overflow:hidden;
  cursor: pointer;
  position: relative;
}
@media(min-width:900px) {
  .sched-item { transition:transform .2s var(--spring), box-shadow .2s; }
  .sched-item:hover { transform:translateY(-2px); box-shadow:var(--sh-md); }
}
.sched-item:active { opacity:0.7; }
.sched-bar { width:4px; flex-shrink:0; }
.sched-body { padding:14px 16px; flex:1; min-width:0; }
@media(max-width:480px) { .sched-body { padding:12px 14px; } }
.sched-time { font-size:10.5px; font-weight:700; color:var(--text4); margin-bottom:4px; display:flex; align-items:center; gap:5px; }
.sched-time svg { width:10px; height:10px; stroke:var(--text4); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.sched-title { font-size:14.5px; font-weight:700; color:var(--text1); margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media(max-width:480px) { .sched-title { font-size:13px; } }
.sched-meta { font-size:12px; font-weight:500; color:var(--text3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media(max-width:480px) { .sched-meta { font-size:11px; } }
.sched-right { align-self:center; padding:0 16px; flex-shrink:0; }
@media(max-width:480px) { .sched-right { padding:0 12px; } }
.sched-type { font-size:10.5px; font-weight:700; padding:5px 10px; border-radius:8px; white-space:nowrap; }
@media(max-width:480px) { .sched-type { font-size:9px; padding:4px 8px; } }

/* ═══════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════ */
@keyframes fu { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }

.home-left > * { animation:fu .4s var(--smooth) both; }
.home-left > *:nth-child(1) { animation-delay:.00s; }
.home-left > *:nth-child(2) { animation-delay:.06s; }
.home-left > *:nth-child(3) { animation-delay:.11s; }
.home-left > *:nth-child(4) { animation-delay:.16s; }

.home-right > * { animation:fu .4s var(--smooth) both; }
.home-right > *:nth-child(1) { animation-delay:.12s; }
.home-right > *:nth-child(2) { animation-delay:.18s; }
.home-right > *:nth-child(3) { animation-delay:.24s; }

.apps-stack .app-row { animation:fu .35s var(--smooth) both; }
.apps-stack .app-row:nth-child(1) { animation-delay:.00s; }
.apps-stack .app-row:nth-child(2) { animation-delay:.05s; }
.apps-stack .app-row:nth-child(3) { animation-delay:.09s; }
.apps-stack .app-row:nth-child(4) { animation-delay:.13s; }
.apps-stack .app-row:nth-child(5) { animation-delay:.17s; }
.apps-stack .app-row:nth-child(6) { animation-delay:.21s; }

.notif-stack .notif-r { animation:fu .35s var(--smooth) both; }
.notif-stack .notif-r:nth-child(1) { animation-delay:.04s; }
.notif-stack .notif-r:nth-child(2) { animation-delay:.09s; }
.notif-stack .notif-r:nth-child(3) { animation-delay:.13s; }
.notif-stack .notif-r:nth-child(4) { animation-delay:.17s; }
.notif-stack .notif-r:nth-child(5) { animation-delay:.21s; }

.explore-grid .news-card { animation:fu .35s var(--smooth) both; }
.explore-grid .news-card:nth-child(1) { animation-delay:.04s; }
.explore-grid .news-card:nth-child(2) { animation-delay:.09s; }
.explore-grid .news-card:nth-child(3) { animation-delay:.13s; }
.explore-grid .news-card:nth-child(4) { animation-delay:.17s; }

.sched-items .sched-item { animation:fu .35s var(--smooth) both; }
.sched-items .sched-item:nth-child(1) { animation-delay:.04s; }
.sched-items .sched-item:nth-child(2) { animation-delay:.09s; }
.sched-items .sched-item:nth-child(3) { animation-delay:.13s; }

/* ═══════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════ */
.toast {
  position:fixed;
  bottom: calc(var(--mob-nav-h) + var(--safe-b) + 14px);
  left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--text1); color:var(--surface);
  padding:11px 22px; border-radius:20px;
  font-size:13px; font-weight:700; white-space:nowrap;
  box-shadow:var(--sh-lg); opacity:0; z-index:9999; pointer-events:none;
  max-width:calc(100vw - 40px);
  text-overflow:ellipsis; overflow:hidden;
}
@media(min-width:900px) { .toast { bottom:32px; } }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ─── Divider ─── */
.divider { height:1px; background:var(--border); margin:0 20px; }

/* ─── Empty state ─── */
.empty-state { padding:36px 20px; text-align:center; color:var(--text3); font-size:14px; font-weight:600; }

