:root {
  color-scheme: dark;
  --navy: #101923;
  --navy-soft: #1b2835;
  --red: #d94b56;
  --red-light: #3a2228;
  --gold: #d4b577;
  --ink: #e1e7ec;
  --muted: #9aa7b2;
  --line: #2b3742;
  --canvas: #0c1218;
  --white: #161f28;
  --green: #67b98c;
  --surface: #151e27;
  --surface-raised: #1a2530;
  --surface-hover: #202c37;
  --text-strong: #e8edf1;
  --shadow: 0 12px 35px rgba(0, 0, 0, .32);
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }

.sidebar {
  background: var(--navy);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  height: 100vh;
  left: 0;
  padding: 27px 16px 18px;
  position: fixed;
  top: 0;
  width: 252px;
  z-index: 5;
}
.brand { align-items: center; color: inherit; display: flex; gap: 12px; margin: 0 7px 42px; text-decoration: none; }
.brand-crest { background: var(--navy); border-radius: 9px; height: 47px; object-fit: contain; padding: 3px; width: 43px; }
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { font: 800 17px 'Manrope', sans-serif; letter-spacing: .13em; }
.brand-copy span { color: #a7b3bf; font-size: 11px; }
.sidebar-label { color: #687786; font-size: 10px; font-weight: 700; letter-spacing: .16em; margin: 0 13px 10px; }
.navigation { display: grid; gap: 5px; }
.nav-link[hidden] { display: none; }
.nav-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #b7c1ca;
  display: flex;
  font-size: 13px;
  gap: 12px;
  padding: 12px 13px;
  text-align: left;
  transition: background .16s, color .16s;
}
.nav-link:hover { background: #1b2835; color: #fff; }
.nav-link.active { background: #273443; color: #fff; font-weight: 600; }
.nav-link.active::before { background: var(--red); border-radius: 2px; content: ''; height: 20px; margin-left: -13px; margin-right: 1px; width: 3px; }
.nav-icon { color: #9daab6; font-size: 16px; text-align: center; width: 18px; }
.sidebar-bottom { margin-top: auto; }
.privacy-note { align-items: flex-start; background: #1a2834; border: 1px solid #2b3a47; border-radius: 8px; color: #d8e0e6; display: flex; font-size: 11px; gap: 9px; line-height: 1.55; padding: 12px 10px; }
.privacy-note small { color: #8e9ba8; font-size: 10px; }
.privacy-dot { background: #50aa7d; border-radius: 50%; height: 7px; margin-top: 5px; width: 7px; }
.sidebar-footer { color: #677583; font-size: 8px; letter-spacing: .11em; line-height: 1.7; margin: 17px 5px 0; }

.main-content { margin-left: 252px; min-height: 100vh; }
.topbar { align-items: center; background: rgba(17, 25, 34, .94); border-bottom: 1px solid var(--line); display: flex; height: 68px; justify-content: space-between; padding: 0 38px; }
.breadcrumbs { align-items: center; color: var(--muted); display: flex; font-size: 12px; gap: 10px; }
.breadcrumbs strong { color: var(--ink); font-weight: 600; }
.crumb-divider { color: #bac1c7; }
.topbar-actions { align-items: center; display: flex; gap: 16px; }
.today-label { color: #74808a; font-size: 11px; }
.user-avatar { align-items: center; background: var(--surface-raised); border-radius: 50%; color: var(--text-strong); display: inline-flex; font-size: 12px; font-weight: 700; height: 33px; justify-content: center; width: 33px; }
.page-content { margin: 0 auto; max-width: 1440px; padding: 34px 38px 55px; }

.page-heading { align-items: flex-end; display: flex; justify-content: space-between; margin-bottom: 25px; }
.eyebrow { color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: .15em; margin: 0 0 8px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--text-strong); font: 700 25px 'Manrope', sans-serif; letter-spacing: -.035em; margin-bottom: 7px; }
.heading-subtitle { color: var(--muted); font-size: 12px; margin: 0; }
.button { align-items: center; border: 1px solid transparent; border-radius: 6px; display: inline-flex; font-size: 11px; font-weight: 600; gap: 8px; justify-content: center; min-height: 37px; padding: 0 14px; transition: background .15s, border .15s; }
.button-primary { background: var(--red); color: #fff; }
.button-primary:hover { background: #a91c28; }
.button-outline { background: var(--surface-raised); border-color: var(--line); color: var(--text-strong); }
.button-outline:hover { background: var(--surface-hover); border-color: #465563; }
.button-small { min-height: 31px; padding: 0 11px; }
.button-danger { background: var(--red-light); color: #ff9aa1; }
.button-danger:hover { background: #4a282f; }
.plus { font-size: 17px; font-weight: 400; line-height: 1; }

.hero-panel { background: #151f2a; border: 1px solid #25313c; border-radius: 10px; color: white; display: flex; justify-content: space-between; margin-bottom: 20px; min-height: 154px; overflow: hidden; padding: 26px 30px; position: relative; }
.hero-panel::after { border: 1px solid rgba(255,255,255,.09); border-radius: 50%; content: ''; height: 270px; position: absolute; right: 3%; top: -76px; width: 270px; }
.hero-panel::before { border: 1px solid rgba(255,255,255,.06); border-radius: 50%; content: ''; height: 350px; position: absolute; right: -1%; top: -115px; width: 350px; }
.hero-copy { max-width: 600px; position: relative; z-index: 1; }
.hero-kicker { color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .16em; margin-bottom: 10px; }
.hero-panel h1 { color: #fff; font-size: 22px; margin-bottom: 7px; }
.hero-panel p { color: #bac5ce; font-size: 11px; line-height: 1.6; margin-bottom: 16px; max-width: 470px; }
.hero-panel .button { background: #e8edf1; color: #18232d; min-height: 32px; }
.hero-badge { align-items: center; align-self: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 50%; display: flex; height: 92px; justify-content: center; margin-right: 5%; overflow: hidden; padding: 9px; position: relative; width: 92px; z-index: 1; }
.hero-badge img { height: 100%; object-fit: contain; width: 100%; }

.stats-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 21px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-height: 104px; padding: 17px 18px; }
.stat-top { align-items: center; color: var(--muted); display: flex; font-size: 10px; justify-content: space-between; }
.stat-icon { align-items: center; background: var(--surface-raised); border-radius: 6px; color: #aab6c0; display: flex; font-size: 14px; height: 28px; justify-content: center; width: 28px; }
.stat-card.warning .stat-icon { background: var(--red-light); color: #ff9099; }
.stat-value { color: var(--text-strong); font: 700 23px 'Manrope', sans-serif; margin-top: 10px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.panel-heading { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 15px 18px; }
.panel-heading h2 { color: var(--text-strong); font: 700 12px 'Manrope', sans-serif; margin: 0; }
.panel-heading p { color: var(--muted); font-size: 10px; margin: 4px 0 0; }
.panel-body { padding: 15px 18px; }
.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.leadership-chat { overflow: hidden; }
.chat-messages { display: flex; flex-direction: column; gap: 10px; max-height: min(65vh, 680px); min-height: 260px; overflow-y: auto; padding: 18px; }
.chat-message { align-self: flex-start; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 9px 9px 9px 2px; max-width: min(80%, 680px); padding: 10px 13px; }
.chat-message-own { align-self: flex-end; background: #243746; border-color: #3a566b; border-radius: 9px 9px 2px 9px; }
.chat-message header { align-items: baseline; display: flex; gap: 12px; }
.chat-message header strong { color: var(--gold); font-size: 10px; }
.chat-message time { color: var(--muted); font-size: 9px; }
.chat-message p { color: var(--text-strong); font-size: 11px; line-height: 1.55; margin: 5px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.todo-form { align-items: end; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 18px; }
.todo-form input { background: #101820; border: 1px solid var(--line); border-radius: 6px; color: var(--text-strong); font-size: 11px; min-height: 37px; outline: none; padding: 8px 10px; }
.todo-form input:focus { border-color: #aab4bc; box-shadow: 0 0 0 3px rgba(80, 99, 114, .08); }
.todo-form input[name="title"] { flex: 1 1 250px; }
.todo-form input[type="date"] { flex: 0 1 155px; }
.todo-date-label { color: var(--muted); font-size: 10px; }
.todo-list { padding: 4px 18px 10px; }
.todo-item { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 12px; min-height: 58px; padding: 9px 2px; }
.todo-item:last-child { border-bottom: 0; }
.todo-toggle { align-items: center; background: transparent; border: 1px solid #53616d; border-radius: 50%; color: #fff; display: inline-flex; flex: 0 0 auto; font-size: 12px; height: 22px; justify-content: center; padding: 0; width: 22px; }
.todo-toggle:hover { border-color: var(--green); }
.todo-toggle.is-complete { background: #1e382d; border-color: #3e815e; color: #81d1a2; }
.todo-copy { display: flex; flex: 1; flex-direction: column; font-size: 11px; gap: 4px; min-width: 0; }
.todo-copy strong { color: var(--text-strong); overflow-wrap: anywhere; }
.todo-copy span { color: var(--muted); font-size: 9px; }
.todo-item-complete .todo-copy strong { color: #87949e; text-decoration: line-through; }
.todo-item-complete .todo-copy span { color: #75828c; }
.chat-compose { align-items: flex-end; border-top: 1px solid var(--line); display: flex; gap: 10px; padding: 14px 18px; }
.chat-compose textarea { background: #101820; border: 1px solid var(--line); border-radius: 6px; color: var(--text-strong); flex: 1; font-size: 12px; line-height: 1.5; min-height: 42px; outline: none; padding: 10px 12px; resize: vertical; }
.chat-compose textarea:focus { border-color: var(--gold); }
.overview-grid { display: grid; gap: 17px; grid-template-columns: minmax(0, 1.65fr) minmax(245px, .85fr); }
.quick-actions { display: grid; gap: 8px; }
.quick-action { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; color: var(--text-strong); display: flex; gap: 11px; padding: 11px; text-align: left; width: 100%; }
.quick-action:hover { background: var(--surface-hover); border-color: #465563; }
.quick-action-icon { align-items: center; background: var(--surface-raised); border-radius: 6px; color: #b2bec7; display: flex; font-size: 14px; height: 31px; justify-content: center; width: 31px; }
.quick-action span:last-child { display: flex; flex-direction: column; gap: 3px; }
.quick-action strong { font-size: 10px; }
.quick-action small { color: var(--muted); font-size: 9px; }

.toolbar { align-items: center; display: flex; gap: 9px; margin-bottom: 13px; }
.search-box { flex: 1; max-width: 330px; position: relative; }
.search-box::before { color: #8c969f; content: '⌕'; font-size: 19px; left: 11px; position: absolute; top: 4px; }
.search-box input { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--text-strong); height: 35px; outline: none; padding: 0 10px 0 32px; width: 100%; }
.search-box input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #aab4bc; box-shadow: 0 0 0 3px rgba(80, 99, 114, .08); }
.filter-select { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--text-strong); font-size: 10px; height: 35px; padding: 0 25px 0 10px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; min-width: 570px; width: 100%; }
.personnel-table { min-width: 760px; table-layout: fixed; }
.personnel-table th:nth-child(1), .personnel-table td:nth-child(1) { width: 25%; }
.personnel-table th:nth-child(2), .personnel-table td:nth-child(2) { width: 23%; }
.personnel-table th:nth-child(3), .personnel-table td:nth-child(3) { width: 10%; }
.personnel-table th:nth-child(4), .personnel-table td:nth-child(4) { width: 17%; }
.personnel-table th:nth-child(5), .personnel-table td:nth-child(5) { width: 15%; }
.personnel-table th:nth-child(6), .personnel-table td:nth-child(6) { width: 10%; }
.personnel-table td:nth-child(2) .rank-pill { max-width: 100%; white-space: normal; }
.personnel-table td:nth-child(3), .personnel-table td:nth-child(4), .personnel-table td:nth-child(5), .personnel-table td:nth-child(6) { white-space: nowrap; }
th { background: #19232d; color: #9ba8b3; font-size: 9px; font-weight: 600; letter-spacing: .05em; padding: 10px 14px; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { border-top: 1px solid #27333e; color: #c2cbd2; font-size: 10px; padding: 12px 14px; vertical-align: middle; }
tbody tr:hover { background: #18232d; }
.person-cell { align-items: center; display: flex; gap: 9px; }
.person-avatar { align-items: center; background: #273440; border-radius: 50%; color: #d4dce2; display: inline-flex; flex: 0 0 auto; font-size: 9px; font-weight: 700; height: 29px; justify-content: center; width: 29px; }
.person-name { color: #e0e6eb; font-size: 10px; font-weight: 600; }
.person-sub { color: #9aa7b1; font-size: 9px; margin-top: 3px; }
.rank-pill, .status-pill { background: #26323d; border-radius: 20px; color: #c5ced5; display: inline-block; font-size: 9px; padding: 4px 8px; white-space: nowrap; }
.status-pill.active { background: #1e382d; color: #81d1a2; }
.status-pill.expiring { background: #3b2329; color: #ff9aa1; }
.warning-current { background: rgba(192, 52, 62, .2); }
.warning-current td:first-child { box-shadow: inset 3px 0 #d94b56; }
.warning-pill { background: #b8323d; border-radius: 12px; color: #fff0f1; display: inline-block; font-size: 9px; font-weight: 700; margin-left: 5px; padding: 3px 7px; vertical-align: middle; }
.audit-table { min-width: 900px; }
.audit-action { border-radius: 20px; display: inline-block; font-size: 9px; padding: 4px 8px; white-space: nowrap; }
.audit-insert { background: #1e382d; color: #81d1a2; }
.audit-update { background: #392d16; color: #e7c56e; }
.audit-delete { background: #3b2329; color: #ff9aa1; }
.audit-changes { line-height: 1.65; min-width: 280px; }
.audit-changes strong { color: #e0e6eb; }
.text-button { background: none; border: 0; color: #aab6c0; font-size: 10px; padding: 3px 4px; }
.text-button:hover { color: var(--red); }
.empty-state { color: #9aa7b1; font-size: 11px; padding: 30px 15px; text-align: center; }
.empty-state strong { color: #d1d9df; display: block; font-size: 12px; margin-bottom: 5px; }
.table-note { color: #9aa7b1; font-size: 9px; margin: 10px 0 0; }
.department-group + .department-group { margin-top: 30px; }
.department-heading { border-bottom: 1px solid var(--line); color: var(--gold); font: 700 22px 'Manrope', sans-serif; letter-spacing: -.02em; margin: 0 0 13px; padding: 0 0 10px; }
.person-card-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.person-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 15px; }
.person-card-top { align-items: flex-start; display: flex; justify-content: space-between; }
.person-card h3 { color: var(--text-strong); font: 700 12px 'Manrope', sans-serif; margin: 0 0 4px; }
.person-card .rank-text { color: var(--muted); font-size: 10px; }
.person-card-meta { border-top: 1px solid var(--line); color: #9aa7b1; display: grid; font-size: 9px; gap: 6px; margin-top: 13px; padding-top: 11px; }
.person-card-meta strong { color: #d1d9df; font-weight: 600; }
.card-action { background: transparent; border: 0; color: #78838d; font-size: 16px; line-height: 1; padding: 0 3px; }

.clothing-grid { display: grid; gap: 15px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.clothing-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; overflow: hidden; }
.clothing-image-wrap { align-items: center; aspect-ratio: 4 / 3; background: #101820; display: flex; justify-content: center; overflow: hidden; }
.clothing-image { cursor: zoom-in; height: 100%; object-fit: cover; width: 100%; }
.clothing-image:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; }
.clothing-image-placeholder { color: var(--muted); font-size: 11px; }
.clothing-card-content { padding: 13px 14px; }
.clothing-card-heading { align-items: flex-start; display: flex; gap: 8px; justify-content: space-between; }
.clothing-card-heading h2 { color: var(--text-strong); font: 700 14px 'Manrope', sans-serif; margin: 8px 0 0; }
.clothing-type { display: block; }
.clothing-description { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 10px 0 0; white-space: pre-line; }
.clothing-delete { margin-top: 12px; }
.catalog-public-header { align-items: center; display: flex; gap: 16px; margin-bottom: 22px; }
.catalog-public-header .brand-crest { border: 1px solid var(--line); }
.catalog-public-header .eyebrow { margin-bottom: 5px; }
.catalog-public-header h1 { margin-bottom: 5px; }
.catalog-public-header .heading-subtitle { margin: 0; }
body.catalog-view .sidebar,
body.catalog-view .topbar { display: none; }
body.catalog-view .main-content { margin-left: 0; }
body.catalog-view .page-content { max-width: 1180px; padding-top: 42px; }

.modal-root:empty { display: none; }
.modal-root { align-items: center; backdrop-filter: blur(4px); background: rgba(4, 8, 12, .78); display: flex; inset: 0; justify-content: center; padding: 20px; position: fixed; z-index: 20; }
.image-lightbox { align-items: center; background: rgba(4, 8, 12, .94); display: flex; inset: 0; justify-content: center; padding: 48px; position: absolute; }
.image-lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; }
.image-lightbox-close { background: rgba(30, 40, 50, .92); border: 1px solid #596571; border-radius: 50%; color: #fff; cursor: pointer; font-size: 25px; height: 42px; line-height: 1; position: absolute; right: 20px; top: 20px; width: 42px; }
.modal { background: #1b2732; border: 1px solid #536575; border-top: 3px solid var(--gold); border-radius: 10px; box-shadow: 0 24px 80px rgba(0, 0, 0, .72), 0 0 0 1px rgba(212, 181, 119, .12); font-weight: 600; max-height: min(90vh, 760px); max-width: 510px; overflow-y: auto; width: 100%; }
.modal.modal-wide { max-width: 680px; }
.modal-header { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 19px 22px 15px; }
.modal-header h2 { color: #fff; font: 700 16px 'Manrope', sans-serif; margin: 0 0 4px; }
.modal-header p { color: var(--muted); font-size: 10px; margin: 0; }
.modal-close { background: none; border: 0; color: #aab6c0; font-size: 21px; line-height: 1; padding: 0 2px; }
.modal-close:hover { color: #fff; }
.modal-form { padding: 18px 22px 21px; }
.form-grid { display: grid; gap: 13px; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field[hidden] { display: none; }
.field.full { grid-column: 1 / -1; }
.field label { color: #c3cdd5; font-size: 10px; font-weight: 600; }
.field input, .field select, .field textarea { background: #101820; border: 1px solid var(--line); border-radius: 5px; color: var(--text-strong); font-size: 11px; min-height: 36px; outline: none; padding: 8px 10px; width: 100%; }
.field textarea { min-height: 76px; resize: vertical; }
.form-hint { color: #8b959d; font-size: 9px; line-height: 1.5; margin: -4px 0 0; }
.modal-footer { border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; margin-top: 19px; padding-top: 14px; }
.detail-header { align-items: center; display: flex; gap: 13px; }
.detail-header .person-avatar { font-size: 14px; height: 44px; width: 44px; }
.detail-header h2 { margin-bottom: 4px; }
.detail-block { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 13px; }
.detail-block h3 { color: #c3cdd5; font-size: 10px; margin-bottom: 9px; }
.detail-line { align-items: flex-start; color: #aab6c0; display: flex; font-size: 10px; justify-content: space-between; padding: 6px 0; }
.detail-line strong { color: #e0e6eb; font-weight: 600; text-align: right; }
.warning-block { border-top-color: rgba(217, 75, 86, .65); }
.warning-block h3 { color: #ff929a; }
.warning-entry { background: rgba(192, 52, 62, .17); border: 1px solid rgba(217, 75, 86, .34); border-radius: 6px; margin-top: 7px; padding: 3px 9px; }
.warning-entry .detail-line strong { color: #ffb0b5; }
.vacation-current { background: rgba(224, 181, 54, .12); }
.vacation-current td:first-child { box-shadow: inset 3px 0 #e0b536; }
.vacation-pill { background: #e0b536; border-radius: 12px; color: #211b08; display: inline-block; font-size: 9px; font-weight: 700; margin-left: 5px; padding: 3px 7px; vertical-align: middle; }
.vacation-heading { align-items: center; display: flex; justify-content: space-between; }
.vacation-heading h3 { margin-bottom: 0; }
.vacation-entry { border-top: 1px solid var(--line); margin-top: 8px; padding: 8px 10px; }
.vacation-entry-current { background: rgba(224, 181, 54, .14); border: 1px solid rgba(224, 181, 54, .48); border-radius: 6px; }
.vacation-entry-current .detail-line strong { color: #f0ce62; }
.vacation-entry p { color: var(--muted); font-size: 10px; margin: 4px 0 8px; }
.toast-region { bottom: 20px; display: grid; gap: 8px; position: fixed; right: 20px; z-index: 30; }
.toast { background: #1c2935; border-radius: 6px; box-shadow: var(--shadow); color: white; font-size: 11px; max-width: min(360px, calc(100vw - 40px)); padding: 12px 15px; }
.toast.error { background: #a82631; }
.auth-screen { align-items: center; background: radial-gradient(ellipse at 50% 20%, #1b2a38 0%, var(--canvas) 65%); display: flex; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-screen[hidden], .app-shell[hidden] { display: none; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-width: 410px; padding: 30px; width: 100%; }
.auth-crest { background: white; border-radius: 10px; height: 58px; margin-bottom: 20px; object-fit: contain; padding: 4px; width: 54px; }
.auth-card h1 { font-size: 23px; margin-bottom: 8px; }
.auth-card .heading-subtitle { line-height: 1.6; margin-bottom: 17px; }
.auth-message { background: #1c382d; border-radius: 6px; color: #a4e2bb; display: none; font-size: 11px; line-height: 1.5; margin: 0 0 13px; padding: 10px 12px; }
.auth-message:not(:empty) { display: block; }
.auth-message.error { background: #3b2329; color: #ffabb1; }
.auth-form { display: grid; gap: 13px; }
.auth-form .field span { color: #c3cdd5; font-size: 10px; font-weight: 600; }
.auth-form .field input { margin-top: 6px; }
.auth-submit { margin-top: 3px; width: 100%; }
.auth-submit:disabled { cursor: wait; opacity: .7; }
.auth-footnote { border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.6; margin: 16px 0 0; padding-top: 12px; }
.user-label { color: var(--muted); font-size: 10px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-access-panel { margin-top: 17px; }
.staff-access-panel .panel-heading { border-bottom-color: var(--line); }

@media (max-width: 1050px) {
  .sidebar { width: 215px; }
  .main-content { margin-left: 215px; }
  .page-content { padding-left: 26px; padding-right: 26px; }
  .topbar { padding: 0 26px; }
  .person-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { height: auto; padding: 10px 12px; position: sticky; top: 0; width: 100%; }
  .brand { margin: 0 2px 10px; }
  .brand-crest { height: 36px; width: 34px; }
  .brand-copy strong { font-size: 14px; }
  .sidebar-label, .sidebar-bottom { display: none; }
  .navigation { display: flex; gap: 4px; overflow-x: auto; }
  .nav-link { flex: 0 0 auto; font-size: 10px; gap: 6px; padding: 8px 9px; white-space: nowrap; }
  .nav-link.active::before { height: 15px; margin-left: -9px; }
  .nav-icon { font-size: 13px; width: 14px; }
  .main-content { margin-left: 0; }
  .topbar { height: 51px; padding: 0 16px; }
  .topbar-actions { gap: 9px; }
  .user-label { display: none; }
  .today-label { display: none; }
  .page-content { padding: 23px 16px 35px; }
  .page-heading { align-items: flex-start; gap: 12px; }
  h1 { font-size: 21px; }
  .heading-subtitle { font-size: 10px; line-height: 1.5; }
  .page-heading > .button { flex: 0 0 auto; font-size: 10px; padding: 0 9px; }
  .hero-panel { min-height: 0; padding: 21px; }
  .hero-panel h1 { font-size: 18px; }
  .hero-panel p { max-width: 360px; }
  .hero-badge { height: 64px; margin-right: 0; width: 64px; }
  .stats-grid { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 89px; padding: 12px; }
  .stat-value { font-size: 20px; }
  .overview-grid { grid-template-columns: 1fr; }
  .person-card-grid { grid-template-columns: 1fr; }
  .clothing-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
  body.catalog-view .page-content { padding-top: 25px; }
}
@media (max-width: 460px) {
  .topbar-actions .button { font-size: 9px; padding: 0 7px; }
  .user-avatar { height: 29px; width: 29px; }
  .hero-badge { display: none; }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .search-box { flex-basis: 100%; max-width: none; }
  .filter-select { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .clothing-grid { grid-template-columns: 1fr; }
  .page-heading { flex-wrap: wrap; }
  .chat-compose { align-items: stretch; flex-direction: column; }
  .chat-compose .button { align-self: flex-end; }
  .todo-form { align-items: stretch; flex-direction: column; }
  .todo-form input[name="title"], .todo-form input[type="date"] { flex: auto; width: 100%; }
  .todo-date-label { margin-bottom: -6px; }
  .todo-form .button { align-self: flex-end; }
  .chat-message { max-width: 94%; }
}
#modal-root .modal,
#modal-root .modal * { font-weight: 700; }
