:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color:#191919; background:#f4f4f2; }
* { box-sizing:border-box; }
body { margin:0; }
.container { width:min(1280px, 94vw); margin:40px auto; }
.card { background:white; border:1px solid #ddd; border-radius:16px; padding:24px; margin-bottom:22px; box-shadow:0 8px 30px rgba(0,0,0,.04); }
.narrow, .kiosk { max-width:520px; margin:9vh auto; }
.brand { font-size:12px; font-weight:800; letter-spacing:.16em; }
h1 { margin:8px 0 4px; font-size:clamp(28px,5vw,44px); }
h2 { margin-top:0; }
.muted { color:#6f6f6f; font-size:14px; }
label { display:block; font-size:13px; font-weight:700; margin:15px 0 6px; }
input, select { width:100%; min-height:46px; padding:10px 12px; border:1px solid #c9c9c9; border-radius:10px; font:inherit; background:#fff; }
button, .button { min-height:44px; padding:10px 16px; border:1px solid #bbb; border-radius:10px; background:#fff; color:#111; text-decoration:none; font-weight:700; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
button.primary, .button.primary { background:#111; border-color:#111; color:white; }
button.danger { background:#a51f1f; border-color:#a51f1f; color:white; }
.full { width:100%; margin:16px 0; }
.button-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:20px; }
.button-grid button { min-height:70px; font-size:18px; }
.admin-link { display:block; text-align:center; margin-top:24px; color:#555; }
.flash { padding:13px 16px; border-radius:10px; margin-bottom:15px; font-weight:700; }
.flash.success { background:#e7f6ea; }
.flash.error { background:#fde8e8; }
.topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:20px; }
.top-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.top-actions form { margin:0; }
.stats { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:22px; }
.stats.five { grid-template-columns:repeat(5,1fr); }
.stat { background:#111; color:white; border-radius:14px; padding:20px; }
.stat strong { display:block; font-size:28px; }
.stat span { opacity:.7; font-size:13px; }
.inline-form { display:grid; grid-template-columns:1.2fr 1fr 1fr auto; gap:10px; align-items:end; }
.add-employee { grid-template-columns:1.2fr 1fr 1fr .8fr auto; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:900px; }
th, td { padding:13px 10px; text-align:left; vertical-align:top; border-bottom:1px solid #e8e8e8; }
th { font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:#666; }
tfoot th { border-top:2px solid #d8d8d8; border-bottom:0; font-size:13px; color:#111; }
.pill { display:inline-block; background:#eee; padding:4px 8px; border-radius:999px; font-size:12px; font-weight:700; }
.pill.green { background:#e3f4e7; color:#175f2d; }
.pill.amber { background:#fff1cf; color:#7a5100; }
details summary { cursor:pointer; font-weight:700; }
.edit-form { min-width:250px; padding-top:8px; }
.edit-form button { margin-top:10px; }
.delete-form { margin-top:8px; }
.section-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:14px; }
.section-heading h2 { margin-bottom:5px; }
.report-actions { display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; justify-content:flex-end; }
.period-form { display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; }
.period-form label { margin:0; min-width:150px; }
.period-form input { margin-top:6px; }
.schedule-form { display:grid; grid-template-columns:1.2fr 1fr 1fr 1.3fr auto; gap:10px; align-items:end; margin-bottom:22px; }
.schedule-form label { margin:0; }
.schedule-form input, .schedule-form select { margin-top:6px; }
.schedule-table-wrap { margin-top:8px; }
.rate-form { display:flex; gap:8px; align-items:center; min-width:210px; }
.rate-form button { white-space:nowrap; min-height:40px; padding:7px 10px; }
.money-input { display:flex; align-items:center; gap:5px; border:1px solid #c9c9c9; border-radius:10px; padding-left:10px; background:#fff; min-width:110px; }
.money-input input { border:0; min-height:40px; padding-left:2px; min-width:80px; }
.money-input input:focus { outline:none; }
.rule-note { margin:16px 0 0; padding:11px 13px; border-radius:10px; background:#f5f5f2; font-size:13px; }
.positive { color:#8a5200; font-weight:700; }
.negative { color:#176130; font-weight:700; }

@media (max-width:1100px) {
  .stats.five { grid-template-columns:repeat(3,1fr); }
  .schedule-form { grid-template-columns:1fr 1fr; }
}
@media (max-width:900px) {
  .section-heading { display:block; }
  .report-actions { justify-content:flex-start; margin-top:12px; }
  .add-employee { grid-template-columns:1fr 1fr; }
}
@media (max-width:760px) {
  .container { margin:18px auto; }
  .topbar { display:block; }
  .top-actions { margin-top:14px; }
  .stats, .stats.five { grid-template-columns:1fr; }
  .inline-form, .add-employee, .schedule-form { grid-template-columns:1fr; }
  .period-form { width:100%; }
  .period-form label { flex:1; min-width:130px; }
}

/* v5: departments, employee history, weekly scheduler */
.category-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:18px 0 22px; }
.category-stat { border:1px solid #dedede; border-radius:12px; padding:16px; background:#fafafa; }
.category-stat span, .category-stat small { display:block; color:#6b6b6b; }
.category-stat strong { display:block; font-size:24px; margin:4px 0; }
.category-stat.total { background:#111; color:#fff; border-color:#111; }
.category-stat.total span, .category-stat.total small { color:#cfcfcf; }
.dept { display:inline-block; min-width:44px; text-align:center; font-size:11px; font-weight:800; letter-spacing:.05em; padding:4px 7px; border-radius:999px; background:#ececec; }
.dept-foh { background:#e8f2ff; color:#194f86; }
.dept-boh { background:#fff0df; color:#7a4600; }
.dept-adm { background:#eee9ff; color:#4b338a; }
.week-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.week-actions form { margin:0; }
.week-grid { display:grid; grid-template-columns:repeat(7,minmax(180px,1fr)); gap:10px; overflow-x:auto; padding-bottom:6px; }
.day-column { min-width:180px; background:#f7f7f5; border:1px solid #e0e0dc; border-radius:12px; padding:10px; }
.day-heading { display:flex; justify-content:space-between; gap:8px; align-items:baseline; padding:2px 2px 10px; border-bottom:1px solid #ddd; margin-bottom:10px; }
.day-heading span { color:#777; font-size:12px; }
.schedule-card { background:#fff; border:1px solid #ddd; border-radius:10px; padding:10px; margin-bottom:8px; }
.schedule-card-top { display:flex; align-items:center; gap:7px; margin-bottom:7px; }
.schedule-time { font-weight:800; font-size:13px; margin-bottom:4px; }
.schedule-card details { margin-top:7px; }
.schedule-card .edit-form { min-width:0; }
.empty-day { color:#999; font-size:12px; padding:14px 4px; text-align:center; }
.add-employee-v5 { grid-template-columns:1.2fr .9fr .7fr .9fr .8fr auto; }
.compact-form { display:flex; gap:6px; align-items:center; min-width:155px; }
.compact-form select { min-height:40px; min-width:76px; }
.compact-form button, .button.small { min-height:40px; padding:7px 10px; white-space:nowrap; }
.history-stats { margin-bottom:0; }

@media (max-width:1100px) {
  .category-stats { grid-template-columns:repeat(2,1fr); }
  .add-employee-v5 { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:760px) {
  .category-stats { grid-template-columns:1fr 1fr; }
  .week-actions { justify-content:flex-start; }
  .add-employee-v5 { grid-template-columns:1fr; }
}

/* v8 company identity + v6 weekly schedule rendering */
.company-brandbar {
  width:min(1280px, 94vw);
  margin:22px auto -16px;
  display:flex;
  align-items:center;
}
.company-logo {
  display:inline-flex;
  flex-direction:column;
  color:#111;
  text-decoration:none;
  font-family:"Poppins", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  line-height:1;
  white-space:nowrap;
}
.company-name {
  font-size:27px;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.company-tagline {
  margin-top:7px;
  font-size:8.5px;
  font-weight:600;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:#696969;
}
.week-grid { align-items:start; overflow-x:auto; overflow-y:visible; }
.day-column { height:auto !important; max-height:none !important; overflow:visible !important; align-self:start; }
.day-heading > div { display:flex; flex-direction:column; gap:2px; }
.day-heading .day-date { color:#777; font-size:12px; }
.shift-count { display:inline-block; flex:none; padding:3px 7px; border-radius:999px; background:#e9e9e5; color:#555 !important; font-size:11px !important; font-weight:700; }
.schedule-list { display:flex; flex-direction:column; gap:8px; height:auto !important; max-height:none !important; overflow:visible !important; }
.schedule-list .schedule-card { display:block !important; flex:none !important; margin-bottom:0; visibility:visible !important; }
@media (max-width:760px) {
  .company-brandbar { margin:16px auto -6px; }
  .company-name { font-size:21px; letter-spacing:.035em; }
  .company-tagline { font-size:7px; letter-spacing:.18em; }
}

/* v7: daily sales, labor %, persistent tip split, and tip distribution */
.stats.seven { grid-template-columns:repeat(7,minmax(0,1fr)); }
.stat.highlight { background:#2b2416; }
.finance-layout { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:14px 0 20px; }
.finance-panel { border:1px solid #dedede; border-radius:14px; padding:18px; background:#fafafa; }
.finance-panel h3 { margin:0 0 8px; }
.finance-entry-form { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; align-items:end; }
.finance-entry-form label, .tip-split-form label { margin:0; }
.finance-entry-form label input, .tip-split-form label input { margin-top:6px; }
.finance-entry-form .checkbox-label { grid-column:1 / -1; display:flex; align-items:flex-start; gap:8px; font-weight:600; line-height:1.35; }
.finance-entry-form .checkbox-label input { width:auto; min-height:0; margin:2px 0 0; }
.finance-entry-form button { grid-column:1 / -1; }
.tip-split-form { display:grid; grid-template-columns:1fr 1fr 1fr auto; gap:10px; align-items:end; }
.finance-summary { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin:18px 0 24px; }
.finance-summary > div { border:1px solid #ddd; border-radius:12px; padding:14px; background:#fff; }
.finance-summary span { display:block; color:#777; font-size:12px; margin-bottom:4px; }
.finance-summary strong { font-size:21px; }
.tip-category-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:12px 0 14px; }
.tip-category-card { border:1px solid #ddd; border-radius:12px; padding:14px; background:#fafafa; }
.tip-category-card strong { display:block; font-size:22px; margin:8px 0 3px; }
.tip-category-card small { display:block; color:#6b6b6b; }

@media (max-width:1180px) {
  .stats.seven { grid-template-columns:repeat(4,1fr); }
  .finance-entry-form { grid-template-columns:1fr 1fr; }
  .tip-split-form { grid-template-columns:1fr 1fr; }
  .finance-summary { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:850px) {
  .finance-layout { grid-template-columns:1fr; }
  .tip-category-summary { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .stats.seven { grid-template-columns:1fr; }
  .finance-entry-form, .tip-split-form, .finance-summary { grid-template-columns:1fr; }
}


/* v8: job tickets, grading, employee tip history */
.stats.six { grid-template-columns:repeat(6,1fr); }
.ticket-create-form { display:grid; grid-template-columns:1fr 2fr auto; gap:12px; align-items:end; }
.ticket-create-form label { margin:0; }
.ticket-create-form textarea, .edit-form textarea { width:100%; border:1px solid #c9c9c9; border-radius:10px; padding:10px; font:inherit; resize:vertical; }
.ticket-library-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.ticket-library-card { border:1px solid #ddd; border-radius:14px; padding:16px; background:#fff; }
.ticket-library-card h3 { margin:8px 0 4px; }
.ticket-library-card > form { margin-top:10px; }
.ticket-inactive { opacity:.68; background:#f4f4f4; }
.ticket-card-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.ticket-date-nav { display:flex; justify-content:space-between; align-items:end; gap:12px; }
.ticket-date-nav form { display:flex; align-items:end; gap:8px; }
.ticket-date-nav label { margin:0; }
.staff-ticket-section h2 { margin:0; }
.ticket-checkbox-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:12px 0; }
.ticket-checkbox { display:flex; gap:9px; align-items:flex-start; border:1px solid #ddd; border-radius:11px; padding:11px; cursor:pointer; background:#fafafa; margin:0; }
.ticket-checkbox input { width:auto; min-height:0; margin-top:3px; }
.ticket-checkbox small, .grade-row small { display:block; color:#777; margin-top:3px; font-weight:400; line-height:1.35; }
.assignment-grade-list { border-top:1px solid #e3e3e3; margin-top:18px; padding-top:14px; }
.grade-row { display:grid; grid-template-columns:1.4fr .55fr 1.4fr auto; gap:8px; align-items:center; padding:8px 0; border-bottom:1px solid #eee; }
.grade-row input, .grade-row select { min-height:40px; }
.grade { display:inline-block; border-radius:999px; padding:4px 8px; font-size:11px; font-weight:800; line-height:1; }
.grade-good { background:#dff3e5; color:#176130; }
.grade-pass { background:#e8f2ff; color:#194f86; }
.grade-fail { background:#fde3e3; color:#8c2020; }
.grade-ungraded { background:#eee; color:#666; }
.grade-mini-summary { display:flex; gap:5px; flex-wrap:wrap; justify-content:flex-end; }
.history-ticket { margin-bottom:7px; min-width:160px; }
.history-ticket .grade { margin-left:5px; }
.ticket-grade-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.ticket-grade-summary > div { border:1px solid #ddd; border-radius:12px; padding:14px; }
.ticket-grade-summary span { display:block; color:#777; font-size:12px; }
.ticket-grade-summary strong { display:block; font-size:24px; margin-top:4px; }
.clock-result { max-width:720px; }
.success-line { font-weight:700; font-size:18px; }
.employee-ticket-list { display:flex; flex-direction:column; gap:10px; margin:18px 0; text-align:left; }
.employee-ticket-card { display:flex; align-items:flex-start; gap:12px; padding:14px; border:1px solid #ddd; border-radius:12px; background:#fafafa; }
.employee-ticket-card p { margin:4px 0 0; color:#666; }
.ticket-number { width:28px; height:28px; flex:none; border-radius:50%; display:grid; place-items:center; background:#111; color:#fff; font-size:12px; font-weight:800; }
.no-ticket-message { padding:22px; border-radius:12px; background:#f4f4f2; text-align:center; color:#666; }
.full-button { display:block; width:100%; text-align:center; }
@media (max-width:1100px) {
  .stats.six { grid-template-columns:repeat(3,1fr); }
  .ticket-library-grid, .ticket-checkbox-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grade-row { grid-template-columns:1fr 1fr; }
}
@media (max-width:760px) {
  .stats.six, .ticket-library-grid, .ticket-checkbox-grid, .ticket-grade-summary { grid-template-columns:1fr; }
  .ticket-create-form, .grade-row { grid-template-columns:1fr; }
  .ticket-date-nav { flex-wrap:wrap; }
  .ticket-date-nav form { order:-1; width:100%; }
  .grade-mini-summary { justify-content:flex-start; }
}

/* v9: staff titles + secure staff self-service portal */
.staff-title-line { color:#555; font-size:12px; font-weight:600; line-height:1.25; }
.title-form { display:flex; gap:6px; align-items:center; min-width:220px; }
.title-form input { min-height:40px; min-width:135px; }
.title-form button { min-height:40px; padding:7px 10px; white-space:nowrap; }
.add-employee-v5 { grid-template-columns:1.15fr 1.05fr .85fr .65fr .8fr .75fr auto; }
.button-grid .staff-view-button { grid-column:1 / -1; min-height:58px; background:#f0f0ed; border-color:#cfcfca; color:#111; }
.staff-access-note { margin:12px 0 0; font-size:12px; color:#737373; line-height:1.45; text-align:center; }
.employee-role { margin:0 0 12px; font-weight:700; color:#555; }
.center-note { text-align:center; margin:14px 0 0; }
.staff-portal-header form { margin:0; }
.staff-today-card { border-top:4px solid #111; }
.staff-day-grid { display:grid; grid-template-columns:1fr 1.25fr; gap:16px; }
.staff-day-panel { border:1px solid #ddd; border-radius:14px; padding:16px; background:#fafafa; }
.staff-day-panel h3 { margin:0 0 12px; }
.staff-schedule-item { display:flex; flex-direction:column; gap:4px; padding:13px; border:1px solid #ddd; border-radius:11px; background:#fff; margin-bottom:8px; }
.staff-schedule-item span { font-size:13px; color:#555; }
.staff-schedule-item small { color:#777; }
.compact-ticket-list { margin:0; }
.staff-feedback { display:block; margin-top:7px; color:#666; line-height:1.4; }
.staff-history-stats { margin-bottom:0; }
@media (max-width:1180px) {
  .add-employee-v5 { grid-template-columns:repeat(4,1fr); }
}
@media (max-width:900px) {
  .staff-day-grid { grid-template-columns:1fr; }
  .add-employee-v5 { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:760px) {
  .add-employee-v5 { grid-template-columns:1fr; }
  .title-form { min-width:180px; }
}


/* v10: 100-ticket performance scoring and category standings */
.score-cell { display:flex; flex-direction:column; gap:2px; min-width:105px; }
.score-cell strong { font-size:21px; line-height:1; }
.score-cell span { color:#555; font-size:11px; font-weight:700; }
.score-cell small { color:#777; font-size:10.5px; }
.score-empty strong, .score-empty span, .score-empty small { color:#999; }
.performance-card { border-top:4px solid #111; }
.score-standing { min-width:112px; text-align:center; border:1px solid #d9d9d9; border-radius:14px; padding:13px 16px; background:#111; color:#fff; }
.score-standing strong { display:block; font-size:34px; line-height:1; }
.score-standing span { display:block; margin-top:5px; font-size:11px; text-transform:uppercase; letter-spacing:.12em; opacity:.78; }
.performance-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; }
.performance-grid > div { border:1px solid #ddd; border-radius:12px; padding:14px; background:#fafafa; }
.performance-grid span { display:block; color:#777; font-size:11px; margin-bottom:5px; }
.performance-grid strong { display:block; font-size:22px; }
.performance-grid .rank-card { background:#111; color:#fff; border-color:#111; }
.performance-grid .rank-card span { color:#cfcfcf; }
.staff-score-line { margin:7px 0 0; font-size:12px; color:#555; }
.ticket-grade-summary { grid-template-columns:repeat(3,1fr); }
@media (max-width:900px) { .performance-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:760px) { .performance-grid { grid-template-columns:1fr; } .score-standing { width:100%; } }

/* v11: categorized job-ticket library + department-aware daily assignment */
.ticket-create-form-v11 { grid-template-columns:.65fr .9fr 1.15fr 2fr auto; }
.ticket-description-field { min-width:220px; }
.ticket-taxonomy-note { margin-top:12px; color:#686868; font-size:12px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.ticket-department-section { overflow:visible; }
.ticket-library-category + .ticket-library-category { border-top:1px solid #e5e5e1; margin-top:24px; padding-top:20px; }
.ticket-category-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:11px; }
.ticket-category-heading h3 { margin:0; font-size:17px; }
.ticket-category-heading span { color:#777; font-size:12px; }
.ticket-badge-row { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.ticket-category-badge, .ticket-category-inline { display:inline-block; border-radius:999px; padding:4px 8px; background:#efefec; color:#555; font-size:10px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; line-height:1.1; }
.ticket-category-inline { margin-left:6px; vertical-align:middle; }
.ticket-edit-form select { width:100%; min-height:42px; border:1px solid #c9c9c9; border-radius:10px; padding:8px 10px; background:#fff; font:inherit; }
.assignment-category-stack { display:flex; flex-direction:column; gap:9px; margin:12px 0 14px; }
.assignment-category { border:1px solid #dcdcd7; border-radius:13px; background:#fbfbf9; overflow:hidden; }
.assignment-category > summary { list-style:none; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 14px; cursor:pointer; font-weight:800; background:#f4f4f1; }
.assignment-category > summary::-webkit-details-marker { display:none; }
.assignment-category > summary:after { content:'+'; width:24px; height:24px; border-radius:50%; background:#fff; display:grid; place-items:center; border:1px solid #ddd; margin-left:auto; }
.assignment-category[open] > summary:after { content:'−'; }
.assignment-category .ticket-checkbox-grid { padding:12px; margin:0; }
.category-count { color:#777; font-size:11px; font-weight:700; white-space:nowrap; }
.legacy-ticket-note { margin:10px 12px 0; padding:9px 10px; background:#fff5d9; border-radius:9px; color:#765b13; font-size:12px; }
.inactive-assignment-category { margin:10px 0 14px; opacity:.78; }
.dept-legacy { background:#ececec; color:#555; }
@media (max-width:1150px) { .ticket-create-form-v11 { grid-template-columns:1fr 1fr 1fr; } .ticket-description-field { grid-column:1 / 3; } }
@media (max-width:760px) { .ticket-create-form-v11 { grid-template-columns:1fr; } .ticket-description-field { grid-column:auto; min-width:0; } .ticket-taxonomy-note { align-items:flex-start; } }

/* v12: self-claim Daily Open Ticket Board */
.button-grid .open-jobs-button { grid-column:1 / -1; min-height:58px; background:#111; color:#fff; border-color:#111; }
.clock-result-actions { display:grid; gap:10px; margin-top:18px; }
.open-job-intro { border-top:4px solid #111; }
.open-job-sections { margin-top:18px; }
.open-job-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:12px; }
.open-job-claim-form { margin:0; }
.open-job-card { width:100%; height:100%; min-height:150px; text-align:left; display:flex; flex-direction:column; align-items:stretch; gap:9px; border:1px solid #d8d8d4; border-radius:14px; padding:15px; background:#fff; color:#111; cursor:pointer; }
.open-job-card:hover:not(:disabled) { border-color:#111; transform:translateY(-1px); box-shadow:0 8px 22px rgba(0,0,0,.07); }
.open-job-card:disabled { cursor:not-allowed; opacity:.55; }
.open-job-card strong { font-size:16px; }
.open-job-card small { color:#686868; line-height:1.4; font-weight:400; flex:1; }
.open-job-card-top { display:flex; justify-content:space-between; gap:8px; align-items:flex-start; }
.claim-callout { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; margin-top:auto; }
.claimed-ticket-card { border-left:4px solid #111; }
.open-board-department + .open-board-department { margin-top:24px; padding-top:22px; border-top:1px solid #e1e1de; }
.ticket-claimed-locked { background:#f0f5f0; }
.open-status-pill { display:inline-block; margin-top:7px; }
.small-button { min-height:34px; padding:6px 9px; font-size:12px; }
@media (max-width:980px) { .open-job-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:680px) { .open-job-grid { grid-template-columns:1fr; } }

/* v13: staff-added open jobs + safe library deletion */
.open-job-added-by { display:block; color:#777; font-size:10.5px; font-weight:700; margin-top:2px; }
.staff-add-department + .staff-add-department { margin-top:20px; padding-top:18px; border-top:1px solid #e5e5e1; }
.add-open-job-card { border-style:dashed; background:#fbfbf8; }
.ticket-library-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.ticket-library-actions form { margin:0; }

.login-code-note{
  margin-top:-4px;
  margin-bottom:14px;
  font-size:.85rem;
  color:var(--muted,#6b7280);
}

.login-code-form{display:flex;gap:6px;align-items:center;min-width:165px;}
.login-code-form input{min-height:40px;min-width:90px;max-width:120px;}
.login-code-form button{min-height:40px;padding:7px 10px;white-space:nowrap;}

/* v15: department-scoped open jobs + admin activity/IP log */
.activity-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
.activity-filter { display:grid; grid-template-columns:repeat(4,minmax(140px,1fr)) 2fr auto auto; gap:10px; align-items:end; }
.activity-filter label { margin:0; }
.activity-filter select { width:100%; min-height:44px; border:1px solid #c9c9c9; border-radius:10px; background:#fff; padding:8px 10px; font:inherit; }
.activity-search { min-width:230px; }
.activity-table { min-width:1280px; }
.activity-table th, .activity-table td { vertical-align:top; }
.activity-time { white-space:nowrap; font-variant-numeric:tabular-nums; }
.activity-actor { display:inline-block; border-radius:999px; padding:3px 7px; margin:0 6px 4px 0; font-size:10px; font-weight:800; letter-spacing:.05em; }
.activity-actor-staff { background:#e7f0ff; color:#194f86; }
.activity-actor-admin { background:#111; color:#fff; }
.activity-actor-guest { background:#f1f1ef; color:#666; }
.method-badge, .status-code { display:inline-block; border-radius:7px; padding:3px 7px; font-size:10px; font-weight:800; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.method-get { background:#e9f6ef; color:#236b42; }
.method-post { background:#fff0d8; color:#805a12; }
.status-ok { background:#e9f6ef; color:#236b42; }
.status-redirect { background:#eef2ff; color:#384f9c; }
.status-error { background:#fde8e8; color:#972c2c; }
.activity-ip code, .activity-table td > code { font-size:11px; white-space:normal; word-break:break-word; }
.activity-agent { min-width:280px; max-width:420px; font-size:11px; color:#666; word-break:break-word; }
.activity-pagination { display:flex; justify-content:center; align-items:center; gap:12px; margin-top:18px; }
.activity-pagination span { color:#666; font-size:12px; font-weight:700; }
@media (max-width:1180px) { .activity-filter { grid-template-columns:repeat(3,1fr); } .activity-search { min-width:0; } }
@media (max-width:760px) { .activity-stats, .activity-filter { grid-template-columns:1fr; } .activity-pagination { flex-wrap:wrap; } }

/* v16 role-based Admin access */
.admin-role-badge {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.permission-readonly-note {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 10px;
  background: rgba(127, 127, 127, 0.08);
}
.readonly-label {
  margin-top: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.58;
}
.admin-role-login-form {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}
.admin-role-login-form label {
  display: grid;
  gap: 6px;
}
.role-login-notes {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
.role-login-notes > div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(127, 127, 127, 0.24);
  border-radius: 9px;
}
.role-login-notes strong { font-size: 0.86rem; }
.role-login-notes span { font-size: 0.78rem; opacity: 0.72; line-height: 1.35; }

/* v17: clock geofence/network verification, announcements, everyday tickets */
.pill.blue { background:#e6efff; color:#224e8d; }
.button-grid .announcements-button { grid-column:1 / -1; min-height:52px; background:#f7f3e8; border-color:#d7c99d; }
.nav-count { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; margin-left:5px; border-radius:999px; background:#a51f1f; color:#fff; font-size:10px; font-weight:800; }
.unread-announcements { margin:20px 0; padding:16px; border:1px solid #ead28f; border-radius:14px; background:#fff9e9; text-align:left; }
.unread-announcements h2 { margin:0; }
.announcement-stack, .announcement-admin-list { display:flex; flex-direction:column; gap:12px; }
.announcement-card, .announcement-admin-card { border:1px solid #ddd; border-radius:14px; padding:17px; background:#fff; }
.announcement-card.unread { border-left:5px solid #d79b13; background:#fffbef; }
.announcement-card h3, .announcement-admin-card h3 { margin:8px 0 7px; }
.announcement-card p, .announcement-admin-card p { margin:0; line-height:1.55; white-space:pre-wrap; }
.announcement-archived { opacity:.68; background:#f5f5f3; }
.announcement-form { display:grid; gap:12px; }
.announcement-form label { margin:0; }
.announcement-form textarea, .clock-security-form textarea { width:100%; border:1px solid #c9c9c9; border-radius:10px; padding:10px 12px; font:inherit; resize:vertical; background:#fff; }
.announcement-admin-card details { margin:14px 0 10px; }
.announcement-admin-card > form { margin:0; }

.everyday-ticket-option { grid-column:1 / -1; display:flex; align-items:flex-start; gap:8px; font-weight:700; line-height:1.35; }
.everyday-ticket-option input, .ticket-edit-form .checkbox-label input { width:auto; min-height:0; margin:2px 0 0; }
.ticket-edit-form .checkbox-label { display:flex; align-items:flex-start; gap:8px; line-height:1.35; }

.security-status-card { border-top:4px solid #111; }
.clock-security-form { display:grid; gap:14px; }
.clock-security-form > label { margin:0; }
.clock-security-form .checkbox-label { display:flex; align-items:flex-start; gap:9px; line-height:1.4; }
.clock-security-form .checkbox-label input { width:auto; min-height:0; margin:3px 0 0; }
.security-location-grid { display:grid; grid-template-columns:1fr 1fr .7fr; gap:12px; }
.security-location-grid label { margin:0; }
.security-location-grid input { margin-top:6px; }
.security-ip-row { display:flex; gap:12px; justify-content:space-between; align-items:center; flex-wrap:wrap; padding:11px 13px; border:1px solid #e0e0dc; border-radius:10px; background:#f7f7f5; }
.security-rule-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.security-rule-grid > div { border:1px solid #ddd; border-radius:12px; padding:14px; background:#fafafa; }
.security-rule-grid strong, .security-rule-grid span { display:block; }
.security-rule-grid span { margin-top:5px; color:#666; font-size:12px; line-height:1.4; }
.presence-required:disabled { opacity:.7; cursor:progress; }

@media (max-width:900px) {
  .security-location-grid { grid-template-columns:1fr 1fr; }
  .security-rule-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:620px) {
  .security-location-grid, .security-rule-grid { grid-template-columns:1fr; }
}
.terminal-authorize-form { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:end; margin:14px 0 18px; max-width:720px; }
.terminal-authorize-form label { margin:0; }
.terminal-table { min-width:760px; }
@media (max-width:620px) { .terminal-authorize-form { grid-template-columns:1fr; } }
