﻿:root {
  color-scheme: only light;
  --forest: #0a4d35;
  --service: #18a957;
  --lime: #75d45a;
  --copper: #d58a3a;
  --cream: #f7f3e8;
  --cream-2: #efe6d4;
  --ink: #101827;
  --ink-soft: #5c6472;
  --hairline: #e4dcc8;
  --paper: #fffdf8;
  --danger: #b42318;
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Outfit", system-ui, sans-serif;
  --radius: 16px;
  --radius-input: 12px;
  --shadow: 0 18px 40px -32px rgba(16, 24, 39, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: var(--font-sans);
  color: var(--ink);
}

html:has(body.login-page),
body.login-page {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--forest);
}

a:hover,
a:focus-visible {
  color: var(--service);
}

:focus-visible {
  outline: 3px solid rgba(213, 138, 58, 0.55);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--paper);
  padding: 0.75rem 1rem;
  z-index: 20;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ——— Login split layout ——— */

body.login-page {
  background: #fffef9;
  height: 100%;
  max-height: 100dvh;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.login-panel {
  display: flex;
  flex-direction: column;
  background: #fffef9;
  border-right: 1px solid var(--hairline);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.login-panel-inner {
  width: min(480px, calc(100% - clamp(1.25rem, 3vw, 3rem)));
  margin: 0 auto;
  padding: clamp(0.75rem, 2.2vh, 2rem) 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content: center;
  gap: clamp(0.15rem, 0.6vh, 0.35rem);
  min-height: 0;
  overflow: hidden;
}

.login-brand {
  margin-bottom: clamp(0.55rem, 2vh, 1.5rem);
  flex-shrink: 0;
}

.login-logo {
  display: block;
  width: min(188px, 70%);
  height: auto;
  max-height: clamp(2.25rem, 6vh, 3.5rem);
  object-fit: contain;
  object-position: left center;
}

.login-header {
  flex-shrink: 0;
}

.login-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vh + 0.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.login-subtitle {
  margin: clamp(0.25rem, 0.8vh, 0.55rem) 0 clamp(0.65rem, 1.8vh, 1.2rem);
  color: var(--ink-soft);
  font-size: clamp(0.88rem, 1.4vh + 0.2vw, 1.02rem);
  line-height: 1.35;
}

#login-form {
  flex-shrink: 1;
  min-height: 0;
}

.field {
  margin-bottom: clamp(0.45rem, 1.4vh, 0.95rem);
}

.field label {
  display: block;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.2vh + 0.15vw, 0.92rem);
  margin: 0 0 clamp(0.2rem, 0.6vh, 0.4rem);
  color: var(--ink-soft);
}

.field input,
.password-field input {
  width: 100%;
  height: clamp(44px, 6.2vh, 54px);
  border: 1px solid #d9d2c3;
  border-radius: var(--radius-input);
  padding: 0.65rem 0.95rem;
  font: inherit;
  font-size: clamp(0.92rem, 1.3vh + 0.2vw, 1rem);
  background: #fff;
  color: var(--ink);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 3.1rem;
}

.password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: block;
}

.field input:focus,
.password-field input:focus {
  outline: 3px solid rgba(24, 169, 87, 0.28);
  border-color: var(--service);
}

.forgot-line {
  margin: 0.05rem 0 clamp(0.65rem, 1.8vh, 1.2rem);
  font-size: clamp(0.8rem, 1.2vh + 0.15vw, 0.92rem);
}

.forgot-line a {
  color: var(--ink-soft);
  text-decoration: none;
}

.forgot-line a:hover,
.forgot-line a:focus-visible {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.button-primary {
  appearance: none;
  border: 0;
  width: 100%;
  height: clamp(44px, 6.2vh, 54px);
  border-radius: 14px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-size: clamp(0.95rem, 1.4vh + 0.2vw, 1.05rem);
  font-weight: 700;
  cursor: pointer;
  background: var(--copper);
  color: #fff;
}

.button-primary:hover:not(:disabled) {
  filter: brightness(1.04);
}

.button-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.alert {
  border-radius: 12px;
  padding: clamp(0.55rem, 1.2vh, 0.85rem) 0.95rem;
  margin: 0 0 clamp(0.45rem, 1.2vh, 0.9rem);
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
  font-size: clamp(0.82rem, 1.2vh + 0.15vw, 0.95rem);
  flex-shrink: 0;
}

.alert[hidden] {
  display: none;
}

.login-footer {
  margin-top: clamp(0.75rem, 2.2vh, 1.75rem);
  padding-top: clamp(0.55rem, 1.4vh, 1rem);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  align-items: center;
  font-size: clamp(0.72rem, 1.1vh + 0.1vw, 0.82rem);
  color: var(--ink-soft);
  flex-shrink: 0;
}

.login-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.login-footer a:hover,
.login-footer a:focus-visible {
  color: var(--forest);
  text-decoration: underline;
}

.footer-sep {
  opacity: 0.55;
}

.login-visual {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--forest);
}

.login-visual-slides {
  position: absolute;
  inset: 0;
}

.login-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
  overflow: hidden;
}

.login-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.login-visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.login-visual-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      160deg,
      rgba(7, 31, 24, 0.28) 0%,
      rgba(10, 77, 53, 0.42) 55%,
      rgba(7, 31, 24, 0.55) 100%
    );
  pointer-events: none;
}

.login-visual-caption {
  position: absolute;
  left: clamp(1rem, 2vw, 2rem);
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(0.85rem, 2.2vh, 2rem);
  margin: 0;
  max-width: 22rem;
  z-index: 3;
  color: #fffef9;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.5vh + 0.4vw, 1.45rem);
  line-height: 1.3;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .login-slide {
    transition: none;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .login-layout {
    grid-template-columns: minmax(280px, 46%) minmax(0, 54%);
  }

  .login-panel-inner {
    width: min(440px, calc(100% - clamp(1.1rem, 2.5vw, 2.5rem)));
  }
}

/* Mobile: fit 390×844; allow scroll only when virtual keyboard shrinks the viewport. */
@media (max-width: 767px) {
  html:has(body.login-page),
  body.login-page {
    overflow: hidden;
    height: 100%;
  }

  body.login-page {
    max-height: 100dvh;
  }

  .login-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(120px, 28dvh) minmax(0, 1fr);
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .login-panel {
    height: 100%;
    min-height: 0;
    border-right: 0;
    overflow: hidden;
  }

  .login-panel-inner {
    width: min(520px, calc(100% - 1.5rem));
    padding: clamp(0.65rem, 1.8vh, 1.1rem) 0 clamp(0.75rem, 2vh, 1.25rem);
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .login-visual {
    order: -1;
    height: 100%;
    min-height: 0;
    max-height: none;
  }

  .login-visual-caption {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.7rem;
    font-size: clamp(0.88rem, 2.4vw, 1rem);
  }

  .login-footer {
    margin-top: clamp(0.65rem, 1.8vh, 1.1rem);
  }
}

/* When the mobile visual viewport is shortened (on-screen keyboard), allow the form to scroll. */
@media (max-width: 767px) and (max-height: 560px) {
  html:has(body.login-page),
  body.login-page {
    overflow: auto;
    height: auto;
    max-height: none;
    min-height: 100%;
  }

  .login-layout {
    height: auto;
    min-height: 0;
    overflow: visible;
    grid-template-rows: 120px auto;
  }

  .login-panel,
  .login-panel-inner {
    overflow: visible;
  }
}

/* ——— Authenticated shell ——— */

body.app-page {
  min-height: 100dvh;
  height: auto;
  overflow: auto;
  background: #f3f1ea;
}

body.app-page.cockpit-page {
  background: #f3f1ea;
  color: var(--ink);
  overflow-x: hidden;
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.muted {
  color: var(--ink-soft);
  margin: 0.35rem 0 1.25rem;
}

button,
.button,
a.button-primary,
a.button-ghost,
a.button-danger {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.button-primary,
a.button-primary {
  background: var(--copper);
  color: #fff;
}

.button-primary:hover,
a.button-primary:hover {
  background: #c47a2f;
  color: #fff;
}

.button-primary:focus-visible,
a.button-primary:focus-visible,
.button-ghost:focus-visible,
a.button-ghost:focus-visible {
  outline: 3px solid rgba(213, 138, 58, 0.45);
  outline-offset: 2px;
}

.button-primary:disabled,
.button-ghost:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button-ghost,
a.button-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.button-ghost:hover,
a.button-ghost:hover {
  background: #f7f4ec;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
  color: var(--ink);
}

.topbar .meta {
  color: var(--ink-soft);
  margin: 0.25rem 0 0;
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
}

.panel {
  padding: 1.25rem 1.35rem;
}

.placeholder {
  margin: 0;
  color: var(--ink-soft);
}

.section-gap {
  margin-top: 1.5rem;
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }

  body.app-page:not(.cockpit-page) {
    background: #f3f1ea;
  }
}

/* ——— Cockpit OWNER/MANAGER (406H4 R2) ——— */
.cockpit-page {
  background: #f3f1ea;
  overflow-x: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  background: #f3f1ea;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0.85rem;
  background: #0a4d35;
  color: #f7f3e8;
}

.app-brand { display: grid; gap: 0.55rem; padding: 0 0.35rem; }
.app-logo {
  width: 132px;
  height: auto;
  display: block;
  filter: none;
}
.app-badge {
  width: fit-content;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(247,243,232,0.35);
  color: #f7f3e8;
  font-size: 0.78rem;
  font-weight: 700;
}
.app-nav {
  display: grid;
  gap: 0.35rem;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}
.app-nav a {
  color: #f7f3e8;
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-weight: 650;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.app-nav a:hover {
  background: rgba(247, 243, 232, 0.12);
  color: #fff;
}
.app-nav a:focus-visible {
  outline: 3px solid rgba(247, 243, 232, 0.45);
  outline-offset: 2px;
  background: rgba(247, 243, 232, 0.12);
}
.app-nav a[aria-current="page"] {
  background: #c47a2f;
  color: #fff;
}
.app-sidebar-foot { margin-top: auto; padding: 0 0.2rem; }
.app-sidebar-foot .button-ghost {
  color: #f7f3e8;
  border-color: rgba(247,243,232,0.4);
  background: transparent;
  width: 100%;
}
.app-sidebar-foot .button-ghost:hover {
  background: rgba(247,243,232,0.12);
  color: #fff;
}

.app-main {
  min-width: 0;
  padding: 0.85rem 1rem 1.25rem;
  background: #f3f1ea;
  color: var(--ink);
}
.app-content {
  min-width: 0;
  max-width: 1080px;
}
.app-nav-toggle {
  display: none;
  color: var(--ink);
  border-color: var(--hairline);
  background: #fff;
}

.cockpit-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.7rem;
  color: var(--ink);
}
.cockpit-heading { flex: 1 1 240px; min-width: 0; }
.cockpit-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  color: var(--ink);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.cockpit-heading .meta {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  hyphens: none;
}
.cockpit-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #abefc6;
  font-weight: 700;
  font-size: 0.86rem;
  min-height: 44px;
}
.status-pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

.context-panel { margin-bottom: 0.7rem; }
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  min-width: min(100%, 9.5rem);
}
.filter-chip-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #0f766e;
  hyphens: none;
}
.filter-chip-value {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
  hyphens: none;
  overflow-wrap: anywhere;
}
.filter-select {
  position: relative;
  padding: 0;
  min-width: min(100%, 12rem);
}
.filter-chip-trigger {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.5rem;
  align-items: center;
  text-align: left;
  padding: 0.4rem 0.75rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.filter-chip-trigger .filter-chip-label { grid-column: 1; grid-row: 1; }
.filter-chip-trigger .filter-chip-value { grid-column: 1; grid-row: 2; }
.filter-chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  margin-top: -0.2rem;
}
.filter-chip-trigger:focus-visible {
  outline: 3px solid rgba(24, 169, 87, 0.35);
  outline-offset: 2px;
}
.filter-select.is-disabled {
  opacity: 0.65;
}
.filter-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
}
.filter-menu [role="option"] {
  padding: 0.65rem 0.7rem;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.filter-menu [role="option"]:hover,
.filter-menu [role="option"]:focus {
  background: #f3f1ea;
  outline: none;
}
.filter-menu [aria-selected="true"] {
  background: #ecfdf3;
  font-weight: 700;
}

.panel-section {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.7rem;
  box-shadow: 0 8px 20px -18px rgba(16,24,39,0.35);
}
.panel-section h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.cash-card,
.kpi-card,
.alert-card,
.action-card,
.list-card,
.compare-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.cash-card { margin: 0.55rem 0; }
.priority-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.kpi-label {
  margin: 0;
  color: #0f766e;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
  hyphens: none;
}
.kpi-value {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  hyphens: none;
}
.kpi-detail {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  hyphens: none;
}
.kpi-danger .kpi-value { color: #b42318; }
.kpi-ok .kpi-value { color: #067647; }

.alert-queue, .action-queue, .card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.alert-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
  justify-content: space-between;
}
.alert-card h3, .action-card h3, .list-card h3, .compare-card h3 {
  margin: 0.35rem 0 0.2rem;
  font-size: 1rem;
  overflow-wrap: anywhere;
  hyphens: none;
}
.alert-reco { margin: 0.35rem 0 0; }
.action-full {
  width: 100%;
  margin-top: 0.55rem;
  min-height: 44px;
}
.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-danger { background: #fef3f2; color: #b42318; }
.badge-warn { background: #fffaeb; color: #b54708; }
.badge-neutral { background: #f2f4f7; color: #344054; }
.badge-ok { background: #ecfdf3; color: #067647; }

.site-compare {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr;
}
.kv-compact { margin: 0; }
.kv-compact > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid #f0ebe0;
}
.kv-compact dt {
  margin: 0;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  hyphens: none;
}
.kv-compact dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; hyphens: none; }

.empty-state, .error-state {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 0.9rem;
}
.empty-state h2, .error-state h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.empty-state p, .error-state p { margin: 0; color: var(--ink-soft); }

.skeleton-grid { display: grid; gap: 0.65rem; }
.skeleton-block {
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(90deg, #e7eee9, #f7faf8, #e7eee9);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-block { animation: none; }
}

.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #fff;
  border-top: 1px solid var(--hairline);
  padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.15rem;
}
.bottom-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.72rem;
  border-radius: 12px;
  padding: 0.35rem 0.2rem;
  text-align: center;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}
.bottom-nav a[aria-current="page"] {
  background: var(--copper);
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .priority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell { padding-bottom: 1.25rem; }
  .action-full { width: auto; }
  .alert-card .button-primary,
  .action-card .button-primary {
    width: auto;
    align-self: flex-start;
  }
}

@media (min-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-content { padding-right: 0.5rem; }
}

@media (max-width: 1199px) and (min-width: 768px) {
  .app-shell { grid-template-columns: 72px 1fr; }
  .app-badge, .app-sidebar-foot { font-size: 0; }
  .app-nav a {
    font-size: 0;
    justify-content: center;
    padding: 0.75rem;
  }
  .app-nav a::after {
    content: attr(data-short);
    font-size: 0.85rem;
    font-weight: 800;
    color: inherit;
  }
  .app-logo { width: 40px; }
}

@media (max-width: 767px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .app-sidebar.is-open { transform: translateX(0); }
  .app-nav-toggle { display: inline-flex; }
  .bottom-nav { display: grid; }
  .cockpit-top-actions { width: 100%; }
  .priority-grid, .kpi-grid { grid-template-columns: 1fr 1fr; }
  .cash-card { grid-column: 1 / -1; }
  .action-full { width: 100%; }
  .filter-chip, .filter-select { flex: 1 1 calc(50% - 0.5rem); }
}
