/* v5.4.3 ARCHITECT - staff ownership migrated from app.css */
.staff-request-lines select{
  min-width:86px;height:36px;padding:0 30px 0 11px;border:1px solid var(--line);border-radius:11px;
  background:var(--surface-strong);color:var(--text);outline:none;font-weight:800
}

.staff-heading{display:flex;align-items:center;gap:18px;margin-bottom:22px;padding:4px 2px}
.staff-heading>img{width:58px;height:58px;flex:none;border-radius:50%;object-fit:cover;box-shadow:var(--shadow-soft)}
.staff-heading>div{min-width:0}.staff-heading h1{margin-top:5px;font-size:clamp(28px,4vw,45px);letter-spacing:-2px}.staff-heading p:not(.eyebrow){margin-top:6px;color:var(--muted);font-size:12px}
.staff-heading-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:9px;
}
.staff-grade-segment{
  display:flex;
  align-items:center;
  gap:4px;
  padding:4px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-soft);
}
.staff-grade-segment button{
  height:32px;
  padding:0 11px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-size:9px;
  font-weight:850;
}
.staff-grade-segment button.is-active{
  background:linear-gradient(135deg,var(--purple),var(--blue));
  color:#fff;
  box-shadow:0 5px 14px rgba(114,87,246,.22);
}
.staff-layout{display:grid;grid-template-columns:minmax(620px,1.1fr) minmax(360px,.9fr);gap:16px;align-items:start}
.staff-matrix-card,
.staff-detail-card{
  padding:22px;
  border:1px solid var(--v410-card-border);
  border-radius:var(--v410-card-radius);
  box-shadow:0 6px 22px rgba(43,48,67,.045);
}

@media(hover:hover) and (pointer:fine){
  .staff-matrix-card,
  .staff-detail-card{
    transition:
      transform .18s ease,
      box-shadow .18s ease,
      border-color .18s ease;
  }
}

@media(max-width:430px){
  .staff-matrix-card,
  .staff-detail-card{
    border-radius:20px;
  }
}
.staff-matrix-wrap{position:relative;z-index:1;overflow:auto;border:1px solid var(--line);border-radius:16px;background:var(--surface-soft)}
.staff-matrix{width:100%;min-width:760px;border-collapse:collapse;font-size:10px;text-align:center}
.staff-matrix th,.staff-matrix td{height:42px;padding:6px 8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.staff-matrix th{position:sticky;top:0;background:var(--surface-strong);font-weight:900}.staff-matrix tbody th{position:sticky;left:0;z-index:2;text-align:left;min-width:78px}
.staff-matrix tr:last-child>*{border-bottom:0}.staff-matrix tr>*:last-child{border-right:0}.staff-matrix td{color:var(--muted)}.staff-matrix td.has-count{color:#fff;background:linear-gradient(135deg,var(--purple),var(--blue));font-weight:900}
.staff-request-groups{position:relative;z-index:1;display:grid;gap:10px;max-height:680px;overflow:auto;padding-right:3px;overscroll-behavior:contain}
.staff-request-card{border:1px solid var(--line);border-radius:17px;background:var(--surface-soft);overflow:hidden}
.staff-request-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line);background:var(--surface-strong)}
.staff-request-card-head div{display:flex;align-items:center;gap:8px}.staff-request-card-head span{color:var(--muted);font-size:9px;font-weight:850}.staff-request-card-head strong{font-size:13px}.staff-request-card-head b{color:var(--purple);font-size:12px}
.staff-request-lines{display:grid}.staff-request-lines>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border-top:1px solid var(--line)}.staff-request-lines>div:first-child{border-top:0}.staff-request-lines strong,.staff-request-lines small{display:block;font-weight:600;}.staff-request-lines strong{font-size:10px}.staff-request-lines small{margin-top:3px;color:var(--muted);font-size:8px;font-weight:600;}

@media(max-width:1050px) and (min-width:760px){
  .staff-layout{grid-template-columns:1fr}.staff-request-groups{max-height:none}
}

@media(max-width:759px){
  .staff-heading{align-items:flex-start;flex-wrap:wrap}.staff-heading>img{width:48px;height:48px}.staff-heading-actions{width:100%;margin-left:0;justify-content:space-between}.staff-grade-segment{flex:1}.staff-grade-segment button{flex:1}
  .staff-layout{grid-template-columns:1fr}.staff-request-groups{max-height:none}
}

/* DUKBAP LIVE v4.8 SIGNAL */

.top-right{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}

.v48-notification-bell{
  position:relative;
  flex:0 0 auto;
  width:44px;
  min-width:44px;
  max-width:44px;
  height:44px;
  padding:0;
  gap:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--text);
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  cursor:pointer;
  transition:
    background .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .16s ease;
}

.v48-notification-bell .notify-label{
  display:none;
}

.v48-notification-bell .notify-icon{
  width:18px;
  height:18px;
}

.v48-notification-bell:hover{
  background:var(--surface-strong);
  border-color:var(--line-strong);
  color:var(--purple);
  transform:translateY(-1px);
}

.v48-notification-bell:active{
  transform:scale(.97);
}

html[data-theme="dark"] .v48-notification-bell,
html[data-theme="dark"] .live{
  background:var(--surface-strong);
  border-color:var(--line);
  color:var(--now-color,var(--text));
}
.v48-notification-badge{
  position:absolute;top:-4px;right:-5px;min-width:18px;height:18px;padding:0 5px;
  display:none;align-items:center;justify-content:center;border:2px solid var(--surface,#fff);
  border-radius:999px;background:#7c3aed;color:#fff;font-size:9px;font-weight:900;line-height:1;
  box-shadow:0 4px 12px rgba(79,70,229,.28)
}
.v48-notification-badge.is-visible{display:flex}

.v48-notification-layer{position:fixed;inset:0;z-index:290;display:none;place-items:center;padding:24px 12px}
.v48-notification-layer.is-open{display:grid}
.v48-notification-backdrop{position:absolute;inset:0;background:var(--v410-modal-backdrop);backdrop-filter:blur(var(--v410-modal-blur));-webkit-backdrop-filter:blur(var(--v410-modal-blur))}
.v48-notification-panel{
  position:relative;z-index:1;top:auto;right:auto;bottom:auto;left:auto;
  width:min(420px,calc(100vw - 24px));height:100%;max-height:calc(100dvh - 48px);box-sizing:border-box;
  display:flex;flex-direction:column;margin:0;background:var(--surface,#fff);color:var(--text,#172033);
  border-left:1px solid var(--line,rgba(20,30,50,.1));border-radius:25px;overflow:hidden;
  box-shadow:-28px 0 80px rgba(20,30,60,.16)
}
.v48-notification-panel:has(.v48-quiet-picker-panel){
  height:auto;
}

.v48-notification-head{display:flex;align-items:center;gap:14px;padding:26px 24px 18px;border-bottom:1px solid var(--line,rgba(20,30,50,.1))}
.v48-notification-head>div:first-child{min-width:0;flex:1}
.v48-notification-eyebrow{margin:0 0 5px;color:var(--purple,#7c3aed);font-size:10px;font-weight:900;letter-spacing:1.7px}
.v48-notification-head h2{margin:0;font-size:25px;letter-spacing:-1px}
.v48-notification-head-actions{display:flex;align-items:center;gap:7px}
.v48-notification-head button:not(.v48-close){border:0;background:var(--surface-soft,#f3f5fa);color:var(--text,#172033);font:inherit;font-size:10px;font-weight:900;border-radius:12px;padding:10px 12px;cursor:pointer}
.v48-notification-list{flex:1;max-height:calc(100dvh - 170px);overflow:auto;padding:10px 14px 26px;overscroll-behavior:contain}
.v48-notification-layer.is-open .v48-notification-backdrop{animation:v410-backdrop-in .20s ease-out both}
.v48-notification-layer.is-open .v48-notification-panel{animation:v410-modal-in .24s cubic-bezier(.2,.8,.2,1) both}

.v48-notification-layer.is-closing .v48-notification-backdrop{
  animation:v48-layer-out .17s ease-in both;
}

.v48-notification-layer.is-closing .v48-notification-panel{
  animation:v48-panel-out .17s cubic-bezier(.4,0,1,1) both;
}

@keyframes v48-layer-out{
  from{opacity:1}
  to{opacity:0}
}

@keyframes v48-panel-out{
  from{opacity:1;transform:translateY(0) scale(1)}
  to{opacity:0;transform:translateY(8px) scale(.98)}
}

.v48-notification-item{
  position:relative;width:100%;box-sizing:border-box;margin:0 0 8px;padding:15px 15px 15px 44px;
  border:1px solid var(--line,rgba(20,30,50,.08));border-radius:18px;background:var(--surface-soft,#f7f8fb);
  color:inherit;text-align:left;cursor:pointer
}
.v48-notification-item::before{content:"";position:absolute;left:17px;top:20px;width:10px;height:10px;border-radius:999px;background:#8b5cf6;box-shadow:0 0 0 5px rgba(139,92,246,.10)}
.v48-notification-item[data-category="request"]::before{background:#2563eb;box-shadow:0 0 0 5px rgba(37,99,235,.10)}
.v48-notification-item[data-category="meal"]::before{background:#38bdf8;box-shadow:0 0 0 5px rgba(56,189,248,.12)}
.v48-notification-item[data-category="schedule"]::before{background:#a855f7;box-shadow:0 0 0 5px rgba(168,85,247,.11)}
.v48-notification-item[data-category="system"]::before{background:#64748b;box-shadow:0 0 0 5px rgba(100,116,139,.11)}
.v48-notification-item.is-urgent::before{background:#ef4444;box-shadow:0 0 0 5px rgba(239,68,68,.11)}
.v48-notification-item.is-read{opacity:.67}
.v48-notification-meta{display:flex;justify-content:space-between;gap:8px;margin-bottom:4px;color:var(--muted,#7d8799);font-size:9px;font-weight:800}
.v48-notification-item strong{display:block;color:var(--text,#172033);font-size:14px;font-weight:900;line-height:1.35}
.v48-notification-item p{margin:5px 0 0;color:var(--muted,#707b8f);font-size:11px;font-weight:650;line-height:1.5}
.v48-notification-empty{padding:70px 20px;text-align:center;color:var(--muted,#7d8799);font-size:12px;font-weight:800}

.v48-settings-card select,.v48-settings-card input[type="time"]{
  min-height:38px;border:1px solid var(--line,rgba(20,30,50,.1));border-radius:12px;
  background:var(--surface-soft,#f4f6fa);color:var(--text,#172033);padding:0 11px;font:inherit;font-size:11px;font-weight:800
}
.v48-permission-button{border:0;border-radius:12px;padding:9px 12px;background:var(--surface-soft,#f4f6fa);color:var(--text,#172033);font:inherit;font-size:10px;font-weight:900;cursor:pointer}

.v48-staff-notice{margin-bottom:18px}
.v48-staff-notice[hidden]{display:none}
.v48-staff-form{display:grid;grid-template-columns:180px minmax(0,1fr);gap:10px;margin-top:15px}
.v48-staff-form select,.v48-staff-form input,.v48-staff-form textarea{
  box-sizing:border-box;width:100%;border:1px solid var(--line,rgba(20,30,50,.1));border-radius:14px;
  background:var(--surface-soft,#f4f6fa);color:var(--text,#172033);font:inherit;font-size:11px;font-weight:700;padding:12px 13px;outline:none
}
.v48-staff-form textarea{grid-column:1/-1;min-height:86px;resize:vertical}
.v48-staff-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px}
.v48-urgent{display:flex;align-items:center;gap:8px;color:var(--muted,#737f92);font-size:10px;font-weight:850}
.v48-staff-send{border:0;border-radius:13px;padding:11px 18px;background:linear-gradient(90deg,#7c3aed,#2563eb);color:#fff;font:inherit;font-size:11px;font-weight:900;cursor:pointer}
.v48-staff-feedback{margin:8px 0 0;color:var(--muted,#737f92);font-size:10px;font-weight:750}

html[data-theme="dark"] .v48-notification-panel,
[data-theme="dark"] .v48-notification-panel{background:#151d2b;border-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .v48-notification-item,
[data-theme="dark"] .v48-notification-item{background:#1d2738;border-color:rgba(255,255,255,.07)}

@media(max-width:759px){
  .v48-notification-panel{height:min(78vh,720px);border-left:0;border-top:1px solid var(--line,rgba(20,30,50,.1));box-shadow:0 -24px 70px rgba(20,30,60,.18)}
  .v48-notification-head{padding:19px 18px 14px}
  .v48-notification-list{padding:9px 10px max(22px,env(safe-area-inset-bottom))}
  .v48-staff-form{grid-template-columns:1fr}
  .v48-staff-form textarea,.v48-staff-actions{grid-column:auto}
}

@media(max-width:759px){
  .v48-notification-panel{
    width:min(390px,calc(100vw - 24px));
  }
}

/* v5.3.3 SIGNAL modal safety */
@media(prefers-reduced-motion:reduce){
  .v48-notification-layer.is-open .v48-notification-panel,
  .v48-notification-layer.is-open .v48-notification-backdrop{
    animation:none;
  }
}

@media(max-height:600px){
  .v48-notification-panel{
    max-height:calc(100dvh - 24px);
  }

  .v48-notification-list{
    max-height:calc(100dvh - 145px);
  }
}


/* v5.3.5 quiet picker desktop height */
@media(min-width:760px){
  .v48-notification-panel:has(.v48-quiet-picker-panel){
    height:auto;
    min-height:0;
  }
  .v48-notification-panel:has(.v48-quiet-picker-panel) .v48-notification-list{
    flex:0 0 auto;
    max-height:none;
    overflow:visible;
    padding-bottom:0;
  }
  .v48-notification-panel:has(.v48-quiet-picker-panel) .v48-quiet-picker-panel{
    flex:0 0 auto;
  }
}

/* DUKBAP LIVE v4.8 SIGNAL - staff matrix width rebalance */
@media (min-width: 900px) {
  [data-view="staff"] .staff-layout,
  .staff-view .staff-layout {
    grid-template-columns: minmax(0, 3.15fr) minmax(250px, .85fr);
    gap: 12px;
    align-items: start;
  }

  [data-view="staff"] .staff-matrix-card,
  .staff-view .staff-matrix-card {
    min-width: 0;
  }

  [data-view="staff"] .staff-detail-card,
  .staff-view .staff-detail-card {
    min-width: 0;
    padding: 17px;
  }

  [data-view="staff"] .staff-matrix,
  .staff-view .staff-matrix {
    min-width: 800px;
  }

  [data-view="staff"] .staff-request-card-head,
  .staff-view .staff-request-card-head {
    padding: 10px 11px;
  }

  [data-view="staff"] .staff-request-lines > div,
  .staff-view .staff-request-lines > div {
    padding: 9px 10px;
  }
}

@media (min-width: 1180px) {
  [data-view="staff"] .staff-layout,
  .staff-view .staff-layout {
    grid-template-columns: minmax(0, 3.55fr) minmax(260px, .75fr);
  }
}


/* v5.3.5 staff matrix controls */
[data-view="staff"] .staff-matrix-card .section-head{align-items:center;gap:12px}
.staff-matrix-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;min-width:0}
.staff-matrix-actions .staff-grade-segment{flex:0 1 auto}
.staff-matrix-actions .staff-grade-segment button{flex:0 0 auto}
.staff-matrix-refresh{height:40px;padding:0 14px;border-radius:999px;white-space:nowrap}
@media(max-width:759px){
  [data-view="staff"] .staff-matrix-card .section-head{align-items:flex-start;flex-direction:column}
  .staff-matrix-actions{width:100%;justify-content:space-between}
  .staff-matrix-actions .staff-grade-segment{flex:1}
  .staff-matrix-actions .staff-grade-segment button{flex:1}
}

/* v5.4.3 ARCHITECT - staff rules migrated from v411-fun.css */

/* canonical staff layout */
[data-view="staff"] .staff-heading > img{
  display:none;
}

/* compact staff matrix */
@media(min-width:760px){
  [data-view="staff"] .staff-matrix-card{
    padding:16px;
  }

  [data-view="staff"] .staff-matrix-card .section-head{
    margin-bottom:12px;
  }

  [data-view="staff"] .staff-matrix{
    font-size:9px;
  }

  [data-view="staff"] .staff-matrix th,
  [data-view="staff"] .staff-matrix td{
    height:32px;
    padding:4px 6px;
  }

  [data-view="staff"] .staff-matrix tbody th{
    min-width:70px;
  }
}


@media(max-width:759px){
  [data-view="staff"] .v48-staff-notice{
    margin:0 0 10px;
  }

  [data-view="staff"] .staff-layout{
    margin:0;
    gap:10px;
  }
  [data-view="staff"] .staff-layout > .staff-matrix-card,
  [data-view="staff"] .staff-layout > .staff-detail-card{
    margin:0;
    height:auto;
    min-height:0;
  }

  [data-view="staff"] .staff-detail-card .empty-state{
    min-height:44px;
    margin:8px 0 0;
    padding:8px 0;
  }
}

