/* Scobey SLS Employee Portal — extracted verbatim from the original app,
   with additions for the landing page and multi-page (link-based) navigation. */

:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#162033;background:#f5f7fb}
*{box-sizing:border-box}
body{margin:0;background:#f5f7fb}

.app{min-height:100vh;display:grid;grid-template-columns:284px 1fr}

.side{background:#111827;color:#e5e7eb;padding:20px 16px;display:flex;flex-direction:column;gap:20px;position:sticky;top:0;height:100vh}
.brand{display:flex;gap:12px;align-items:center}
.brand a{text-decoration:none;color:inherit;display:flex;gap:12px;align-items:center}
.mark{width:42px;height:42px;border-radius:8px;background:linear-gradient(135deg,#38bdf8,#2563eb 52%,#0f766e);display:grid;place-items:center;font-weight:800;color:white}
.brand span{display:block;color:#aeb8c8;font-size:13px}
.brand strong{color:#fff}

.roles{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;border:1px solid rgba(255,255,255,.12);border-radius:8px}
.roles a,.nav a{border:0;background:transparent;color:#cbd5e1;border-radius:7px;padding:9px;cursor:pointer;text-decoration:none;text-align:center}
.roles a.on,.nav a.on{background:#2563eb;color:white}

.nav{display:grid;gap:4px}
.nav a{text-align:left;padding:11px 12px;display:flex;align-items:center;gap:10px}
.ico{width:18px;height:18px;display:inline-grid;place-items:center;flex:0 0 auto}
.ico svg{width:18px;height:18px;display:block}

.foot{margin-top:auto;border:1px solid rgba(255,255,255,.12);border-radius:8px;padding:10px 12px;color:#cbd5e1;font-size:13px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.logout{border:1px solid rgba(255,255,255,.16);background:transparent;color:#e5e7eb;border-radius:7px;padding:6px 10px;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.logout:hover{background:rgba(255,255,255,.08)}

.main{min-width:0}
.top{min-height:88px;background:rgba(255,255,255,.92);border-bottom:1px solid #dbe3ef;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 28px;position:sticky;top:0;z-index:4}
.eyebrow{margin:0 0 4px;color:#627087;font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:800}
h1{margin:0;font-size:26px}
h2{margin:0 0 12px;font-size:20px}
p{margin-top:0}

.actions{display:flex;gap:10px;align-items:center}
.search{border:1px solid #dbe3ef;border-radius:8px;background:#f8fafc;padding:0 12px;display:flex;gap:8px;align-items:center;min-width:min(360px,36vw)}
.search span{font-size:12px;font-weight:800;color:#627087}
.search input{border:0;background:transparent;outline:0;padding:12px 0;width:100%}

button.primary,.primary,.secondary,.iconbtn{border-radius:8px;border:1px solid transparent;padding:10px 14px;font-weight:800;cursor:pointer;font:inherit;font-weight:800;text-decoration:none;display:inline-block}
.primary{background:#2563eb;color:white}
.secondary,.iconbtn{background:white;border-color:#dbe3ef;color:#162033}
.iconbtn{width:40px;padding:9px;display:inline-grid;place-items:center}
.logout-top{background:white;border:1px solid #dbe3ef;color:#991b1b}
.logout-top:hover{background:#fef2f2;border-color:#fecaca}
.bell{width:16px;height:18px;border:2px solid currentColor;border-top-left-radius:10px;border-top-right-radius:10px;border-bottom:0;display:block;position:relative}
.bell:after{content:"";position:absolute;left:4px;bottom:-6px;width:5px;height:5px;border-radius:50%;background:currentColor}

.content{padding:28px;display:grid;gap:22px}
.grid{display:grid;gap:16px}
.c2{grid-template-columns:repeat(2,minmax(0,1fr))}
.c3{grid-template-columns:repeat(3,minmax(0,1fr))}
.c4{grid-template-columns:repeat(4,minmax(0,1fr))}

.card{background:white;border:1px solid #dbe3ef;border-radius:8px;box-shadow:0 1px 2px rgba(15,23,42,.04);padding:18px;min-width:0}
.muted{color:#627087;font-size:13px}
.stat strong{display:block;font-size:30px;margin:8px 0}

.status{display:inline-flex;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:800;background:#f1f5f9;color:#475569}
.green{background:#dcfce7;color:#166534}
.amber{background:#fef3c7;color:#92400e}
.red{background:#fee2e2;color:#991b1b}
.blue{background:#dbeafe;color:#1e40af}

table{width:100%;border-collapse:collapse;font-size:14px}
th,td{text-align:left;padding:13px 12px;border-bottom:1px solid #dbe3ef;white-space:nowrap}
th{font-size:12px;text-transform:uppercase;color:#627087;background:#f8fafc}

.list{display:grid;gap:10px}
.item{display:flex;gap:12px;background:#f8fafc;border-radius:8px;padding:12px}
.badge{width:34px;height:34px;border-radius:8px;background:#dbeafe;color:#1e40af;display:grid;place-items:center;font-weight:900;flex:0 0 auto}
.avatar{width:40px;height:40px;border-radius:50%;background:#7c3aed;color:white;display:grid;place-items:center;font-weight:900}

.form{display:grid;gap:14px}
.field{display:grid;gap:6px;font-weight:700}
.field input,.field select,.field textarea{border:1px solid #dbe3ef;border-radius:8px;padding:10px 12px;font:inherit}
.field textarea{min-height:92px}
.drop{border:1px dashed #93a4bd;border-radius:8px;background:#f8fafc;text-align:center;color:#627087;padding:18px}

.builder{display:grid;grid-template-columns:.8fr 1.35fr .85fr;gap:16px}
.split{display:grid;grid-template-columns:.9fr 1.4fr;gap:16px}

.chart{height:210px;display:flex;align-items:end;gap:10px;padding-top:20px}
.bar{flex:1;border-radius:6px 6px 0 0;background:linear-gradient(180deg,#2563eb,#60a5fa);position:relative}
.bar span{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-weight:800;font-size:12px}
.bar label{position:absolute;top:100%;left:50%;transform:translateX(-50%);font-size:12px;color:#627087;margin-top:8px}

/* Modal popup (CSS-only, driven by :target — the primary action opens it).
   Hidden by default; shown when the URL fragment is #create. */
.modal-bg{display:none;position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:10;place-items:center;padding:20px}
.modal-bg:target{display:grid}
.modal-backdrop{position:absolute;inset:0;display:block}
.modal{position:relative;background:white;border-radius:12px;width:min(720px,100%);box-shadow:0 18px 48px rgba(15,23,42,.16);padding:20px;max-height:90vh;overflow:auto}
.modal-head{display:flex;justify-content:space-between;gap:12px}
.x{width:38px;height:38px;border:1px solid #dbe3ef;border-radius:8px;background:white;font-weight:900;display:grid;place-items:center;text-decoration:none;color:#162033;flex:0 0 auto}

/* Login page — standalone auth screen (the landing page).
   Reuses the existing tokens (colors, radii, brand mark) but is a centered
   single-column layout, independent of the .app sidebar grid. */
.auth{min-height:100vh;display:grid;place-items:center;padding:24px;
  background:linear-gradient(160deg,#eef2fb 0%,#f5f7fb 60%)}
.auth-card{width:min(420px,100%);background:white;border:1px solid #dbe3ef;
  border-radius:14px;box-shadow:0 18px 48px rgba(15,23,42,.10);padding:32px}
.auth-brand{display:flex;gap:12px;align-items:center;justify-content:center;margin-bottom:22px}
.auth-brand .mark{width:46px;height:46px}
.auth-brand strong{display:block;font-size:17px;color:#162033;line-height:1.1}
.auth-brand span{display:block;color:#627087;font-size:13px}
.auth-card h1{font-size:22px;text-align:center;margin:0 0 4px}
.auth-card .sub{text-align:center;color:#627087;font-size:14px;margin:0 0 24px}
.auth-card .form{gap:16px}
.auth-card .primary{width:100%;text-align:center;padding:12px 14px;border:0;font-size:15px}
.auth-error{display:none;background:#fee2e2;color:#991b1b;border-radius:8px;
  padding:10px 12px;font-size:13px;font-weight:700;margin-bottom:16px}
.auth-error.show{display:block}
.auth-hint{margin-top:20px;text-align:center;color:#627087;font-size:12px;line-height:1.6}
.auth-hint code{background:#f1f5f9;border-radius:5px;padding:2px 6px;font-size:12px;color:#334155}

@media(max-width:1120px){
  .app{grid-template-columns:94px 1fr}
  .brand div:not(.mark),.roles,.nav .txt,.foot{display:none}
  .side{align-items:center}
  .nav a{justify-content:center}
  .c4{grid-template-columns:repeat(2,1fr)}
  .builder,.split{grid-template-columns:1fr}
}
/* CSS-only sidebar toggle (a hidden checkbox drives the slide; no JavaScript).
   #navToggle is the first child of .app, so `#navToggle:checked ~ …` can react
   on .side, .mobile-bar, and .nav-backdrop. The mobile bar, hamburger, and
   backdrop are display:none on desktop and only appear at the breakpoint below,
   so desktop is completely unaffected. */
.nav-toggle{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;margin:0}
.mobile-bar{display:none}
.nav-backdrop{display:none}

@media(max-width:760px){
  .app{display:block}

  /* Collapsed default: a slim fixed top bar shows only the logo section
     (a compact copy of the brand) plus the hamburger toggle. */
  .mobile-bar{
    display:flex;align-items:center;justify-content:space-between;gap:12px;
    position:fixed;top:0;left:0;right:0;z-index:8;
    background:#111827;color:#e5e7eb;padding:12px 16px;
    height:66px;border-bottom:1px solid rgba(255,255,255,.10)
  }
  /* The logo itself is the toggle (a <label for="navToggle">): tapping it
     opens the drawer. The hamburger on the right is the same control. */
  .mobile-bar .brand-mini{display:flex;gap:10px;align-items:center;color:inherit;cursor:pointer}
  .mobile-bar .brand-mini strong{color:#fff;font-size:15px;line-height:1}
  .mobile-bar .brand-mini span{display:block;color:#aeb8c8;font-size:12px}
  .mobile-bar .mark{width:36px;height:36px}
  .burger{
    display:inline-grid;place-items:center;flex:0 0 auto;
    width:42px;height:42px;border-radius:8px;
    border:1px solid rgba(255,255,255,.16);background:transparent;cursor:pointer
  }
  .burger span{position:relative;display:block;width:20px;height:2px;border-radius:2px;background:#e5e7eb}
  .burger span:before,.burger span:after{content:"";position:absolute;left:0;width:20px;height:2px;border-radius:2px;background:#e5e7eb}
  .burger span:before{top:-6px}
  .burger span:after{top:6px}

  /* The full desktop sidebar design becomes an off-canvas drawer. */
  .side{
    position:fixed;top:0;left:0;z-index:10;
    width:284px;max-width:86vw;height:100vh;
    align-items:stretch;
    transform:translateX(-100%);
    transition:transform .32s cubic-bezier(.22,1,.36,1);
    box-shadow:0 18px 48px rgba(15,23,42,.28)
  }
  /* Every element keeps its full desktop appearance inside the open drawer. */
  .brand div:not(.mark),.nav .txt,.foot{display:block}
  /* Keep the three role tabs as equal thirds (the desktop grid), not block. */
  .roles{display:grid;grid-template-columns:repeat(3,1fr)}
  .nav{grid-template-columns:1fr}
  .nav a{justify-content:flex-start}

  /* Push page content below the fixed logo bar. */
  .main{padding-top:66px}

  /* Dim backdrop behind the open drawer; tapping it closes the menu. */
  .nav-backdrop{
    display:block;position:fixed;inset:0;z-index:9;
    background:rgba(15,23,42,.42);
    opacity:0;pointer-events:none;
    transition:opacity .32s ease
  }

  /* Open state — driven purely by the checkbox (toggled by the hamburger). */
  .nav-toggle:checked ~ .side{transform:translateX(0)}
  .nav-toggle:checked ~ .nav-backdrop{opacity:1;pointer-events:auto}

  .top{flex-direction:column;align-items:flex-start;padding:18px}
  .actions{flex-wrap:wrap;width:100%}
  .search{min-width:100%}
  .content{padding:18px}
  .c2,.c3,.c4{grid-template-columns:1fr}
  thead{display:none}
  table,tbody,tr,td{display:block}
  tr{border:1px solid #dbe3ef;border-radius:8px;padding:8px 10px;margin-bottom:10px}
  td{display:flex;justify-content:space-between;gap:14px;text-align:right;white-space:normal;border:0;padding:7px 0}
  td:before{content:attr(data-label);color:#627087;font-size:11px;font-weight:800;text-transform:uppercase;text-align:left;flex:0 0 92px}
}

@media(max-width:760px) and (prefers-reduced-motion:reduce){
  .side,.nav-backdrop{transition:none}
}
