/* Supabase authentication / shared-backend states */
.sm-auth-shell{min-height:100dvh;display:grid;grid-template-columns:55% 45%;background:var(--bg);border-top:2px solid var(--text)}
.sm-auth-panel{padding:clamp(36px,5vw,78px);display:flex;flex-direction:column;justify-content:center;border-right:1px solid var(--border-2);max-width:none}
.sm-auth-kicker{font-size:10px;letter-spacing:.14em;color:var(--muted);margin-bottom:22px}
.sm-auth-panel h1{font-size:clamp(64px,7.4vw,118px);line-height:.86;letter-spacing:-.065em;margin:0 0 30px;font-weight:600}
.sm-auth-panel>p{max-width:560px;color:var(--muted);font-size:13px;line-height:1.55;margin:0 0 26px}
.sm-auth-panel form{max-width:560px;display:grid;gap:14px;border-top:1px solid var(--border-2);padding-top:24px}
.sm-auth-panel label{display:grid;gap:7px;font:600 9px/1.2 "JetBrains Mono",ui-monospace,monospace;letter-spacing:.1em;color:var(--muted)}
.sm-auth-panel input{height:48px;border:1px solid var(--border-2);border-radius:0;background:rgba(255,255,255,.14);color:var(--text);padding:0 14px;font:500 14px/1 Inter,sans-serif}
.sm-auth-panel form button{height:48px;border:1px solid var(--text);background:var(--text);color:var(--bg);font:700 10px/1 "JetBrains Mono",ui-monospace,monospace;letter-spacing:.1em;cursor:pointer;margin-top:4px}
.sm-auth-panel form button:disabled{opacity:.55;cursor:wait}
.sm-auth-link{margin-top:16px;width:max-content;border:0;background:transparent;padding:0;color:var(--text);text-decoration:underline;text-underline-offset:4px;font:600 9px/1.4 "JetBrains Mono",ui-monospace,monospace;cursor:pointer}
.sm-auth-message{max-width:560px;border:1px solid var(--border-2);border-left:3px solid var(--warning);padding:12px 14px;margin-bottom:18px;font-size:11px;line-height:1.45;color:var(--muted);background:rgba(255,255,255,.14)}
.sm-auth-system{position:relative;padding:clamp(36px,4vw,64px);display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}
.sm-auth-system:before{content:"";position:absolute;inset:28px;border:1px solid var(--border-2);background-image:linear-gradient(var(--border) 1px,transparent 1px),linear-gradient(90deg,var(--border) 1px,transparent 1px);background-size:25% 25%;opacity:.65}
.sm-auth-system>*{position:relative;z-index:1}
.sm-auth-system>span{font-size:10px;letter-spacing:.14em}
.sm-auth-system>strong{font-size:clamp(46px,5.4vw,86px);line-height:.9;letter-spacing:-.055em;font-weight:600}
.sm-auth-system>small{font:500 9px/1.4 "JetBrains Mono",ui-monospace,monospace;color:var(--muted);letter-spacing:.08em}
.backend-live:after{content:"";display:inline-block;width:6px;height:6px;background:var(--success);border-radius:50%;margin-left:7px;vertical-align:1px}
@media(max-width:860px){.sm-auth-shell{grid-template-columns:1fr}.sm-auth-system{display:none}.sm-auth-panel{min-height:100dvh;padding:30px 20px}.sm-auth-panel h1{font-size:clamp(58px,17vw,88px)}}

/* ==============================================================
   MANAGEMENT HEADER PRECISION GRID
   One shared 55/45 geometry for header, rules and navigation.
   ============================================================== */
@media (min-width:1200px){
  .zenith-shell{
    --sm-header-split:55%;
    --sm-header-gutter:30px;
    --sm-tool-employee:168px;
    --sm-tool-search:112px;
  }

  .zenith-header{
    grid-template-columns:var(--sm-header-split) calc(100% - var(--sm-header-split));
  }

  .zenith-header-left,
  .zenith-header-right{
    padding-left:var(--sm-header-gutter);
    padding-right:var(--sm-header-gutter);
  }

  /* Make the technical rule a single continuous line through the centre seam. */
  .zenith-header-left:after{
    left:var(--sm-header-gutter);
    right:0;
  }
  .zenith-header-right:after{
    left:0;
    right:var(--sm-header-gutter);
  }

  /* The first eight cells terminate exactly on the same 55% split as the header. */
  .zenith-nav{
    padding-left:var(--sm-header-gutter);
    padding-right:var(--sm-header-gutter);
    gap:0;
    overflow:hidden;
  }

  .zenith-nav-item{
    min-width:0;
    padding-left:10px;
    padding-right:10px;
    justify-content:center;
    border-color:var(--border-2);
  }

  .zenith-nav-item:not(.employee-switch):not(.search-switch){
    /* 8 × (6.875% of the padded content box + .375px) = 55vw − 30px. */
    flex:0 0 calc(6.875% + .375px);
  }

  .zenith-nav-item:first-child{
    border-left:1px solid var(--border-2);
  }

  .zenith-nav-item:nth-child(8){
    border-right:1px solid var(--border-2);
  }

  .zenith-nav-item.employee-switch{
    flex:0 0 var(--sm-tool-employee);
    margin-left:auto;
    border-left:1px solid var(--border-2);
  }

  .zenith-nav-item.search-switch{
    flex:0 0 var(--sm-tool-search);
    border-right:1px solid var(--border-2);
  }

  .zenith-nav-item.active:after{
    left:0;
    right:0;
    bottom:0;
    height:2px;
  }
}

@media (min-width:1200px) and (max-width:1450px){
  .zenith-nav-item{
    padding-left:7px;
    padding-right:7px;
    font-size:7.4px;
    letter-spacing:.055em;
    gap:6px;
  }
  .zenith-shell{
    --sm-tool-employee:154px;
    --sm-tool-search:100px;
  }
}
