:root{--bg:#f5f7fb;--card:#fff;--ink:#172033;--muted:#6d7483;--line:#e2e7ef;--nav:#111827;--accent:#2563eb;--accent2:#1d4ed8;--success:#0f9f6e;--warn:#d97706}
*{box-sizing:border-box}body{margin:0;font:15px/1.5 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--ink);background:var(--bg)}
a{color:var(--accent);text-decoration:none}.layout{min-height:100vh;display:grid;grid-template-columns:245px 1fr}
.sidebar{background:var(--nav);color:#fff;padding:24px 18px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:11px;color:#fff;font-weight:750;font-size:18px;margin:0 6px 28px}
.brand-mark{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#60a5fa,#2563eb);color:white;font-weight:850}
.brand-mark.large{width:54px;height:54px;margin:auto}.sidebar nav{display:grid;gap:7px}.sidebar nav a{color:#d1d5db;padding:11px 12px;border-radius:10px}.sidebar nav a:hover{background:#1f2937;color:#fff}.sidebar-footer{margin-top:auto;border-top:1px solid #374151;padding:18px 10px 0;display:flex;justify-content:space-between;align-items:center}
.link-button{border:0;background:transparent;color:#93c5fd;cursor:pointer}.content{padding:34px;min-width:0}.page-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}
h1{font-size:30px;line-height:1.15;margin:0 0 6px}h2{font-size:20px;margin-top:0}.muted{color:var(--muted)}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:0 5px 20px rgba(23,32,51,.04)}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}.stat span{display:block;color:var(--muted)}.stat strong{font-size:28px}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:white;color:var(--ink);border-radius:10px;padding:9px 14px;font-weight:650;cursor:pointer}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{background:var(--accent2)}.btn.full{width:100%}
.toolbar,.actions{display:flex;gap:10px;align-items:center}.toolbar{margin-bottom:16px}.toolbar input{max-width:360px}
input,select,textarea{width:100%;border:1px solid #cfd6e2;border-radius:9px;padding:10px 11px;background:#fff;color:var(--ink);font:inherit}label{font-weight:650}.form-card{max-width:680px}.form-card p{display:grid;gap:6px}.check{display:flex;gap:10px;align-items:center;margin:16px 0}.check input{width:auto}
.table-wrap{overflow:auto;padding:0}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:13px 15px;border-bottom:1px solid var(--line);white-space:nowrap}th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;background:#fafbfc}
.badge{display:inline-block;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:750;background:#edf2f7}.badge.published{background:#dcfce7;color:#166534}.badge.draft{background:#dbeafe;color:#1e40af}.badge.superseded{background:#f3f4f6;color:#4b5563}
.alert{padding:12px 15px;border-radius:10px;margin-bottom:16px;background:#e0f2fe}.alert.success{background:#dcfce7}.alert.error{background:#fee2e2}.alert.warning{background:#fef3c7}
.roster-grid-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:14px}.roster-grid{min-width:1120px}.roster-grid th,.roster-grid td{padding:0;border-right:1px solid var(--line)}.roster-grid th{padding:10px;text-align:center}.roster-grid th small{display:block;font-size:11px;margin-top:2px}.employee-col{position:sticky;left:0;z-index:2;background:#fff!important;min-width:175px;padding:10px 12px!important}.employee-col small{display:block;color:var(--muted)}
.shift-cell{min-width:128px;height:58px}.cell-input{border:0;border-radius:0;height:58px;padding:8px;text-align:center;background:transparent}.cell-input:focus{outline:2px solid var(--accent);outline-offset:-2px;background:#eff6ff}.hours{text-align:center;font-weight:750;padding:8px!important}.department-row td{background:#eef2ff;color:#3730a3;font-weight:800;padding:7px 12px;border-top:2px solid #c7d2fe}.shift-chip{text-align:center;padding:4px;font-weight:650}.off{display:block;text-align:center;color:#a0a7b3;font-size:12px}
.login-page{display:grid;place-items:center;min-height:100vh;background:linear-gradient(135deg,#111827,#1e3a8a)}.login-card{width:min(420px,calc(100% - 32px));background:#fff;padding:34px;border-radius:20px;box-shadow:0 25px 80px rgba(0,0,0,.3)}.login-card h1{text-align:center;margin-top:14px}.login-card .muted{text-align:center}.login-card p{display:grid;gap:6px}
code{background:#eef2f7;padding:2px 5px;border-radius:5px}
@media(max-width:900px){.layout{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.sidebar nav{grid-template-columns:repeat(3,1fr)}.sidebar-footer{display:none}.content{padding:20px}.stats{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}}
@media print{.sidebar,.print-hide,.alert{display:none!important}.layout{display:block}.content{padding:0}.roster-grid-wrap{border:0}.roster-grid{min-width:0;font-size:10px}.employee-col{position:static!important}}

.uncertain-cell{background:#fff7ed}.cell-choice{display:flex;justify-content:space-between;align-items:center;padding:4px 6px;background:#ffedd5;color:#9a3412}.cell-choice small{font-size:10px}.mini-btn{border:0;border-radius:6px;background:#ea580c;color:white;padding:3px 7px;font-weight:700}

.row-actions{display:flex;gap:12px;align-items:center}
.danger-link{color:#b91c1c}
.btn.danger{background:#b91c1c;border-color:#b91c1c;color:#fff}
.choice-block{padding:18px 0;border-bottom:1px solid var(--line)}
.choice-block:last-child{border-bottom:0}
.danger-choice{background:#fff7f7;margin:14px -14px;padding:18px 14px;border-radius:12px}
.merge-summary{display:grid;grid-template-columns:1fr auto 1fr;gap:18px;align-items:center;margin-bottom:24px}
.merge-summary div{display:grid;gap:6px}
.merge-summary small{color:var(--muted)}
.field-block{display:grid;gap:8px;margin-bottom:22px}

.open-shifts-card{margin-bottom:18px}
.open-shift-row{display:grid;grid-template-columns:1fr minmax(320px,520px);gap:18px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}
.open-shift-row:last-child{border-bottom:0}
.open-shift-row div{display:grid;gap:3px}
.open-shift-row span{color:var(--muted)}
.open-shift-row form{display:grid;grid-template-columns:1fr auto;gap:8px}
@media(max-width:800px){.open-shift-row{grid-template-columns:1fr}.open-shift-row form{grid-template-columns:1fr}}

.compact-header{margin-bottom:14px}
.compact-roster .roster-grid{table-layout:fixed;min-width:920px}
.compact-roster .employee-col{min-width:145px;width:145px}
.compact-roster .shift-cell{min-width:105px;height:42px}
.compact-roster .cell-input{height:42px;padding:5px 4px;font-size:12px}
.compact-roster th{padding:7px 4px;font-size:11px}
.compact-roster td{font-size:12px}
.compact-roster .employee-col{padding:6px 8px!important}
.compact-roster .department-row td{padding:5px 8px}
.compact-roster .hours{padding:4px!important;width:46px}
.compact-roster .shift-chip{font-size:11px;padding:2px}
.roster-help{margin-top:8px}
.empty-state{max-width:680px}

@media print{
  @page{size:A4 landscape;margin:7mm}
  body{background:#fff}
  .content{padding:0!important}
  .roster-grid-wrap{overflow:visible;border:0}
  .compact-roster .roster-grid{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed;
    font-size:7.5px;
  }
  .compact-roster .employee-col{
    position:static!important;
    width:18%!important;
    min-width:0!important;
  }
  .compact-roster th,
  .compact-roster td{
    padding:2px!important;
    white-space:normal!important;
  }
  .compact-roster .shift-cell{height:22px!important;min-width:0!important}
  .compact-roster .cell-input{
    height:22px!important;
    font-size:7px!important;
    padding:1px!important;
  }
  .compact-roster .shift-chip{font-size:7px!important;padding:0!important}
  .compact-roster .department-row td{
    font-size:8px!important;
    padding:2px 4px!important;
  }
  .compact-roster .hours{width:5%!important}
}

.open-choice{padding:18px 0;border-bottom:1px solid var(--line)}
.open-choice:last-child{border-bottom:0}
.open-choice-header{display:flex;justify-content:space-between;gap:16px;margin-bottom:12px}
.open-choice-header div{display:grid;gap:3px}
.open-choice-header span{color:var(--muted)}
.ranked-candidates{display:grid;gap:8px}
.candidate-card{
  display:grid;
  grid-template-columns:32px 1fr auto;
  gap:12px;
  align-items:start;
  padding:11px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.candidate-card:first-child{
  border-color:#93c5fd;
  background:#eff6ff;
}
.candidate-rank{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:999px;
  background:#e5e7eb;
  font-weight:800;
}
.candidate-card:first-child .candidate-rank{
  background:#2563eb;
  color:#fff;
}
.candidate-copy{display:grid;gap:3px}
.candidate-copy small{color:var(--muted)}
.candidate-reasons{
  margin:4px 0 0;
  padding-left:17px;
  color:#4b5563;
  font-size:12px;
}
.candidate-reasons li{margin:1px 0}
.other-employees{margin-top:10px}
.other-employees summary{
  cursor:pointer;
  color:var(--accent);
  font-weight:700;
  width:max-content;
}
.other-employees form{
  display:grid;
  grid-template-columns:minmax(220px,420px) auto;
  gap:8px;
  margin-top:10px;
  max-width:560px;
}
@media(max-width:700px){
  .candidate-card{grid-template-columns:28px 1fr}
  .candidate-card form{grid-column:2}
  .other-employees form{grid-template-columns:1fr}
}

.link-button-table{
  border:0;
  padding:0;
  background:transparent;
  color:var(--accent);
  font:inherit;
  cursor:pointer;
}
.existing-roster-choice{max-width:820px}
.choice-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
.choice-card{
  display:grid;
  align-content:start;
  gap:8px;
  min-height:150px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:14px;
  color:var(--ink);
  background:#fff;
}
.choice-card:hover{border-color:#93c5fd}
.choice-card span{color:var(--muted)}
.choice-card button{margin-top:auto;width:max-content}
.danger-lite{background:#fff7f7}
@media(max-width:800px){
  .choice-grid{grid-template-columns:1fr}
}

.choice-department{margin-top:22px}
.choice-department>h3{
  margin:0;
  padding:9px 12px;
  border-radius:10px;
  background:#eef2ff;
  font-size:15px;
}
.choice-department+.choice-department{margin-top:30px}

.target-hours{min-width:92px}
.target-hours small{color:var(--muted)}
.allocation-status{
  display:block;
  margin-top:4px;
  font-size:11px;
  font-weight:700;
}
.allocation-needs-hours{color:#b45309}
.allocation-over-target{color:#b91c1c}
.allocation-on-target{color:#15803d}

.payroll-total{display:block;font-size:10px;color:var(--muted);white-space:nowrap}

/* Employee clock + roster prototype */
.staff-body{margin:0;background:#f4f6f8;color:#172033;font-family:Arial,sans-serif}
.staff-shell{max-width:680px;margin:0 auto;padding:12px 12px 44px}
.staff-header{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 16px}.staff-header div{display:flex;gap:8px;align-items:baseline}.staff-header span{color:#667085}.staff-name{font-weight:700!important;color:#172033!important}
.staff-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:20px;margin:12px 0;box-shadow:0 3px 14px rgba(15,23,42,.04)}
.staff-card h1,.staff-card h2{margin:0}.staff-card p{color:#667085}.staff-input,.availability-form input,.availability-form select,.shift-actions input{width:100%;box-sizing:border-box;padding:13px;border:1px solid #cbd5e1;border-radius:10px;font-size:16px;background:#fff}.staff-primary,.staff-break,.staff-dark{width:100%;padding:15px;border:0;border-radius:11px;font-size:18px;font-weight:800;cursor:pointer}.staff-primary{background:#2563eb;color:#fff}.staff-break{background:#f59e0b;color:#111827}.staff-dark{background:#4b5563;color:#fff}.identify-card form{display:grid;gap:10px}.staff-test-note{font-size:13px!important;line-height:1.45;background:#f8fafc;padding:10px;border-radius:9px}.staff-tabs{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:repeat(3,1fr);gap:5px;background:#f4f6f8;padding:7px 0}.staff-tabs a{text-decoration:none;text-align:center;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:10px;color:#344054;font-weight:700}.section-heading{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:14px}.section-heading p{margin:4px 0 0}.test-pill{font-size:11px;font-weight:800;background:#fff7ed;color:#9a3412;border-radius:999px;padding:5px 8px}.clock-state-card{display:grid;gap:5px;padding:17px;background:#f8fafc;border-radius:13px;margin-bottom:10px}.clock-state-card strong{font-size:24px}.clock-state-card span{font-size:19px;font-weight:700}.clock-buttons{display:grid;gap:8px}.staff-shift-list{display:grid;gap:9px}.staff-shift{display:grid;grid-template-columns:56px 1fr auto;gap:12px;align-items:center;border:1px solid #e5e7eb;border-radius:13px;padding:12px}.staff-shift.open{background:#f8fbff}.shift-date{display:grid;text-align:center;border-right:1px solid #e5e7eb;padding-right:10px}.shift-date strong{font-size:17px}.shift-date span,.shift-main span{font-size:12px;color:#667085}.shift-main{display:grid;gap:3px}.shift-main>strong{font-size:17px}.shift-actions{display:grid;gap:5px;justify-items:end}.shift-actions details{position:relative}.shift-actions summary{cursor:pointer;color:#b42318;font-size:12px}.shift-actions details form{position:absolute;right:0;top:22px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:10px;width:220px;z-index:3;display:grid;gap:7px;box-shadow:0 10px 25px rgba(15,23,42,.12)}.response-badge{font-size:11px;font-weight:700;padding:4px 7px;background:#eef2ff;border-radius:999px}.response-badge.good{background:#ecfdf3;color:#027a48}.response-badge.problem{background:#fff1f0;color:#b42318}.empty-copy{margin:5px 0!important}.availability-form{display:grid;grid-template-columns:1fr 1fr;gap:10px}.availability-form label{display:grid;gap:5px;font-size:13px;font-weight:700}.availability-times{display:grid;grid-template-columns:1fr 1fr;gap:8px}.availability-form .staff-primary{grid-column:1/-1}.exception-list{border-top:1px solid #e5e7eb;margin-top:18px;padding-top:13px}.exception-list h3{font-size:14px}.exception-list>div{display:flex;justify-content:space-between;gap:10px;padding:7px 0;font-size:13px}.staff-reset{text-align:center;margin-top:18px}.staff-reset button{border:0;background:transparent;color:#475467;text-decoration:underline;cursor:pointer}
@media(max-width:560px){.staff-shift{grid-template-columns:48px 1fr}.shift-actions{grid-column:2;justify-items:start;grid-auto-flow:column}.availability-form{grid-template-columns:1fr}.availability-form .staff-primary{grid-column:auto}.staff-header div span{display:none}}
.manager-attention{border-color:#fed7aa;background:#fffdf8}.attention-item{padding:14px 0;border-top:1px solid var(--line)}.attention-item:first-of-type{border-top:0}.attention-summary{display:grid;gap:3px;margin-bottom:10px}.attention-summary>strong{font-size:16px}.attention-summary span,.attention-summary small{color:var(--muted)}.open-request-item{display:flex;justify-content:space-between;gap:20px;align-items:center}.open-request-item .actions{display:flex;gap:7px}@media(max-width:700px){.open-request-item{display:block}.open-request-item .actions{margin-top:10px}}
.profile-list{display:grid;gap:12px}.schedule-profile-card{padding:16px 18px}.profile-heading{display:flex;justify-content:space-between;gap:15px}.profile-heading h3{margin:0 0 3px}.profile-heading span,.learned-days{color:var(--muted);font-size:13px}.pattern-confidence{font-weight:700}.learned-days{margin:10px 0}.profile-form{display:grid;grid-template-columns:120px 110px 160px minmax(220px,1fr) auto;gap:9px;align-items:end}.profile-form label{display:grid;gap:4px;font-size:12px;font-weight:700}.profile-form input,.profile-form select{width:100%;box-sizing:border-box;padding:9px;border:1px solid var(--line);border-radius:8px;background:#fff}.profile-form .btn{height:38px}@media(max-width:1000px){.profile-form{grid-template-columns:repeat(2,1fr)}.profile-notes{grid-column:1/-1}}@media(max-width:600px){.profile-form{grid-template-columns:1fr}.profile-notes{grid-column:auto}.profile-heading{display:block}.pattern-confidence{display:inline-block;margin-top:5px}}

/* Simplified employee roster reveal */
.staff-roster-toggle {
  width: 100%; border: 0; border-radius: 14px; padding: 18px 20px;
  font-size: 1.15rem; font-weight: 800; cursor: pointer; background: #fff;
  box-shadow: 0 1px 3px rgba(16,24,40,.08); margin: 4px 0 16px;
}
.staff-roster-panel[hidden] { display: none; }
.staff-secondary-details > summary { cursor: pointer; font-size: 1.05rem; font-weight: 800; padding: 4px 0; }
.staff-secondary-details[open] > summary { margin-bottom: 14px; }
.staff-clock-primary { margin-bottom: 12px; }
.simple-shift .shift-actions details summary { cursor: pointer; font-weight: 700; }

/* Manager roster: keep the normal path Generate/Review/Publish */
.primary-roster-actions { align-items: center; }
.manager-more { position: relative; }
.manager-more > summary { list-style: none; cursor: pointer; }
.manager-more > summary::-webkit-details-marker { display: none; }
.manager-more-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; z-index: 20; background: #fff; border: 1px solid #d0d5dd; border-radius: 12px; padding: 8px; box-shadow: 0 12px 28px rgba(16,24,40,.14); }
.manager-more-menu a, .manager-more-menu button { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none; cursor: pointer; font: inherit; }
.manager-more-menu a:hover, .manager-more-menu button:hover { background: #f2f4f7; }
.manager-more-menu .danger-link { color: #b42318; }

.cant-work-details form {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.staff-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    cursor: pointer;
}

.staff-choice input {
    width: 20px;
    height: 20px;
}

.replacement-hours-card .candidate-card,
.manager-attention .candidate-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.replacement-hours-card .candidate-copy,
.manager-attention .candidate-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.replacement-hours-card .candidate-card form,
.manager-attention .candidate-card form {
    flex: 0 0 auto;
    margin-left: auto;
}

.replacement-hours-card .candidate-copy strong,
.replacement-hours-card .candidate-copy .muted {
    white-space: normal;
}

.staff-roster-notice {
    margin: 0 0 18px;
    padding: 18px;
    border: 2px solid #d92d20;
    border-radius: 14px;
    background: #fff6f5;
}

.staff-roster-notice strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.staff-roster-notice div {
    margin: 5px 0;
}

.staff-notice-button {
    margin-top: 12px;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}


.roster-cell-editor {
    display: grid;
    gap: 5px;
}

.roster-cell-editor .cell-input {
    width: 100%;
    min-width: 90px;
}

.cell-edit-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.cell-edit-actions .mini-btn {
    padding: 4px 7px;
    font-size: 11px;
}

.cell-off-btn {
    opacity: .7;
}

.auto-cell-form {
    width: 100%;
}

.cell-view {
    width: 100%;
    min-height: 40px;
    padding: 6px 3px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: center;
}

.cell-view:hover {
    background: rgba(0,0,0,.035);
    border-radius: 7px;
}

.cell-shift-line {
    display: block;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.4;
}

.cell-off {
    font-size: 11px;
    opacity: .45;
}

.cell-inline-editor {
    width: 100%;
}

.cell-inline-editor .cell-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 4px;
    text-align: center;
    font-size: 12px;
}

.cell-inline-editor small {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    opacity: .5;
}

.roster-start-options {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.roster-start-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
}

.roster-start-choice:hover {
    background: rgba(0,0,0,.025);
}

.roster-start-choice input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

.roster-start-choice span {
    display: grid;
    gap: 3px;
}

.roster-start-choice small {
    opacity: .65;
}
