/* Aurora 2.1: stable geometry, explicit appearance, restrained contrast. */
:root {
  --control-line: #91a99a;
  --hover-surface: #e5ede6;
  --scroll-thumb: #7b9684;
}
html {background:var(--canvas);scrollbar-gutter:stable;scrollbar-color:var(--scroll-thumb) var(--canvas);}
body {background-attachment:scroll;}
.nav {overflow-x:hidden;scrollbar-gutter:stable;padding:2px 5px 2px 2px;}
.table-wrap,.sheet-scroll {scrollbar-gutter:stable;scrollbar-color:var(--scroll-thumb) var(--surface);}
/* Moving a target under the cursor also moves its scrollable overflow. */
.nav button,.nav button:hover:not(.active),.btn,.btn:active:not(:disabled),
.collaborator-card,.collaborator-card:hover,.personal-asset,.personal-asset:hover,
.report-card,.report-card:hover,.office-card,.office-card:hover,.action-stat,.action-stat:hover,
.action-stat:hover .card-arrow,.personal-asset:hover .device-stage svg {
  transform:none;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease;
}
.nav button:hover:not(.active) {background:var(--hover-surface);border-color:var(--line);color:var(--ink);box-shadow:none;}
.collaborator-card:hover,.personal-asset:hover,.report-card:hover,.office-card:hover,.action-stat:hover {border-color:var(--control-line);box-shadow:0 5px 20px #12291b0a;}
.heading {flex-wrap:wrap;align-items:flex-start;}
.heading>div:first-child {flex:1 1 320px;min-width:0;}
.heading .actions {align-self:center;gap:12px;}
.topbar {flex-wrap:wrap;row-gap:16px;}
.top-meta {gap:12px;min-width:0;}
.panel-head,.table-footer,.modal-footer {flex-wrap:wrap;gap:12px;}
.panel>.actions {padding:20px 24px;gap:12px;}
.btn:hover:not(:disabled) {transform:none;background:var(--hover-surface);border-color:var(--control-line);}
.btn.primary:hover:not(:disabled) {background:#236b4e;color:#fff;}
.row-action {background:var(--surface-soft);border:1px solid var(--line);color:var(--ink);min-height:36px;}
.row-action:hover {background:var(--hover-surface);}
.modal-footer {padding-top:20px;}
.module-tabs {max-width:100%;flex-wrap:wrap;gap:8px;background:var(--surface-soft);border-color:var(--line);box-shadow:none;}
.module-tabs button {min-height:44px;}
.module-tabs button:hover {background:var(--hover-surface);color:var(--ink);}
.module-tabs button[aria-selected=true] {background:var(--surface);color:var(--accent);border-color:var(--control-line);box-shadow:none;}
.collaborator-cards {grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:20px;}
.collaborator-card>span:not(.avatar):not(.assignment-count) {min-width:0;flex:1;}
.collaborator-card .avatar {flex-shrink:0;}
.collaborator-card small {opacity:1;color:var(--muted);}
.custody-slot {min-width:0;gap:12px;}
.custody-slot .btn {margin-top:0;white-space:normal;}
.personal-asset .modal-footer {margin-top:auto;}
.theme-control {display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--line);border-radius:16px;background:var(--surface-soft);flex-shrink:0;}
.theme-control-label {font-size:11px;color:var(--muted);padding:0 8px;}
.theme-options {display:flex;align-items:center;gap:4px;}
.theme-choice {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 10px;border:1px solid transparent;border-radius:11px;background:transparent;color:var(--muted);font-size:12px;font-weight:600;white-space:nowrap;}
.theme-choice svg {width:17px;height:17px;flex-shrink:0;}
.theme-choice[aria-pressed=true] {background:var(--surface);color:var(--ink);border-color:var(--control-line);box-shadow:0 2px 5px #14281d08;}
.theme-choice:hover {background:var(--surface);color:var(--ink);}
.auth-appearance {display:flex;justify-content:flex-end;margin-bottom:26px;}
.auth-form {flex-direction:column;min-width:0;}
.auth-form form {width:100%;max-width:390px;}
.auth-appearance {width:100%;max-width:390px;}
.auth-appearance .theme-control-label {display:none;}
html[data-theme=dark] {
  --canvas:#111816;--surface:#1b2521;--surface-soft:#25322c;
  --ink:#edf3ef;--muted:#b4c5bc;--line:#3e5147;--control-line:#789186;
  --accent:#a1dfbb;--focus:#a1dfbb;--hover-surface:#2d3d34;--scroll-thumb:#789186;
  --rim:#3e5147;--glass:linear-gradient(145deg,#233129f5,#1b2521f5);
  --glass-shadow:0 12px 32px #00000029;
}
html[data-theme=dark] body {background:var(--canvas);}
html[data-theme=dark] body::before {display:none;}
html[data-theme=dark] .topbar strong {color:var(--muted);}
html[data-theme=dark] :is(.panel,.stat,.report-card,.personal-asset,.office-card,.collaborator-card,.custody-slot,.passport,.sheet-panel,.upload-zone,.request-search,.toolbar,.filters,.advanced-filters,.quick-search,.incident-equipment,.attachment-file,.incident-response,.incident-history article,.portal-pager,.remote-link,.form-note,.external-form-note) {background:var(--surface);border-color:var(--line);box-shadow:none;}
html[data-theme=dark] :is(.stat.featured,.custody-slot.occupied,.portal-welcome,.remote-content,.module-tabs,.equipment-intro,.note-card,.source-note) {background:var(--surface-soft);border-color:var(--line);box-shadow:none;}
html[data-theme=dark] :is(.stat.featured .number,.stat.featured label,.stat.featured .caption,.remote-link a,.remote-copy h3,.remote-copy strong,.incident-description p,.incident-row strong,.form-note,.request-summary,.review-guide strong) {color:var(--ink);}
html[data-theme=dark] :is(p,.remote-copy p,.remote-panel small,.incident-row p,.attachment-file small,.form-note p,.portal-welcome p,.office-row small,.category label,.review-guide p,.quick-empty,.auth-form .muted,.auth-form small) {color:var(--muted);}
html[data-theme=dark] :is(.connection,.profile,.office-row,.custody-history p,.incident-history,.tech-editor,.line-editor,.sheet-view-settings) {border-color:var(--line);}
html[data-theme=dark] :is(dialog,#modal,#quick-dialog) {border-color:var(--line)!important;box-shadow:0 24px 80px #0006;background:var(--surface);}
html[data-theme=dark] :is(.close,.quick-open,.theme-control,.theme-choice) {box-shadow:none;}
html[data-theme=dark] .quick-open {background:var(--surface-soft);border-color:var(--line);}
html[data-theme=dark] .btn {background:var(--surface-soft);border-color:var(--control-line);color:var(--ink);box-shadow:none;}
html[data-theme=dark] .btn.primary {background:#2a7353;color:#fff;border-color:#519b77;}
html[data-theme=dark] .btn.danger {background:#392822;border-color:#b77c70;color:#ffb9a9;}
html[data-theme=dark] .btn.soft {color:var(--accent);}
html[data-theme=dark] .btn:hover:not(:disabled) {background:var(--hover-surface);border-color:var(--control-line);color:var(--ink);}
html[data-theme=dark] .btn.primary:hover:not(:disabled) {background:#338562;color:#fff;border-color:#71b18b;}
html[data-theme=dark] .btn.danger:hover:not(:disabled) {background:#513128;color:#ffcebf;border-color:#c68d7f;}
html[data-theme=dark] .report-card.feature {background:var(--surface-soft);border-color:var(--line);}
html[data-theme=dark] .report-card.feature p {color:var(--muted);}
html[data-theme=dark] :is(input,select,textarea):focus {outline-color:var(--focus);box-shadow:0 0 0 3px #a1dfbb20;}
html[data-theme=dark] :is(.theme-choice[aria-pressed=true],.module-tabs button[aria-selected=true]) {background:#354d40;color:#edfff5;border-color:var(--control-line);}
html[data-theme=dark] .badge.warn,html[data-theme=dark] .review-guide {background:#3e3322;border-color:#806b46;color:#f5dda7;}
html[data-theme=dark] .nav button.active {background:#2c6048;border-color:#5c9073;box-shadow:none;}
html[data-theme=dark] :is(.nav button.active .icon,.nav button.active::after) {color:#edf3ef;box-shadow:none;}
html[data-theme=dark] .mobile-dock {border-color:var(--line);box-shadow:0 8px 24px #0005;}
html[data-theme=dark] .mobile-dock button.active {background:#354d40;color:#edfff5;}
html[data-theme=dark] .custody-slot.available {opacity:1;}
@media (max-width:750px) {
  .topbar {display:flex;align-items:center;}
  .top-meta {width:100%;justify-content:space-between;}
  .theme-control {flex:1;max-width:310px;}
  .theme-control-label {display:none;}
  .theme-options {width:100%;}
  .theme-choice {flex:1;min-height:44px;padding:8px 6px;font-size:11px;}
  .theme-choice svg {width:15px;height:15px;}
  .auth-appearance {justify-content:center;margin-bottom:24px;}
  .auth-appearance .theme-control {max-width:100%;}
  .heading>div:first-child {flex-basis:100%;}
  .heading .actions {width:100%;gap:12px;}
  .collaborator-card {gap:12px;}
  .collaborator-cards {gap:16px;}
  .btn {white-space:normal;min-height:44px;}
  .request-input {flex-wrap:wrap;gap:12px;}
  .request-input input {min-width:0;flex:1 1 160px;}
}
@media (pointer:coarse) {
  .theme-choice {min-height:48px;}
  .table-wrap,.sheet-scroll {scrollbar-width:auto;}
  .nav button {min-height:48px;}
  button,a,input,select,textarea {touch-action:manipulation;}
}
@media (forced-colors:active) {
  .theme-choice[aria-pressed=true] {outline:2px solid Highlight;outline-offset:-3px;}
}

html[data-theme] :where(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea) {border-color:var(--control-line)!important;}
html[data-theme=dark] .upload-zone:hover {background:var(--hover-surface);border-color:var(--control-line);}

/* Shared import layout: file selection and submission have separate breathing room. */
.upload-stack {display:grid;gap:20px;min-width:0;}
.upload-stack .upload-zone {margin:0;}
.upload-actions {display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px;}
.upload-actions>.hint {flex:1 1 280px;margin:0;line-height:1.7;}
.upload-actions>.btn {flex:0 0 auto;min-height:44px;}
.block-content {display:grid;grid-template-columns:minmax(0,1fr);gap:24px;}
.block-content>* {min-width:0;}
#block-import-panel {margin-bottom:24px;}
.block-content>.sheet-filters,.block-content>p {margin:0;}
.block-row-actions {gap:12px;}

/* Original transparent mark, without an artificial plate. */
#app .brand img.company-logo {background:transparent;border:0;border-radius:0;padding:0;box-shadow:none;height:auto;object-fit:contain;}
#app .auth-story .brand img.company-logo {filter:brightness(0) invert(1);opacity:.94;}
html[data-theme=dark] #app .sidebar .brand img.company-logo {filter:brightness(0) invert(1);opacity:.94;}
@media (max-width:750px) {
  .upload-actions {align-items:stretch;gap:16px;}
  .upload-actions>.hint {flex-basis:100%;}
  .upload-actions>.btn {width:100%;}
}

/* Support workspace: header, filters and results are distinct comfortable rows. */
.incident-panel .incident-filters {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),280px));
  align-items:end;
  gap:20px 24px;
  padding:24px 26px;
  border-bottom:1px solid var(--line);
}
.incident-panel .incident-filters .field {display:grid;gap:9px;min-width:0;margin:0;}
.incident-panel .incident-filters label {margin:0;line-height:1.5;}
.incident-panel .incident-filters select {width:100%;min-height:46px;}
.incident-panel .incident-list {padding:24px 26px;}
.incident-panel .incident-row {gap:24px;border-color:var(--line);}
.incident-panel .incident-row:first-child {padding-top:0;border-top:0;}
.incident-panel .incident-list>.empty {min-height:220px;gap:14px;padding:28px 20px;}
.incident-panel .incident-list>.empty p {margin:0;max-width:420px;}
@media(max-width:750px) {
  .incident-panel .panel-head {align-items:flex-start;gap:18px;}
  .incident-panel .incident-filters {grid-template-columns:minmax(0,1fr);gap:20px;padding:22px 20px;}
  .incident-panel .incident-list {padding:22px 20px;}
  .incident-panel .incident-list>.empty {min-height:200px;padding-inline:0;}
}
