/* ============ TOKENS ============ */
  :root{
    --navy:#0A1A30;
    --navy-2:#0F2340;
    --navy-3:#16304F;
    --navy-border:#22395C;
    --navy-text-dim:#8FA3C4;
    --navy-text:#DCE6F5;

    --accent:#2557C7;
    --accent-hover:#1E49AE;
    --accent-tint:#EAF0FE;
    --accent-tint-2:#DCE7FD;

    --bg:#F5F6F8;
    --surface:#FFFFFF;
    --border:#E4E7EC;
    --border-strong:#D3D8E0;

    --text:#141B2A;
    --text-secondary:#5B6472;
    --text-tertiary:#8A93A3;

    --amber:#B4780F;
    --amber-tint:#FCF3E3;
    --blue:#2557C7;
    --blue-tint:#EAF0FE;
    --purple:#6C4FCE;
    --purple-tint:#F1EDFC;
    --teal:#0E8074;
    --teal-tint:#E6F5F3;
    --orange:#C15A1B;
    --orange-tint:#FCEEE3;
    --green:#1E8E5A;
    --green-tint:#E7F5EE;
    --red:#C0392B;
    --red-tint:#FBEAE8;

    --radius-sm:6px;
    --radius-md:10px;
    --radius-lg:14px;
    --shadow-sm:0 1px 2px rgba(15,25,45,0.06);
    --shadow-md:0 4px 16px rgba(15,25,45,0.08);
  }

  *{box-sizing:border-box;}
  html,body{height:100%;}
  body{
    margin:0;
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    background:var(--bg);
    color:var(--text);
    font-size:14px;
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
  }
  h1,h2,h3,h4{
    font-family:'Manrope',sans-serif;
    margin:0;
    color:var(--text);
  }
  a{color:inherit;text-decoration:none;}
  button{font-family:inherit;cursor:pointer;}
  ::selection{background:var(--accent-tint-2);}

  /* focus visibility */
  a:focus-visible, button:focus-visible, input:focus-visible{
    outline:2px solid var(--accent);
    outline-offset:2px;
  }

  @media (prefers-reduced-motion: reduce){
    *{animation-duration:0.001ms !important; transition-duration:0.001ms !important;}
  }

  /* ============ LAYOUT ============ */
  .app{
    display:grid;
    grid-template-columns:248px 1fr;
    min-height:100vh;
  }

  /* ============ SIDEBAR ============ */
  .sidebar{
    background:var(--navy);
    color:var(--navy-text);
    padding:20px 14px 20px;
    display:flex;
    flex-direction:column;
    position:sticky;
    top:0;
    height:100vh;
    border-right:1px solid var(--navy-border);
  }
  .brand{
    display:flex;
    align-items:center;
    gap:10px;
    padding:6px 10px 20px;
    margin-bottom:10px;
    border-bottom:1px solid var(--navy-border);
  }
  .brand-mark{
    width:34px;height:34px;
    border-radius:8px;
    background:#fff;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
  }
  .brand-mark svg{width:24px;height:21px;}
  .brand-text{display:flex;flex-direction:column;line-height:1.15;}
  .brand-text .name{
    font-family:'Manrope',sans-serif;
    font-weight:800;
    font-size:15px;
    letter-spacing:0.03em;
    color:#fff;
  }
  .brand-text .sub{
    font-size:10.5px;
    letter-spacing:0.09em;
    color:var(--navy-text-dim);
    font-weight:600;
    text-transform:uppercase;
    margin-top:2px;
  }

  .nav-section-label{
    font-size:10.5px;
    letter-spacing:0.09em;
    text-transform:uppercase;
    color:#5A6E90;
    font-weight:700;
    padding:16px 12px 6px;
  }
  .nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;}
  .nav-link{
    display:flex;
    align-items:center;
    gap:10px;
    padding:9px 12px;
    border-radius:8px;
    color:var(--navy-text-dim);
    font-size:13.5px;
    font-weight:500;
    border:1px solid transparent;
    transition:background 0.12s ease, color 0.12s ease;
  }
  .nav-link svg{width:17px;height:17px;flex-shrink:0;opacity:0.85;}
  .nav-link:hover{background:var(--navy-2); color:var(--navy-text);}
  .nav-link.active{
    background:var(--navy-3);
    color:#fff;
    border-color:var(--navy-border);
  }
  .nav-link.active svg{opacity:1;}
  .nav-link .badge-count{
    margin-left:auto;
    font-size:11px;
    font-weight:700;
    background:var(--navy-border);
    color:var(--navy-text);
    padding:1px 7px;
    border-radius:20px;
  }
  .nav-link.active .badge-count{background:var(--accent);color:#fff;}

  .sidebar-footer{
    margin-top:auto;
    padding-top:14px;
    border-top:1px solid var(--navy-border);
  }
  .user-chip{
    display:flex;align-items:center;gap:10px;
    padding:8px 10px;
    border-radius:8px;
  }
  .user-chip:hover{background:var(--navy-2);}
  .avatar{
    width:30px;height:30px;border-radius:50%;
    background:linear-gradient(155deg,#4472DB,#1B3E8E);
    color:#fff;display:flex;align-items:center;justify-content:center;
    font-size:12px;font-weight:700;flex-shrink:0;
  }
  .user-chip .u-name{font-size:13px;font-weight:600;color:#fff;}
  .user-chip .u-role{font-size:11px;color:var(--navy-text-dim);}

  /* ============ MAIN ============ */
  .main{min-width:0;}
  .topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:7px 28px;
    background:var(--surface);
    border-bottom:1px solid var(--border);
    position:sticky;
    top:0;
    z-index:10;
  }
  .topbar-left{display:flex;flex-direction:column;gap:0px;}
  .breadcrumb{
    font-size:12px;color:var(--text-tertiary);
    display:flex;align-items:center;gap:6px;
  }
  .breadcrumb .crumb-link{cursor:pointer;}
  .breadcrumb .crumb-link:hover{color:var(--accent);}
  .page-title{font-size:19px;font-weight:800;letter-spacing:-0.01em;}
  .topbar-right{display:flex;align-items:center;gap:12px;}
  .search-box{
    display:flex;align-items:center;gap:8px;
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:8px;
    padding:5px 12px;
    width:260px;
  }
  .search-box svg{width:15px;height:15px;color:var(--text-tertiary);flex-shrink:0;}
  .search-box input{
    border:none;background:transparent;outline:none;
    font-size:13px;width:100%;color:var(--text);font-family:inherit;
  }
  .icon-btn{
    width:30px;height:30px;border-radius:8px;
    border:1px solid var(--border);background:var(--surface);
    display:flex;align-items:center;justify-content:center;
    color:var(--text-secondary);
  }
  .icon-btn:hover{background:var(--bg);border-color:var(--border-strong);}
  .icon-btn svg{width:16px;height:16px;}
  .btn-primary{
    background:var(--accent);color:#fff;border:1px solid var(--accent);
    padding:8px 14px;border-radius:8px;font-size:13px;font-weight:600;
    display:flex;align-items:center;gap:6px;
  }
  .btn-primary:hover{background:var(--accent-hover);}
  .btn-primary svg{width:14px;height:14px;}
  .btn-secondary{
    background:var(--surface);color:var(--text);border:1px solid var(--border-strong);
    padding:8px 14px;border-radius:8px;font-size:13px;font-weight:600;
    display:flex;align-items:center;gap:6px;
  }
  .btn-secondary:hover{background:var(--bg);}

  .content{padding:24px 28px 60px;}
  .view{display:none;}
  .view.active{display:block;animation:fadeIn 0.15s ease;}
  @keyframes fadeIn{from{opacity:0;transform:translateY(3px);}to{opacity:1;transform:translateY(0);}}

@media (max-width: 1180px){
    .card-grid{grid-template-columns:repeat(2,1fr);}
    .dash-grid{grid-template-columns:1fr;}
    .board{grid-template-columns:repeat(2,1fr);}
    .detail-meta-grid{grid-template-columns:repeat(3,1fr);}
    .meta-item:nth-child(3){border-right:none;}
  }
  @media (max-width: 780px){
    .app{grid-template-columns:1fr;}
    .sidebar{display:none;}
    .card-grid{grid-template-columns:1fr;}
    .board{grid-template-columns:1fr;}
    .search-box{width:160px;}
  }
