/* Shared surfaces and corner sizes for all primary sections and dialogs. */
:root{--radius-panel:10px;--radius-control:6px;--radius-cell:6px;--surface-soft:#f7f9fd;--surface-header:#edf1f7;--surface-border:#dce3ef}
:root[data-theme=dark]{--surface-soft:#202c3e;--surface-header:#243145;--surface-border:#344255}
:root :is(.panel,.metric,.card,.eff-metrics article,.eff-table,.guide-index,.guide-chapter,.guide-empty,.guide-hero,.modal,.registry-picker,.work-delete-confirm,.guide-image-dialog,.column-filter-menu,.queue-dealer-popup,.queue-full-preview){border-radius:var(--radius-panel);border-color:var(--line);box-shadow:var(--shadow)}
:root :is(.panel,.metric,.card,.eff-metrics article,.eff-table,.guide-index,.guide-chapter,.guide-empty,.modal,.registry-picker,.work-delete-confirm,.guide-image-dialog,.column-filter-menu,.queue-dealer-popup){background-color:var(--panel);color:var(--text)}
:root :is(button,input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea,.field,.dealer-dropdown,.contractor-dealers,.specialization-option){border-radius:var(--radius-control)}
:root :is(.board,.queue-scroll,.import-table,.guide-figure a,.guide-shortcuts a,.feed-form,.integration-box,.queue-state,.queue-note,.max-channel-preview,.max-event-options,.max-settings-hint,.work-schedule-note,.work-save-result,.notice,.stage){border-radius:var(--radius-panel)}
:root :is(.workcell,.workcell.is-empty,.queue-location-button,.queue-cell-expanded,.car,.task,.work-notification-state,.work-form-error,.specialization-badge,.dictation-note){border-radius:var(--radius-cell)}
:root :is(.integration-box,.queue-state,.feed-form,.max-settings-hint,.work-schedule-note):not(.warning):not(.error):not(.is-error){background-color:var(--surface-soft);border-color:var(--surface-border)}
:root :is(.worktable th,.worktable th:first-child,.queue-table th,.eff-table th,.import-table th,.board-floating-header,.board-floating-header th:first-child){background-color:var(--surface-header)}
:root .sidebar,:root .sidebar-collapsed .sidebar{border-radius:12px}
:root .sidebar .navitem,:root .sidebar-footer .sidebar-toggle,:root .sidebar-theme-toggle{border-radius:6px}
:root .sidebar-system,:root .sidebar-collapsed .sidebar-system{border-radius:8px}
:root .sidebar-brand-symbol,:root .sidebar-collapsed .sidebar-brand-symbol{border-radius:8px}
:root .sidebar-toggle svg{border-radius:8px}
:root .sidebar .navitem.active{box-shadow:0 3px 10px #2050e326,inset 0 1px 1px #ffffff50}
:root #guideView :is(.guide-index,.guide-chapter,.guide-hero,.guide-empty){border-radius:var(--radius-panel)}
/* One outer frame around the whole active page, shared by every section. */
:root .app>main{margin:12px;padding:18px;min-height:calc(100dvh - 24px);border:1px solid #dce4f1;border-radius:12px;background:linear-gradient(150deg,#ffffffb3,#f6f9ffcc);box-shadow:0 8px 28px #315ce10a}
:root[data-theme=dark] .app>main{border-color:#34435c;background:linear-gradient(150deg,#172232,#131d2c);box-shadow:0 8px 28px #0002}
@media(max-width:900px){:root .app>main{margin:12px 10px;padding:14px}}
@media(max-width:600px){:root .app>main{margin:10px 8px;padding:10px;min-height:calc(100dvh - 20px);border-radius:10px}}
/* Keep archive controls usable and contractor names readable on narrow screens. */
#contractorsView .archive-filter{display:inline-flex;align-items:center;gap:8px;cursor:pointer;white-space:nowrap}
#contractorsView .archive-filter input[type=checkbox]{appearance:auto;flex:none;width:17px;height:17px;min-width:17px;padding:0;margin:0;opacity:1}
#contractorsView .listtable{min-width:1000px}
#contractorsView .listtable th:first-child,#contractorsView .listtable td:first-child{min-width:150px;word-break:normal;overflow-wrap:break-word}
#contractorsView .listtable td:last-child{min-width:110px}
#contractorsView .listtable td:last-child button{white-space:nowrap}
