:root {
    --bg: #F0F2F8;
    --surface: #FFFFFF;
    --card: #FFFFFF;
    --card2: #F5F7FB;
    --border: #E2E6EF;
    --border2: #D4D9E6;
    --primary: #EF4444;
    --primary-hover: #DC2626;
    --primary-dim: rgba(239,68,68,0.10);
    --primary-gradient: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    --teal: #10B981;
    --teal-dim: rgba(16,185,129,0.10);
    --purple: #8B5CF6;
    --purple-dim: rgba(139,92,246,0.10);
    --yellow: #F59E0B;
    --yellow-dim: rgba(245,158,11,0.10);
    --blue: #3B82F6;
    --blue-dim: rgba(59,130,246,0.10);
    --red: #EF4444;
    --red-dim: rgba(239,68,68,0.10);
    --text: #0F172A;
    --text2: #475569;
    --text3: #94A3B8;
    --sidebar-w: 72px;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --shadow: 0 4px 20px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.10), 0 4px 16px rgba(0,0,0,0.05);
    --shadow-glow: 0 0 30px rgba(239,68,68,0.15);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  * { margin:0; padding:0; box-sizing:border-box; }

  body {
    font-family:'Inter',system-ui,-apple-system,sans-serif;
    background:var(--bg);
    color:var(--text);
    min-height:100vh;
    overflow-x:hidden;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    text-rendering:optimizeLegibility;
  }

  h1,h2,h3,h4,h5 { font-family:'Plus Jakarta Sans',sans-serif; }

  .panel { display:none; }
  .panel.active { display:block; }
  .layout { display:flex; min-height:100vh; }

  .sidebar {
    width:var(--sidebar-w);
    background:var(--surface);
    border-right:1px solid var(--border);
    display:flex;
    flex-direction:column;
    align-items:center;
    position:fixed;
    top:0; left:0;
    height:100vh;
    z-index:100;
    padding:10px 0 12px;
    box-shadow:2px 0 12px rgba(0,0,0,0.03);
    overflow:visible;
  }

  .sidebar-brand {
    padding:10px 0 8px;
    border-bottom:1px solid var(--border);
    margin-bottom:6px;
    width:100%;
    text-align:center;
  }

  .brand-name {
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:16px;
    font-weight:800;
    color:var(--text);
    letter-spacing:-0.3px;
    line-height:1;
  }

  .brand-name span { color:var(--primary); }

  .brand-logo {
    width:52px;
    height:auto;
    object-fit:contain;
    transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
    display:block;
    margin:0 auto;
  }

  .brand-role {
    font-size:0;
    visibility:hidden;
    height:0;
    margin:0;
    padding:0;
    overflow:hidden;
  }

  .nav-section { padding:2px 0; margin-top:2px; width:100%; display:flex; flex-direction:column; align-items:center; }

  .nav-label {
    font-size:0;
    visibility:hidden;
    height:0;
    padding:0;
    margin:0;
    overflow:hidden;
  }

  .nav-item {
    display:flex;
    align-items:center;
    justify-content:center;
    width:40px;
    height:40px;
    padding:0;
    border-radius:12px;
    cursor:pointer;
    color:var(--text2);
    font-size:0;
    font-weight:500;
    transition:all 0.18s ease;
    margin-bottom:4px;
    position:relative;
    text-decoration:none;
  }

  .nav-item:hover {
    background:var(--card2);
    color:var(--text);
    transform:scale(1.08);
  }

  .nav-item.active {
    background:var(--primary-dim);
    color:var(--primary);
    font-weight:600;
    box-shadow:0 0 0 2px rgba(239,68,68,0.15);
  }

  .nav-item .icon { font-size:19px; width:auto; text-align:center; }

  /* Sidebar tooltip on hover */
  .nav-item .nav-tooltip {
    position:absolute;
    left:calc(100% + 10px);
    top:50%;
    transform:translateY(-50%);
    background:var(--text);
    color:#fff;
    font-size:12px;
    font-weight:600;
    padding:5px 12px;
    border-radius:8px;
    white-space:nowrap;
    pointer-events:none;
    opacity:0;
    transition:opacity 0.15s ease, transform 0.15s ease;
    transform:translateY(-50%) translateX(-4px);
    z-index:9999;
    box-shadow:0 4px 12px rgba(0,0,0,0.15);
  }
  .nav-item .nav-tooltip::before {
    content:'';
    position:absolute;
    left:-5px;
    top:50%;
    transform:translateY(-50%);
    border:5px solid transparent;
    border-right-color:var(--text);
    border-left:0;
  }
  .nav-item:hover .nav-tooltip {
    opacity:1;
    transform:translateY(-50%) translateX(0);
  }

  /* Hide inline text labels & badge counts in collapsed sidebar */
  .nav-item > span:not(.icon):not(.nav-tooltip) {
    display:none;
  }

  /* Notification dot for nav items with badge */
  .nav-item .nav-badge-dot {
    position:absolute;
    top:6px; right:6px;
    width:8px; height:8px;
    border-radius:50%;
    background:var(--red);
    border:2px solid var(--surface);
  }

  .nav-badge {
    display:none;
  }

  .sidebar-footer {
    margin-top:auto;
    padding:8px 0 0;
    border-top:1px solid var(--border);
    width:100%;
    display:flex;
    justify-content:center;
  }

  .user-pill {
    display:flex;
    align-items:center;
    justify-content:center;
    padding:6px;
    border-radius:12px;
    cursor:pointer;
    transition:background 0.2s;
    position:relative;
  }

  .user-pill:hover { background:var(--card2); }

  /* Hide user text in slim sidebar */
  .user-pill > div:not(.avatar) {
    display:none;
  }

  .user-pill .nav-tooltip {
    position:absolute;
    left:calc(100% + 10px);
    top:50%;
    background:var(--text);
    color:#fff;
    font-size:12px;
    font-weight:600;
    padding:5px 12px;
    border-radius:8px;
    white-space:nowrap;
    pointer-events:none;
    opacity:0;
    transition:opacity 0.15s ease, transform 0.15s ease;
    transform:translateY(-50%) translateX(-4px);
    z-index:9999;
    box-shadow:0 4px 12px rgba(0,0,0,0.15);
  }
  .user-pill .nav-tooltip::before {
    content:'';
    position:absolute;
    left:-5px;
    top:50%;
    transform:translateY(-50%);
    border:5px solid transparent;
    border-right-color:var(--text);
    border-left:0;
  }
  .user-pill:hover .nav-tooltip {
    opacity:1;
    transform:translateY(-50%) translateX(0);
  }

  .avatar {
    width:32px;
    height:32px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:700;
    color:#fff;
    flex-shrink:0;
    box-shadow:0 2px 6px rgba(0,0,0,0.12);
  }

  .user-name { font-size:13.5px; font-weight:600; color:var(--text); }
  .user-sub { font-size:11px; color:var(--text3); }

  /* ---------- Sidebar Toggle via Brand / Avatar ---------- */
  .sidebar .sidebar-brand { display:flex; align-items:center; justify-content:center; cursor:pointer; }
  .sidebar .sidebar-brand .brand-name { transition:transform 0.15s ease; }
  .sidebar .sidebar-brand .brand-name:hover { transform:scale(1.1); }
  .sidebar .sidebar-brand:hover .brand-logo { transform:scale(1.08); opacity:0.85; }

  /* ---------- Sidebar Expanded State ---------- */
  .sidebar.expanded { width:220px; align-items:stretch; padding:10px 0 12px; transition:width 0.25s cubic-bezier(0.4,0,0.2,1); }
  .sidebar:not(.expanded) { transition:width 0.25s cubic-bezier(0.4,0,0.2,1); }

  .sidebar.expanded .sidebar-brand { padding:10px 16px 8px; text-align:left; justify-content:center; }
  .sidebar.expanded .sidebar-brand .brand-name { text-align:left; flex:1; }
  .sidebar.expanded .sidebar-brand .brand-logo { width:160px; height:auto; margin:0 auto; }

  .sidebar.expanded .nav-section { align-items:stretch; padding:2px 10px; }
  .sidebar.expanded .nav-item { width:100%; height:auto; padding:9px 12px; justify-content:flex-start; gap:10px; font-size:13px; border-radius:10px; }
  .sidebar.expanded .nav-item .icon { font-size:17px; width:22px; text-align:center; flex-shrink:0; }
  .sidebar.expanded .nav-item > span:not(.icon):not(.nav-tooltip) { display:inline; }
  .sidebar.expanded .nav-item .nav-tooltip { display:none!important; }
  .sidebar.expanded .nav-item .nav-badge-dot { top:8px; right:8px; }

  .sidebar.expanded .sidebar-footer { padding:8px 10px 0; justify-content:stretch; }
  .sidebar.expanded .user-pill { justify-content:flex-start; gap:10px; padding:8px 10px; }
  .sidebar.expanded .user-pill > div:not(.avatar) { display:block; }
  .sidebar.expanded .user-pill .nav-tooltip { display:none!important; }

  .main { transition:margin-left 0.25s cubic-bezier(0.4,0,0.2,1); }
  .sidebar.expanded ~ .main { margin-left:220px; }

  .main {
    margin-left:var(--sidebar-w);
    flex:1;
    padding:24px 32px;
    max-width:100%;
  }

  .page { display:none; }
  .page.active { display:block; }

  .topbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:28px;
    gap:16px;
  }

  .page-title {
    font-size:24px;
    font-weight:800;
    color:var(--text);
    letter-spacing:-0.3px;
  }

  .page-subtitle {
    font-size:13.5px;
    color:var(--text3);
    margin-top:3px;
  }

  .topbar-actions { display:flex; align-items:center; gap:10px; }

  .btn-primary {
    background:var(--primary);
    color:#fff;
    border:none;
    border-radius:var(--radius-sm);
    padding:10px 20px;
    font-family:'Inter',sans-serif;
    font-size:13.5px;
    font-weight:600;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:7px;
    transition:all 0.2s ease;
    white-space:nowrap;
    box-shadow:0 2px 8px rgba(239,68,68,0.25);
  }

  .btn-primary:hover {
    background:var(--primary-hover);
    transform:translateY(-1px);
    box-shadow:0 4px 14px rgba(239,68,68,0.30);
  }

  .btn-sec {
    background:var(--surface);
    color:var(--text2);
    border:1px solid var(--border2);
    border-radius:var(--radius-sm);
    padding:10px 18px;
    font-family:'Inter',sans-serif;
    font-size:13.5px;
    font-weight:500;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:7px;
    transition:all 0.2s ease;
  }

  .btn-sec:hover {
    background:var(--card2);
    color:var(--text);
    border-color:var(--border2);
  }

  .notif-bell {
    width:40px;
    height:40px;
    background:linear-gradient(135deg, var(--surface) 0%, var(--card) 100%);
    border:1.5px solid var(--border);
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:17px;
    position:relative;
    transition:all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.3);
    color:var(--text);
  }

  .notif-bell:hover {
    background:linear-gradient(135deg, rgba(79,109,240,0.08) 0%, rgba(79,109,240,0.04) 100%);
    border-color:var(--primary);
    box-shadow:0 4px 16px rgba(79,109,240,0.15), inset 0 1px 0 rgba(255,255,255,0.4);
    transform:scale(1.05);
  }

  .notif-bell:active {
    transform:scale(0.95);
  }

  .notif-dot {
    width:10px;
    height:10px;
    background:linear-gradient(135deg, var(--red), #DC2626);
    border-radius:50%;
    position:absolute;
    top:5px;
    right:5px;
    border:2.5px solid var(--surface);
    box-shadow:0 2px 8px rgba(239,68,68,0.35);
    animation:dot-pulse 2s ease-in-out infinite;
  }

  @keyframes dot-pulse {
    0%, 100% { box-shadow:0 2px 8px rgba(239,68,68,0.35), 0 0 0 0 rgba(239,68,68,0.35); }
    50% { box-shadow:0 2px 8px rgba(239,68,68,0.35), 0 0 0 4px rgba(239,68,68,0.15); }
  }

  .notif-count-badge {
    position:absolute;
    top:-6px;
    right:-6px;
    background:linear-gradient(135deg, var(--red), #DC2626);
    color:#fff;
    font-size:10px;
    font-weight:700;
    min-width:18px;
    height:18px;
    line-height:18px;
    text-align:center;
    border-radius:50%;
    padding:0;
    border:2.5px solid var(--surface);
    pointer-events:none;
    box-shadow:0 2px 10px rgba(239,68,68,0.35);
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .stats-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin-bottom:24px;
  }

  .stat-card {
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:20px 22px;
    cursor:pointer;
    transition:all 0.25s ease;
    position:relative;
    overflow:hidden;
    box-shadow:var(--shadow-sm);
  }

  .stat-card::before {
    content:'';
    position:absolute;
    top:0; left:0; right:0;
    height:3px;
    background:var(--accent-c);
    border-radius:var(--radius) var(--radius) 0 0;
  }

  .stat-card:hover {
    border-color:var(--border2);
    transform:translateY(-3px);
    box-shadow:var(--shadow);
  }

  .stat-card .s-label {
    font-size:12.5px;
    color:var(--text3);
    margin-bottom:10px;
    letter-spacing:0.2px;
    font-weight:500;
  }

  .stat-card .s-value {
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:30px;
    font-weight:800;
    color:var(--text);
  }

  .stat-card .s-sub {
    font-size:12px;
    margin-top:6px;
    display:flex;
    align-items:center;
    gap:4px;
    font-weight:500;
  }

  .stat-card .s-icon {
    font-size:24px;
    position:absolute;
    right:20px;
    top:20px;
    opacity:0.25;
  }

  .sec-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:16px;
  }

  .sec-title {
    font-size:14.5px;
    font-weight:700;
    color:var(--text);
  }

  .sec-link {
    font-size:12.5px;
    color:var(--primary);
    cursor:pointer;
    font-weight:600;
    transition:color 0.15s;
  }

  .sec-link:hover { text-decoration:underline; }

  .card {
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:22px;
    box-shadow:var(--shadow-sm);
  }

  .card2 {
    background:var(--card2);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    padding:14px;
  }

  .alert-list { display:flex; flex-direction:column; gap:8px; }

  .alert-item {
    display:flex;
    align-items:center;
    gap:12px;
    padding:13px 16px;
    background:var(--card2);
    border-radius:var(--radius-sm);
    border-left:3px solid var(--accent-c);
    cursor:pointer;
    transition:all 0.2s ease;
  }

  .alert-item:hover {
    background:var(--border);
    transform:translateX(2px);
  }

  .alert-dot {
    width:8px; height:8px;
    border-radius:50%;
    background:var(--accent-c);
    flex-shrink:0;
  }

  .alert-text { font-size:13.5px; color:var(--text2); font-weight:500; }
  .alert-time { font-size:11.5px; color:var(--text3); margin-left:auto; font-weight:500; }

  .kanban {
    display:grid;
    grid-template-columns:repeat(6,1fr);
    gap:12px;
  }

  .kanban-col {
    background:var(--card2);
    border-radius:var(--radius);
    padding:12px;
    min-height:200px;
    max-height:75vh;
    overflow-y:auto;
    border:1px solid var(--border);
  }

  .kanban-col::-webkit-scrollbar { width:5px; }
  .kanban-col::-webkit-scrollbar-track { background:transparent; }
  .kanban-col::-webkit-scrollbar-thumb { background:var(--border); border-radius:4px; }
  .kanban-col::-webkit-scrollbar-thumb:hover { background:var(--text3); }

  .kanban-col-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:14px;
    position:sticky;
    top:-16px;
    padding:12px 0 10px;
    background:var(--card2);
    z-index:2;
  }

  .kanban-col-head{
    border-radius: 10px 20px;
    padding: 20px 10px;
    background: white;
  }

  #kanban-col-todo{
    background: rgba(222, 228, 237, 0.8);
  }
  #kanban-col-inprogress{
    background: rgba(198, 220, 255, 0.8);
  }

  #kanban-col-review{
    background: rgba(254, 248, 217, 0.8);
  }
  #kanban-col-completed{
    background:rgba(194, 241, 225, 0.8);
  }

  #kanban-col-todo .task-card { background:rgba(148,163,184,0.08); border-left:3px solid var(--text3); }
  #kanban-col-inprogress .task-card { background:rgba(59,130,246,0.08); border-left:3px solid var(--blue); }
  #kanban-col-review .task-card { background:rgba(245,158,11,0.08); border-left:3px solid var(--yellow); }
  #kanban-col-completed .task-card { background:rgba(16,185,129,0.08); border-left:3px solid var(--teal); }

  .task-title{
    color: black;
    font-weight: 700;
    font-size: 23px;
  }

  .col-label {
    font-size:12px;
    font-weight:700;
    letter-spacing:0.5px;
    text-transform:uppercase;
  }

  .col-count {
    font-size:11px;
    background:var(--surface);
    color:var(--text3);
    border-radius:10px;
    padding:2px 9px;
    font-weight:600;
    border:1px solid var(--border);
  }

  .task-card {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    padding:14px;
    margin-bottom:10px;
    cursor:pointer;
    transition:all 0.2s ease;
    box-shadow:var(--shadow-sm);
  }

  .task-card:hover {
    border-color:var(--primary);
    transform:translateY(-2px);
    box-shadow:var(--shadow);
  }

  .task-title {
    font-size:13.5px;
    font-weight:600;
    color:var(--text);
    margin-bottom:7px;
  }

  .task-meta {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    align-items:center;
  }

  .tag {
    font-size:10.5px;
    padding:3px 9px;
    border-radius:20px;
    font-weight:600;
    letter-spacing:0.2px;
  }

  .tag-orange { background:var(--primary-dim); color:var(--primary); }
  .tag-teal { background:var(--teal-dim); color:var(--teal); }
  .tag-purple { background:var(--purple-dim); color:var(--purple); }
  .tag-yellow { background:var(--yellow-dim); color:var(--yellow); }
  .tag-blue { background:var(--blue-dim); color:var(--blue); }
  .tag-red { background:var(--red-dim); color:var(--red); }
  .tag-pink { background:rgba(236,72,153,0.12); color:#ec4899; }

  .task-deadline {
    font-size:11.5px;
    color:var(--text3);
    display:flex;
    align-items:center;
    gap:4px;
  }

  .avatar-row { display:flex; gap:-4px; margin-left:auto; }

  .av-sm {
    width:24px; height:24px;
    border-radius:50%;
    border:2px solid var(--surface);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:9px;
    font-weight:700;
    color:#fff;
    box-shadow:0 1px 3px rgba(0,0,0,0.1);
  }

  /* ── Calendar Grid Header ── */
  .calg-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:16px;
    padding:0 2px;
  }
  .calg-header-left {
    display:flex;
    align-items:baseline;
    gap:10px;
  }
  .calg-month-name {
    font-size:18px;
    font-weight:800;
    color:var(--text);
    letter-spacing:-0.3px;
  }
  .calg-task-count {
    font-size:11.5px;
    font-weight:600;
    color:var(--text3);
    background:var(--card2);
    padding:2px 10px;
    border-radius:999px;
  }
  .calg-header-nav {
    display:flex;
    align-items:center;
    gap:6px;
  }
  .calg-nav-btn {
    width:30px;
    height:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    border:1px solid var(--border);
    background:var(--card);
    color:var(--text2);
    font-size:11px;
    cursor:pointer;
    transition:all .15s ease;
    text-decoration:none;
  }
  .calg-nav-btn:hover {
    border-color:var(--primary);
    color:var(--primary);
    background:var(--primary-dim);
  }
  .calg-nav-today {
    font-size:12px;
    font-weight:700;
    color:var(--primary);
    background:var(--primary-dim);
    padding:5px 14px;
    border-radius:8px;
    border:1px solid transparent;
    cursor:pointer;
    transition:all .15s ease;
    text-decoration:none;
  }
  .calg-nav-today:hover {
    background:var(--primary);
    color:#fff;
  }

  /* ── Calendar Grid ── */
  .cal-grid {
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:1px;
    background:var(--border);
    border-radius:var(--radius);
    overflow:hidden;
    border:1px solid var(--border);
  }

  .cal-day-label {
    text-align:center;
    font-size:11px;
    color:var(--text3);
    padding:10px 0;
    font-weight:700;
    letter-spacing:0.5px;
    text-transform:uppercase;
    background:var(--card);
  }
  .cal-day-label.weekend {
    color:var(--text3);
    opacity:0.6;
  }

  .cal-day {
    background:var(--card);
    min-height:100px;
    padding:8px;
    cursor:pointer;
    transition:all 0.15s ease;
    position:relative;
  }
  .cal-day:hover {
    background:var(--primary-dim);
    z-index:2;
  }
  .cal-day.weekend {
    background:var(--card2);
  }
  .cal-day.weekend:hover {
    background:var(--primary-dim);
  }
  .cal-day.today {
    background:rgba(79,109,240,0.04);
  }
  .cal-day.today:hover {
    background:var(--primary-dim);
  }
  .cal-day.empty {
    background:var(--card2);
    cursor:default;
    opacity:0.45;
  }
  .cal-day.empty:hover {
    background:var(--card2);
  }

  /* Date header row */
  .cal-day-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:6px;
  }
  .cal-date-wrap {
    width:26px;
    height:26px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    transition:background .15s;
  }
  .cal-date-wrap.today-circle {
    background:var(--primary);
  }
  .cal-date {
    font-size:12px;
    color:var(--text3);
    font-weight:600;
    line-height:1;
  }
  .cal-date.today-num {
    color:#fff;
    font-weight:800;
  }
  .cal-day-dots {
    display:flex;
    gap:3px;
    align-items:center;
  }
  .cal-status-dot {
    width:6px;
    height:6px;
    border-radius:50%;
    flex-shrink:0;
  }

  /* Task events */
  .cal-events {
    display:flex;
    flex-direction:column;
    gap:2px;
  }
  .cal-event {
    display:flex;
    align-items:center;
    gap:4px;
    font-size:10px;
    padding:3px 5px;
    border-radius:5px;
    background:var(--card2);
    overflow:hidden;
    transition:background .12s;
    cursor:pointer;
  }
  .cal-day:hover .cal-event {
    background:rgba(255,255,255,0.7);
  }
  .cal-ev-bar {
    width:3px;
    height:14px;
    border-radius:2px;
    flex-shrink:0;
  }
  .cal-ev-logo {
    width:14px;
    height:14px;
    border-radius:4px;
    object-fit:cover;
    flex-shrink:0;
    border:1px solid var(--border);
  }
  .cal-ev-emoji {
    font-size:10px;
    flex-shrink:0;
    width:14px;
    text-align:center;
    line-height:1;
  }
  .cal-ev-title {
    font-weight:600;
    color:var(--text2);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    flex:1;
    min-width:0;
  }
  .cal-ev-priority {
    font-size:8px;
    flex-shrink:0;
    line-height:1;
  }
  .cal-more {
    font-size:9.5px;
    color:var(--text3);
    font-weight:700;
    padding:2px 5px;
    cursor:pointer;
    border-radius:4px;
    transition:all .12s;
  }
  .cal-more:hover {
    background:var(--primary-dim);
    color:var(--primary);
  }

  /* Today pulse */
  .cal-day.today { animation:todayPulse 2.5s ease-in-out infinite; }
  @keyframes todayPulse {
    0%,100% { box-shadow:inset 0 0 0 0 transparent; }
    50% { box-shadow:inset 0 0 0 2px var(--primary); }
  }

  /* Mobile */
  @media (max-width:768px) {
    .cal-grid { font-size:10px; }
    .cal-day { min-height:70px; padding:5px; }
    .cal-date-wrap { width:22px; height:22px; }
    .cal-date { font-size:10px; }
    .cal-event { font-size:9px; padding:2px 4px; }
    .cal-ev-bar { height:10px; }
    .cal-ev-logo { width:12px; height:12px; }
    .calg-header { flex-direction:column; gap:8px; align-items:flex-start; }
  }

  .table-wrap { overflow-x:auto; }

  table {
    width:100%;
    border-collapse:collapse;
    font-size:13.5px;
  }

  thead th {
    text-align:left;
    padding:12px 16px;
    font-size:11px;
    color:var(--text3);
    letter-spacing:0.5px;
    text-transform:uppercase;
    font-weight:700;
    border-bottom:2px solid var(--border);
    white-space:nowrap;
    background:var(--card2);
  }

  tbody tr {
    border-bottom:1px solid var(--border);
    transition:background 0.15s;
    cursor:pointer;
  }

  tbody tr:hover { background:var(--card2); }

  tbody td {
    padding:14px 16px;
    color:var(--text2);
  }

  tbody td:first-child {
    color:var(--text);
    font-weight:500;
  }

  .progress-bar {
    height:5px;
    background:var(--border);
    border-radius:10px;
    overflow:hidden;
  }

  .progress-fill {
    height:100%;
    border-radius:10px;
    transition:width 0.4s ease;
  }

  .status {
    font-size:11px;
    font-weight:600;
    padding:4px 12px;
    border-radius:20px;
    display:inline-flex;
    align-items:center;
    gap:5px;
  }

  .status::before {
    content:'';
    width:6px; height:6px;
    border-radius:50%;
  }

  .s-todo { background:var(--card2); color:var(--text3); border:1px solid var(--border); }
  .s-todo::before { background:var(--text3); }
  .s-prog { background:var(--blue-dim); color:var(--blue); }
  .s-prog::before { background:var(--blue); }
  .s-review { background:var(--yellow-dim); color:var(--yellow); }
  .s-review::before { background:var(--yellow); }
  .s-done { background:var(--teal-dim); color:var(--teal); }
  .s-done::before { background:var(--teal); }
  .s-published { background:rgba(34,197,94,0.12); color:#16a34a; }
  .s-published::before { background:#16a34a; }
  .s-urgent { background:var(--red-dim); color:var(--red); }
  .s-urgent::before { background:var(--red); }
  .s-paused { background:rgba(245,158,11,0.12); color:#D97706; border:1px dashed #D97706; }
  .s-paused::before { background:#D97706; }

  .form-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
  }

  .form-group {
    display:flex;
    flex-direction:column;
    gap:7px;
  }

  .form-group.full { grid-column:1/-1; }

  label {
    font-size:12.5px;
    color:var(--text2);
    font-weight:600;
    letter-spacing:0.2px;
  }

  input, select, textarea {
    background:var(--card2);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    color:var(--text);
    font-family:'Inter',sans-serif;
    font-size:13.5px;
    padding:11px 14px;
    transition:all 0.2s ease;
    outline:none;
  }

  input:focus, select:focus, textarea:focus {
    border-color:var(--primary);
    box-shadow:0 0 0 3px var(--primary-dim);
    background:var(--surface);
  }

  select option { background:var(--surface); }
  textarea { resize:vertical; min-height:100px; }

  .upload-zone {
    border:2px dashed var(--border2);
    border-radius:var(--radius-sm);
    padding:32px;
    text-align:center;
    cursor:pointer;
    transition:all 0.2s ease;
    color:var(--text3);
    font-weight:500;
    background:var(--card2);
  }

  .upload-zone:hover {
    border-color:var(--primary);
    color:var(--primary);
    background:var(--primary-dim);
  }

  #loginPanel {
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:100vh;
    background:linear-gradient(135deg, #EEF2FF 0%, #F0F4FF 30%, #F8F9FE 60%, #FDF2F8 100%);
    position:relative;
    overflow:hidden;
  }

  .login-bg {
    position:absolute;
    inset:0;
    background:
      radial-gradient(ellipse 60% 50% at 80% 20%, rgba(79,109,240,0.08) 0%, transparent 60%),
      radial-gradient(ellipse 50% 60% at 20% 80%, rgba(16,185,129,0.06) 0%, transparent 60%),
      radial-gradient(ellipse 40% 40% at 50% 50%, rgba(139,92,246,0.04) 0%, transparent 50%);
  }

  .login-card {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:20px;
    padding:48px 44px;
    width:400px;
    position:relative;
    z-index:1;
    box-shadow:0 20px 60px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  }

  .login-logo {
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:28px;
    font-weight:800;
    margin-bottom:8px;
    color:var(--text);
  }

  .login-logo span { color:var(--primary); }

  .login-tagline {
    font-size:14px;
    color:var(--text3);
    margin-bottom:36px;
  }

  .login-card .form-group { margin-bottom:16px; }
  .login-card input { width:100%; background:var(--card2); }

  .login-btn {
    width:100%;
    background:var(--primary);
    color:#fff;
    border:none;
    border-radius:var(--radius-sm);
    padding:13px;
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    margin-top:10px;
    transition:all 0.25s ease;
    letter-spacing:0.3px;
    box-shadow:0 4px 14px rgba(79,109,240,0.30);
  }

  .login-btn:hover {
    background:var(--primary-hover);
    transform:translateY(-2px);
    box-shadow:0 6px 20px rgba(79,109,240,0.35);
  }

  .login-forgot {
    text-align:center;
    margin-top:18px;
    font-size:13px;
    color:var(--text3);
  }

  .login-forgot span {
    color:var(--primary);
    cursor:pointer;
    font-weight:600;
  }

  .role-select-label {
    font-size:12.5px;
    color:var(--text3);
    margin-bottom:10px;
    text-align:center;
    font-weight:600;
  }

  .role-pills { display:flex; gap:8px; margin-bottom:28px; }

  .role-pill {
    flex:1;
    padding:10px 4px;
    background:var(--card2);
    border:1.5px solid var(--border);
    border-radius:var(--radius-sm);
    text-align:center;
    cursor:pointer;
    transition:all 0.2s ease;
    font-size:12.5px;
    color:var(--text2);
    font-weight:600;
  }

  .role-pill.active {
    background:var(--primary-dim);
    border-color:var(--primary);
    color:var(--primary);
    box-shadow:0 2px 8px rgba(79,109,240,0.15);
  }

  .role-pill:hover:not(.active) {
    border-color:var(--border2);
    color:var(--text);
    background:var(--surface);
  }

  .client-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
  }

  .client-card {
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:22px;
    cursor:pointer;
    transition:all 0.25s ease;
    box-shadow:var(--shadow-sm);
  }

  .client-card:hover {
    border-color:var(--primary);
    transform:translateY(-3px);
    box-shadow:var(--shadow);
  }

  .client-avatar {
    width:48px; height:48px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    margin-bottom:14px;
  }

  .client-name {
    font-size:15.5px;
    font-weight:700;
    margin-bottom:4px;
    color:var(--text);
  }

  .client-category {
    font-size:12px;
    color:var(--text3);
    margin-bottom:16px;
  }

  .client-stats { display:flex; gap:16px; }

  .client-stat { text-align:center; }

  .client-stat .v {
    font-size:18px;
    font-weight:800;
    font-family:'Plus Jakarta Sans',sans-serif;
  }

  .client-stat .l {
    font-size:10.5px;
    color:var(--text3);
    margin-top:2px;
    font-weight:500;
  }

  .mini-chart { display:flex; align-items:flex-end; gap:4px; height:50px; }

  .chart-bar {
    flex:1;
    border-radius:5px 5px 0 0;
    background:var(--primary-dim);
    min-width:14px;
    position:relative;
    cursor:pointer;
    transition:all 0.2s ease;
  }

  .chart-bar:hover { background:var(--primary); }
  .chart-bar.active { background:var(--primary); }

  .notif-panel {
    position:fixed;
    top:0;
    right:-360px;
    height:100vh;
    width:340px;
    background:linear-gradient(180deg, var(--surface) 0%, var(--card) 100%);
    border-left:2px solid var(--border);
    z-index:10001;
    transition:right 0.3s cubic-bezier(0.25,0.8,0.25,1);
    display:flex;
    flex-direction:column;
    box-shadow:0 8px 40px rgba(0,0,0,0.12), -12px 0 32px rgba(0,0,0,0.08);
  }

  .notif-panel.open { right:0; }

  .notif-head {
    padding:18px 20px;
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:linear-gradient(90deg, rgba(79,109,240,0.04) 0%, transparent 100%);
  }

  .notif-title {
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:16px;
    font-weight:700;
    color:var(--text);
    display:flex;
    align-items:center;
    gap:8px;
  }

  .notif-close {
    cursor:pointer;
    color:var(--text3);
    font-size:18px;
    padding:6px 8px;
    border-radius:8px;
    transition:all 0.2s ease;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .notif-close:hover { 
    color:var(--text);
    background:var(--bg);
  }

  .notif-list {
    flex:1;
    overflow-y:auto;
    padding:12px;
  }

  .notif-item {
    padding:12px;
    border-radius:10px;
    margin-bottom:8px;
    background:var(--card2);
    border:1.5px solid var(--border);
    cursor:pointer;
    transition:all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display:flex;
    align-items:flex-start;
    gap:10px;
    position:relative;
  }

  .notif-item:hover {
    background:var(--surface);
    border-color:var(--primary);
    box-shadow:0 4px 16px rgba(79,109,240,0.15), inset 0 1px 0 rgba(255,255,255,0.3);
    transform:translateY(-1px);
  }

  .notif-unread { 
    background:linear-gradient(135deg, var(--primary-dim) 0%, rgba(139,92,246,0.08) 100%);
    border-color:var(--primary);
  }

  .notif-unread:hover {
    background:linear-gradient(135deg, rgba(79,109,240,0.15) 0%, rgba(139,92,246,0.12) 100%);
    box-shadow:0 6px 20px rgba(79,109,240,0.2), inset 0 1px 0 rgba(255,255,255,0.4);
  }

  .notif-read { opacity:0.8; }

  .notif-unread-dot {
    width:10px; height:10px;
    border-radius:50%;
    background:linear-gradient(135deg, var(--primary), #6366F1);
    flex-shrink:0;
    margin-top:5px;
    box-shadow:0 2px 8px rgba(79,109,240,0.35);
    animation:pulse 2s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity:1; transform:scale(1); }
    50% { opacity:0.7; transform:scale(1.1); }
  }

  .notif-time { 
    font-size:11px; 
    color:var(--text3); 
    margin-top:5px; 
    font-weight:500;
  }

  .notif-item-title {
    font-size:13px;
    font-weight:600;
    color:var(--text);
    margin-bottom:3px;
    line-height:1.3;
  }

  .notif-item-sub { 
    font-size:12px; 
    color:var(--text3);
    line-height:1.4;
  }

  .notif-item-time { 
    font-size:11px; 
    color:var(--text3); 
    margin-top:6px; 
    font-weight:500;
  }

  .notif-icon { 
    font-size:18px; 
    flex-shrink:0; 
    margin-top:1px;
    width:28px;
    height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:var(--primary-dim);
    color:var(--primary);
  }

  .notif-unread .notif-icon {
    background:linear-gradient(135deg, var(--primary-dim), rgba(139,92,246,0.12));
    box-shadow:0 2px 8px rgba(79,109,240,0.15);
  }

  .notif-footer {
    padding:12px 12px;
    border-top:1px solid var(--border);
    text-align:center;
    background:linear-gradient(180deg, transparent 0%, rgba(79,109,240,0.02) 100%);
  }

  .notif-clear-btn {
    width:100%;
    background:linear-gradient(135deg, var(--red-dim) 0%, rgba(239,68,68,0.08) 100%);
    border:1.5px solid var(--red);
    border-radius:10px;
    padding:10px 16px;
    font-size:12.5px;
    font-weight:600;
    color:var(--red);
    cursor:pointer;
    transition:all 0.25s ease;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
  }
  
  .notif-clear-btn:hover {
    background:linear-gradient(135deg, rgba(239,68,68,0.15) 0%, rgba(239,68,68,0.1) 100%);
    border-color:var(--red);
    box-shadow:0 4px 12px rgba(239,68,68,0.2);
    transform:translateY(-1px);
  }
  
  .notif-clear-btn:active {
    transform:translateY(0);
  }

  .modal-overlay {
    display:none;
    position:fixed;
    inset:0;
    background:rgba(15,23,42,0.4);
    z-index:300;
    align-items:center;
    justify-content:center;
    backdrop-filter:blur(6px);
  }

  .modal-overlay.show { display:flex; }

  .modal {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:18px;
    padding:30px;
    width:540px;
    max-height:85vh;
    overflow-y:auto;
    position:relative;
    box-shadow:var(--shadow-lg);
  }

  .modal-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:24px;
  }

  .modal-title {
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:18px;
    font-weight:700;
  }

  .modal-close {
    cursor:pointer;
    color:var(--text3);
    font-size:20px;
    transition:all 0.15s;
    width:32px; height:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
  }

  .modal-close:hover {
    color:var(--text);
    background:var(--card2);
  }

  .task-detail-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:22px;
  }

  .detail-meta-row {
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    margin-bottom:16px;
  }

  .detail-section { margin-bottom:20px; }

  .detail-label {
    font-size:11.5px;
    color:var(--text3);
    font-weight:700;
    letter-spacing:0.5px;
    text-transform:uppercase;
    margin-bottom:7px;
  }

  .detail-value {
    font-size:14px;
    color:var(--text);
  }

  .attachment-pill {
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:var(--card2);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    padding:8px 14px;
    font-size:12.5px;
    color:var(--text2);
    cursor:pointer;
    transition:all 0.2s ease;
    font-weight:500;
  }

  .attachment-pill:hover {
    border-color:var(--primary);
    color:var(--primary);
    background:var(--primary-dim);
  }

  .status-select-row { display:flex; gap:8px; margin-top:8px; }

  .status-btn {
    flex:1;
    padding:10px;
    border:1.5px solid var(--border);
    border-radius:var(--radius-sm);
    background:var(--card2);
    color:var(--text3);
    font-size:12.5px;
    font-weight:600;
    cursor:pointer;
    text-align:center;
    transition:all 0.2s ease;
  }

  .status-btn:hover { border-color:var(--border2); color:var(--text2); }

  .status-btn.active-todo {
    border-color:var(--text3);
    color:var(--text);
    background:var(--card2);
  }

  .status-btn.active-prog {
    border-color:var(--blue);
    color:var(--blue);
    background:var(--blue-dim);
  }

  .status-btn.active-done {
    border-color:var(--teal);
    color:var(--teal);
    background:var(--teal-dim);
  }

  .emp-row {
    display:flex;
    align-items:center;
    gap:14px;
    padding:15px;
    border-radius:var(--radius-sm);
    background:var(--card2);
    border:1px solid var(--border);
    margin-bottom:8px;
    cursor:pointer;
    transition:all 0.2s ease;
  }

  .emp-row:hover {
    border-color:var(--primary);
    box-shadow:var(--shadow-sm);
  }

  .emp-info { flex:1; }
  .emp-name { font-size:14px; font-weight:600; color:var(--text); }
  .emp-role { font-size:12px; color:var(--text3); }
  .emp-stats { display:flex; gap:14px; }
  .emp-stat-v { font-family:'Plus Jakarta Sans',sans-serif; font-size:18px; font-weight:800; }
  .emp-stat-l { font-size:10.5px; color:var(--text3); }

  .report-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    margin-bottom:22px;
  }

  .report-card {
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:22px;
    box-shadow:var(--shadow-sm);
  }

  .report-value {
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:38px;
    font-weight:800;
    color:var(--text);
  }

  .report-label {
    font-size:13.5px;
    color:var(--text3);
    margin-top:4px;
    font-weight:500;
  }

  .donut-row { display:flex; align-items:center; gap:28px; }

  .donut {
    width:100px; height:100px;
    position:relative;
    flex-shrink:0;
  }

  .donut svg { transform:rotate(-90deg); }

  .donut-label {
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:18px;
    font-weight:800;
  }

  .legend {
    display:flex;
    flex-direction:column;
    gap:10px;
  }

  .legend-item {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:13.5px;
    font-weight:500;
  }

  .legend-dot {
    width:10px; height:10px;
    border-radius:3px;
    flex-shrink:0;
  }

  .two-col { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
  .three-col { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; }

  /* Flexible auto-adjusting dashboard grid */
  .dash-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(460px, 1fr)); gap:20px; margin-bottom:20px; align-items:stretch; }
  .dash-grid > .card { display:flex; flex-direction:column; }

  ::-webkit-scrollbar { width:6px; height:6px; }
  ::-webkit-scrollbar-track { background:transparent; }
  ::-webkit-scrollbar-thumb { background:var(--border2); border-radius:10px; }
  ::-webkit-scrollbar-thumb:hover { background:var(--text3); }

  .page.active { animation:fadeIn 0.3s ease; }

  @keyframes fadeIn {
    from { opacity:0; transform:translateY(10px); }
    to { opacity:1; transform:translateY(0); }
  }

  .perf-row {
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
  }

  .perf-name {
    font-size:13px;
    color:var(--text2);
    width:110px;
    flex-shrink:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-weight:500;
  }

  .perf-bar-wrap {
    flex:1;
    height:7px;
    background:var(--border);
    border-radius:10px;
    overflow:hidden;
  }

  .perf-bar-fill {
    height:100%;
    border-radius:10px;
    transition:width 0.5s ease;
  }

  .perf-pct {
    font-size:12.5px;
    color:var(--text3);
    width:36px;
    text-align:right;
    flex-shrink:0;
    font-weight:600;
  }

  .month-chart {
    display:flex;
    align-items:flex-end;
    gap:8px;
    height:80px;
    padding:0 4px;
  }

  .mc-bar {
    flex:1;
    border-radius:5px 5px 0 0;
    position:relative;
    cursor:pointer;
    transition:all 0.2s ease;
  }

  .mc-bar:hover { opacity:0.8; transform:scaleY(1.03); transform-origin:bottom; }

  .mc-label {
    font-size:9.5px;
    color:var(--text3);
    text-align:center;
    margin-top:4px;
  }

  .approval-card {
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:18px;
    margin-bottom:12px;
    display:flex;
    align-items:center;
    gap:16px;
    box-shadow:var(--shadow-sm);
    transition:all 0.2s ease;
  }

  .approval-card:hover {
    border-color:var(--border2);
    box-shadow:var(--shadow);
  }

  .approval-thumb {
    width:62px; height:62px;
    border-radius:var(--radius-sm);
    object-fit:cover;
    background:var(--card2);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    flex-shrink:0;
    border:1px solid var(--border);
  }

  .approval-info { flex:1; }
  .approval-title { font-size:14.5px; font-weight:600; color:var(--text); }
  .approval-meta { font-size:12.5px; color:var(--text3); margin-top:4px; }
  .approval-actions { display:flex; gap:8px; }

  .btn-approve {
    background:var(--teal-dim);
    color:var(--teal);
    border:1.5px solid var(--teal);
    border-radius:var(--radius-sm);
    padding:8px 16px;
    font-size:12.5px;
    font-weight:700;
    cursor:pointer;
    transition:all 0.2s ease;
  }

  .btn-approve:hover {
    background:var(--teal);
    color:#fff;
    box-shadow:0 2px 8px rgba(16,185,129,0.25);
  }

  .btn-reject {
    background:var(--red-dim);
    color:var(--red);
    border:1.5px solid var(--red);
    border-radius:var(--radius-sm);
    padding:8px 16px;
    font-size:12.5px;
    font-weight:700;
    cursor:pointer;
    transition:all 0.2s ease;
  }

  .btn-reject:hover {
    background:var(--red);
    color:#fff;
    box-shadow:0 2px 8px rgba(239,68,68,0.25);
  }

  .my-cal-grid {
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:5px;
  }

  .my-cal-day {
    background:var(--card2);
    border:1px solid var(--border);
    border-radius:8px;
    min-height:68px;
    padding:6px;
    font-size:10px;
    transition:all 0.15s ease;
  }

  /* ── Date Change Request cards ── */
  .dcr-card{background:var(--card2);border-radius:var(--radius-sm);padding:14px 16px;display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
  .dcr-info{flex:1;min-width:220px}
  .dcr-title{font-weight:600;font-size:13px;color:var(--text);margin-bottom:3px}
  .dcr-meta{font-size:11px;color:var(--text3);margin-bottom:6px}
  .dcr-dates{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text2)}
  .dcr-date-old strong{color:var(--text3)}
  .dcr-date-new strong{color:var(--primary)}
  .dcr-arrow{color:var(--text3);font-size:14px}
  .dcr-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}
  .dcr-btn{padding:6px 12px;border-radius:8px;font-size:11px;font-weight:600;border:none;cursor:pointer;transition:all .15s ease}
  .dcr-approve{background:var(--teal-dim);color:var(--teal)}
  .dcr-approve:hover{background:var(--teal);color:#fff}
  .dcr-reject{background:var(--red-dim);color:var(--red)}
  .dcr-reject:hover{background:var(--red);color:#fff}
  .dcr-view{background:var(--blue-dim);color:var(--blue);display:inline-flex;align-items:center}
  .dcr-view:hover{background:var(--blue);color:#fff}
  .dcr-reject-form{width:100%;padding-top:6px}

  .my-cal-day.has-task {
    border-color:var(--primary);
    background:var(--primary-dim);
  }

  .my-cal-task {
    background:var(--primary-dim);
    color:var(--primary);
    border-radius:4px;
    padding:2px 5px;
    margin-top:3px;
    font-size:9.5px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-weight:600;
  }

  .my-cal-task.teal { background:var(--teal-dim); color:var(--teal); }
  .my-cal-task.blue { background:var(--blue-dim); color:var(--blue); }

  .divider {
    border:none;
    border-top:1px solid var(--border);
    margin:18px 0;
  }

  .overlay-bg {
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0, 0, 0, 0);
    z-index:150;
    pointer-events:none;
    transition:all 0.3s ease;
    opacity:0;
  }

  .overlay-bg.show { 
    display:block; 
    pointer-events:auto;
    background:rgba(0, 0, 0, 0.2);
    backdrop-filter:blur(4px);
    opacity:1;
  }

  /* ══════════════════════════════════════════════════════
     DESIGNER WORKFLOW STYLES
     ══════════════════════════════════════════════════════ */

  /* ── Progress Bar ── */
  .wf-progress-bar {
    display:flex;
    align-items:center;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:16px 24px;
    margin-bottom:14px;
    gap:0;
    overflow-x:auto;
  }
  .wf-step {
    display:flex;
    align-items:center;
    gap:10px;
    flex-shrink:0;
    padding:6px 0;
  }
  .wf-step-icon {
    width:36px; height:36px;
    border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:14px;
    background:var(--card2);
    border:2px solid var(--border);
    color:var(--text3);
    transition:all 0.3s;
    flex-shrink:0;
  }
  .wf-step.wf-done .wf-step-icon {
    background:var(--teal);
    border-color:var(--teal);
    color:#fff;
    font-size:12px;
  }
  .wf-step.wf-current .wf-step-icon {
    background:var(--primary-dim);
    border-color:var(--primary);
    color:var(--primary);
    animation:wfPulse 2s ease-in-out infinite;
  }
  .wf-step-info { min-width:0; }
  .wf-step-label {
    font-size:12px;
    font-weight:700;
    color:var(--text3);
    white-space:nowrap;
  }
  .wf-step.wf-done .wf-step-label { color:var(--teal); }
  .wf-step.wf-current .wf-step-label { color:var(--primary); }
  .wf-step-time {
    font-size:10px;
    color:var(--text3);
    margin-top:1px;
    white-space:nowrap;
  }
  .wf-step-now { color:var(--primary); font-weight:600; }
  .wf-connector {
    flex:1;
    min-width:24px;
    height:2px;
    background:var(--border);
    margin:0 8px;
  }
  .wf-conn-done { background:var(--teal); }
  @keyframes wfPulse {
    0%, 100% { box-shadow:0 0 0 0 rgba(99,102,241,0.3); }
    50% { box-shadow:0 0 0 8px rgba(99,102,241,0); }
  }

  /* ── Timer / Status Bars ── */
  .wf-timer-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:linear-gradient(90deg, rgba(59,130,246,0.06), transparent);
    border:1px solid rgba(59,130,246,0.15);
    border-radius:var(--radius-sm);
    padding:10px 16px;
    margin-bottom:14px;
  }
  .wf-review-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:linear-gradient(90deg, rgba(139,92,246,0.06), transparent);
    border:1px solid rgba(139,92,246,0.15);
    border-radius:var(--radius-sm);
    padding:10px 16px;
    margin-bottom:14px;
  }
  .wf-done-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:linear-gradient(90deg, rgba(16,185,129,0.06), transparent);
    border:1px solid rgba(16,185,129,0.15);
    border-radius:var(--radius-sm);
    padding:10px 16px;
    margin-bottom:14px;
  }
  .wf-pulse {
    width:10px; height:10px;
    border-radius:50%;
    background:var(--blue);
    animation:wfDotPulse 1.5s ease-in-out infinite;
    flex-shrink:0;
  }
  @keyframes wfDotPulse {
    0%, 100% { opacity:1; transform:scale(1); }
    50% { opacity:0.4; transform:scale(0.7); }
  }
  .wf-elapsed {
    font-size:12px;
    font-weight:700;
    color:var(--blue);
    background:rgba(59,130,246,0.1);
    padding:3px 10px;
    border-radius:99px;
  }

  /* ── Submit Button ── */
  .wf-submit-btn {
    width:100%;
    padding:14px 20px;
    background:linear-gradient(135deg, var(--primary), #6366F1);
    color:#fff;
    border:none;
    border-radius:var(--radius-sm);
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    transition:all 0.2s;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-family:'Plus Jakarta Sans',sans-serif;
  }
  .wf-submit-btn:hover {
    transform:translateY(-1px);
    box-shadow:0 6px 20px rgba(99,102,241,0.35);
  }
  .wf-submit-btn:active { transform:translateY(0); }

  /* ── Status Cards ── */
  .wf-action-card { padding:4px 0 0; }
  .wf-status-card {
    text-align:center;
    padding:24px 16px;
    border-radius:var(--radius-sm);
  }
  .wf-status-review {
    background:rgba(139,92,246,0.04);
    border:1px solid rgba(139,92,246,0.12);
  }
  .wf-status-done {
    background:rgba(16,185,129,0.04);
    border:1px solid rgba(16,185,129,0.12);
  }

  /* ── Revision Alert ── */
  .rev-alert-card {
    padding:16px;
    background:rgba(249,115,22,0.05);
    border:1px solid rgba(249,115,22,0.2);
    border-radius:var(--radius-sm);
    margin-bottom:0;
  }
  .rev-alert-header {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:10px;
  }
  .rev-alert-icon {
    width:36px;
    height:36px;
    border-radius:10px;
    background:rgba(249,115,22,0.12);
    color:#F97316;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:15px;
    flex-shrink:0;
  }
  .rev-alert-title {
    font-size:14px;
    font-weight:700;
    color:#F97316;
    display:flex;
    align-items:center;
    gap:6px;
  }
  .rev-badge {
    font-size:10px;
    font-weight:700;
    background:#F97316;
    color:#fff;
    padding:2px 8px;
    border-radius:999px;
  }
  .rev-alert-meta {
    font-size:11px;
    color:var(--text3);
    margin-top:2px;
  }
  .rev-alert-note {
    background:rgba(249,115,22,0.06);
    border:1px solid rgba(249,115,22,0.12);
    border-radius:8px;
    padding:10px 12px;
    margin-bottom:10px;
  }
  .rev-alert-note-label {
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:0.3px;
    color:#F97316;
    margin-bottom:4px;
  }
  .rev-alert-note-text {
    font-size:12.5px;
    color:var(--text);
    line-height:1.5;
  }
  .rev-alert-action {
    font-size:11px;
    font-weight:600;
    color:var(--text3);
    text-align:center;
    padding:6px 0 0;
  }

  /* ── Revision Badge (Task List) ── */
  .wf-rev-badge {
    display:inline-flex;
    align-items:center;
    gap:4px;
    font-size:10px;
    font-weight:700;
    background:#F97316;
    color:#fff;
    padding:2px 8px;
    border-radius:999px;
    margin-left:6px;
    vertical-align:middle;
    animation:revPulse 2s ease-in-out infinite;
  }
  .wf-task-revised {
    border-left:3px solid #F97316 !important;
    background:rgba(249,115,22,0.03) !important;
  }
  @keyframes revPulse {
    0%, 100% { opacity:1; }
    50% { opacity:0.7; }
  }

  /* ── Task List (Designer My Tasks) ── */
  .wf-mini-stat {
    display:flex;
    align-items:center;
    gap:6px;
    padding:6px 14px;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    border-left:3px solid var(--wms-color, var(--primary));
  }
  .wf-mini-val {
    font-size:16px;
    font-weight:800;
    color:var(--wms-color, var(--text));
  }
  .wf-mini-label {
    font-size:11px;
    font-weight:600;
    color:var(--text3);
  }
  .wf-task-row {
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 8px;
    border-bottom:1px solid var(--border);
    transition:all 0.15s;
    text-decoration:none;
    color:var(--text);
    border-radius:var(--radius-sm);
  }
  .wf-task-row:last-child { border-bottom:none; }
  .wf-task-row:hover { background:var(--card2); }
  .wf-task-active { background:linear-gradient(90deg, rgba(59,130,246,0.04), transparent); }
  .wf-task-active:hover { background:rgba(59,130,246,0.08); }
  .wf-task-locked { cursor:not-allowed; }
  .wf-task-status-dot {
    width:8px; height:8px;
    border-radius:50%;
    flex-shrink:0;
  }
  .wf-task-title {
    font-size:13.5px;
    font-weight:600;
    margin-bottom:2px;
    color:var(--text);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .wf-task-meta {
    font-size:11.5px;
    color:var(--text3);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .wf-task-deadline {
    font-size:11.5px;
    color:var(--text3);
    min-width:64px;
    text-align:right;
    white-space:nowrap;
    flex-shrink:0;
  }
  .wf-task-deadline.overdue { color:var(--red); font-weight:600; }
  .wf-task-arrow {
    font-size:11px;
    color:var(--text3);
    opacity:0;
    transition:all 0.15s;
    flex-shrink:0;
  }
  .wf-task-row:hover .wf-task-arrow { opacity:1; transform:translateX(2px); }

  @media (max-width:768px) {
    .wf-progress-bar { padding:12px 14px; }
    .wf-step-info { display:none; }
    .wf-connector { min-width:16px; margin:0 4px; }
    .wf-timer-bar, .wf-review-bar, .wf-done-bar { flex-direction:column; gap:6px; align-items:flex-start; }
  }

  /* ===== PAGE LOADER ===== */
  .page-loader {
    position:fixed;
    inset:0;
    background:linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
    opacity:0;
    pointer-events:none;
    transition:opacity 0.15s ease;
  }

  /* Ensure [hidden] always wins — prevents display:flex from overriding it and
     causing the loader logo to briefly render/animate on every page load. */
  .page-loader[hidden] { display:none !important; }

  .page-loader.show {
    opacity:1;
    pointer-events:auto;
  }

  .loader-container {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:20px;
  }

  .loader-logo {
    width:180px;
    height:auto;
    margin-bottom:8px;
  }

  .loader-spinner {
    width:50px;
    height:50px;
    border:4px solid rgba(79,109,240,0.15);
    border-top:4px solid var(--primary);
    border-right:4px solid var(--primary);
    border-radius:50%;
    animation:spin 0.8s linear infinite;
  }

  .loader-text {
    font-size:14px;
    font-weight:600;
    color:var(--text2);
    letter-spacing:0.3px;
  }

  @keyframes spin {
    to { transform:rotate(360deg); }
  }

  .info-chip {
    display:inline-flex;
    align-items:center;
    gap:5px;
    font-size:12.5px;
    color:var(--text3);
    font-weight:500;
  }

  /* ═══════════════════ GREETING HERO ═══════════════════ */
  .greeting-hero {
    position:relative;
    border-radius:var(--radius);
    padding:28px 32px;
    margin-bottom:24px;
    overflow:hidden;
    background:linear-gradient(135deg, #D97706 0%, #EA580C 50%, #F97316 100%);
    box-shadow:0 8px 32px rgba(217,119,6,0.25), 0 2px 8px rgba(0,0,0,0.06);
    animation:ghSlideIn 0.5s cubic-bezier(0.25,0.8,0.25,1) both;
  }
  @keyframes ghSlideIn {
    from { opacity:0; transform:translateY(-12px); }
    to { opacity:1; transform:translateY(0); }
  }

  /* Time-of-day gradient variants */
  .greeting-hero.morning { background:linear-gradient(135deg, #D97706 0%, #EA580C 40%, #F97316 100%); }
  .greeting-hero.afternoon { background:linear-gradient(135deg, #DC2626 0%, #EF4444 40%, #F87171 100%); }
  .greeting-hero.evening { background:linear-gradient(135deg, #B45309 0%, #D97706 40%, #F59E0B 100%); box-shadow:0 8px 32px rgba(178,83,9,0.25), 0 2px 8px rgba(0,0,0,0.06); }

  /* Decorative floating shapes */
  .gh-shape {
    position:absolute;
    border-radius:50%;
    background:rgba(255,255,255,0.06);
    pointer-events:none;
  }
  .gh-shape-1 {
    width:180px; height:180px;
    top:-60px; right:-30px;
    animation:ghFloat1 6s ease-in-out infinite;
  }
  .gh-shape-2 {
    width:120px; height:120px;
    bottom:-40px; left:15%;
    background:rgba(255,255,255,0.04);
    animation:ghFloat2 8s ease-in-out infinite;
  }
  .gh-shape-3 {
    width:60px; height:60px;
    top:20%; right:25%;
    background:rgba(255,255,255,0.08);
    animation:ghFloat3 5s ease-in-out infinite;
  }
  .gh-glow {
    position:absolute;
    top:50%; left:50%;
    width:300px; height:300px;
    background:radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    transform:translate(-50%, -50%);
    pointer-events:none;
  }
  @keyframes ghFloat1 {
    0%, 100% { transform:translateY(0) rotate(0deg); }
    50% { transform:translateY(-15px) rotate(5deg); }
  }
  @keyframes ghFloat2 {
    0%, 100% { transform:translateX(0) rotate(0deg); }
    50% { transform:translateX(12px) rotate(-3deg); }
  }
  @keyframes ghFloat3 {
    0%, 100% { transform:scale(1); }
    50% { transform:scale(1.15); }
  }

  /* Content layout */
  .gh-content {
    position:relative;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
  }
  .gh-left { flex:1; min-width:0; }

  /* Badge */
  .gh-badge {
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:rgba(255,255,255,0.15);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
    border:1px solid rgba(255,255,255,0.2);
    border-radius:999px;
    padding:5px 14px;
    font-size:12px;
    font-weight:600;
    color:#fff;
    margin-bottom:10px;
    letter-spacing:0.3px;
  }
  .gh-badge-dot {
    width:7px; height:7px;
    border-radius:50%;
    background:#4ADE80;
    box-shadow:0 0 6px rgba(74,222,128,0.5);
    animation:ghDotPulse 2s ease-in-out infinite;
  }
  @keyframes ghDotPulse {
    0%, 100% { opacity:1; box-shadow:0 0 6px rgba(74,222,128,0.5); }
    50% { opacity:0.7; box-shadow:0 0 12px rgba(74,222,128,0.3); }
  }

  /* Title */
  .gh-title {
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:26px;
    font-weight:800;
    color:#fff;
    letter-spacing:-0.5px;
    text-shadow:0 2px 12px rgba(0,0,0,0.12);
    margin:0 0 4px;
  }
  .gh-title span {
    background:linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.8));
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
  }

  /* Subtitle */
  .gh-subtitle {
    font-size:13.5px;
    color:rgba(255,255,255,0.75);
    margin:0 0 14px;
    font-weight:500;
  }

  /* Stat Chips */
  .gh-chips {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }
  .gh-chip {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:5px 12px;
    border-radius:999px;
    font-size:11.5px;
    font-weight:600;
    color:#fff;
    background:rgba(255,255,255,0.15);
    backdrop-filter:blur(6px);
    -webkit-backdrop-filter:blur(6px);
    border:1px solid rgba(255,255,255,0.12);
    transition:all 0.2s ease;
    cursor:default;
  }
  .gh-chip:hover {
    background:rgba(255,255,255,0.22);
    transform:translateY(-1px);
  }
  .gh-chip i { font-size:10px; }
  .gh-chip-warning { background:rgba(245,158,11,0.3); border-color:rgba(245,158,11,0.4); }
  .gh-chip-danger { background:rgba(239,68,68,0.3); border-color:rgba(239,68,68,0.4); animation:ghChipPulse 2.5s ease-in-out infinite; }
  .gh-chip-success { background:rgba(16,185,129,0.25); border-color:rgba(16,185,129,0.35); }
  .gh-chip-info { background:rgba(59,130,246,0.25); border-color:rgba(59,130,246,0.35); }
  @keyframes ghChipPulse {
    0%, 100% { box-shadow:none; }
    50% { box-shadow:0 0 12px rgba(239,68,68,0.3); }
  }

  /* Right side: clock + emoji */
  .gh-right {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    flex-shrink:0;
  }
  .gh-clock {
    display:flex;
    align-items:baseline;
    gap:4px;
    background:rgba(255,255,255,0.1);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
    border:1px solid rgba(255,255,255,0.15);
    border-radius:14px;
    padding:8px 16px;
  }
  .gh-clock-time {
    font-family:'Plus Jakarta Sans',monospace;
    font-size:32px;
    font-weight:800;
    color:#fff;
    letter-spacing:-1px;
    text-shadow:0 2px 8px rgba(0,0,0,0.15);
    line-height:1;
  }
  .gh-clock-ampm {
    font-size:13px;
    font-weight:700;
    color:rgba(255,255,255,0.7);
    letter-spacing:0.5px;
  }
  .gh-emoji {
    font-size:38px;
    filter:drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    animation:ghEmojiFloat 3s ease-in-out infinite;
  }
  @keyframes ghEmojiFloat {
    0%, 100% { transform:translateY(0) rotate(0deg); }
    25% { transform:translateY(-5px) rotate(3deg); }
    75% { transform:translateY(3px) rotate(-2deg); }
  }

  /* Responsive */
  @media (max-width:768px) {
    .greeting-hero { padding:20px; }
    .gh-content { flex-direction:column; text-align:center; }
    .gh-chips { justify-content:center; }
    .gh-badge { margin:0 auto 10px; }
    .gh-title { font-size:20px; }
    .gh-right { flex-direction:row; gap:16px; }
    .gh-clock-time { font-size:24px; }
  }

  /* ── Global Link Reset ── */
  a { text-decoration:none; color:inherit; }
  a.btn-primary, a.btn-sec, a.sec-link { display:inline-flex; }

  /* ── Content Fade-In Animation ── */
  .main { animation:contentFadeIn 0.35s ease; }
  @keyframes contentFadeIn {
    from { opacity:0; transform:translateY(8px); }
    to { opacity:1; transform:translateY(0); }
  }

  /* ── Better Table Stripes ── */
  tbody tr:nth-child(even) { background:var(--card2); }
  tbody tr:nth-child(even):hover { background:var(--border); }

  /* ── Smoother Stat Card Glow ── */
  .stat-card { transition:all 0.3s cubic-bezier(0.25,0.8,0.25,1); }
  .stat-card:hover {
    border-color:color-mix(in srgb, var(--accent-c) 40%, transparent);
    box-shadow:0 8px 24px rgba(0,0,0,0.06), 0 0 0 1px color-mix(in srgb, var(--accent-c) 12%, transparent);
  }

  /* ── Task Card Hover Glow ── */
  .task-card { transition:all 0.25s cubic-bezier(0.25,0.8,0.25,1); }
  .task-card:hover {
    border-color:var(--primary);
    box-shadow:0 8px 20px rgba(79,109,240,0.10), 0 0 0 1px var(--primary-dim);
    transform:translateY(-2px);
  }

  /* ── Better Focus States (Accessibility) ── */
  .btn-primary:focus-visible, .btn-sec:focus-visible, .status-btn:focus-visible,
  .nav-item:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline:2px solid var(--primary);
    outline-offset:2px;
  }

  /* ── Avatar ring on hover ── */
  .av-sm { transition:all 0.2s ease; }
  .av-sm:hover { transform:scale(1.15); box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }

  /* ── Client Card Shimmer ── */
  .client-card { transition:all 0.3s cubic-bezier(0.25,0.8,0.25,1); }
  .client-card:hover {
    transform:translateY(-4px);
    box-shadow:0 12px 32px rgba(0,0,0,0.08);
    border-color:var(--brand, var(--primary));
  }
  .client-card:hover .cl-accent-strip {
    height:5px;
  }
  .cl-accent-strip { transition:height .2s ease; }

  /* ── Approval Card Slide-in ── */
  .approval-card { transition:all 0.25s ease; }
  .approval-card:hover {
    transform:translateX(4px);
    border-left:3px solid var(--primary);
  }

  /* ── Alert item entrance stagger ── */
  .alert-item { animation:slideInLeft 0.3s ease backwards; }
  .alert-item:nth-child(1) { animation-delay:0.05s; }
  .alert-item:nth-child(2) { animation-delay:0.1s; }
  .alert-item:nth-child(3) { animation-delay:0.15s; }
  .alert-item:nth-child(4) { animation-delay:0.2s; }
  @keyframes slideInLeft {
    from { opacity:0; transform:translateX(-12px); }
    to { opacity:1; transform:translateX(0); }
  }

  /* ── Perf bar animated fill ── */
  .perf-bar-fill { animation:barGrow 0.6s ease forwards; transform-origin:left; }
  @keyframes barGrow {
    from { width:0 !important; }
  }

  /* ── Progress bar animated fill ── */
  .progress-fill { animation:barGrow 0.8s ease forwards; transform-origin:left; }

  /* ── Kanban column drop target hint ── */
  .kanban-col { transition:all 0.2s ease; }
  .kanban-col:hover { background:color-mix(in srgb, var(--card2) 80%, var(--primary-dim) 20%); }

  /* ── Report card counter animation helper ── */
  .report-value { transition:color 0.3s ease; }
  .report-card { transition:all 0.25s ease; }
  .report-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }

  /* ── Status badge shimmer ── */
  .status { transition:all 0.2s ease; }

  /* ── Better scrollbar for notification panel ── */
  .notif-list::-webkit-scrollbar { width:4px; }
  .notif-list::-webkit-scrollbar-thumb { background:var(--border); border-radius:10px; }

  /* ── Flash toast entrance ── */
  @keyframes toastSlideIn {
    from { opacity:0; transform:translateY(20px); }
    to { opacity:1; transform:translateY(0); }
  }

  /* ── Empty State Styling ── */
  .empty-state {
    padding:48px 20px;
    text-align:center;
    color:var(--text3);
  }
  .empty-state-icon { font-size:48px; margin-bottom:12px; opacity:0.5; }
  .empty-state-text { font-size:14px; font-weight:500; }
  .empty-state-sub { font-size:12.5px; color:var(--text3); margin-top:4px; }

  /* ── Breadcrumb ── */
  .breadcrumb {
    display:flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    color:var(--text3);
    margin-bottom:4px;
  }
  .breadcrumb a { color:var(--primary); font-weight:500; }
  .breadcrumb a:hover { text-decoration:underline; }
  .breadcrumb-sep { color:var(--border2); }

  /* ── Responsive ── */
  @media (max-width: 1400px) {
    .kanban { grid-template-columns:repeat(6,1fr); gap:8px; }
    .kanban-col { padding:10px; }
  }

  @media (max-width: 1200px) {
    .stats-grid { grid-template-columns:repeat(2,1fr); }
    .kanban { grid-template-columns:repeat(3,1fr); }
    .client-grid { grid-template-columns:repeat(2,1fr); }
    .report-grid { grid-template-columns:repeat(2,1fr); }
    .two-col { grid-template-columns:1fr; }
    .dash-grid { grid-template-columns:1fr; }
  }

  @media (max-width: 768px) {
    .main { margin-left:0; padding:16px; max-width:100%; }
    .stats-grid { grid-template-columns:1fr; }
    .kanban { grid-template-columns:1fr; }
    .client-grid { grid-template-columns:1fr; }
    .report-grid { grid-template-columns:1fr; }
    .form-grid { grid-template-columns:1fr; }
    .two-col { grid-template-columns:1fr; }
    .three-col { grid-template-columns:1fr; }
    .dash-grid { grid-template-columns:1fr; }
    .cal-grid { font-size:10px; }
    .cal-day { min-height:60px; }
    .page-title { font-size:20px; }
    .topbar { flex-direction:column; align-items:flex-start; }
    .login-card { width:calc(100% - 32px); padding:32px 24px; }
    .greeting-band { flex-direction:column; text-align:center; gap:12px; }
    .modal { width:calc(100% - 24px); margin:12px; }
    .donut-row { flex-direction:column; align-items:center; }
    .status-select-row { flex-wrap:wrap; }
    
    /* Disable sidebar brand zoom on mobile */
    .sidebar .sidebar-brand { cursor: default; }
    .sidebar .sidebar-brand:hover .brand-logo { transform: none; opacity: 1; }
  }

  /* ── Mobile hamburger ── */
  .mobile-menu-btn {
    display:none;
    width:38px; height:38px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:18px;
  }
  @media (max-width: 768px) {
    .mobile-menu-btn { display:flex; }
    .sidebar.mobile-open { display:flex; z-index:200; }
  }

/* ═══ STRATEGIST TASK DETAIL ═══ */
.std-approval-bar {
  display:flex;align-items:center;justify-content:space-between;padding:16px 20px;
  background:linear-gradient(135deg,rgba(139,92,246,0.08),rgba(59,130,246,0.06));
  border:1px solid rgba(139,92,246,0.2);border-radius:var(--radius);margin-bottom:16px;
}
.std-pulse { width:10px;height:10px;border-radius:50%;animation:pulse-ring 1.5s infinite; }
@keyframes pulse-ring { 0%{box-shadow:0 0 0 0 rgba(139,92,246,0.4)} 70%{box-shadow:0 0 0 8px rgba(139,92,246,0)} 100%{box-shadow:0 0 0 0 rgba(139,92,246,0)} }
.std-done-bar {
  padding:14px 20px;background:rgba(16,185,129,0.06);border:1px solid rgba(16,185,129,0.2);
  border-radius:var(--radius);margin-bottom:16px;
}
.std-approve-btn {
  display:inline-flex;align-items:center;gap:6px;padding:9px 18px;
  background:linear-gradient(135deg,#10B981,#059669);color:#fff;border:none;
  border-radius:8px;font-size:12px;font-weight:700;cursor:pointer;font-family:inherit;
  transition:all .15s ease;
}
.std-approve-btn:hover { filter:brightness(1.1);transform:translateY(-1px);box-shadow:0 4px 12px rgba(16,185,129,0.3); }
.std-revision-btn {
  display:inline-flex;align-items:center;gap:6px;padding:9px 18px;
  background:rgba(249,115,22,0.1);color:var(--yellow);border:1px solid rgba(249,115,22,0.3);
  border-radius:8px;font-size:12px;font-weight:700;cursor:pointer;font-family:inherit;
  transition:all .15s ease;
}
.std-revision-btn:hover { background:rgba(249,115,22,0.18); }

/* Media preview */
.std-media-preview { border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--card2); }
.std-media-file { width:100%;max-height:500px;object-fit:contain;display:block;background:#0a0a0a; }
.std-media-actions { display:flex;gap:6px;padding:10px;border-top:1px solid var(--border); }
.std-media-upload-zone {
  border:2px dashed var(--border);border-radius:var(--radius-sm);padding:30px 20px;
  text-align:center;cursor:pointer;transition:border-color .2s;
}
.std-media-upload-zone:hover { border-color:var(--primary); }

/* ═══════════════════════════════════════════════
   ACTION ITEMS SYSTEM
   ═══════════════════════════════════════════════ */

/* Stat Cards */
.ai-stats-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:16px; margin-bottom:20px; }
.ai-stat-card { display:flex; align-items:center; gap:14px; padding:20px 22px; background:var(--card); border-radius:16px; border:1px solid var(--border); transition:all .25s ease; position:relative; overflow:hidden; }
.ai-stat-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:var(--asc, var(--primary)); opacity:0; transition:opacity .25s; }
.ai-stat-card:hover { border-color:color-mix(in srgb, var(--asc, var(--border)) 50%, transparent); box-shadow:0 8px 24px rgba(0,0,0,.07); transform:translateY(-2px); }
.ai-stat-card:hover::before { opacity:1; }
.ai-stat-icon { width:48px; height:48px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:19px; background:color-mix(in srgb, var(--asc, var(--primary)) 12%, transparent); color:var(--asc, var(--primary)); flex-shrink:0; transition:transform .3s; }
.ai-stat-card:hover .ai-stat-icon { transform:scale(1.08); }
.ai-stat-info { display:flex; flex-direction:column; min-width:0; flex:1; }
.ai-stat-val { font-size:26px; font-weight:800; color:var(--text); line-height:1.1; }
.ai-stat-label { font-size:12px; font-weight:600; color:var(--text3); margin-top:3px; letter-spacing:.3px; }
.ai-stat-alert { border-color:rgba(239,68,68,.3); background:linear-gradient(135deg, rgba(239,68,68,.02), rgba(239,68,68,.06)); animation:ai-pulse-border 2s infinite; }
@keyframes ai-pulse-border { 0%,100% { border-color:rgba(239,68,68,.3); } 50% { border-color:rgba(239,68,68,.6); } }

/* Filter Bar */
.ai-filter-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:4px; }
.ai-filter-tabs { display:flex; gap:5px; padding:4px; background:var(--card2); border-radius:12px; }
.ai-tab { padding:9px 18px; border-radius:9px; font-size:13px; font-weight:600; color:var(--text3); text-decoration:none; transition:all .25s; border:1px solid transparent; display:flex; align-items:center; gap:6px; }
.ai-tab:hover { background:var(--card); color:var(--text); box-shadow:0 2px 8px rgba(0,0,0,.06); }
.ai-tab.active { background:var(--primary); color:#fff; border-color:var(--primary); box-shadow:0 4px 12px rgba(204,49,14,.2); }
.ai-tab-count { font-size:10px; font-weight:800; background:rgba(255,255,255,.25); padding:2px 7px; border-radius:10px; min-width:18px; text-align:center; }
.ai-tab:not(.active) .ai-tab-count { background:rgba(0,0,0,.06); color:var(--text2); }
.ai-tab-count-red:not(.active .ai-tab-count) { background:rgba(239,68,68,.12); color:var(--red); }

/* List Header */
.ai-list-header { display:flex; justify-content:space-between; align-items:center; padding:10px 18px; font-size:12px; font-weight:600; color:var(--text3); border-bottom:1px solid var(--border); }

/* Item List */
.ai-list { display:flex; flex-direction:column; }
.ai-item { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px 18px; border-bottom:1px solid var(--border); transition:background .15s; }
.ai-item:last-child { border-bottom:none; }
.ai-item:hover { background:var(--card2); }
.ai-item.ai-overdue { background:rgba(239,68,68,.04); }
.ai-item.ai-urgent { border-left:3px solid var(--red); }
.ai-item.ai-done { opacity:.65; }
.ai-item-left { display:flex; gap:12px; flex:1; min-width:0; }
.ai-item-right { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.ai-item-content { flex:1; min-width:0; }
.ai-item-title { font-size:14px; font-weight:600; color:var(--text); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ai-item-desc { font-size:12px; color:var(--text3); margin-top:4px; line-height:1.5; }
.ai-item-meta { font-size:11px; color:var(--text3); margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* Meta Chips */
.ai-meta-chip { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; background:var(--card2); border-radius:6px; font-size:11px; font-weight:500; color:var(--text3); }
.ai-meta-chip-red { background:rgba(239,68,68,.08); color:var(--red); font-weight:700; }
.ai-meta-chip-light { opacity:.7; }

/* Status Dot */
.ai-status-dot { width:12px; height:12px; border-radius:50%; flex-shrink:0; margin-top:4px; }
.ai-status-dot.pending { background:#94a3b8; }
.ai-status-dot.progress { background:var(--blue); animation:ai-pulse 2s infinite; }
.ai-status-dot.overdue { background:var(--red); animation:ai-pulse 1.5s infinite; }
.ai-status-dot.done { background:var(--teal); }
@keyframes ai-pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }

/* Badges */
.ai-badge-urgent { background:var(--red); color:#fff; font-size:9px; font-weight:800; padding:2px 7px; border-radius:4px; text-transform:uppercase; letter-spacing:.5px; display:inline-flex; align-items:center; gap:3px; }
.ai-badge-recurring { background:var(--blue); color:#fff; font-size:9px; font-weight:700; padding:2px 7px; border-radius:4px; display:inline-flex; align-items:center; gap:3px; }
.ai-badge-progress { background:rgba(59,130,246,.1); color:var(--blue); font-size:9px; font-weight:700; padding:2px 7px; border-radius:4px; display:inline-flex; align-items:center; gap:3px; }
.ai-overdue-label { color:var(--red); font-weight:700; }
.ai-followup-badge { background:#fef3c7; color:#92400e; font-size:11px; font-weight:600; padding:4px 10px; border-radius:6px; margin-top:6px; display:inline-flex; align-items:center; gap:4px; }

/* Completion Note */
.ai-completion-note { font-size:12px; color:var(--text2); margin-top:10px; padding:10px 14px; background:rgba(16,185,129,.06); border-radius:10px; border-left:3px solid var(--teal); }
.ai-completion-head { display:flex; align-items:center; gap:6px; margin-bottom:4px; font-size:11px; }
.ai-completion-body { color:var(--text2); line-height:1.5; }
.ai-parent-link { font-size:11px; color:var(--text3); margin-top:6px; display:flex; align-items:center; gap:4px; }
.ai-parent-link i { font-size:10px; }

/* Action Buttons */
.ai-actions { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.ai-btn { padding:6px 12px; border-radius:8px; font-size:12px; font-weight:600; border:1px solid var(--border); background:var(--card); color:var(--text2); cursor:pointer; transition:all .15s; display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.ai-btn:hover { border-color:var(--primary); color:var(--primary); }
.ai-btn-done { background:var(--teal); color:#fff; border-color:var(--teal); }
.ai-btn-done:hover { background:#059669; border-color:#059669; color:#fff; }
.ai-btn-start { background:var(--blue); color:#fff; border-color:var(--blue); }
.ai-btn-start:hover { background:#2563eb; border-color:#2563eb; color:#fff; }
.ai-btn-snooze { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.ai-btn-snooze:hover { background:#fde68a; }
.ai-btn-delete { background:none; color:var(--text3); border:none; padding:6px 8px; }
.ai-btn-delete:hover { color:var(--red); }

/* Empty State */
.ai-empty { padding:48px 20px; text-align:center; }
.ai-empty-icon { font-size:40px; margin-bottom:12px; }
.ai-empty-title { font-size:16px; font-weight:700; color:var(--text); margin-bottom:4px; }
.ai-empty-text { font-size:13px; color:var(--text3); }

/* Form */
.ai-form { padding:20px; display:flex; flex-direction:column; gap:16px; }
.ai-form-group { display:flex; flex-direction:column; gap:5px; }
.ai-form-group label { font-size:12px; font-weight:600; color:var(--text2); display:flex; align-items:center; gap:5px; }
.ai-form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ai-input { padding:10px 14px; border:1px solid var(--border); border-radius:10px; font-size:13px; background:var(--card2); color:var(--text); font-family:inherit; transition:all .2s; }
.ai-input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(204,49,14,.08); background:var(--card); }
.ai-form-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:10px; }
.ai-done-item-title { font-size:14px; font-weight:700; color:var(--text); background:var(--card2); margin:0 20px; padding:12px 16px; border-radius:10px; border-left:3px solid var(--primary); line-height:1.4; }

/* Dashboard Widget */
.ai-dash-widget { overflow:hidden; }
.ai-dash-list { display:flex; flex-direction:column; }
.ai-dash-row { display:flex; align-items:center; gap:10px; padding:10px 18px; border-bottom:1px solid var(--border); transition:background .15s; }
.ai-dash-row:last-child { border-bottom:none; }
.ai-dash-row:hover { background:var(--card2); }
.ai-dash-row.ai-overdue { background:rgba(239,68,68,.04); }

/* Responsive */
@media (max-width:640px) {
    .ai-stats-grid { grid-template-columns:1fr 1fr; }
    .ai-form-row { grid-template-columns:1fr; }
    .ai-actions { flex-direction:column; }
    .ai-item { flex-direction:column; }
    .ai-item-right { width:100%; justify-content:flex-end; }
    .ai-filter-tabs { flex-wrap:wrap; }
}

/* ═══════════════════════════════════════════════
   STICKY NOTES — Strategist Action Items
   ═══════════════════════════════════════════════ */

/* Board Grid */
.sn-board {
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(290px, 1fr));
    gap:26px;
    margin-top:18px;
    padding:12px 6px;
}

/* Note Base */
.sn-note {
    position:relative;
    padding:30px 22px 18px;
    border-radius:6px;
    min-height:190px;
    display:flex;
    flex-direction:column;
    gap:8px;
    transform:rotate(var(--sn-rotate, 0deg)) perspective(800px) rotateX(0deg) rotateY(0deg);
    transition:transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease, filter .3s ease;
    cursor:default;
    animation:sn-drop-in .5s cubic-bezier(.34,1.56,.64,1) both;
    transform-origin:top center;
    box-shadow:
        2px 4px 12px rgba(0,0,0,.08),
        0 1px 3px rgba(0,0,0,.05),
        inset 0 -2px 6px rgba(0,0,0,.025);
}
.sn-note:hover {
    transform:rotate(0deg) perspective(800px) rotateX(-2deg) rotateY(1.5deg) translateY(-12px) scale(1.05);
    box-shadow:
        0 25px 50px rgba(0,0,0,.18),
        0 12px 24px rgba(0,0,0,.10),
        -4px 8px 16px rgba(0,0,0,.06),
        0 0 0 1px rgba(255,255,255,.1);
    z-index:10;
    filter:brightness(1.03) saturate(1.08);
}

/* Fold effect (bottom-right corner) — peels on hover */
.sn-note::after {
    content:'';
    position:absolute;
    bottom:0; right:0;
    width:28px; height:28px;
    background:linear-gradient(135deg, transparent 50%, rgba(0,0,0,.06) 50%);
    border-radius:0 0 6px 0;
    transition:all .35s cubic-bezier(.34,1.56,.64,1);
    z-index:2;
}
.sn-note:hover::after {
    width:42px; height:42px;
    background:linear-gradient(135deg, transparent 42%, rgba(0,0,0,.04) 42%, rgba(0,0,0,.08) 50%, rgba(255,255,255,.6) 50%, rgba(255,255,255,.35) 100%);
    box-shadow:-2px -2px 6px rgba(0,0,0,.06);
}

/* Pushpin — sticks note to wall */
.sn-pin {
    position:absolute;
    top:-10px;
    left:50%;
    transform:translateX(-50%);
    width:22px;
    height:22px;
    z-index:5;
    font-size:0;
    animation:sn-pin-stick .5s cubic-bezier(.34,1.56,.64,1) both;
    animation-delay:inherit;
}
/* Pin head — shiny dome */
.sn-pin::before {
    content:'';
    position:absolute;
    top:0; left:50%;
    transform:translateX(-50%);
    width:16px; height:16px;
    border-radius:50%;
    background:radial-gradient(circle at 35% 30%, #ff6b6b, #c0392b 60%, #922b21 100%);
    box-shadow:
        0 1px 4px rgba(0,0,0,.35),
        inset 0 2px 3px rgba(255,255,255,.35),
        0 4px 8px rgba(0,0,0,.15);
    z-index:2;
}
/* Pin needle — shadow puncture mark */
.sn-pin::after {
    content:'';
    position:absolute;
    top:14px; left:50%;
    transform:translateX(-50%);
    width:3px; height:8px;
    background:linear-gradient(to bottom, #888 0%, #555 100%);
    border-radius:0 0 1px 1px;
    clip-path:polygon(30% 0, 70% 0, 50% 100%);
    z-index:1;
    opacity:.6;
}

/* Color Variants */
.sn-yellow { background:linear-gradient(165deg, #fffde7 0%, #fff59d 60%, #fff176 100%); color:#4e342e; }
.sn-yellow::after { background:linear-gradient(135deg, transparent 50%, #f9e94e 50%); }

.sn-blue { background:linear-gradient(165deg, #e8f4fd 0%, #bbdefb 60%, #90caf9 100%); color:#1a237e; }
.sn-blue::after { background:linear-gradient(135deg, transparent 50%, #64b5f6 50%); }

.sn-green { background:linear-gradient(165deg, #ecf7ed 0%, #c8e6c9 60%, #a5d6a7 100%); color:#1b5e20; }
.sn-green::after { background:linear-gradient(135deg, transparent 50%, #81c784 50%); }

.sn-pink { background:linear-gradient(165deg, #fef0f4 0%, #f8bbd0 60%, #f48fb1 100%); color:#880e4f; }
.sn-pink::after { background:linear-gradient(135deg, transparent 50%, #ec407a 50%); }

.sn-purple { background:linear-gradient(165deg, #f8f0fa 0%, #e1bee7 60%, #ce93d8 100%); color:#4a148c; }
.sn-purple::after { background:linear-gradient(135deg, transparent 50%, #ba68c8 50%); }

.sn-orange { background:linear-gradient(165deg, #fff8f0 0%, #ffe0b2 60%, #ffcc80 100%); color:#bf360c; }
.sn-orange::after { background:linear-gradient(135deg, transparent 50%, #ffb74d 50%); }

.sn-red { background:linear-gradient(165deg, #fff5f5 0%, #ffcdd2 60%, #ef9a9a 100%); color:#b71c1c; }
.sn-red::after { background:linear-gradient(135deg, transparent 50%, #e57373 50%); }

.sn-done { background:linear-gradient(165deg, #fafafa 0%, #e8e8e8 60%, #d5d5d5 100%); color:#757575; opacity:.7; }
.sn-done::after { background:linear-gradient(135deg, transparent 50%, #bbb 50%); }
.sn-done .sn-title { text-decoration:line-through; text-decoration-color:rgba(0,0,0,.25); }
.sn-done:hover { opacity:.9; }

/* Title */
.sn-title {
    font-size:18px;
    font-weight:700;
    line-height:1.4;
    font-family:'Segoe UI', system-ui, sans-serif;
    word-break:break-word;
    letter-spacing:-.2px;
}

/* Description */
.sn-desc {
    font-size:14px;
    line-height:1.55;
    opacity:.7;
    font-style:italic;
    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

/* Client tag */
.sn-client {
    display:inline-flex;
    align-items:center;
    gap:5px;
    font-size:13px;
    font-weight:600;
    background:rgba(0,0,0,.06);
    padding:4px 10px;
    border-radius:6px;
    width:fit-content;
    backdrop-filter:blur(4px);
}

/* Due date */
.sn-due {
    font-size:13px;
    font-weight:600;
    display:flex;
    align-items:center;
    gap:5px;
    opacity:.65;
    padding:3px 0;
}
.sn-due-overdue {
    opacity:1;
    font-weight:800;
    color:#c62828;
    padding:3px 8px;
    background:rgba(198,40,40,.08);
    border-radius:5px;
    width:fit-content;
}

/* From line */
.sn-from {
    font-size:12px;
    opacity:.45;
    display:flex;
    align-items:center;
    gap:4px;
    margin-top:auto;
    letter-spacing:.2px;
}

/* Assigned to */
.sn-assigned {
    font-size:11px;
    font-weight:600;
    display:flex;
    align-items:center;
    gap:5px;
    opacity:.65;
}

/* Top badge row */
.sn-top-row {
    display:flex;
    gap:5px;
    flex-wrap:wrap;
    margin-bottom:2px;
}
.sn-badge {
    font-size:11px;
    font-weight:800;
    padding:3px 8px;
    border-radius:5px;
    text-transform:uppercase;
    letter-spacing:.4px;
    display:inline-flex;
    align-items:center;
    gap:3px;
}
.sn-badge-urgent { background:linear-gradient(135deg, rgba(198,40,40,.9), rgba(239,68,68,.85)); color:#fff; box-shadow:0 1px 4px rgba(198,40,40,.2); }
.sn-badge-progress { background:rgba(25,118,210,.12); color:#1565c0; border:1px solid rgba(25,118,210,.2); }
.sn-badge-recurring { background:rgba(0,0,0,.06); color:inherit; border:1px solid rgba(0,0,0,.06); }
.sn-badge-done { background:rgba(46,125,50,.12); color:#2e7d32; border:1px solid rgba(46,125,50,.15); }

/* Completion note */
.sn-completion {
    font-size:11px;
    line-height:1.5;
    padding:8px 10px;
    background:rgba(0,0,0,.045);
    border-radius:6px;
    margin-top:4px;
    font-style:italic;
    border-left:2px solid rgba(0,0,0,.08);
}

/* Follow-up */
.sn-followup {
    font-size:10px;
    font-weight:700;
    display:flex;
    align-items:center;
    gap:5px;
    padding:4px 8px;
    background:rgba(255,152,0,.14);
    border-radius:6px;
    width:fit-content;
}

/* Parent link */
.sn-parent {
    font-size:10px;
    opacity:.5;
    display:flex;
    align-items:center;
    gap:4px;
    padding:3px 8px;
    background:rgba(0,0,0,.035);
    border-radius:5px;
    width:fit-content;
}

/* Action buttons (bottom of note) */
.sn-actions {
    display:flex;
    gap:6px;
    margin-top:auto;
    padding-top:10px;
    border-top:1px dashed rgba(0,0,0,.08);
}
.sn-action-btn {
    width:36px; height:36px;
    border-radius:50%;
    border:none;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:13px;
    transition:all .25s cubic-bezier(.34,1.56,.64,1);
    box-shadow:0 2px 6px rgba(0,0,0,.08);
    position:relative;
}
.sn-action-btn:hover {
    transform:scale(1.18) translateY(-2px);
    box-shadow:0 4px 14px rgba(0,0,0,.15);
}
.sn-action-btn:active {
    transform:scale(.95);
}
/* Tooltip for action buttons */
.sn-action-btn::after {
    content:attr(title);
    position:absolute;
    bottom:calc(100% + 6px);
    left:50%; transform:translateX(-50%) scale(.8);
    background:rgba(30,41,59,.9); color:#fff;
    font-size:10px; font-weight:600;
    padding:3px 8px; border-radius:5px;
    white-space:nowrap;
    opacity:0; pointer-events:none;
    transition:all .2s cubic-bezier(.34,1.56,.64,1);
}
.sn-action-btn:hover::after {
    opacity:1; transform:translateX(-50%) scale(1);
}
.sn-act-start { background:linear-gradient(135deg, #1565c0, #1976d2); color:#fff; }
.sn-act-start:hover { background:linear-gradient(135deg, #0d47a1, #1565c0); }
.sn-act-snooze { background:#fff8e1; color:#f57f17; border:1px solid #ffe082; }
.sn-act-snooze:hover { background:#fff176; }
.sn-act-done { background:linear-gradient(135deg, #2e7d32, #388e3c); color:#fff; }
.sn-act-done:hover { background:linear-gradient(135deg, #1b5e20, #2e7d32); }
.sn-act-delete { background:rgba(0,0,0,.06); color:rgba(0,0,0,.4); }
.sn-act-delete:hover { background:#c62828; color:#fff; }

/* Empty state */
.sn-empty {
    grid-column:1 / -1;
    text-align:center;
    padding:72px 20px;
    background:var(--card);
    border-radius:var(--radius);
    border:2px dashed var(--border);
}
.sn-empty-icon { font-size:52px; margin-bottom:16px; }
.sn-empty-title { font-size:18px; font-weight:700; color:var(--text); margin-bottom:6px; }
.sn-empty-text { font-size:13px; color:var(--text3); line-height:1.5; }

/* ── Animations ── */

/* Slide in from right */
@keyframes sn-drop-in {
    0% {
        opacity:0;
        transform:rotate(var(--sn-rotate, 0deg)) translateX(120px) scale(.85);
    }
    50% {
        opacity:1;
        transform:rotate(var(--sn-rotate, 0deg)) translateX(-8px) scale(1.02);
    }
    70% {
        transform:rotate(var(--sn-rotate, 0deg)) translateX(3px) scale(1);
    }
    100% {
        opacity:1;
        transform:rotate(var(--sn-rotate, 0deg)) translateX(0) scale(1);
    }
}

/* Pin sticks into wall */
@keyframes sn-pin-stick {
    0% { transform:translateX(-50%) translateY(-30px) scale(0) rotate(-20deg); opacity:0; }
    50% { transform:translateX(-50%) translateY(4px) scale(1.25) rotate(5deg); opacity:1; }
    70% { transform:translateX(-50%) translateY(-2px) scale(0.95) rotate(-2deg); }
    100% { transform:translateX(-50%) translateY(0) scale(1) rotate(0deg); opacity:1; }
}

/* Overdue shake */
.sn-overdue-shake {
    animation:sn-drop-in .5s cubic-bezier(.34,1.56,.64,1) both, sn-shake 3s ease-in-out 1s infinite;
}
@keyframes sn-shake {
    0%, 86%, 100% { transform:rotate(var(--sn-rotate, 0deg)) translateX(0); }
    88% { transform:rotate(calc(var(--sn-rotate, 0deg) - 2deg)) translateX(-2px); }
    90% { transform:rotate(calc(var(--sn-rotate, 0deg) + 2deg)) translateX(2px); }
    92% { transform:rotate(calc(var(--sn-rotate, 0deg) - 1.5deg)) translateX(-1px); }
    94% { transform:rotate(calc(var(--sn-rotate, 0deg) + 1deg)) translateX(1px); }
    96% { transform:rotate(var(--sn-rotate, 0deg)) translateX(0); }
}

/* Responsive */
@media (max-width:640px) {
    .sn-board { grid-template-columns:1fr; gap:20px; }
    .sn-note { min-height:150px; }
}

/* ═══════════════════════════════════════════════
   ACTION ITEMS — Enhanced UI
   ═══════════════════════════════════════════════ */

/* #10 Progress Bar */
.ai-progress-bar { width:100%; height:6px; background:rgba(0,0,0,.06); border-radius:6px; margin-top:8px; overflow:hidden; }
.ai-progress-fill { height:100%; background:linear-gradient(90deg, var(--teal), #34d399); border-radius:6px; transition:width .8s cubic-bezier(.34,1.56,.64,1); min-width:2px; position:relative; }
.ai-progress-fill::after { content:''; position:absolute; top:0; left:0; right:0; bottom:0; background:linear-gradient(90deg, transparent 0%, rgba(255,255,255,.3) 50%, transparent 100%); animation:ai-progress-shine 2s ease-in-out infinite; }
@keyframes ai-progress-shine { 0% { transform:translateX(-100%); } 100% { transform:translateX(100%); } }

/* #1 Search + #2 Client Filter + #6 Sort Toolbar */
.ai-toolbar { margin-bottom:16px; padding:14px 18px; background:var(--card); border-radius:var(--radius); border:1px solid var(--border); box-shadow:var(--shadow-sm); }
.ai-toolbar-form { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.ai-search-box { position:relative; flex:1; min-width:220px; max-width:400px; }
.ai-search-box i { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--text3); font-size:13px; pointer-events:none; transition:color .2s; }
.ai-search-box:focus-within i { color:var(--primary); }
.ai-search-input { width:100%; padding:10px 14px 10px 38px; border:1px solid var(--border); border-radius:10px; font-size:13px; background:var(--card2); color:var(--text); font-family:inherit; transition:all .2s; }
.ai-search-input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(204,49,14,.08); background:var(--card); }
.ai-search-input::placeholder { color:var(--text3); }
.ai-search-clear { position:absolute; right:10px; top:50%; transform:translateY(-50%); color:var(--text3); font-size:11px; cursor:pointer; width:22px; height:22px; display:flex; align-items:center; justify-content:center; border-radius:50%; transition:all .2s; text-decoration:none; background:rgba(0,0,0,.04); }
.ai-search-clear:hover { background:rgba(239,68,68,.12); color:var(--red); }
.ai-filter-select { padding:10px 14px; border:1px solid var(--border); border-radius:10px; font-size:13px; background:var(--card2); color:var(--text); font-family:inherit; cursor:pointer; transition:all .2s; min-width:150px; -webkit-appearance:none; }
.ai-filter-select:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(204,49,14,.08); }
.ai-filter-select:hover { border-color:var(--border2); }

/* #3 Timeline Group Headers */
.sn-group-header {
    grid-column:1 / -1;
    font-size:14px;
    font-weight:700;
    color:var(--text);
    padding:10px 16px;
    margin-top:12px;
    background:var(--card);
    border-radius:10px;
    border:1px solid var(--border);
    display:flex;
    align-items:center;
    gap:8px;
    box-shadow:var(--shadow-sm);
    letter-spacing:.2px;
}
.sn-group-header:first-child { margin-top:0; }

/* #9 Time Remaining Badges (legacy) */
.sn-badge-time-critical { background:rgba(239,68,68,.18); color:#b71c1c; font-weight:800; animation:sn-time-pulse 1.5s infinite; }
.sn-badge-time-warn { background:rgba(245,158,11,.15); color:#7c2d12; }
.sn-badge-time-ok { background:rgba(16,185,129,.12); color:#065f46; }
@keyframes sn-time-pulse { 0%,100% { opacity:1; } 50% { opacity:.55; } }

/* #9b Live Countdown Timer */
.sn-timer {
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 10px;
    border-radius:8px;
    background:rgba(16,185,129,.1);
    border:1px solid rgba(16,185,129,.2);
    margin-top:2px;
    transition:all .3s ease;
}
.sn-timer-icon {
    font-size:14px;
    line-height:1;
    flex-shrink:0;
}
.sn-timer-display {
    display:flex;
    flex-direction:column;
    gap:1px;
    min-width:0;
}
.sn-timer-label {
    font-size:8px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.8px;
    opacity:.6;
    line-height:1;
}
.sn-timer-clock {
    font-family:'Courier New', 'Consolas', monospace;
    font-size:16px;
    font-weight:800;
    letter-spacing:1.5px;
    line-height:1.2;
    tabular-nums:lining-nums;
    font-variant-numeric:tabular-nums;
}

/* Timer urgency states */
.sn-timer-ok { background:rgba(16,185,129,.1); border-color:rgba(16,185,129,.2); color:#065f46; }
.sn-timer-ok .sn-timer-icon { color:#10b981; }
.sn-timer-ok .sn-timer-clock { color:#047857; }

.sn-timer-warn { background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.25); color:#7c2d12; }
.sn-timer-warn .sn-timer-icon { color:#f59e0b; }
.sn-timer-warn .sn-timer-clock { color:#b45309; }

.sn-timer-critical { background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.25); color:#b71c1c; }
.sn-timer-critical .sn-timer-icon { color:#ef4444; }
.sn-timer-critical .sn-timer-clock { color:#c62828; animation:sn-timer-blink 1s infinite; }

.sn-timer-overdue { background:rgba(198,40,40,.12); border-color:rgba(198,40,40,.3); color:#b71c1c; }
.sn-timer-overdue .sn-timer-icon { color:#c62828; animation:sn-timer-blink 1.2s infinite; }
.sn-timer-overdue .sn-timer-clock { color:#c62828; font-weight:900; }
.sn-timer-overdue .sn-timer-label { color:#c62828; opacity:.8; }

@keyframes sn-timer-blink { 0%,100% { opacity:1; } 50% { opacity:.4; } }

/* #10 Reminder Attention-Seeker Icon (top-right) */
.sn-reminder-icon {
    position:absolute;
    top:8px;
    right:8px;
    width:32px;
    height:32px;
    border-radius:50%;
    background:linear-gradient(135deg, rgba(59,130,246,.15), rgba(25,118,210,.1));
    border:1.5px solid rgba(59,130,246,.3);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:16px;
    color:#1565c0;
    transition:all .3s ease;
    z-index:4;
    box-shadow:0 2px 6px rgba(59,130,246,.15);
    animation:sn-reminder-pulse 2s infinite;
}
.sn-reminder-icon:hover {
    background:linear-gradient(135deg, rgba(59,130,246,.25), rgba(25,118,210,.2));
    border-color:rgba(59,130,246,.5);
    box-shadow:0 4px 12px rgba(59,130,246,.25), inset 0 1px 2px rgba(255,255,255,.3);
    transform:scale(1.15);
}

/* Reminder due state — urgent attention */
.sn-reminder-icon-due {
    background:linear-gradient(135deg, rgba(239,68,68,.18), rgba(198,40,40,.12));
    border-color:rgba(239,68,68,.4);
    color:#c62828;
    box-shadow:0 2px 8px rgba(239,68,68,.2);
    animation:sn-reminder-shake 0.5s infinite;
}
.sn-reminder-icon-due:hover {
    background:linear-gradient(135deg, rgba(239,68,68,.25), rgba(198,40,40,.2));
    border-color:rgba(239,68,68,.6);
    box-shadow:0 6px 16px rgba(239,68,68,.3), inset 0 1px 2px rgba(255,255,255,.2);
}

/* Animations */
@keyframes sn-reminder-pulse {
    0%, 100% { box-shadow:0 2px 6px rgba(59,130,246,.15), 0 0 0 0 rgba(59,130,246,.3); }
    50% { box-shadow:0 2px 6px rgba(59,130,246,.15), 0 0 0 6px rgba(59,130,246,.0); }
}

@keyframes sn-reminder-shake {
    0%, 100% { transform:translate(0, 0) rotate(0deg); }
    25% { transform:translate(-1px, -1px) rotate(-1deg); }
    50% { transform:translate(1px, 1px) rotate(1deg); }
    75% { transform:translate(-1px, 1px) rotate(-1deg); }
}

/* #11 Notes on sticky notes */
.sn-notes-list {
    display:flex; flex-direction:column; gap:5px;
    margin-top:6px; padding:8px 10px;
    background:rgba(0,0,0,.045);
    border-radius:6px;
    border-left:2px solid rgba(0,0,0,.08);
}
.sn-note-entry { font-size:11px; line-height:1.45; display:flex; align-items:baseline; gap:4px; }
.sn-note-entry::before { content:'•'; opacity:.4; flex-shrink:0; }
.sn-note-text { color:inherit; opacity:.85; }
.sn-note-meta { font-size:9px; opacity:.45; margin-left:auto; white-space:nowrap; }
.sn-note-more { font-size:10px; opacity:.45; font-style:italic; padding-left:10px; }
.sn-note-new { animation:sn-note-flash .8s ease; border-radius:4px; padding:2px 4px; margin:-2px -4px; }
@keyframes sn-note-flash { 0% { background:rgba(59,130,246,.2); } 100% { background:transparent; } }

/* Action buttons — pill style with labels */
.sn-act-note { background:rgba(25,118,210,.08); color:#1565c0; border:1px solid rgba(25,118,210,.2); }
.sn-act-note:hover { background:rgba(25,118,210,.18); border-color:rgba(25,118,210,.35); }
.sn-act-reopen { background:rgba(0,0,0,.04); color:rgba(0,0,0,.4); border:1px solid rgba(0,0,0,.08); }
.sn-act-reopen:hover { background:#ff9800; color:#fff; border-color:#ff9800; }
.sn-act-edit { background:rgba(57,73,171,.08); color:#3949ab; border:1px solid rgba(57,73,171,.15); }
.sn-act-edit:hover { background:rgba(57,73,171,.18); border-color:rgba(57,73,171,.3); }

/* #12 Description in done modal */
.ai-done-item-desc {
    font-size:12px; color:var(--text2); margin:8px 18px 0; padding:10px 14px;
    background:var(--card2); border-radius:8px; line-height:1.6;
    font-style:italic; border-left:3px solid var(--blue);
}

/* #15 Toast notifications */
.ai-toast {
    position:fixed; bottom:28px; left:50%; z-index:10001;
    transform:translateX(-50%) translateY(20px);
    padding:12px 28px;
    background:linear-gradient(135deg, #10B981, #059669);
    color:#fff; border-radius:12px;
    font-size:13px; font-weight:600;
    box-shadow:0 8px 30px rgba(16,185,129,.3), 0 2px 8px rgba(0,0,0,.1);
    opacity:0; transition:all .35s cubic-bezier(.34,1.56,.64,1);
    pointer-events:none;
    display:flex; align-items:center; gap:8px;
}
.ai-toast::before { content:'✓'; font-weight:700; }
.ai-toast-show { opacity:1; transform:translateX(-50%) translateY(0); }
.ai-toast-error { background:linear-gradient(135deg, #EF4444, #DC2626); box-shadow:0 8px 30px rgba(239,68,68,.3), 0 2px 8px rgba(0,0,0,.1); }
.ai-toast-error::before { content:'✕'; }

/* ── Global Reminder Widget ── */
.global-reminder-widget {
    position:relative;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
}
.grw-icon {
    font-size:22px;
    transition:all .3s ease;
    animation:grw-pulse 3s infinite;
}
.global-reminder-widget:hover .grw-icon {
    transform:scale(1.1);
}
.grw-badge {
    position:absolute;
    top:-6px;
    right:-8px;
    background:linear-gradient(135deg, #ef4444, #dc2626);
    color:#fff;
    font-size:11px;
    font-weight:800;
    padding:3px 7px;
    border-radius:50%;
    min-width:22px;
    height:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 2px 8px rgba(239, 68, 68, 0.3);
    animation:grw-badge-pop .4s cubic-bezier(.34,1.56,.64,1);
}
.grw-badge.due {
    background:linear-gradient(135deg, #dc2626, #991b1b);
    box-shadow:0 4px 12px rgba(220, 38, 38, 0.4);
    animation:grw-urgent-pulse 1.2s infinite;
}

@keyframes grw-pulse {
    0%, 100% { transform:scale(1); opacity:1; }
    50% { transform:scale(1.08); opacity:.8; }
}

@keyframes grw-badge-pop {
    0% { transform:scale(0) rotate(-20deg); opacity:0; }
    60% { transform:scale(1.15); }
    100% { transform:scale(1) rotate(0); opacity:1; }
}

@keyframes grw-urgent-pulse {
    0%, 100% { box-shadow:0 4px 12px rgba(220, 38, 38, 0.4); }
    50% { box-shadow:0 6px 20px rgba(220, 38, 38, 0.6); }
}

/* Global Reminders Modal Content */
.grm-body {
    background:var(--card);
}
.grm-empty {
    padding:48px 24px;
    text-align:center;
    color:var(--text3);
}
.grm-empty-icon {
    font-size:48px;
    margin-bottom:12px;
    opacity:.5;
}
.grm-empty-text {
    font-size:13px;
    line-height:1.6;
}

.grm-list {
    display:flex;
    flex-direction:column;
}
.grm-item {
    padding:16px;
    border-bottom:1px solid var(--border);
    transition:all .2s ease;
    cursor:pointer;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
}
.grm-item:last-child {
    border-bottom:none;
}
.grm-item:hover {
    background:var(--card2);
}
.grm-item-content {
    flex:1;
    min-width:0;
}
.grm-item-title {
    font-weight:600;
    color:var(--text1);
    font-size:13px;
    word-break:break-word;
    margin-bottom:4px;
}
.grm-item-time {
    font-size:12px;
    color:var(--text3);
    display:flex;
    align-items:center;
    gap:4px;
    margin-bottom:6px;
}
.grm-item-note {
    font-size:12px;
    color:var(--text2);
    line-height:1.5;
    opacity:.8;
}
.grm-item-badge {
    flex-shrink:0;
    padding:6px 10px;
    border-radius:6px;
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.5px;
    white-space:nowrap;
}
.grm-item-badge.due {
    background:rgba(239, 68, 68, .15);
    color:#c62828;
    animation:grm-badge-pulse 1s infinite;
}
.grm-item-badge.pending {
    background:rgba(59, 130, 246, .15);
    color:#1565c0;
}

@keyframes grm-badge-pulse {
    0%, 100% { opacity:1; }
    50% { opacity:.6; }
}

/* ── Reminder Strip on Sticky Notes ── */
.sn-reminder-strip {
    display:flex;
    gap:8px;
    align-items:flex-start;
    padding:8px 10px;
    background:linear-gradient(135deg, rgba(255,152,0,.08), rgba(255,193,7,.12));
    border:1px solid rgba(255,152,0,.2);
    border-radius:8px;
    margin-top:4px;
    position:relative;
}
.sn-reminder-strip.sn-reminder-due {
    background:linear-gradient(135deg, rgba(239,68,68,.06), rgba(255,152,0,.12));
    border-color:rgba(239,68,68,.3);
    animation:sn-reminder-glow 2s infinite;
}
@keyframes sn-reminder-glow {
    0%,100% { box-shadow:0 0 0 0 rgba(239,68,68,0); }
    50% { box-shadow:0 0 0 4px rgba(239,68,68,.12); }
}
.sn-reminder-icon {
    font-size:14px;
    color:#ff9800;
    flex-shrink:0;
    margin-top:1px;
}
.sn-reminder-due .sn-reminder-icon { color:#e53935; }
.sn-reminder-info { flex:1; min-width:0; }
.sn-reminder-reason {
    font-size:11px;
    font-weight:600;
    line-height:1.4;
    color:inherit;
    opacity:.85;
}
.sn-reminder-time {
    font-size:10px;
    font-weight:700;
    opacity:.6;
    margin-top:2px;
}
.sn-reminder-dismiss {
    position:absolute;
    top:4px; right:4px;
    width:18px; height:18px;
    border-radius:50%;
    border:none;
    background:rgba(0,0,0,.06);
    color:rgba(0,0,0,.35);
    font-size:8px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all .2s;
    opacity:0;
}
.sn-reminder-strip:hover .sn-reminder-dismiss { opacity:1; }
.sn-reminder-dismiss:hover { background:rgba(239,68,68,.15); color:#c62828; }

/* Reminder badge variants */
.sn-badge-reminder-due {
    background:linear-gradient(135deg, #ff9800, #f57c00);
    color:#fff;
    animation:sn-time-pulse 1s infinite;
    box-shadow:0 1px 4px rgba(255,152,0,.3);
}
.sn-badge-reminder {
    background:rgba(255,152,0,.1);
    color:#DC2626;
    border:1px solid rgba(255,152,0,.2);
}

/* Reminder action button */
.sn-act-reminder {
    background:rgba(255,152,0,.08);
    color:#f57c00;
    border:1px solid rgba(255,152,0,.2);
}
.sn-act-reminder:hover {
    background:rgba(255,152,0,.2);
    border-color:rgba(255,152,0,.4);
}
.sn-act-reminder-active {
    background:#ff9800 !important;
    color:#fff !important;
    border-color:#ff9800 !important;
    box-shadow:0 2px 8px rgba(255,152,0,.3);
}

/* Quick pick buttons in reminder modal */
.sn-reminder-quick-picks { padding:0; }
.sn-reminder-picks-row {
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}
.sn-pick-btn {
    padding:6px 12px;
    border-radius:8px;
    border:1px solid var(--border);
    background:var(--card2);
    color:var(--text2);
    font-size:11px;
    font-weight:600;
    cursor:pointer;
    transition:all .2s;
    font-family:inherit;
}
.sn-pick-btn:hover {
    background:#ff9800;
    color:#fff;
    border-color:#ff9800;
    transform:translateY(-1px);
    box-shadow:0 3px 8px rgba(255,152,0,.2);
}

/* ── Premium Sticky Note Enhancements ── */

/* Alternating pin colors */
.sn-note:nth-child(3n+1) .sn-pin::before { background:radial-gradient(circle at 35% 30%, #ff6b6b, #c0392b 60%, #922b21 100%); }
.sn-note:nth-child(3n+2) .sn-pin::before { background:radial-gradient(circle at 35% 30%, #5dade2, #2e86c1 60%, #1a5276 100%); }
.sn-note:nth-child(3n+3) .sn-pin::before { background:radial-gradient(circle at 35% 30%, #58d68d, #27ae60 60%, #1e8449 100%); }
/* Pin shadow on note surface */
.sn-note:nth-child(3n+1) .sn-pin::after, .sn-note:nth-child(3n+2) .sn-pin::after, .sn-note:nth-child(3n+3) .sn-pin::after { opacity:.5; }

/* Paper texture overlay */
.sn-note::before {
    content:'';
    position:absolute;
    inset:0;
    background:url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
    border-radius:inherit;
    pointer-events:none;
    z-index:0;
}

/* Give all content z-index above paper texture */
.sn-pin, .sn-top-row, .sn-title, .sn-desc, .sn-client,
.sn-due, .sn-from, .sn-notes-list, .sn-completion, .sn-followup,
.sn-parent, .sn-actions, .sn-reminder-strip, .sn-badge, .sn-assigned {
    position:relative;
    z-index:1;
}

/* Subtle ruled lines */
.sn-note {
    background-size:100% auto;
}

/* Pin wiggles on hover — like tugging the note off the wall */
.sn-note:hover .sn-pin {
    animation:sn-pin-wiggle .5s ease;
}
.sn-note:hover .sn-pin::before {
    box-shadow:
        0 2px 8px rgba(0,0,0,.45),
        inset 0 2px 3px rgba(255,255,255,.4),
        0 8px 16px rgba(0,0,0,.12);
}
@keyframes sn-pin-wiggle {
    0%, 100% { transform:translateX(-50%) rotate(0) scale(1); }
    15% { transform:translateX(-50%) rotate(-12deg) scale(1.15); }
    30% { transform:translateX(-50%) rotate(10deg) scale(1.08); }
    50% { transform:translateX(-50%) rotate(-6deg) scale(1.12); }
    70% { transform:translateX(-50%) rotate(4deg) scale(1.04); }
    85% { transform:translateX(-50%) rotate(-2deg) scale(1.02); }
}

/* Ruled notebook lines appear on hover */
.sn-note:hover::before {
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 24px,
            rgba(0,0,0,.04) 24px,
            rgba(0,0,0,.04) 25px
        );
    opacity:1;
}

/* ===== Admin Activity Feed ===== */
.admin-activity-feed {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.admin-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border);
    transition: background .2s;
}
.admin-activity-header:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.admin-activity-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-activity-header h3 i {
    color: var(--teal);
}
.admin-activity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--teal);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
}
.admin-activity-chevron {
    font-size: 13px;
    color: var(--text3);
    transition: transform .25s ease;
}
.admin-activity-header.collapsed .admin-activity-chevron {
    transform: rotate(-90deg);
}
.admin-activity-body {
    max-height: 260px;
    overflow-y: auto;
    padding: 6px 0;
}
.admin-activity-body.collapsed {
    display: none;
}
.admin-activity-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}
.admin-activity-row:last-child {
    border-bottom: none;
}
.admin-activity-row:hover {
    background: #f8fafc;
}
.admin-activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: var(--blue);
}
.admin-activity-content {
    flex: 1;
    min-width: 0;
}
.admin-activity-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 2px;
}
.admin-activity-text strong {
    font-weight: 600;
    color: var(--text);
}
.admin-activity-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.admin-activity-link:hover {
    text-decoration: underline;
}
.admin-activity-note {
    font-size: 12px;
    color: var(--text2);
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 8px;
    margin-top: 4px;
    border-left: 3px solid var(--teal);
    line-height: 1.4;
}
.admin-activity-time {
    font-size: 11px;
    color: var(--text3);
    white-space: nowrap;
    margin-top: 2px;
    flex-shrink: 0;
}
.admin-activity-empty {
    text-align: center;
    padding: 24px 20px;
    color: var(--text3);
    font-size: 13px;
}
.admin-activity-empty i {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
    opacity: .5;
}

/* New Update badge for admin cards */
.sn-badge-new-activity {
    background: linear-gradient(135deg, var(--teal), #059669);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
    position: relative;
    z-index: 1;
}

/* ══════════════ MOBILE CIRCULAR STATS ══════════════ */
.mobile-circular-stats {
    display: none;
    padding: 16px;
    background: var(--card);
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.mcs-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.mcs-row:last-child {
    margin-bottom: 0;
}

.mcs-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.mcs-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(var(--mcs-color) 75%, var(--card2) 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mcs-ring::before {
    content: '';
    position: absolute;
    width: 54px;
    height: 54px;
    background: var(--card);
    border-radius: 50%;
    z-index: 1;
}

.mcs-icon {
    font-size: 14px;
    color: var(--mcs-color);
    z-index: 2;
    margin-bottom: 2px;
}

.mcs-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    z-index: 2;
    line-height: 1;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.mcs-label {
    font-size: 10px;
    color: var(--text2);
    margin-top: 6px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.mcs-circle:hover .mcs-ring {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ══════════════ MOBILE QUICK CARDS ══════════════ */
.mobile-quick-cards {
    display: none;
    padding: 0 16px 16px;
}

.mqc-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mqc-card:hover {
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.mqc-card.mqc-alert {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    border-color: #F87171;
}

.mqc-card.mqc-alert .mqc-icon {
    color: #DC2626;
}

.mqc-card.mqc-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-color: #F59E0B;
}

.mqc-card.mqc-warning .mqc-icon {
    color: #D97706;
}

.mqc-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--card2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.mqc-content {
    flex: 1;
    min-width: 0;
}

.mqc-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.mqc-subtitle {
    font-size: 12px;
    color: var(--text3);
}

.mqc-arrow {
    color: var(--text3);
    font-size: 12px;
}

.mqc-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.mqc-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mqc-action-btn:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: var(--primary);
}

.mqc-action-btn i {
    font-size: 18px;
}

/* ══════════════ MOBILE BOTTOM NAVIGATION ══════════════ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.mbn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    color: var(--text3);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.mbn-item:hover {
    color: var(--text2);
    background: var(--card2);
}

.mbn-item.active {
    color: var(--primary);
}

.mbn-item.active .mbn-icon {
    background: var(--primary-dim);
    color: var(--primary);
}

.mbn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

/* ══════════════ MOBILE RESPONSIVE BREAKPOINTS ══════════════ */
@media (max-width: 768px) {
    .mobile-circular-stats,
    .mobile-quick-cards,
    .mobile-bottom-nav {
        display: flex;
    }
    
    .mobile-quick-cards {
        flex-direction: column;
    }
    
    .mobile-bottom-nav {
        flex-direction: row;
    }
    
    /* Hide desktop metric cards on mobile */
    .db-metrics {
        display: none !important;
    }
    
    /* Add padding for fixed bottom nav */
    body {
        padding-bottom: 80px !important;
    }
    
    /* Hide complex tables on mobile, show simplified cards instead */
    .db-row3 .card .db-scroll-content {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .mcs-ring {
        width: 60px;
        height: 60px;
    }
    
    .mcs-ring::before {
        width: 46px;
        height: 46px;
    }
    
    .mcs-icon {
        font-size: 12px;
    }
    
    .mcs-val {
        font-size: 16px;
    }
    
    .mcs-label {
        font-size: 9px;
    }
    
    .mqc-card {
        padding: 12px 14px;
    }
    
    .mqc-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .mqc-title {
        font-size: 13px;
    }
    
    .mqc-subtitle {
        font-size: 11px;
    }
}

/* Responsive adjustments */
@media (max-width:640px) {
    .ai-toolbar { padding:10px 12px; }
    .ai-toolbar-form { flex-direction:column; gap:8px; }
    .ai-search-box { max-width:100%; min-width:0; }
    .ai-filter-select { width:100%; }
    .ai-stats-grid { grid-template-columns:1fr 1fr; }
    .sn-group-header { font-size:13px; padding:8px 12px; }
    .sn-reminder-picks-row { gap:4px; }
    .sn-pick-btn { font-size:10px; padding:5px 8px; }
    .ai-filter-tabs { flex-wrap:wrap; }
}

/* ═══════════════════════════════════════════════════════
   MOBILE CIRCULAR STATS & BOTTOM NAVIGATION
   ═══════════════════════════════════════════════════════ */

/* Mobile Circular Stats - Hidden on desktop */
.mobile-circular-stats {
    display: none;
}

/* Bottom Navigation - Hidden on desktop */
.mobile-bottom-nav {
    display: none;
}

/* Mobile styles (max-width: 768px) */
@media (max-width: 768px) {
    /* Hide original metric cards on mobile */
    .db-metrics {
        display: none !important;
    }
    
    /* Show mobile circular stats */
    .mobile-circular-stats {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 20px;
        padding: 0 4px;
    }
    
    .mcs-row {
        display: flex;
        justify-content: space-between;
        gap: 8px;
    }
    
    .mcs-circle {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        flex: 1;
        min-width: 0;
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .mcs-circle:active {
        transform: scale(0.95);
    }
    
    .mcs-ring {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        background: conic-gradient(
            var(--mcs-color) 0%,
            var(--mcs-color) 75%,
            var(--card2) 75%,
            var(--card2) 100%
        );
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 0 0 3px var(--surface);
        transition: all 0.3s ease;
    }
    
    .mcs-circle:hover .mcs-ring {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 0 0 4px var(--surface);
    }
    
    /* Inner white circle for donut effect */
    .mcs-ring::before {
        content: '';
        position: absolute;
        inset: 4px;
        background: var(--surface);
        border-radius: 50%;
        z-index: 1;
    }
    
    .mcs-icon {
        font-size: 14px;
        color: var(--mcs-color);
        z-index: 2;
        margin-bottom: 2px;
    }
    
    .mcs-val {
        font-size: 18px;
        font-weight: 800;
        color: var(--text);
        z-index: 2;
        line-height: 1;
        font-family: 'Plus Jakarta Sans', sans-serif;
    }
    
    .mcs-label {
        font-size: 10px;
        font-weight: 600;
        color: var(--text2);
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    /* Bottom Navigation */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding: 8px 0 12px;
        z-index: 1000;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
        justify-content: space-around;
        align-items: center;
    }
    
    .mbn-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-decoration: none;
        color: var(--text3);
        padding: 6px 12px;
        border-radius: 12px;
        transition: all 0.2s ease;
        flex: 1;
        max-width: 80px;
    }
    
    .mbn-item:active {
        transform: scale(0.95);
    }
    
    .mbn-item.active {
        color: var(--primary);
    }
    
    .mbn-item.active .mbn-icon {
        background: var(--primary-dim);
        color: var(--primary);
    }
    
    .mbn-icon {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        background: var(--card2);
        transition: all 0.2s ease;
    }
    
    .mbn-item:not(.active):hover .mbn-icon {
        background: var(--border);
        color: var(--text2);
    }
    
    .mbn-label {
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
    }
    
    /* Add padding to main content to account for bottom nav */
    .main {
        padding-bottom: 90px !important;
    }
}

/* Smaller mobile screens */
@media (max-width: 480px) {
    .mcs-ring {
        width: 60px;
        height: 60px;
    }
    
    .mcs-icon {
        font-size: 12px;
    }
    
    .mcs-val {
        font-size: 16px;
    }
    
    .mcs-label {
        font-size: 9px;
    }
    
    .mbn-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .mbn-label {
        font-size: 10px;
    }
}
