:root {
  --ink: #2f3437;
  --muted: #70777b;
  --line: #c8ced1;
  --paper: #ffffff;
  --card: #ffffff;
  --button: #2f6686;
  --button-dark: #244a63;
  --amber: #f5ecd7;
  --amber-ink: #765d27;
  --rose: #f5e1df;
  --rose-ink: #8c3c39;
  --shadow: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "MS PGothic", "ＭＳ Ｐゴシック", Osaka, "Hiragino Kaku Gothic ProN", Arial, sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.topbar {
  display: none;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; background: var(--button); color: white; font-weight: 800; font-size: 17px; }
.eyebrow { margin: 0 0 4px; color: var(--button); font-size: 10px; letter-spacing: .14em; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 16px; letter-spacing: -.03em; }
.topbar-meta { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.sync-status { color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.sync-status.is-ready { color: var(--button-dark); }
.sync-status.is-pending { color: var(--amber-ink); }
.sync-status.is-local { color: var(--rose-ink); }
.refresh-button { padding: 5px 8px; font-size: 10px; }
.topbar-admin-settings { display: none; padding: 6px 10px; font-size: 11px; }
.topbar-admin-all-rooms { display: none; padding: 6px 10px; font-size: 11px; }
.soft-badge { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 11px; font-weight: 700; }
.reset-button { border: 1px solid var(--button); padding: 6px 10px; border-radius: 3px; color: var(--button); background: white; font-size: 11px; font-weight: 800; }
.reset-button:hover { color: white; background: var(--button-dark); }
.login-back-button { display: none; border: 1px solid var(--line); padding: 6px 10px; border-radius: 3px; color: var(--muted); background: white; font-size: 11px; font-weight: 800; }
.login-back-button:hover { color: var(--button-dark); border-color: var(--button); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.green { background: var(--button); }
main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 60px; }
.hero-panel { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 18px; }
#room-heading { width: 100%; display: block; }
.room-heading-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 24px; margin-bottom: 4px; }
.room-heading-line p { margin-bottom: 0; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.hero-panel h2 { margin-top: 3px; }
.room-controls { display: flex; align-items: center; gap: 8px; }
.staff-room-list-button { min-width: 104px; padding: 12px 18px; font-size: 14px; }
.room-controls select { min-width: 130px; border: 1px solid var(--line); border-radius: 2px; padding: 7px 9px; color: var(--ink); background: white; font-size: 11px; font-weight: 800; }
.add-room-form { display: flex; gap: 5px; }
.add-room-form input { width: 118px; border: 1px solid var(--line); border-radius: 2px; padding: 7px 8px; color: var(--ink); background: white; font-size: 11px; }
.add-room-form .primary-button { padding: 7px 9px; }
h2 { margin: 0; font-size: 26px; line-height: 1.08; letter-spacing: -.06em; }
.login-view { max-width: 480px; margin: 90px auto 0; }
.login-box { border: 1px solid var(--line); border-radius: 4px; background: white; overflow: hidden; }
.login-head { padding: 25px 26px 20px; border-bottom: 1px solid var(--line); }
.login-head h2 { margin-bottom: 7px; font-size: 24px; }
.login-property { margin-bottom: 5px; color: var(--button); font-size: 12px; font-weight: 800; }
.login-head p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.login-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px 26px 26px; }
.login-option { min-height: 100px; border: 1px solid var(--button); border-radius: 3px; color: var(--button); background: white; font-size: 16px; font-weight: 800; }
.login-option:hover { color: white; background: var(--button); }
.view { animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.staff-layout { max-width: 860px; }
.staff-room-list-card { max-width: 860px; }
.staff-list-meta { display: inline-flex; align-items: center; gap: 8px; }
.staff-room-head-tools { display: flex; align-items: center; gap: 8px; }
.staff-identity { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.staff-identity select { width: 112px; border: 1px solid var(--line); border-radius: 2px; padding: 7px 8px; color: var(--ink); background: white; font-size: 10px; }
.notification-button { padding: 5px 7px; font-size: 9px; white-space: nowrap; }
.staff-room-tools { display: flex; gap: 6px; }
.staff-room-tools input, .staff-room-tools select { width: 112px; border: 1px solid var(--line); border-radius: 2px; padding: 7px 8px; color: var(--ink); background: white; font-size: 10px; }
.staff-room-sections { display: grid; gap: 17px; padding: 16px 18px 20px; }
.staff-floor-section h4 { margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.staff-room-list { padding: 6px 18px 12px; }
.staff-floor-section .staff-room-list { padding: 0; border-top: 1px solid var(--line); }
.staff-room-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 4px; border: 0; border-bottom: 1px solid #edf1ee; color: var(--ink); background: white; text-align: left; }
.staff-room-item:last-child { border-bottom: 0; }
.staff-room-item:hover { color: var(--button-dark); background: #f6f8f8; }
.staff-room-item > span:first-child { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.staff-room-item strong { font-size: 16px; }
.staff-room-item small { color: var(--muted); font-size: 10px; }
.staff-room-status { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; flex: 0 0 auto; }
.staff-room-item .status-pill { padding: 4px 7px; font-size: 10px; }
.staff-room-alert { padding: 3px 6px; border: 1px solid var(--rose-ink); border-radius: 2px; color: var(--rose-ink); background: var(--rose); font-size: 9px; font-style: normal; font-weight: 800; white-space: nowrap; }
.staff-notice-link { padding: 3px 6px; border: 1px solid var(--rose-ink); border-radius: 2px; color: var(--rose-ink); background: var(--rose); font-size: 9px; font-weight: 800; white-space: nowrap; }
.staff-notice-link:hover { color: white; background: var(--rose-ink); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px 13px; border-bottom: 1px solid #edf1ee; }
.card-head h3 { margin-bottom: 0; font-size: 17px; letter-spacing: -.03em; }
.photo-section-head > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.example-actions { display: flex; gap: 6px; }
.example-button { border: 1px solid var(--line); border-radius: 2px; padding: 6px 8px; color: var(--muted); background: white; font-size: 10px; font-weight: 800; }
.example-button:hover { color: var(--button-dark); border-color: var(--button); }
.example-button:disabled { cursor: wait; opacity: .45; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 2px; font-size: 11px; font-weight: 800; }
.status-wait { background: #f0f1f1; color: #667077; }
.status-working { background: var(--amber); color: var(--amber-ink); }
.status-review { background: #e4edf2; color: var(--button-dark); }
.status-approved { background: #e3edf2; color: var(--button-dark); }
.status-reclean { background: var(--rose); color: var(--rose-ink); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 18px 18px; }
.photo-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: white; }
.photo-preview { position: relative; display: grid; place-items: center; height: 240px; padding: 8px; overflow: hidden; background: #f4f5f5; color: var(--muted); }
.photo-preview img { display: block; width: auto; max-width: 100%; max-height: 224px; height: auto; object-fit: contain; background: #f4f5f5; }
.photo-preview .preview-placeholder { text-align: center; padding: 16px; font-size: 11px; line-height: 1.5; }
.photo-label { padding: 10px 10px 0; font-size: 12px; font-weight: 850; }
.photo-meta { padding: 6px 10px 9px; min-height: 37px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.photo-meta.is-photo-ready { min-height: 12px; padding-top: 2px; padding-bottom: 2px; }
.photo-meta.is-reclean-required { color: var(--rose-ink); font-weight: 800; }
.photo-preview.is-reclean-required { background: #fff7f6; color: var(--rose-ink); }
.photo-actions { display: flex; justify-content: center; gap: 6px; padding: 0 10px 10px; }
.upload-label, .ghost-button, .primary-button, .danger-button { border: 1px solid var(--button); border-radius: 2px; padding: 8px 5px; font-weight: 800; font-size: 10px; text-align: center; transition: background .15s, color .15s, opacity .15s; }
.upload-label:hover, button:hover { transform: none; }
.upload-label { flex: 1; color: var(--button); background: white; }
.upload-label:hover { color: white; background: var(--button); }
.upload-label.is-disabled { cursor: not-allowed; opacity: .48; }
.upload-label.is-disabled:hover { color: var(--button); background: white; }
.camera-button { width: 100%; max-width: 180px; font: inherit; }
.ghost-button { color: var(--button); border-color: var(--line); background: white; }
.primary-button { color: white; border-color: var(--button); background: var(--button); }
.primary-button:hover { background: var(--button-dark); }
.danger-button { color: var(--rose-ink); border-color: var(--rose-ink); background: var(--rose); }
.wide-button { width: 100%; }
.button-row { display: flex; gap: 8px; padding: 0 18px 18px; }
.button-row > button { flex: 1; }
button:disabled { cursor: not-allowed; opacity: .42; transform: none; }
.side-card { padding-bottom: 18px; }
.side-section { padding: 16px 18px 0; }
.side-section + .side-section { border-top: 1px solid #edf1ee; margin-top: 20px; }
.side-section h3 { margin-bottom: 13px; font-size: 14px; }
.cycle-actions { display: grid; gap: 8px; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; color: #485650; font-size: 12px; border-bottom: 1px dashed #e7ece8; }
.check-row:last-child { border-bottom: 0; }
.check-row input { accent-color: var(--button); }
.legend-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 12px; }
.notice { margin: 0 18px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: white; font-size: 11px; line-height: 1.45; }
.staff-instruction { border-color: #b9cbd4; background: #f2f6f8; }
.staff-instruction strong { color: var(--button-dark); font-size: 10px; }
.staff-memo-field { display: grid; gap: 6px; margin: 0 18px 14px; }
.staff-memo-field span { color: var(--muted); font-size: 10px; font-weight: 800; }
.staff-memo-field textarea { min-height: 52px; resize: vertical; }
.staff-memo-notice { border-color: #d8c9ae; background: #fbf8f1; }
.staff-memo-notice strong { color: #705a2e; font-size: 10px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { padding: 17px 19px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.stat-filter-button { width: 100%; color: var(--ink); text-align: left; cursor: pointer; }
.stat-filter-button:hover, .stat-filter-button.is-active { border-color: var(--button); background: #f6f8f8; }
.stat-filter-button.is-active { box-shadow: inset 0 0 0 1px var(--button); }
.stat-card p { margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.stat-card strong { font-size: 29px; letter-spacing: -.05em; }
.stat-card .stat-room { display: block; overflow: hidden; font-size: 18px; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.admin-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px; }
.settings-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: 20px; }
.settings-card { min-width: 0; }
.ai-health-tools { display: flex; align-items: center; gap: 7px; }
.ai-health-status { color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.ai-health-status.is-ready { color: var(--button-dark); }
.ai-health-status.is-pending { color: var(--amber-ink); }
.ai-health-status.is-warning, .ai-health-status.is-error { color: var(--rose-ink); }
.ai-model-name { color: var(--muted); font-size: 9px; white-space: nowrap; }
.ai-health-tools button { padding: 5px 7px; font-size: 10px; }
.settings-data-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 18px 0; }
.settings-data-actions button { padding: 6px 8px; font-size: 10px; }
.settings-add-room { display: flex; gap: 7px; padding: 16px 18px; border-bottom: 1px solid #edf1ee; }
.settings-add-room input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 2px; padding: 8px 9px; color: var(--ink); background: white; font-size: 11px; }
.settings-add-room button { flex: 0 0 auto; padding: 8px 10px; }
.settings-add-many { display: flex; gap: 7px; padding: 0 18px 13px; border-bottom: 1px solid #edf1ee; }
.settings-add-many textarea { min-width: 0; flex: 1; resize: vertical; border: 1px solid var(--line); border-radius: 2px; padding: 7px 8px; color: var(--ink); background: white; font: inherit; font-size: 10px; line-height: 1.4; }
.settings-add-many button { align-self: stretch; flex: 0 0 auto; padding: 8px 10px; }
.settings-staff-roster { display: flex; gap: 7px; padding: 0 18px 13px; border-bottom: 1px solid #edf1ee; }
.settings-staff-roster textarea { min-width: 0; flex: 1; resize: vertical; border: 1px solid var(--line); border-radius: 2px; padding: 7px 8px; color: var(--ink); background: white; font: inherit; font-size: 10px; line-height: 1.4; }
.settings-staff-roster button { align-self: stretch; flex: 0 0 auto; padding: 8px 10px; }
.settings-bulk-assign { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; padding: 0 18px 13px; border-bottom: 1px solid #edf1ee; }
.settings-bulk-assign input, .settings-bulk-assign select { min-width: 0; border: 1px solid var(--line); border-radius: 2px; padding: 7px 8px; color: var(--ink); background: white; font-size: 10px; }
.settings-bulk-assign button { padding: 8px 10px; }
.settings-room-list { padding: 4px 18px 12px; }
.settings-room-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf1ee; }
.settings-room-row:last-child { border-bottom: 0; }
.settings-rename-form { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1; }
.settings-rename-form input, .settings-rename-form select { min-width: 0; width: 125px; border: 1px solid var(--line); border-radius: 2px; padding: 6px 7px; color: var(--ink); background: white; font-size: 11px; }
.settings-rename-form .settings-room-note { flex: 1 1 150px; width: auto; min-width: 110px; }
.settings-rename-form button { flex: 0 0 auto; padding: 5px 8px; font-size: 10px; }
.settings-room-status { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.settings-room-status small { color: var(--muted); font-size: 10px; }
.settings-room-status button { flex: 0 0 auto; padding: 5px 8px; font-size: 10px; }
.settings-body { padding: 7px 18px 18px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #edf1ee; }
.setting-row > span:first-child { display: grid; gap: 4px; }
.setting-row strong, .setting-block > strong { font-size: 12px; }
.setting-row small { color: var(--muted); font-size: 10px; }
.setting-row select, .setting-row input, .settings-inline input, .settings-score-grid input { width: 64px; border: 1px solid var(--line); border-radius: 2px; padding: 6px 7px; color: var(--ink); background: white; font-size: 11px; }
.setting-row select { width: 104px; }
.setting-row .setting-text-input { width: 190px; }
.setting-textarea-row { align-items: flex-start; }
.setting-textarea-row textarea { width: 230px; min-height: 56px; resize: vertical; border: 1px solid var(--line); border-radius: 2px; padding: 7px; color: var(--ink); background: white; font: inherit; font-size: 11px; line-height: 1.4; }
.setting-check input { width: 16px; height: 16px; accent-color: var(--button); }
.setting-block { padding: 15px 0 5px; border-bottom: 1px solid #edf1ee; }
.settings-score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 11px; }
.settings-score-grid label { display: flex; align-items: center; justify-content: space-between; gap: 4px; color: var(--muted); font-size: 10px; }
.settings-inline { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf1ee; }
.settings-inline label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.settings-help { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.learning-settings { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #edf1ee; }
.learning-settings > div { display: grid; gap: 4px; }
.learning-settings strong { font-size: 12px; }
.learning-settings small { color: var(--muted); font-size: 10px; }
.learning-settings button { flex: 0 0 auto; padding: 6px 8px; font-size: 10px; }
.room-overview { margin-bottom: 20px; }
.overview-actions { display: flex; align-items: center; gap: 8px; }
.overview-actions > .ghost-button { flex: 0 0 auto; padding: 7px 9px; font-size: 10px; }
.overview-bulk-assign { display: flex; align-items: center; gap: 6px; }
.overview-bulk-assign select { border: 1px solid var(--line); border-radius: 2px; padding: 7px 8px; color: var(--ink); background: white; font-size: 10px; }
.overview-bulk-assign button { flex: 0 0 auto; padding: 7px 9px; font-size: 10px; }
.overview-bulk-reclean { display: flex; align-items: center; gap: 6px; }
.overview-bulk-reclean input { width: 150px; border: 1px solid var(--line); border-radius: 2px; padding: 7px 8px; color: var(--ink); background: white; font-size: 10px; }
.overview-bulk-reclean button { flex: 0 0 auto; padding: 7px 9px; font-size: 10px; }
.admin-overview-tools { display: flex; align-items: center; gap: 7px; }
.admin-overview-tools input, .admin-overview-tools select { border: 1px solid var(--line); border-radius: 2px; padding: 7px 8px; color: var(--ink); background: white; font-size: 10px; }
.admin-overview-tools input { width: 125px; }
.admin-overview-tools select { width: 105px; }
.learning-note { padding: 10px 18px; border-bottom: 1px solid #edf1ee; color: var(--muted); font-size: 10px; }
.admin-room-sections { display: grid; gap: 17px; padding: 16px 18px 20px; }
.admin-floor-section h4 { margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.admin-room-list { border-top: 1px solid var(--line); }
.admin-room-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px; padding: 0 5px; border-bottom: 1px solid #edf1ee; color: var(--ink); background: white; text-align: left; }
.admin-room-row:hover { background: #f6f8f8; }
.admin-room-select { width: 15px; height: 15px; margin: 0; accent-color: var(--button); }
.admin-room-open { width: 100%; display: grid; grid-template-columns: minmax(92px, .8fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border: 0; color: var(--ink); background: transparent; text-align: left; }
.admin-room-open:hover { color: var(--button-dark); }
.admin-room-select:disabled { opacity: .2; }
.admin-room-name { font-weight: 850; white-space: nowrap; }
.admin-room-detail { min-width: 0; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-room-detail small { color: var(--muted); font-size: 9px; }
.admin-room-open .status-pill { padding: 4px 7px; font-size: 10px; white-space: nowrap; }
.room-overview-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 18px 18px; }
.room-overview-item { padding: 13px; border: 1px solid var(--line); background: white; }
.room-overview-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.room-overview-photos { display: grid; gap: 4px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.room-overview-photos > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room-overview-photos .status-pill { padding: 3px 6px; }
.room-detail-button { width: 100%; margin-top: 12px; }
.task-list { padding: 9px 14px 14px; }
.task-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 10px; border: 0; border-bottom: 1px solid #edf1ee; color: var(--ink); background: white; text-align: left; }
.task-item:last-child { border-bottom: 0; }
.task-item:hover, .task-item.is-active { background: #f6f8f8; }
.task-room { font-weight: 850; }
.task-sub { margin-top: 4px; color: var(--muted); font-size: 11px; }
.evidence { padding-bottom: 20px; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 20px 24px 10px; }
.evidence-item { overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: white; }
.evidence-image { display: grid; place-items: center; height: 240px; overflow: hidden; background: #edf4ee; }
.evidence-image-button { display: grid; place-items: center; width: 100%; height: 100%; padding: 8px; border: 0; cursor: zoom-in; background: #edf4ee; }
.evidence-image img { display: block; width: auto; max-width: 100%; max-height: 224px; height: auto; object-fit: contain; background: #edf4ee; }
.evidence-caption { padding: 9px 10px; font-size: 10px; }
.evidence-caption strong { display: block; margin-bottom: 4px; font-size: 11px; }
.evidence-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.evidence-title-row strong { margin-bottom: 0; }
.reclean-checkbox { display: inline-flex; align-items: center; gap: 5px; color: var(--rose-ink); font-size: 10px; font-weight: 800; white-space: nowrap; }
.reclean-checkbox input { width: 15px; height: 15px; margin: 0; accent-color: var(--rose-ink); }
.photo-source { display: inline-block; margin-left: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
.manager-decision { display: inline-flex; margin-left: 5px; color: var(--button-dark); font-size: 10px; font-weight: 800; }
.manager-note { color: var(--muted); font-size: 10px; line-height: 1.45; }
.photo-review-actions { display: flex; gap: 5px; margin-top: 9px; }
.photo-review-actions button { flex: 1; padding: 6px 4px; font-size: 10px; }
.photo-review-actions .reanalyze-button { color: var(--button-dark); }
.review-note { margin: 0 24px 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 3px; background: white; color: var(--muted); font-size: 11px; line-height: 1.55; }
.reclean-selection-help { margin: 0 24px 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.reclean-comment { display: grid; gap: 6px; margin: 0 24px 12px; color: var(--muted); font-size: 10px; }
.reclean-comment textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 2px; padding: 8px; color: var(--ink); background: white; font: inherit; font-size: 11px; line-height: 1.45; }
.review-actions { display: flex; gap: 9px; padding: 0 24px; }
.review-actions button { flex: 1; }
.cleaning-history { margin-top: 20px; }
.history-list { display: grid; gap: 10px; padding: 14px 18px 18px; }
.history-item { padding: 12px; border: 1px solid var(--line); background: white; }
.history-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 11px; }
.history-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; color: var(--muted); font-size: 10px; }
.history-results span { display: grid; gap: 4px; padding: 8px; background: #f6f8f8; }
.history-results b { color: var(--ink); font-size: 10px; }
.activity-history { margin-top: 20px; }
.activity-list { display: grid; padding: 8px 18px 14px; }
.activity-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf1ee; color: var(--muted); font-size: 10px; line-height: 1.45; }
.activity-item:last-child { border-bottom: 0; }
.activity-item time { white-space: nowrap; }
.activity-item span { color: var(--ink); }
.activity-item b { margin-right: 6px; color: var(--button-dark); font-size: 9px; }
.activity-item em { margin-right: 6px; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 800; }
.settings-activity-card { grid-column: 1 / -1; }
.settings-activity-tools { display: flex; align-items: center; gap: 6px; }
.settings-activity-tools input, .settings-activity-tools select { min-width: 0; border: 1px solid var(--line); border-radius: 2px; padding: 6px 8px; color: var(--ink); background: white; font-size: 10px; }
.settings-activity-tools input { width: 150px; }
.settings-activity-tools select { width: 90px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 320px; padding: 13px 16px; border-radius: 3px; color: white; background: var(--button-dark); box-shadow: none; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.camera-modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(27, 36, 40, .52); }
.camera-dialog { width: min(92vw, 640px); overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: white; }
.camera-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.camera-head h2 { font-size: 18px; }
.photo-modal-actions { display: flex; align-items: center; gap: 7px; }
.camera-close { border: 1px solid var(--line); border-radius: 2px; padding: 6px 10px; color: var(--muted); background: white; font-size: 11px; font-weight: 800; }
.photo-modal-actions a { text-decoration: none; }
.camera-preview { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #15191b; }
.camera-preview video { display: block; width: 100%; height: 100%; object-fit: cover; }
.camera-preview p { position: absolute; inset: auto 20px 20px; margin: 0; padding: 10px 12px; border: 1px solid #e1b4b1; border-radius: 2px; color: #fff; background: rgba(91, 35, 32, .9); font-size: 12px; line-height: 1.5; }
.camera-actions { display: flex; gap: 8px; padding: 14px 18px 18px; }
.camera-actions button { width: 100%; }
.photo-modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(27, 36, 40, .72); }
.photo-dialog { width: min(96vw, 1120px); max-height: 94vh; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: white; }
.photo-modal-preview { display: grid; place-items: center; max-height: calc(94vh - 66px); overflow: auto; padding: 14px; background: #202628; }
.photo-modal-preview img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(94vh - 100px); object-fit: contain; }
@media (max-width: 820px) {
  main { padding: 28px 15px 60px; }
  .hero-panel { display: block; }
  #room-heading { display: block; }
  .room-controls { flex-wrap: wrap; margin-top: 12px; }
  .admin-overview-tools { width: 100%; margin-top: 9px; }
  .admin-overview-tools input { flex: 1; width: auto; }
  .admin-overview-tools select { flex: 0 0 105px; }
  .room-overview .card-head { display: block; }
  .overview-actions { display: grid; gap: 8px; margin-top: 9px; }
  .overview-actions > .ghost-button { width: 100%; }
  .overview-bulk-reclean { width: 100%; }
  .overview-bulk-reclean input { flex: 1; width: auto; }
  .overview-bulk-reclean button { flex: 0 0 auto; }
  .staff-room-head-tools { justify-content: flex-start; flex-wrap: wrap; margin-top: 9px; }
  .staff-identity { flex: 1 1 100%; }
  .staff-identity select { flex: 1; width: auto; }
  .staff-room-tools { flex: 1; }
  .staff-room-tools input { flex: 1; width: auto; }
  .staff-room-tools select { flex: 0 0 105px; width: auto; }
  .settings-bulk-assign { grid-template-columns: 1fr 1fr; }
  .settings-bulk-assign button { grid-column: 1 / -1; }
  .settings-rename-form { flex-wrap: wrap; }
  .settings-rename-form .settings-room-note { flex-basis: 100%; }
  .login-view { margin-top: 55px; }
  .grid-2, .admin-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-activity-card .card-head { display: block; }
  .settings-activity-tools { margin-top: 9px; }
  .settings-activity-tools input { flex: 1; width: auto; }
  .setting-textarea-row { display: grid; }
  .setting-textarea-row textarea { width: 100%; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .room-overview-list { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .history-results { grid-template-columns: 1fr; }
  .photo-preview { height: 260px; }
  .photo-preview img { max-height: 244px; }
  .evidence-image { height: 260px; }
  .evidence-image img { max-height: 244px; }
  .admin-stats { gap: 8px; }
  .stat-card { padding: 14px 12px; }
  .stat-card strong { font-size: 23px; }
}
