/* X–Tour 2099 · shared visual system.
   Load last. Layout-specific production/agenda rules remain in their modules. */
#app [hidden]:not([hidden="until-found"]),dialog [hidden]:not([hidden="until-found"]) { display:none !important; }
:root {
  --xt-bg: #080d12;
  --xt-rail: #0b1118;
  --xt-surface: #111b24;
  --xt-surface-raised: #17232e;
  --xt-surface-inset: #0b141d;
  --xt-line: #a7c9df1c;
  --xt-line-strong: #a7c9df35;
  --xt-text: #f0f5f8;
  --xt-muted: #9fadb9;
  --xt-subtle: #748897;
  --xt-lime: #c3f56b;
  --xt-cyan: #7bdae1;
  --xt-violet: #b6a1f1;
  --xt-danger: #ff8e9c;
  --xt-radius: 16px;
  --xt-radius-small: 10px;
  --xt-shadow: 0 12px 32px #0000001a, inset 0 1px 0 #ffffff04;
  --xt-motion: 180ms;
  --xt-ease: cubic-bezier(.2,.7,.2,1);
}

.system-skip-link { position:fixed; top:12px; left:12px; z-index:100000; padding:12px 18px; border-radius:10px; color:#14220a; background:var(--xt-lime); transform:translateY(-160%); }
.system-skip-link:focus { transform:translateY(0); }
.system-save-feedback,.system-connection-status { position:fixed; z-index:100001; right:24px; bottom:24px; max-width:min(440px,calc(100vw - 32px)); padding:14px 18px; border-radius:12px; border:1px solid #c3f56b50; background:#13221ef5; color:#e8ffdc; box-shadow:0 10px 40px #0005; font:600 13px/1.6 Manrope,system-ui,sans-serif; }
.system-save-feedback[hidden] { display:none; }
.system-connection-status { bottom:auto; top:14px; background:#2d2415f5; border-color:#edba6950; color:#ffe1ad; }
.connection-recovery { width:min(490px,calc(100% - 32px)); margin:15vh auto; padding:36px; border:1px solid var(--xt-line-strong); border-radius:20px; background:linear-gradient(145deg,#16232e,#0d1720); box-shadow:var(--xt-shadow); color:var(--xt-text); }
.connection-recovery h1 { font:700 30px/1.2 Manrope,system-ui,sans-serif; letter-spacing:-.04em; margin:12px 0; }
.connection-recovery p { color:var(--xt-muted); line-height:1.7; }
.connection-recovery-icon { display:grid; place-items:center; width:48px; height:48px; border-radius:14px; background:#c3f56b16; color:var(--xt-lime); font-size:28px; }
.connection-recovery button { margin-top:18px; min-height:44px; }
.production-inline-editor .persistent-save-actions { display:none !important; }
#app .production-commandbar.save-out-of-view .production-save-section:not([hidden]) { position:fixed; right:24px; bottom:24px; z-index:100; width:210px; max-width:calc(100vw - 32px); margin:0; min-height:48px; box-shadow:0 12px 38px #0008,0 0 0 5px #0d1720e8; }
body:has(dialog[open]) #app .production-commandbar.save-out-of-view .production-save-section { visibility:hidden; }
@media(max-width:700px){#app .production-commandbar.save-out-of-view .production-save-section:not([hidden]){right:20px;bottom:max(20px,env(safe-area-inset-bottom));}.production-inline-editor{padding-bottom:80px !important;}}

/* Quiet chrome with one recognizable accent. */
#app .app-shell,
body:has(.app-shell) > dialog {
  --bg: var(--xt-bg);
  --panel: var(--xt-surface);
  --panel-background: var(--xt-bg);
  --text: var(--xt-text);
  --muted: var(--xt-muted);
  --line: var(--xt-line);
  --lime: var(--xt-lime);
  --cyan: var(--xt-cyan);
  --violet: var(--xt-violet);
  --danger: var(--xt-danger);
  --refined-line: var(--xt-line);
  --refined-muted: var(--xt-muted);
  color-scheme: dark;
  color: var(--xt-text);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body:has(.app-shell) { background: var(--xt-bg); }
body:has(.app-shell) > :is(.noise,.orb) { opacity: 0; }
#app .app-shell { background: var(--xt-bg); }
#app .app-shell .content {
  padding: 30px clamp(22px,3vw,48px) 48px;
  background: radial-gradient(ellipse at 95% -5%,#5bc9d00a,transparent 38%);
}
#app .app-shell :is(.content,.panel,.metric,.op-form,.op-two,.topbar,.top-actions) { min-width: 0; }
#app .app-shell ::selection { background: #c3f56b38; color: #fff; }
#app .app-shell :is(.sidebar,.vertical-rail,.tour-track,.table-panel,.header-results) {
  scrollbar-width: thin;
  scrollbar-color: #48607280 transparent;
}

#app .app-shell .sidebar {
  padding: 18px 14px 16px;
  background: linear-gradient(180deg,#0e1720 0%,var(--xt-rail) 62%);
  border-right: 1px solid var(--xt-line);
  box-shadow: 8px 0 32px #00000012;
  isolation: isolate;
}
#app .app-shell .sidebar::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg,transparent,#c3f56b55,transparent);
  pointer-events: none;
}
#app .app-shell .sidebar .logo {
  border-bottom: 1px solid var(--xt-line);
  border-radius: 0;
  margin-bottom: 16px;
}
#app .app-shell .sidebar .nav { gap: 5px; padding: 2px 3px; }
#app .app-shell .sidebar .nav-label {
  margin: 22px 0 9px;
  padding: 0 12px;
  color: var(--xt-subtle);
  font: 500 9px/1.6 "DM Mono",monospace;
  letter-spacing: .16em;
}
#app .app-shell .sidebar .nav button {
  position: relative;
  min-height: 44px;
  padding: 11px 12px;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #a9b9c7;
  box-shadow: none;
  transition: background var(--xt-motion), color var(--xt-motion), border-color var(--xt-motion);
}
/* Earlier navigation CSS hard-codes white labels and heavy weight. */
#app .app-shell .sidebar .nav .menu-standard-label {
  color: inherit;
  font-size: 12px;
  font-weight: 600 !important;
}
#app .app-shell .sidebar .nav .menu-standard-icon { opacity: .82; stroke-width: 1.7; }
#app .app-shell .sidebar .nav button:is(.active,[aria-current="page"]) {
  background: linear-gradient(100deg,#c3f56b13,#c3f56b06);
  border-color: #c3f56b29;
  color: var(--xt-lime);
  box-shadow: inset 2px 0 var(--xt-lime);
}
#app .app-shell .sidebar .nav button.active .menu-standard-label { color: var(--xt-lime); }
#app .app-shell .sidebar .nav button.active .menu-standard-icon { opacity: 1; }
#app .app-shell .sidebar [data-menu-compact] {
  min-width: 36px;
  color: var(--xt-muted);
  border-color: var(--xt-line);
  background: #ffffff03;
}
#app .app-shell .sidebar :is(.artist-switch,.account-profile) {
  background: var(--xt-surface-inset);
  border: 1px solid var(--xt-line);
  box-shadow: inset 0 1px #ffffff03;
}
#app .app-shell .sidebar .account-profile { margin-top: 18px; padding: 12px 10px; gap: 10px; }
#app .app-shell .sidebar .account-profile .avatar {
  background: #c3f56b0d;
  color: var(--xt-lime);
  border-color: #c3f56b26;
  border-radius: 10px;
}
#app .app-shell .sidebar .account-profile span { color: var(--xt-muted); }
#app .app-shell .sidebar .account-profile .logout { background: transparent; border-color: transparent; }
#app .app-shell .platform-brand { opacity: .65; padding-top: 22px; }

#app .app-shell .topbar {
  position: relative;
  align-items: center;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--xt-line);
}
#app .app-shell .topbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 44px;
  height: 1px;
  background: var(--xt-lime);
}
#app .app-shell .topbar h1 {
  font-size: clamp(26px,2.3vw,34px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.2;
  color: var(--xt-text);
}
#app .app-shell .topbar p {
  margin: 9px 0 0;
  font: 400 10px/1.6 "DM Mono",monospace;
  letter-spacing: .1em;
  color: var(--xt-subtle);
}
#app .app-shell .top-actions { flex-basis: 360px; min-width: min(300px,100%); max-width: 430px; }
#app .app-shell .header-search {
  min-height: 44px;
  border: 1px solid var(--xt-line);
  border-radius: 11px;
  background: #0c151e;
  box-shadow: inset 0 1px #ffffff03;
  gap: 9px;
  transition: border-color var(--xt-motion), box-shadow var(--xt-motion);
}
#app .app-shell .header-search > span { color: var(--xt-muted); font-size: 22px; }
#app .app-shell .header-search input { font-size: 12px; min-height: 42px; }
#app .app-shell .header-search:focus-within {
  outline: none;
  border-color: #c3f56b77;
  box-shadow: 0 0 0 3px #c3f56b0b;
}
#app .app-shell .header-results {
  background: #111d28;
  border-color: var(--xt-line-strong);
  border-radius: 14px;
  box-shadow: 0 18px 64px #0008;
}

/* Shared surfaces. No display/position overrides on operational components. */
#app .app-shell :is(.glass.panel,.glass.metric,.social-card,.master-banner,.drive-banner) {
  border: 1px solid var(--xt-line);
  border-radius: var(--xt-radius);
  background: linear-gradient(145deg,#15212c,var(--xt-surface) 70%);
  box-shadow: var(--xt-shadow);
  backdrop-filter: none;
}
#app .app-shell .panel-head { align-items: center; gap: 16px; }
#app .app-shell .panel-head h2 {
  color: var(--xt-text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.4;
}
#app .app-shell :is(.panel-head p,.panel > p,.op-muted) { color: var(--xt-muted); line-height: 1.65; }
#app .app-shell .eyebrow { color: var(--xt-lime); font-size: 10px; letter-spacing: .13em; }
#app .app-shell :is(.employee-grid,.integration-grid,.document-card-grid,.settings-action-grid) { gap: 16px; }
#app .app-shell :is(.employee-card,.document-preview-card,.rooming-room,.settings-action-card) {
  background: linear-gradient(140deg,#16232e,#101b24) !important;
  border-color: var(--xt-line) !important;
  box-shadow: var(--xt-shadow);
}
#app .app-shell .employee-photo.no-photo {
  background: #7bdae10b;
  color: var(--xt-cyan);
  border: 1px solid #7bdae123;
}
#app .app-shell .document-file-icon { background: #7bdae107; color: var(--xt-cyan); }
#app .app-shell :is(.employee-info p,.document-preview-card small) { color: var(--xt-muted); }
#app .app-shell :is(.expense-cards article,.integration-grid article,.integration-grid > section) {
  background: var(--xt-surface);
  border-color: var(--xt-line);
  border-radius: var(--xt-radius);
}

/* Dashboard hierarchy: calm cards, large values, data-first labels. */
#app .app-shell .refined-dashboard { --dashboard-gap: 20px; }
#app .app-shell .refined-dashboard :is(.op-stats,.income-and-volume,.dashboard-agenda-pair,.op-two) { gap: 20px; }
#app .app-shell .refined-dashboard :is(.glass.metric,.income-redesign,.monthly-show-metrics,.dashboard-rail,.tour-timeline,.request-summary,.dashboard-brazil-map) {
  border-radius: var(--xt-radius);
  border-color: var(--xt-line);
  background: linear-gradient(145deg,#14212b,var(--xt-surface) 75%);
  box-shadow: var(--xt-shadow);
}
#app .app-shell .refined-dashboard .op-stats .metric {
  min-height: 148px;
  background: radial-gradient(ellipse at 100% 0,#7bdae107,transparent 70%),var(--xt-surface);
}
#app .app-shell .refined-dashboard .metric::after { display: none; }
#app .app-shell .refined-dashboard .metric::before { width: 30px; height: 2px; left: 22px; box-shadow: none; }
#app .app-shell .refined-dashboard .metric-label {
  color: #b1c0cc;
  font-family: "DM Mono",monospace;
  letter-spacing: .06em;
  line-height: 1.55;
}
#app .app-shell .refined-dashboard .metric > strong {
  font-size: clamp(32px,3vw,44px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
  color: var(--xt-text);
}
#app .app-shell .refined-dashboard .metric > small { color: var(--xt-muted); font-size: 11px; line-height: 1.6; }
#app .app-shell .refined-dashboard h2 { text-transform: none; letter-spacing: -.015em; }
#app .app-shell .refined-dashboard .income-and-volume > .income-redesign {
  background: radial-gradient(ellipse at 0 0,#c3f56b06,transparent 65%),var(--xt-surface) !important;
}
#app .app-shell .refined-dashboard .income-total .revenue-value { color: #e7f7d1; font-weight: 600; }
#app .app-shell .refined-dashboard :is(.revenue-period,.panel-head,.brazil-map-heading) { border-color: var(--xt-line); }
#app .app-shell .refined-dashboard .revenue-legend > span {
  border: 1px solid var(--xt-line);
  background: var(--xt-surface-inset);
  border-radius: 11px;
  box-shadow: none;
}
#app .app-shell .refined-dashboard .monthly-metrics-scroll { background: #07101955; border-color: var(--xt-line); }
#app .app-shell .refined-dashboard .monthly-show-metrics th { background: #13202b; color: var(--xt-muted); }
#app .app-shell .refined-dashboard .monthly-show-metrics tbody tr:nth-child(even) { background: #ffffff02; }
#app .app-shell .refined-dashboard .vertical-rail .op-event {
  border-color: var(--xt-line);
  background: var(--xt-surface-inset);
  border-radius: 11px;
  box-shadow: none;
}
#app .app-shell .refined-dashboard .date-chip { border-color: #c3f56b20; background: #c3f56b08; }
#app .app-shell .refined-dashboard .event-meta { color: var(--xt-muted); }
#app .app-shell .refined-dashboard .tour-stop {
  background: var(--xt-surface-inset);
  border-color: var(--xt-line);
  border-radius: 12px;
}

/* Controls use the same rhythm without changing semantic status colors. */
#app .app-shell :is(button,a.wa),
body:has(.app-shell) > dialog :is(button,a.wa) {
  transition: background var(--xt-motion) var(--xt-ease), border-color var(--xt-motion) var(--xt-ease), color var(--xt-motion), box-shadow var(--xt-motion), transform 120ms var(--xt-ease);
}
#app .app-shell :is(.op-controls,.panel-head,.toolbar,.modal-actions) > button:not(.primary):not(.danger),
#app .app-shell .icon-button,
#app .app-shell .refined-dashboard .panel-head button {
  background: #1b2a36;
  border: 1px solid var(--xt-line-strong);
  color: #d5e1ea;
  min-height: 42px;
  box-shadow: inset 0 1px #ffffff04;
}
#app .app-shell button.primary,
body:has(.app-shell) > dialog button.primary {
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid #d3ff8b40;
  border-radius: var(--xt-radius-small);
  background: var(--xt-lime);
  color: #16210c;
  font-weight: 800;
  box-shadow: inset 0 1px #ffffff30,0 4px 12px #c3f56b08;
}
#app .app-shell :is(button,a,[role="button"],summary):focus-visible,
body:has(.app-shell) > dialog :is(button,a,summary):focus-visible {
  outline: 2px solid var(--xt-lime);
  outline-offset: 4px;
}
#app .app-shell :is(button,a.wa):active:not(:disabled),
body:has(.app-shell) > dialog button:active:not(:disabled) { transform: translateY(1px); }
#app .app-shell :is(button,input,select,textarea):disabled,
body:has(.app-shell) > dialog :is(button,input,select,textarea):disabled { opacity: .45; cursor: not-allowed; }

#app .app-shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),select,textarea),
body:has(.app-shell) > dialog :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),select,textarea) {
  min-height: 44px;
  max-width: 100%;
  padding: 11px 13px;
  border: 1px solid #91b4ce30;
  border-radius: var(--xt-radius-small);
  background-color: var(--xt-surface-inset);
  color: var(--xt-text);
  font-family: inherit;
  line-height: 1.5;
  box-shadow: inset 0 1px 3px #00000012;
  transition: border-color var(--xt-motion), box-shadow var(--xt-motion), background-color var(--xt-motion);
}
#app .app-shell :is(input,textarea)::placeholder,
body:has(.app-shell) > dialog :is(input,textarea)::placeholder { color: #7d919f; opacity: 1; }
#app .app-shell :is(input,select,textarea):focus-visible,
body:has(.app-shell) > dialog :is(input,select,textarea):focus-visible {
  outline: 2px solid #c3f56b99;
  outline-offset: 2px;
  border-color: #c3f56b80;
  box-shadow: 0 0 0 4px #c3f56b07;
}
#app .app-shell :is(input[type="checkbox"],input[type="radio"]),
body:has(.app-shell) > dialog :is(input[type="checkbox"],input[type="radio"]) { accent-color: var(--xt-lime); }
#app .app-shell textarea { min-height: 100px; resize: vertical; }
#app .app-shell label { color: #bfced9; }
#app .app-shell :is(.operation-tabs,.workflow-tabs,.ac-modes) { gap: 6px; }
#app .app-shell :is(.operation-tabs,.workflow-tabs) button {
  background: var(--xt-surface-inset);
  border: 1px solid var(--xt-line);
  color: var(--xt-muted);
  min-height: 44px;
}
#app .app-shell :is(.operation-tabs,.workflow-tabs) button:is(.active,[aria-current="step"],[aria-pressed="true"]) {
  background: #c3f56b0d;
  border-color: #c3f56b50;
  color: var(--xt-lime);
  box-shadow: inset 0 -2px var(--xt-lime);
}
#app .app-shell .data-table th { background: #ffffff02; color: var(--xt-muted); font-size: 10px; letter-spacing: .08em; }
#app .app-shell .data-table td { border-color: var(--xt-line); font-variant-numeric: tabular-nums; }

/* Account settings keep large, unambiguous click targets. */
#app .app-shell .settings-action-grid { margin: 22px 0; }
#app .app-shell .settings-action-card { min-height: 114px; gap: 16px; }
#app .app-shell .settings-action-icon {
  background: #c3f56b0b;
  border: 1px solid #c3f56b20;
  color: var(--xt-lime);
  border-radius: 12px;
}
#app .app-shell .settings-action-card:nth-child(2) .settings-action-icon { color: var(--xt-cyan); background: #7bdae109; border-color: #7bdae123; }
#app .app-shell .settings-action-card:nth-child(3) .settings-action-icon { color: var(--xt-violet); background: #b6a1f109; border-color: #b6a1f123; }
#app .app-shell .settings-action-copy strong { font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: -.02em; }
#app .app-shell .settings-action-copy small { color: var(--xt-muted); font-size: 12px; line-height: 1.6; }
#app .app-shell .settings-action-card > span:last-child { color: var(--xt-subtle); }
#app .app-shell :is(.personalize-intro,.calendar-export,.staff-agreement) { border-color: var(--xt-line); background: #7bdae104; }

/* Native dialogs stay scrollable; visual treatment does not change their flow. */
body:has(.app-shell) > dialog.op-dialog {
  padding: 26px;
  border: 1px solid var(--xt-line-strong);
  border-radius: 20px;
  background: linear-gradient(145deg,#16232e,#0d1720);
  color: var(--xt-text);
  box-shadow: 0 32px 100px #0009,inset 0 1px #ffffff06;
  scrollbar-width: thin;
  scrollbar-color: #48607280 transparent;
}
body:has(.app-shell) > dialog::backdrop { background: #04090fbb; backdrop-filter: blur(8px); }
body:has(.app-shell) > dialog.op-dialog > header { padding-bottom: 18px; margin-bottom: 22px; border-bottom-color: var(--xt-line); }
body:has(.app-shell) > dialog.op-dialog > header h2 { font-size: 23px; font-weight: 700; letter-spacing: -.035em; }
body:has(.app-shell) > dialog.op-dialog :is(fieldset,.repeat-card,.staff-agreement) { border-color: var(--xt-line); background: #08131b40; border-radius: 12px; }
body:has(.app-shell) > dialog.op-dialog legend { color: #d5e1ea; font-size: 12px; }
body:has(.app-shell) > dialog.op-dialog label { color: #bfced9; font-size: 12px; font-weight: 600; }
body:has(.app-shell) > dialog.op-dialog .sticky-save { background: #0e1924f5; border-color: var(--xt-line); }
body:has(.app-shell) > dialog.op-dialog .danger { background: #ff8e9c0d; color: var(--xt-danger); border-color: #ff8e9c35; }

@media (hover:hover) and (pointer:fine) {
  #app .app-shell .sidebar .nav button:hover { background-color: #ffffff05; border-color: var(--xt-line); color: var(--xt-text); }
  #app .app-shell .sidebar .nav button.active:hover { background-color: #c3f56b16; color: var(--xt-lime); }
  #app .app-shell button.primary:hover,
  body:has(.app-shell) > dialog button.primary:hover { background: #d1ff80; box-shadow: 0 5px 18px #c3f56b14; transform: translateY(-1px); }
  #app .app-shell :is(.op-controls,.panel-head,.toolbar,.modal-actions) > button:not(.primary):not(.danger):hover,
  #app .app-shell .icon-button:hover { background: #253847; border-color: #b4d3e85c; }
  #app .app-shell .settings-action-card:hover { border-color: #c3f56b4d !important; transform: translateY(-2px); box-shadow: 0 12px 30px #0003; }
  #app .app-shell .refined-dashboard .vertical-rail .op-event:hover { border-color: #c3f56b3b; background: #c3f56b05; }
  #app .app-shell .data-table tbody tr:hover { background: #ffffff05; }
  #app .app-shell :is(input,select,textarea):not(:disabled):hover { border-color: #91b4ce55; }
}

@media (min-width:981px) {
  #app .app-shell:not(.menu-compact) > .sidebar { width: 244px; }
  #app .app-shell:not(.menu-compact) > .content { width: calc(100% - 244px); margin-left: 244px; }
  #app .app-shell.menu-compact .sidebar .logo { border-bottom: 0; }
  #app .app-shell.menu-compact .sidebar .account-profile { padding: 8px 4px; }
}
@media (max-width:1100px) {
  #app .app-shell .content { padding-inline: 24px; }
  #app .app-shell .top-actions { flex-basis: 300px; }
  #app .app-shell .refined-dashboard :is(.op-stats,.income-and-volume,.dashboard-agenda-pair,.op-two) { gap: 16px; }
}
@media (max-width:980px) {
  #app .app-shell > .content { margin-left: 0; width: 100%; padding: 24px 22px 36px; }
  #app .app-shell > .sidebar { width: 272px; padding-top: 70px; box-shadow: 18px 0 65px #0006; }
  #app .app-shell .mobile-menu-toggle {
    top: 20px;
    left: 20px;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--xt-line-strong);
    background: #16232f;
    color: var(--xt-text);
    border-radius: 11px;
    font-size: 19px;
  }
  #app .app-shell .topbar { align-items: flex-start; gap: 20px; }
  #app .app-shell .topbar > div:first-child { padding-left: 56px; }
  #app .app-shell .topbar h1 { padding-left: 0; font-size: 27px; }
  #app .app-shell .topbar p { font-size: 9px; }
  #app .app-shell .sidebar .account-profile > div:not(.avatar) { display: flex; }
  #app .app-shell .sidebar .account-profile .logout { display: grid; }
  #app .app-shell .sidebar .platform-brand img { width: 88px; }
}
@media (max-width:700px) {
  #app .app-shell > .content { padding: 22px 16px 30px; }
  #app .app-shell .topbar { padding-bottom: 20px; margin-bottom: 20px; gap: 19px; }
  #app .app-shell .topbar h1 { font-size: 25px; }
  #app .app-shell .topbar > div:first-child { padding-left: 54px; }
  #app .app-shell .topbar p { letter-spacing: .05em; overflow-wrap: anywhere; }
  #app .app-shell .top-actions { flex-basis: 100%; max-width: none; width: 100%; }
  #app .app-shell .mobile-menu-toggle { left: 16px; top: 19px; }
  #app .app-shell .header-search { min-height: 46px; }
  #app .app-shell .header-results { width: 100%; max-width: none; }
  #app .app-shell :is(.glass.panel,.glass.metric) { border-radius: 14px; }
  #app .app-shell .refined-dashboard :is(.op-stats,.income-and-volume,.dashboard-agenda-pair,.op-two) { gap: 12px; }
  #app .app-shell .refined-dashboard .op-stats .metric { min-height: 145px; }
  #app .app-shell .refined-dashboard .metric > strong { font-size: 34px; }
  #app .app-shell .settings-action-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  #app .app-shell .settings-action-card { min-height: 106px; gap: 12px; }
  #app .app-shell .settings-action-copy strong { font-size: 14px; }
  #app .app-shell :is(.operation-tabs,.workflow-tabs) { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
  #app .app-shell :is(.operation-tabs,.workflow-tabs) > button { flex-shrink: 0; }
  body:has(.app-shell) > dialog.op-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  body:has(.app-shell) > dialog.op-dialog > header h2 { font-size: 21px; }
  #app .app-shell :is(input,select,textarea),
  body:has(.app-shell) > dialog :is(input,select,textarea) { font-size: 16px; }
}

@media (prefers-reduced-motion:reduce) {
  #app .app-shell *,body:has(.app-shell) > dialog * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Keep editing spacious on tablets instead of leaving a long empty side rail. */
@media (max-width:980px) {
  #app .production-desk { grid-template-columns:minmax(0,1fr)!important; }
  #app .production-desk>.production-event-info { position:static; }
}
@media (max-width:600px) {
  #app .brazil-map-heading { display:flex!important; flex-direction:row!important; flex-wrap:wrap!important; align-items:center!important; gap:10px!important; padding:16px!important; height:auto!important; max-height:none!important; }
  #app .brazil-map-heading>div:first-child { flex:1 0 100%; min-width:0; }
  #app .brazil-map-heading h2 { white-space:normal!important; }
  #app .brazil-map-heading>button { position:static!important; margin:0!important; flex:0 1 auto; }
  #app .brazil-map-heading .map-year-control { position:static!important; margin:0 0 0 auto!important; flex:0 0 auto; }
}
