/* ==========================================================
   ALIENS ACTIVITYHUB
   AliensBrand shared design language
   Light + Dark | Desktop 1440 | Mobile 390
   Application stylesheet
========================================================== */

/* ================= TOKENS ================= */

:root {
  color-scheme: light;
  --x-bg: #f3f8fe;
  --x-panel: #ffffff;
  --x-panel-2: #f2f2f7;
  --x-border: rgba(15,23,42,.10);
  --x-line: rgba(15,23,42,.065);
  --x-text: #111827;
  --x-muted: #5c6778;
  --x-subtle: #8a94a5;
  --x-hover: rgba(15,23,42,.045);
  --x-accent: #2F8FE6;
  --x-accent-ink: #1A66C2;
  --x-primary: #1A66C2;
  --x-primary-hover: #155399;
  --x-primary-ink: #ffffff;
  --x-accent-soft: rgba(47,143,230,.12);
  --x-mint: #15D195;
  --x-amber: #F59E0B;
  --x-coral: #FF4D6D;
  --new-gradient: linear-gradient(135deg,#3f55bd,#6040bd);
  --new-gradient-hover: linear-gradient(135deg,#3548a5,#50349f);
  --new-ink: #ffffff;
  --x-shadow: 0 4px 16px rgba(15,23,42,.045);
  --x-shadow-lg: 0 12px 35px rgba(15,23,42,.10);
  --x-radius: 10px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --x-bg: #000000;
  --x-panel: #1c1c1e;
  --x-panel-2: #2c2c2e;
  --x-border: rgba(255,255,255,.10);
  --x-line: rgba(255,255,255,.065);
  --x-text: #f5f5f7;
  --x-muted: #aeaeb2;
  --x-subtle: #8e8e93;
  --x-hover: rgba(255,255,255,.065);
  --x-accent: #3BA7FF;
  --x-accent-ink: #3BA7FF;
  --x-primary: #3BA7FF;
  --x-primary-hover: #6CBDFF;
  --x-primary-ink: #08111f;
  --new-gradient: linear-gradient(135deg,#3BA7FF 0%,#5C7CFF 55%,#8B6DFF 100%);
  --new-gradient-hover: linear-gradient(135deg,#6CBDFF 0%,#8098FF 55%,#A78BFA 100%);
  --new-ink: #08111f;
  --x-accent-soft: rgba(59,167,255,.16);
  --x-shadow: 0 4px 16px rgba(0,0,0,.20);
  --x-shadow-lg: 0 12px 35px rgba(0,0,0,.40);
}

/* ================= RESET ================= */

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  letter-spacing: 0;
  color: var(--x-text);
  background: var(--x-bg);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--x-accent-soft);
  color: var(--x-text);
}

:focus-visible {
  outline: 2px solid var(--x-accent);
  outline-offset: 3px;
}

/* ================= APP SHELL ================= */

.app-shell {
  display: grid;
  grid-template-columns: 60px 250px minmax(0,1fr);
  min-height: 100vh;
  
}

:root[data-theme="dark"] .app-shell {
  
}

.app-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 13px 7px;
  border-right: 1px solid var(--x-line);
  background: var(--x-panel);
  z-index: 30;
}

.rail-waffle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--x-border);
  border-radius: 12px;
  background: var(--x-panel);
  color: var(--x-muted);
  cursor: pointer;
}

.rail-apps,
.rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.rail-apps {
  flex: 1;
}

.rail-app {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--x-muted);
  cursor: pointer;
  transition: background .18s ease,color .18s ease;
}

.rail-app:hover,
.rail-app.active {
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
}

.rail-app.active::before {
  content: "";
  position: absolute;
  left: -7px;
  width: 3px;
  height: 22px;
  border-radius: 4px;
  background: var(--x-accent);
}

.rail-app svg,
.rail-waffle svg {
  width: 21px;
  height: 21px;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px 12px;
  border-right: 1px solid var(--x-line);
  background: rgba(255,255,255,.62);
  z-index: 20;
}

:root[data-theme="dark"] .app-sidebar {
  background: #000000;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 4px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--new-gradient);
  color: #fff;
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-name {
  color: var(--x-text);
  font-size: 16px;
  font-weight: 750;
  white-space: nowrap;
}

.brand-version {
  margin-left: auto;
  color: var(--x-subtle);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.company-switcher {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  margin-top: 20px;
  padding: 10px;
  border: 1px solid var(--x-border);
  border-radius: 14px;
  background: var(--x-panel);
  text-align: left;
  cursor: pointer;
}

.company-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
  font-weight: 800;
}

.company-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.company-info strong {
  overflow: hidden;
  color: var(--x-text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-info small {
  color: var(--x-muted);
  font-size: 10px;
}

.company-switcher > svg {
  width: 15px;
  color: var(--x-muted);
}

.new-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(120deg,#0FA5E9,#3B82F6 38%,#6D5AE0 72%,#9333EA);
  box-shadow: 0 10px 24px rgba(109,90,224,.34);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.new-button svg {
  width: 18px;
  height: 18px;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 19px;
  scrollbar-width: thin;
  scrollbar-color: var(--x-border) transparent;
}

.nav-group {
  margin-bottom: 19px;
}

.nav-label {
  padding: 0 10px;
  margin-bottom: 7px;
  color: var(--x-muted);
  font-size: 12.5px;
  font-weight: 700;
}

.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 43px;
  margin: 2px 0;
  padding: 7px 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--x-muted);
  text-align: left;
  cursor: pointer;
  transition: .16s ease;
}

.nav-row > svg {
  width: 18px;
  height: 18px;
}

.nav-row > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nav-row strong {
  color: inherit;
  font-size: 12px;
  font-weight: 550;
}

.nav-row small {
  color: var(--x-subtle);
  font-size: 10px;
}

.nav-row:hover,
.nav-row.active {
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
}

.nav-row.active {
  border-left-color:var(--x-accent-ink);
}

.nav-row.active strong {
  font-weight: 700;
}

.sidebar-usage {
  padding: 13px 10px 5px;
  border-top: 1px solid var(--x-line);
}

.usage-heading {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--x-muted);
  font-size: 10px;
}

.usage-heading strong {
  color: var(--x-text);
}

.usage-track,
.capacity-track {
  height: 6px;
  overflow: hidden;
  margin-top: 9px;
  border-radius: 10px;
  background: var(--x-panel-2);
}

.usage-track span,
.capacity-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--x-mint);
}

.sidebar-usage small {
  display: block;
  margin-top: 7px;
  color: var(--x-subtle);
  font-size: 10px;
}

/* ================= MAIN AREA ================= */

.app-main {
  min-width: 0;
  min-height: 100vh;
}

kbd {
  padding: 3px 6px;
  border: 1px solid var(--x-border);
  border-radius: 5px;
  background: var(--x-panel-2);
  color: var(--x-muted);
  font-family: inherit;
  font-size: 9px;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--x-line);
  border-radius: 11px;
  background: var(--x-panel);
  color: var(--x-muted);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--x-hover);
  color:var(--x-accent-ink);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--x-coral);
}

.theme-moon {
  display: none;
}

:root[data-theme="dark"] .theme-sun {
  display: none;
}

:root[data-theme="dark"] .theme-moon {
  display: block;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 3px;
  border: 1px solid var(--x-line);
  border-radius: 22px;
  background: var(--x-panel);
  cursor: pointer;
}

.user-avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
  font-size: 11px;
  font-weight: 800;
}

.user-name {
  color: var(--x-text);
  font-size: 10px;
  font-weight: 650;
}

.user-menu > svg {
  width: 13px;
}

/* ================= SCREEN AREA ================= */

.screen-container {
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
  padding: 27px 27px 50px;
}

.screen {
  display: none;
  animation: screen-in .2s ease;
}

.screen:not([hidden]) {
  display: block;
}

.screen.active {
  display: block;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--x-subtle);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .055em;
}

.page-heading h1 {
  margin: 0;
  color: var(--x-text);
  font-size: 29px;
  font-weight: 750;
  letter-spacing:0;
  line-height: 1.25;
}

.page-heading p {
  margin: 7px 0 0;
  color: var(--x-muted);
  font-size: 12px;
  line-height: 1.5;
}

.heading-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.spacer {
  flex: 1;
}

/* ================= BUTTONS ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--x-border);
  border-radius: 9px;
  background: var(--x-panel);
  color: var(--x-text);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background .17s ease,border-color .17s ease;
}

.btn:hover {
  border-color:var(--x-accent-ink);
  background: var(--x-hover);
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn-primary {
  border-color:var(--x-accent-ink);
  background: var(--x-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--x-accent);
  filter: brightness(.93);
}

.btn-danger {
  color: var(--x-coral);
  border-color: rgba(255,77,109,.25);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color:var(--x-accent-ink);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.text-button svg {
  width: 14px;
}

/* ================= BADGES ================= */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--x-border);
  border-radius: 20px;
  background: var(--x-panel-2);
  color: var(--x-muted);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.badge.success {
  color: var(--x-mint);
  background: rgba(21,209,149,.09);
  border-color: rgba(21,209,149,.2);
}

.badge.warning {
  color: var(--x-amber);
  background: rgba(245,158,11,.09);
  border-color: rgba(245,158,11,.2);
}

.badge.danger {
  color: var(--x-coral);
  background: rgba(255,77,109,.09);
  border-color: rgba(255,77,109,.2);
}

.badge.info {
  color:var(--x-accent-ink);
  background: var(--x-accent-soft);
  border-color: transparent;
}

/* ================= METRICS ================= */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 13px;
  margin-bottom: 17px;
}

.metric {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--x-border);
  border-radius: 13px;
  background: var(--x-panel);
  box-shadow: var(--x-shadow);
}

.metric > span,
.metric-top > span {
  color: var(--x-muted);
  font-size: 11px;
  font-weight: 600;
}

.metric > strong {
  display: block;
  margin-top: 12px;
  color: var(--x-text);
  font-size: 25px;
  font-weight: 750;
  letter-spacing:0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--x-muted);
  font-size: 10px;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
}

.metric-icon svg {
  width: 17px;
}

.positive {
  color: var(--x-mint) !important;
  font-weight: 700;
}

.positive span {
  color: var(--x-muted);
  font-weight: 500;
}

.warning-text {
  color: var(--x-amber) !important;
}

/* ================= CONTENT CARDS ================= */

.content-card {
  min-width: 0;
  margin-bottom: 16px;
  padding: 17px;
  border: 1px solid var(--x-border);
  border-radius: 14px;
  background: var(--x-panel);
  box-shadow: var(--x-shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title {
  margin: 0;
  color: var(--x-text);
  font-size: 14px;
  font-weight: 750;
}

.panel-subtitle {
  margin: 5px 0 0;
  color: var(--x-muted);
  font-size: 10px;
  line-height: 1.5;
}

/* ================= DASHBOARD ================= */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 15px;
  align-items: start;
}

.revenue-card {
  min-height: 285px;
}

.chart-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.chart-summary strong {
  font-size: 24px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 140px;
  gap: 13px;
  padding: 8px 5px 0;
  border-bottom: 1px solid var(--x-line);
}

.bar-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  height: 100%;
}

.bar-item > span {
  display: block;
  width: min(100%,32px);
  min-height: 5px;
  border-radius: 7px 7px 2px 2px;
  background: rgba(47,143,230,.28);
}

.bar-item.selected > span {
  background: var(--x-accent);
}

.bar-item small {
  color: var(--x-muted);
  font-size: 10px;
}

.channel-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.channel-line {
  display: grid;
  grid-template-columns: 10px minmax(0,1fr) auto 45px;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid var(--x-line);
  color: var(--x-muted);
  font-size: 11px;
}

.channel-line:last-child {
  border-bottom: 0;
}

.channel-line strong {
  color: var(--x-text);
  font-size: 11px;
}

.channel-line small {
  text-align: right;
  font-size: 10px;
}

.channel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--x-accent);
}

.channel-dot.direct { background: var(--x-accent); }
.channel-dot.marketplace { background: var(--x-mint); }
.channel-dot.concierge { background: var(--x-amber); }
.channel-dot.partner { background: #9B8CE5; }

.departure-list {
  display: flex;
  flex-direction: column;
}

.departure-row {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) 52px auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--x-line);
}

.departure-row:last-child {
  border-bottom: 0;
}

.departure-time {
  color: var(--x-text);
  font-size: 13px;
  font-weight: 750;
}

.departure-time small {
  display: block;
  margin-top: 2px;
  color: var(--x-muted);
  font-size: 9px;
}

.departure-info {
  min-width: 0;
}

.departure-info strong {
  display: block;
  overflow: hidden;
  color: var(--x-text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.departure-info > small {
  display: block;
  margin-top: 4px;
  color: var(--x-muted);
  font-size: 9px;
}

.departure-info .capacity-track {
  margin-top: 7px;
}

.departure-count {
  text-align: right;
}

.departure-count strong {
  display: block;
  color: var(--x-text);
  font-size: 11px;
}

.departure-count small {
  color: var(--x-muted);
  font-size: 9px;
}

.alert-list {
  display: flex;
  flex-direction: column;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--x-line);
}

.alert-item:last-child {
  border-bottom: 0;
}

.alert-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
  font-weight: 750;
}

.alert-item.warning .alert-icon {
  background: rgba(245,158,11,.1);
  color: var(--x-amber);
}

.alert-item.danger .alert-icon {
  background: rgba(255,77,109,.1);
  color: var(--x-coral);
}

.alert-item > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alert-item strong {
  color: var(--x-text);
  font-size: 11px;
}

.alert-item small {
  color: var(--x-muted);
  font-size: 10px;
}

/* ================= CATALOGUE ================= */

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
}

.app-tile {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--x-border);
  border-radius: 13px;
  background: var(--x-panel);
  box-shadow: var(--x-shadow);
  transition: border-color .18s ease;
}

.app-tile:hover {
  border-color:var(--x-accent-ink);
}

.activity-image {
  position: relative;
  height: 135px;
  overflow: hidden;
  background-color: var(--x-panel-2);
  background-position: center;
  background-size: cover;
}

.image-goa { background-image: linear-gradient(135deg,#174c62,#b1b69a 55%,#765f48); }
.image-jaisalmer { background-image: linear-gradient(135deg,#70472d,#d8a15c 55%,#f0d7a6); }
.image-alleppey { background-image: linear-gradient(135deg,#174f50,#73a98c 55%,#d5c49c); }
.image-rishikesh { background-image: linear-gradient(135deg,#285b77,#4f9e9a 55%,#c5d4bb); }
.image-ladakh { background-image: linear-gradient(135deg,#4d657d,#a4a5a0 50%,#d7b78a); }
.image-corbett { background-image: linear-gradient(135deg,#244b31,#68835c 55%,#a0a57a); }
.image-coorg { background-image: linear-gradient(135deg,#244c37,#658b5b 55%,#c4ad75); }
.image-andaman { background-image: linear-gradient(135deg,#11627d,#55b8b1 55%,#e5d4a1); }
.image-hampi { background-image: linear-gradient(135deg,#714b36,#b98b55 55%,#e3c99b); }
.image-spiti { background-image: linear-gradient(135deg,#4b6079,#a8a7a0 55%,#d9c5a1); }

.image-category {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 15px;
  background: rgba(0,0,0,.43);
  color: #fff;
  font-size: 9px;
  backdrop-filter: blur(8px);
}

.activity-image .badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.tile-body {
  padding: 12px;
}

.tile-name {
  margin: 0;
  color: var(--x-text);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.tile-body > p {
  min-height: 30px;
  margin: 6px 0 10px;
  color: var(--x-muted);
  font-size: 10px;
  line-height: 1.5;
}

.tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--x-muted);
  font-size: 9px;
}

.tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--x-line);
}

.tile-footer > strong {
  color: var(--x-text);
  font-size: 14px;
}

.tile-footer > strong small {
  color: var(--x-muted);
  font-size: 9px;
  font-weight: 500;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--x-amber);
  font-size: 10px;
  font-weight: 700;
}

.rating svg {
  width: 12px;
  height: 12px;
}

.tile-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--x-muted);
  font-size: 9px;
}

/* ================= TOOLBARS & FORMS ================= */

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 15px;
}

.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 180px;
  height: 36px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--x-border);
  border-radius: 9px;
  background: var(--x-panel);
  color: var(--x-muted);
}

.search-field svg {
  width: 15px;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--x-text);
  font-size: 11px;
}

.search-field input::placeholder {
  color: var(--x-subtle);
}

.form-control {
  min-width: 120px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--x-border);
  border-radius: 9px;
  outline: none;
  background: var(--x-panel);
  color: var(--x-text);
  font-size: 11px;
}

.form-control:focus {
  border-color:var(--x-accent-ink);
  box-shadow: 0 0 0 3px var(--x-accent-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: var(--x-text);
  font-size: 11px;
  font-weight: 650;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group .form-control {
  width: 100%;
  min-height: 39px;
}

.form-group textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

/* ================= TABLES ================= */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11px;
}

.data-table thead {
  background: var(--x-panel-2);
}

.data-table th {
  padding: 12px 11px;
  border-bottom: 1px solid var(--x-border);
  color: var(--x-muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .035em;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--x-line);
  color: var(--x-text);
  vertical-align: middle;
}

.data-table td strong {
  display: block;
  color: var(--x-text);
  font-size: 11px;
  font-weight: 700;
}

.data-table td small {
  display: block;
  margin-top: 4px;
  color: var(--x-muted);
  font-size: 9px;
}

.data-table tbody tr:hover {
  background: var(--x-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  color: var(--x-muted);
  font-size: 10px;
}

.table-footer > div {
  display: flex;
  gap: 5px;
}

.table-footer .btn {
  min-height: 29px;
  padding: 5px 9px;
  font-size: 10px;
}

/* ================= CALENDAR ================= */

.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 17px;
}

.calendar-toolbar h2 {
  flex: 1;
  margin: 0;
  color: var(--x-text);
  font-size: 16px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  border-top: 1px solid var(--x-line);
  border-left: 1px solid var(--x-line);
}

.calendar-day-name {
  padding: 10px 4px;
  background: var(--x-panel-2);
  color: var(--x-muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  border-right: 1px solid var(--x-line);
  border-bottom: 1px solid var(--x-line);
}

.calendar-cell {
  position: relative;
  min-height: 80px;
  padding: 9px;
  border-right: 1px solid var(--x-line);
  border-bottom: 1px solid var(--x-line);
  background: var(--x-panel);
}

.calendar-cell > span {
  display: block;
  color: var(--x-text);
  font-size: 11px;
  font-weight: 650;
}

.calendar-cell > small {
  display: block;
  margin-top: 9px;
  color: var(--x-muted);
  font-size: 9px;
}

.calendar-cell.muted {
  background: var(--x-panel-2);
}

.calendar-cell.muted > span {
  color: var(--x-subtle);
}

.calendar-cell.today {
  background: var(--x-accent-soft);
}

.calendar-cell.today > span {
  color:var(--x-accent-ink);
}

.calendar-dot {
  position: absolute;
  right: 9px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--x-accent);
}

/* ================= LISTS ================= */

.simple-list {
  display: flex;
  flex-direction: column;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--x-line);
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row > div {
  min-width: 0;
}

.list-row strong,
.list-row > span {
  color: var(--x-text);
  font-size: 11px;
  font-weight: 650;
}

.list-row small {
  display: block;
  margin-top: 4px;
  color: var(--x-muted);
  font-size: 10px;
}

/* ================= TIMELINE ================= */

.activity-timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 75px 18px minmax(0,1fr);
  gap: 12px;
  min-height: 91px;
}

.timeline-time {
  padding-top: 3px;
  color: var(--x-muted);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.timeline-marker {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-marker::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  border: 2px solid var(--x-panel);
  background: var(--x-accent);
  box-shadow: 0 0 0 2px var(--x-accent-soft);
}

.timeline-marker::after {
  content: "";
  position: absolute;
  top: 17px;
  bottom: 0;
  width: 1px;
  background: var(--x-border);
}

.timeline-item:last-child .timeline-marker::after {
  display: none;
}

.timeline-content {
  min-width: 0;
  padding-bottom: 17px;
}

.session-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.session-heading strong {
  color: var(--x-text);
  font-size: 12px;
}

.timeline-content p {
  margin: 7px 0;
  color: var(--x-muted);
  font-size: 10px;
  line-height: 1.5;
}

/* ================= WAITLIST / REVIEWS ================= */

.promo-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--x-line);
}

.promo-card strong {
  color: var(--x-text);
  font-size: 11px;
}

.promo-card > span:not(.badge) {
  color: var(--x-muted);
  font-size: 10px;
}

.section-gap {
  margin-top: 22px;
}

.rating-overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
}

.rating-overview > strong {
  color: var(--x-text);
  font-size: 39px;
  font-weight: 800;
}

.rating-stars {
  color: var(--x-amber);
  letter-spacing: 2px;
  font-size: 15px;
}

.rating-overview small {
  color: var(--x-muted);
  font-size: 10px;
}

.rating-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.rating-bars > div {
  display: grid;
  grid-template-columns: 55px minmax(0,1fr) 35px;
  align-items: center;
  gap: 9px;
  color: var(--x-muted);
  font-size: 10px;
}

.rating-bars .capacity-track {
  margin: 0;
}

.rating-bars strong {
  color: var(--x-text);
  text-align: right;
  font-size: 10px;
}

.review-list {
  display: flex;
  flex-direction: column;
}

.review-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--x-line);
}

.review-item:last-child {
  border-bottom: 0;
}

.review-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.review-top strong {
  display: block;
  color: var(--x-text);
  font-size: 12px;
}

.review-top small {
  display: block;
  margin-top: 4px;
  color: var(--x-muted);
  font-size: 10px;
}

.review-item p {
  color: var(--x-muted);
  font-size: 11px;
  line-height: 1.65;
}

/* ================= REPORTS ================= */

.two-column-layout {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 15px;
  align-items: start;
}

.horizontal-bars {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.horizontal-bars > div {
  display: grid;
  grid-template-columns: 75px minmax(0,1fr) 65px;
  align-items: center;
  gap: 10px;
  color: var(--x-muted);
  font-size: 10px;
}

.horizontal-bars .capacity-track {
  margin: 0;
}

.horizontal-bars strong {
  color: var(--x-text);
  text-align: right;
  font-size: 11px;
}

/* ================= SETTINGS ================= */

.settings-layout {
  display: grid;
  grid-template-columns: 190px minmax(0,1fr);
  align-items: start;
  gap: 15px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--x-border);
  border-radius: 12px;
  background: var(--x-panel);
}

.settings-link {
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--x-muted);
  text-align: left;
  font-size: 11px;
  cursor: pointer;
}

.settings-link.active,
.settings-link:hover {
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
}

.settings-content {
  min-width: 0;
}

.settings-panel {
  margin-bottom: 0;
}

.settings-panel + .settings-panel {
  margin-top: 15px;
}

/* ================= DRAWERS / MODALS ================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(5px);
}

.modal {
  width: min(560px,100%);
  max-height: min(86vh,780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--x-border);
  border-radius: 16px;
  background: var(--x-panel);
  color: var(--x-text);
  box-shadow: var(--x-shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--x-line);
}

.modal-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
}

.modal-body {
  overflow-y: auto;
  padding: 19px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 18px;
  border-top: 1px solid var(--x-line);
}

/* ================= TOAST ================= */

.toast-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  max-width: min(390px,calc(100vw - 30px));
  padding: 13px 15px;
  border: 1px solid var(--x-border);
  border-radius: 12px;
  background: var(--x-panel);
  color: var(--x-text);
  box-shadow: var(--x-shadow-lg);
  font-size: 11px;
  animation: screen-in .2s ease;
}

/* ================= COMMAND SEARCH ================= */

.command-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: start center;
  padding: 15vh 15px 20px;
  background: rgba(0,0,0,.40);
  backdrop-filter: blur(5px);
}

.command-dialog {
  width: min(590px,100%);
  overflow: hidden;
  border: 1px solid var(--x-border);
  border-radius: 15px;
  background: var(--x-panel);
  box-shadow: var(--x-shadow-lg);
}

.command-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid var(--x-line);
}

.command-input > svg {
  color: var(--x-muted);
}

.command-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--x-text);
  font-size: 13px;
}

.command-results {
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.command-section-label {
  padding: 7px;
  color: var(--x-subtle);
  font-size: 9px;
  font-weight: 750;
}

.command-results button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--x-text);
  text-align: left;
  font-size: 11px;
  cursor: pointer;
}

.command-results button:hover {
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
}

.command-results button svg {
  width: 17px;
}

.command-footer {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 11px 15px;
  border-top: 1px solid var(--x-line);
  color: var(--x-muted);
  font-size: 9px;
}

/* ================= MOBILE NAV ================= */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(12px,env(safe-area-inset-bottom));
  z-index: 40;
  transform: translateX(-50%);
  width: min(440px,calc(100vw - 22px));
  justify-content: space-around;
  align-items: center;
  gap: 3px;
  padding: 8px 5px;
  border: 1px solid var(--x-border);
  border-radius: 23px;
  background: rgba(255,255,255,.91);
  backdrop-filter: blur(20px);
  box-shadow: 0 7px 28px rgba(15,23,42,.13);
}

:root[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(28,28,30,.94);
}

.mobile-nav-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--x-muted);
  font-size: 9px;
  cursor: pointer;
}

.mobile-nav-item svg {
  width: 18px;
  height: 18px;
}

.mobile-nav-item.active {
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
}

/* ================= RESPONSIVE: TABLET ================= */

@media (max-width:1100px) {
  .app-shell {
    grid-template-columns: 60px 210px minmax(0,1fr);
  }

  .screen-container {
    padding: 22px 19px 40px;
  }

  .activity-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .dashboard-grid {
    grid-template-columns: minmax(0,1fr);
  }
}

/* ================= RESPONSIVE: MOBILE ================= */

@media (max-width:720px) {
  html,
  body {
    min-width: 320px;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
    
  }

  .app-rail,
  .app-sidebar {
    display: none;
  }

  .app-main {
    min-height: 100vh;
    padding-bottom: 85px;
  }

  .user-name,
.user-menu > svg {
    display: none;
  }

  .user-menu {
    padding: 1px;
    border: 0;
    background: transparent;
  }

  .user-avatar {
    width: 31px;
    height: 31px;
  }

  .screen-container {
    padding: 20px 13px 20px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 16px;
  }

  .page-heading h1 {
    font-size: 23px;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .btn {
    flex: 1;
  }

  .metric-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 9px;
  }

  .metric {
    padding: 12px;
  }

  .metric > strong {
    font-size: 20px;
  }

  .metric > span {
    font-size: 10px;
  }

  .metric small {
    font-size: 9px;
  }

  .content-card {
    padding: 13px;
    border-radius: 12px;
  }

  .panel-header {
    align-items: flex-start;
  }

  .activity-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 9px;
  }

  .activity-image {
    height: 105px;
  }

  .tile-body {
    padding: 10px;
  }

  .tile-name {
    font-size: 11px;
  }

  .tile-body > p {
    min-height: 43px;
    font-size: 9px;
  }

  .tile-meta {
    font-size: 8px;
  }

  .tile-footer > strong {
    font-size: 12px;
  }

  .tile-bottom {
    font-size: 8px;
  }

  .dashboard-grid,
  .two-column-layout {
    grid-template-columns: minmax(0,1fr);
    gap: 11px;
  }

  .departure-row {
    grid-template-columns: 43px minmax(0,1fr) 42px;
    gap: 8px;
  }

  .departure-row > .badge {
    display: none;
  }

  .departure-time {
    font-size: 11px;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar .search-field {
    flex-basis: 100%;
  }

  .toolbar .form-control {
    flex: 1;
    min-width: 0;
  }

  .form-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
  }

  .form-group.full-width {
    grid-column: auto;
  }

  .calendar-toolbar {
    gap: 5px;
  }

  .calendar-toolbar h2 {
    min-width: 120px;
    font-size: 13px;
  }

  .calendar-grid {
    min-width: 0;
  }

  .calendar-day-name {
    font-size: 9px;
    padding: 8px 1px;
  }

  .calendar-cell {
    min-height: 54px;
    padding: 5px;
  }

  .calendar-cell > span {
    font-size: 9px;
  }

  .calendar-cell > small {
    margin-top: 5px;
    font-size: 7px;
    line-height: 1.3;
  }

  .calendar-dot {
    top: 6px;
    right: 5px;
    width: 5px;
    height: 5px;
  }

  .settings-layout {
    grid-template-columns: minmax(0,1fr);
  }

  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .settings-nav::-webkit-scrollbar {
    display: none;
  }

  .settings-link {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .table-scroll .data-table {
    min-width: 680px;
  }

  .table-footer {
    flex-wrap: wrap;
  }

  .timeline-item {
    grid-template-columns: 57px 15px minmax(0,1fr);
    gap: 7px;
  }

  .timeline-time {
    font-size: 9px;
  }

  .session-heading strong {
    font-size: 11px;
  }

  .rating-bars > div {
    grid-template-columns: 48px minmax(0,1fr) 32px;
    gap: 7px;
  }

  .commission-summary {
    grid-template-columns: minmax(0,1fr);
  }

  .modal-overlay {
    padding: 10px;
    align-items: end;
  }

  .modal {
    width: 100%;
    max-height: 88vh;
    border-radius: 17px 17px 12px 12px;
  }

  .modal-body {
    padding: 14px;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .toast-container {
    right: 11px;
    bottom: 84px;
    left: 11px;
  }

  .toast {
    min-width: 0;
    width: 100%;
  }

  .command-overlay {
    padding-top: 9vh;
  }
}

/* ================= SMALL PHONE ================= */

@media (max-width:390px) {
  .screen-container {
    padding-right: 10px;
    padding-left: 10px;
  }

  .activity-grid {
    gap: 7px;
  }

  .activity-image {
    height: 92px;
  }

  .metric {
    padding: 10px;
  }

  .metric > strong {
    font-size: 18px;
  }

  .page-heading h1 {
    font-size: 21px;
  }

  .content-card {
    padding: 11px;
  }

  .mobile-bottom-nav {
    bottom: max(9px,env(safe-area-inset-bottom));
  }
}

/* ================= ACCESSIBILITY ================= */

@media (prefers-reduced-motion:reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media (hover:none) {
  .app-tile:hover {
    transform: none;
  }
}
/* --- Aliens landing fixes: inline SVG stars (Human Mode icon law) --- */
svg.star {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--x-amber);
  vertical-align: -2px;
}
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.rating-stars svg.star {
  width: 15px;
  height: 15px;
}
svg.star.star-empty {
  opacity: 0.32;
}
/* --- Aliens landing fix: screen visibility driven by [hidden] --- */
.screen:not([hidden]) {
  display: block;
}

/* ================= ALIENS EXTRAS (CB0017 - CSO) ================= */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--x-border);
  border-radius: 999px;
  background: var(--x-panel);
  color: var(--x-muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
.filter-chip:hover {
  color: var(--x-text);
  border-color:var(--x-accent-ink);
}
.filter-chip.active {
  background: var(--x-accent-soft);
  color:var(--x-accent-ink);
  border-color: transparent;
}
.btn-quiet {
  background: transparent;
  color: var(--x-muted);
}
.btn-quiet:hover {
  color: var(--x-text);
}
.btn-sm {
  min-height: 29px;
  padding: 5px 10px;
  font-size: 10px;
}
.btn-danger {
  background: rgba(255,77,109,.12);
  color: var(--x-coral);
  border-color: rgba(255,77,109,.28);
}
.btn-danger:hover {
  background: rgba(255,77,109,.2);
}
.extras-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding: 11px 14px;
  border: 1px solid var(--x-border);
  border-radius: 12px;
  background: var(--x-panel-2);
}
.extras-toolbar .muted {
  font-size: 11px;
}
.extras-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.extras-card {
  margin-top: 16px;
}
.extras-select {
  max-width: 290px;
  min-width: 190px;
}
.extras-plan {
  padding-top: 2px;
}
.extras-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 4px;
}
.extras-plan-head strong {
  font-size: 13px;
}
.extras-plan .list-row strong {
  text-align: right;
}
.extras-recent {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.extras-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ================= PRINT / PDF VIEW ================= */
@media print {
  .app-rail,
.app-sidebar,
.mobile-bottom-nav,
.user-menu,
.extras-toolbar,
.extras-recent,
[data-extras-print],
[data-extras-export],
[data-extras-bulk],
[data-extras-draft],
[data-extras-recent] {
    display: none !important;
  }
  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }
  .app-shell {
    display: block !important;
  }
  .app-main {
    margin: 0 !important;
    padding: 0 !important;
  }
  .screen-container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .screen {
    display: none !important;
  }
  .screen:not([hidden]) {
    display: block !important;
  }
  .content-card,
  .extras-card {
    break-inside: avoid;
    border-color: #ddd !important;
    background: #fff !important;
  }
}

/* 34. PROVIDER DIRECTORY (2 Nov 2026, CB0017 - CSO) */
.btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.data-table .muted {
  color: var(--x-muted);
}

.two-column-layout .simple-list .list-row strong {
  white-space: nowrap;
}


/* ==========================================================
   ALIENSBRAND v4 shell alignment — ActivityHub
   Visual-only layer; existing screens and interaction hooks stay intact.
========================================================== */


.app-shell {
  
}
:root[data-theme="dark"] .app-shell {
  
}
.app-rail {
  background: rgba(222,237,253,.36);
  border-right-color: var(--x-border);
}
:root[data-theme="dark"] .app-rail { background: rgba(14,15,17,.93); }
.rail-app img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.app-sidebar {
  background: rgba(246,250,255,.72);
  border-right-color: var(--x-border);
}
:root[data-theme="dark"] .app-sidebar { background: rgba(15,15,17,.95); }
.brand-mark {
  background:var(--new-gradient);
  border-radius: 13px;
}
.company-switcher {
  background: rgba(255,255,255,.86);
  border-color: var(--x-border);
  border-radius: 14px;
}
:root[data-theme="dark"] .company-switcher { background: rgba(30,30,32,.92); }
.new-button {
  background:var(--new-gradient);
  border-radius: 999px;
  min-height: 48px;
  box-shadow: 0 2px 8px rgba(15,23,42,.10);
  letter-spacing: 0;
}
:root[data-theme="dark"] .new-button {
  background:var(--new-gradient);
  color: var(--new-ink);
}
.metric,
.content-card,
.app-tile {
  border-color: var(--x-border);
  background: var(--x-panel);
  box-shadow: var(--x-shadow);
}
.icon-button,
.user-menu,
.filter-chip,
.btn {
  border-color: var(--x-border);
}
.mobile-bottom-nav {
  border-color: var(--x-border);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 5px 18px rgba(44,76,140,.09);
}
:root[data-theme="dark"] .mobile-bottom-nav {
  border-color: var(--x-border);
  background: rgba(30,30,34,.9);
}
@media (max-width:720px) {
  .screen-container { padding-top: 20px; }
  .mobile-bottom-nav { min-height: 60px; }
}
@media (max-width:390px) {
  .mobile-bottom-nav { min-height: 58px; }
}


/* Shadow discipline: only the New CTA may carry chromatic elevation. */
.mobile-bottom-nav {
  box-shadow: 0 4px 14px rgba(15,23,42,.075);
}
:root[data-theme="dark"] .mobile-bottom-nav {
  box-shadow: 0 4px 14px rgba(0,0,0,.24);
}


/* ActivityHub Today — operational dashboard */


.app-shell {}
:root[data-theme="dark"] .app-shell {}
.brand-mark {background:var(--new-gradient);}
.new-button {background:var(--new-gradient);border-radius:999px;box-shadow:0 2px 8px rgba(15,23,42,.10);}
:root[data-theme="dark"] .new-button {background:var(--new-gradient);color:var(--new-ink);}
.today-screen {padding-bottom:36px;}
.today-heading {display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin:0 0 24px;}
.today-kicker,.today-eyebrow,.quickbar-label {display:block;color:var(--x-muted);font-size:10px;font-weight:800;letter-spacing:.5px;}
.today-kicker {display:flex;align-items:center;gap:8px;margin-bottom:10px;}
.live-dot {width:7px;height:7px;border-radius:50%;background:#29976b;box-shadow:0 0 0 4px rgba(41,151,107,.12);}
.today-heading h1 {margin:0;color:var(--x-text);font-size:32px;font-weight:720;letter-spacing:0;line-height:1.12;}
.today-heading p {margin:8px 0 0;color:var(--x-muted);font-size:13px;}
.today-head-actions {display:flex;align-items:center;gap:9px;flex-shrink:0;}
.today-btn {min-height:42px;padding:0 16px;border:1px solid var(--x-border);border-radius:11px;background:var(--x-panel);color:var(--x-text);font-family:inherit;font-size:12px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;transition:.18s ease;}
.today-btn:hover {transform:none;box-shadow:none;}
.today-btn-primary {background:var(--x-accent);border-color:var(--x-accent-ink);color:#fff;box-shadow:none;}
:root[data-theme="dark"] .today-btn-primary {color:var(--new-ink);}
.today-btn-primary:hover {filter:brightness(1.06);}
.today-btn-quiet[aria-pressed="true"] {border-color:var(--x-accent-ink);color:var(--x-accent-ink);background:var(--x-accent-soft);}
.today-btn-icon {font-size:17px;}
.today-pulse {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:15px;}
.pulse-card,.today-panel {min-width:0;background:var(--x-panel);border:1px solid var(--x-border);border-radius:15px;box-shadow:var(--x-shadow);}
.pulse-card {padding:16px 18px 14px;}
.pulse-top {display:flex;align-items:center;justify-content:space-between;color:var(--x-muted);font-size:11px;font-weight:650;}
.pulse-icon {width:28px;height:28px;border-radius:9px;background:var(--x-accent-soft);color:var(--x-accent-ink);display:grid;place-items:center;font-size:14px;font-weight:800;}
.pulse-card>strong {display:block;margin:9px 0 4px;font-size:25px;line-height:1.1;letter-spacing:0;color:var(--x-text);font-weight:750;font-variant-numeric:tabular-nums;}
.pulse-card>strong em {font-style:normal;color:var(--x-muted);font-size:15px;font-weight:550;}
.pulse-card>small {color:var(--x-muted);font-size:10px;}
.up {color:#21845d;font-weight:750;}
:root[data-theme="dark"] .up {color:#6bd6a5;}
.pulse-meter,.readiness-track {height:5px;border-radius:99px;background:var(--x-panel-2);overflow:hidden;}
.pulse-meter {margin-top:10px;}
.pulse-meter i,.readiness-track i {display:block;height:100%;border-radius:99px;background:var(--x-accent);}
.today-quickbar {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:9px;padding:13px 15px;margin-bottom:16px;border:1px solid var(--x-border);border-radius:15px;background:var(--x-panel);box-shadow:var(--x-shadow);}
:root[data-theme="dark"] .today-quickbar {background:var(--x-panel);}
.today-quickbar>div {grid-column:1/-1;min-width:0;padding:0 3px 2px;}
.quickbar-label {font-size:9px;margin-bottom:4px;}
.today-quickbar>div strong {font-size:12px;color:var(--x-text);}
.today-quickbar>button {display:flex;align-items:center;gap:10px;flex:1;min-width:0;padding:8px 10px;border:0;border-left:1px solid var(--x-line);background:transparent;text-align:left;color:var(--x-text);cursor:pointer;border-radius:9px;}
.today-quickbar>button:hover {border-color:var(--x-accent-ink);}
.quick-symbol {width:32px;height:32px;flex-shrink:0;border-radius:10px;background:var(--x-accent-soft);color:var(--x-accent-ink);display:grid;place-items:center;font-size:19px;}
.today-quickbar b,.today-quickbar small {display:block;}
.today-quickbar b {font-size:11px;font-weight:750;}
.today-quickbar small {margin-top:3px;color:var(--x-muted);font-size:9px;}
.today-main-grid {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(285px,.85fr);gap:15px;align-items:start;}
.today-panel {padding:17px 18px;}
.today-panel-head {display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:15px;}
.today-panel-head h2 {margin:5px 0 3px;font-size:17px;letter-spacing:0;color:var(--x-text);}
.today-panel-head p {margin:0;color:var(--x-muted);font-size:10px;}
.today-link,.today-inline-link {border:0;background:transparent;color:var(--x-accent-ink);font-size:10px;font-weight:750;white-space:nowrap;cursor:pointer;padding:6px 0;}
.today-link span,.today-inline-link span {font-size:14px;margin-left:4px;}
.today-controls {display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:8px;border-bottom:1px solid var(--x-line);}
.today-tabs {display:flex;gap:4px;flex-wrap:wrap;}
.today-tabs button,.sales-tabs button {border:0;background:transparent;color:var(--x-muted);font-size:10px;font-weight:650;padding:7px 9px;border-radius:8px;cursor:pointer;}
.today-tabs button.is-active,.sales-tabs button.is-active {background:var(--x-accent-soft);color:var(--x-accent-ink);}
.today-tabs button span {margin-left:3px;opacity:.75;}
.today-sort {display:flex;align-items:center;gap:6px;color:var(--x-muted);font-size:9px;white-space:nowrap;}
.today-sort select {max-width:130px;border:1px solid var(--x-border);border-radius:8px;padding:6px 7px;background:var(--x-panel);color:var(--x-text);font-size:10px;}
.today-departure {display:grid;grid-template-columns:66px minmax(0,1fr) 26px;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--x-line);}
.today-departure:last-child {border-bottom:0;}
.departure-clock {padding:8px 5px;border-radius:10px;background:var(--x-panel-2);text-align:center;color:var(--x-text);}
.departure-clock strong {display:block;font-size:15px;letter-spacing:0;font-variant-numeric:tabular-nums;}
.departure-clock small {font-size:9px;color:var(--x-muted);}
.departure-title {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.departure-title>strong {font-size:11px;color:var(--x-text);}
.departure-copy p {margin:4px 0 7px;color:var(--x-muted);font-size:9px;}
.departure-copy>small {display:block;margin-top:5px;color:var(--x-muted);font-size:9px;}
.departure-progress {height:4px;border-radius:99px;background:var(--x-panel-2);overflow:hidden;}
.departure-progress span {display:block;height:100%;border-radius:99px;background:#6eaa8e;}
.today-status {padding:4px 7px;border-radius:99px;font-size:8px;font-weight:750;white-space:nowrap;}
.status-done {background:rgba(42,143,99,.12);color:#24845d;}
.status-ready {background:rgba(47,143,230,.12);color:#367fb5;}
.status-full {background:rgba(205,111,40,.13);color:#b15a1e;}
.status-check {background:rgba(205,145,40,.15);color:#a66a12;}
.departure-more {width:26px;height:26px;border:1px solid var(--x-border);border-radius:8px;background:transparent;color:var(--x-muted);cursor:pointer;}
.departure-more:hover {color:var(--x-accent-ink);border-color:var(--x-accent-ink);}
.today-panel-foot {display:flex;justify-content:space-between;gap:10px;padding-top:10px;border-top:1px solid var(--x-line);color:var(--x-muted);font-size:9px;}
.legend-dot {display:inline-block;width:7px;height:7px;margin-right:5px;border-radius:50%;background:#6eaa8e;}
.today-side-stack {display:grid;gap:15px;}
.today-panel-head.compact {align-items:center;margin-bottom:13px;}
.today-panel-head.compact h2 {font-size:15px;}
.readiness-ring {width:39px;height:39px;border-radius:50%;display:grid;place-items:center;border:3px solid #5aa783;color:var(--x-text);font-size:10px;font-weight:800;}
.readiness-line {display:flex;justify-content:space-between;gap:10px;margin:10px 0 6px;color:var(--x-muted);font-size:10px;}
.readiness-line strong {color:var(--x-text);font-size:10px;font-variant-numeric:tabular-nums;}
.readiness-track {height:5px;}
.readiness-track i {background:#63a987;}
.today-inline-link {margin-top:11px;padding-bottom:0;}
.attention-count {display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#fff0d9;color:#9b5c14;font-size:10px;font-weight:800;}
.attention-row {display:grid;grid-template-columns:30px minmax(0,1fr) 12px;align-items:center;gap:9px;width:100%;padding:10px 0;border:0;border-top:1px solid var(--x-line);background:transparent;text-align:left;cursor:pointer;color:var(--x-text);}
.attention-row>span:nth-child(2) b,.attention-row>span:nth-child(2) small {display:block;}
.attention-row b {font-size:10px;}
.attention-row small {margin-top:3px;color:var(--x-muted);font-size:9px;}
.attention-row>span:last-child {color:var(--x-muted);font-size:17px;}
.attention-mark {width:29px;height:29px;border-radius:9px;display:grid;place-items:center;font-weight:800;font-size:12px;}
.mark-amber {background:rgba(224,164,66,.16);color:#b27a24;}
.mark-red {background:rgba(210,85,76,.13);color:#bd5149;}
.mark-neutral {background:var(--x-panel-2);color:var(--x-muted);}
.today-bottom-grid {display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:15px;margin-top:15px;}
.sales-tabs {display:flex;gap:3px;margin:-3px 0 8px;}
.sales-total {display:flex;align-items:baseline;gap:7px;margin:0 0 10px;}
.sales-total strong {font-size:25px;letter-spacing:0;color:var(--x-text);}
.sales-total span {font-size:10px;color:var(--x-muted);}
.sales-stack {display:flex;gap:3px;height:9px;border-radius:99px;overflow:hidden;}
.sales-stack span {display:block;border-radius:99px;}
.sales-direct {background:var(--x-accent);}
.sales-agent {background:#d5a06e;}
.sales-ota {background:#7b9e91;}
:root[data-theme="dark"] .sales-direct {background:var(--x-accent);}
.sales-legend {display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:13px;}
.sales-legend>div {display:grid;grid-template-columns:9px 1fr auto;align-items:center;gap:5px;color:var(--x-muted);font-size:9px;}
.sales-legend i {width:8px;height:8px;border-radius:3px;}
.sales-legend b {color:var(--x-text);font-size:10px;}
.activity-feed {display:grid;}
.activity-entry {display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px 0;border-top:1px solid var(--x-line);}
.activity-avatar {width:29px;height:29px;border-radius:50%;display:grid;place-items:center;font-size:9px;font-weight:800;color:#5c3527;background:#f4e0d4;}
.avatar-sand {background:#f2e9d8;color:#75552c;}
.avatar-sage {background:#dcebe3;color:#315f4b;}
.activity-entry b {font-size:10px;color:var(--x-text);}
.activity-entry p {margin:3px 0;color:var(--x-muted);font-size:9px;}
.activity-entry p strong {color:var(--x-text);font-weight:650;}
.activity-entry small {font-size:8px;color:var(--x-muted);}
.activity-entry small i {font-style:normal;margin:0 3px;}
.activity-amount {font-size:10px;font-weight:750;color:var(--x-text);font-variant-numeric:tabular-nums;}
.source-direct,.source-agent,.source-ota {font-size:8px;font-weight:800;letter-spacing:.04em;}
.source-direct {color:var(--x-accent-ink);}.source-agent {color:#a57539;}.source-ota {color:#588372;}
.today-empty {padding:32px 12px;text-align:center;color:var(--x-muted);font-size:12px;}
.today-busy-banner {display:flex;align-items:center;gap:12px;margin-top:15px;padding:14px 16px;border:1px solid color-mix(in srgb,var(--x-accent) 24%,transparent);border-radius:13px;background:var(--x-accent-soft);color:var(--x-text);}
.today-busy-banner[hidden] {display:none;}
.busy-spark {font-size:21px;color:var(--x-accent-ink);}
.today-busy-banner div {flex:1;}
.today-busy-banner strong {font-size:12px;}
.today-busy-banner p {margin:3px 0 0;color:var(--x-muted);font-size:10px;}
.today-busy-banner button {border:0;background:transparent;color:var(--x-accent-ink);font-weight:750;font-size:10px;cursor:pointer;}
.today-screen.is-busy .today-quickbar,.today-screen.is-busy .today-bottom-grid,.today-screen.is-busy .readiness-panel {display:none;}
.today-screen.is-busy .today-main-grid {grid-template-columns:minmax(0,1fr) minmax(270px,.7fr);}
 .today-screen.is-busy .today-departure {display:none;}.today-screen.is-busy .today-departure[data-state="soon"] {display:grid;}
.today-screen.is-busy .today-pulse {grid-template-columns:repeat(2,minmax(0,1fr));}
.today-screen.is-comfort .today-panel,.today-screen.is-comfort .pulse-card {padding:22px;}
.today-screen.is-comfort .today-departure {padding:19px 0;}
.today-screen.is-comfort .today-btn,.today-screen.is-comfort .today-quickbar>button {min-height:52px;}
.today-toast {position:fixed;right:28px;bottom:26px;z-index:80;padding:13px 17px;border-radius:11px;background:#17202b;color:#fff;font-size:12px;box-shadow:0 8px 28px rgba(0,0,0,.2);}
.today-toast[hidden] {display:none;}
.today-dialog {width:min(480px,calc(100vw - 28px));padding:0;border:1px solid var(--x-border);border-radius:18px;background:var(--x-panel);color:var(--x-text);box-shadow:0 24px 80px rgba(0,0,0,.25);}
.today-dialog::backdrop {background:rgba(14,20,28,.42);backdrop-filter:blur(4px);}
.today-dialog-card {position:relative;padding:25px;}
.today-dialog-close {position:absolute;right:17px;top:14px;border:0;background:transparent;color:var(--x-muted);font-size:24px;cursor:pointer;}
.today-dialog h2 {margin:7px 0 5px;font-size:21px;letter-spacing:0;}
.today-dialog-card>p {margin:0 0 18px;color:var(--x-muted);font-size:11px;}
.today-form-fields {display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.today-field {display:grid;gap:6px;}
.today-field.full {grid-column:1/-1;}
.today-field label {font-size:10px;font-weight:700;color:var(--x-muted);}
.today-field input,.today-field select,.today-field textarea {width:100%;min-height:40px;padding:9px 11px;border:1px solid var(--x-border);border-radius:9px;background:var(--x-panel-2);color:var(--x-text);font-family:inherit;font-size:12px;outline:none;}
.today-field input:focus,.today-field select:focus,.today-field textarea:focus {border-color:var(--x-accent-ink);box-shadow:0 0 0 3px var(--x-accent-soft);}
.today-form-error {min-height:18px;margin-top:9px;color:#bd5149;font-size:10px;}
.today-dialog-actions {display:flex;justify-content:flex-end;gap:8px;margin-top:10px;}
.today-dialog-actions .today-btn {min-height:40px;}
:root[data-theme="dark"] .today-dialog {background:#1c1c1e;}
@media (max-width:1150px) {.today-pulse{grid-template-columns:repeat(2,minmax(0,1fr));}.today-main-grid{grid-template-columns:minmax(0,1.3fr) minmax(270px,.9fr);}}
@media (max-width:900px) {.today-main-grid,.today-bottom-grid{grid-template-columns:1fr;}.today-side-stack{grid-template-columns:1fr 1fr;}.today-quickbar>div{min-width:130px;}}
@media (max-width:720px) {
 .today-screen{padding-bottom:84px;}
 .today-heading{display:block;margin-bottom:19px;}
 .today-heading h1{font-size:28px;}
 .today-heading p{max-width:330px;line-height:1.5;}
 .today-head-actions{margin-top:15px;}
 .today-head-actions .today-btn{flex:1;}
 .today-pulse{gap:9px;}
 .pulse-card{padding:14px;}
 .pulse-card>strong{font-size:22px;}
 .today-quickbar{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:12px;}
 .today-quickbar>div{grid-column:1/-1;padding:0 4px 8px;}
 .today-quickbar>button{border-left:0;padding:9px 5px;}
 .today-main-grid,.today-bottom-grid{gap:11px;}
 .today-panel{padding:15px 13px;border-radius:13px;}
 .today-side-stack{grid-template-columns:1fr;}
 .today-controls{align-items:flex-start;flex-direction:column;}
 .today-sort{align-self:flex-end;}
 .today-departure{grid-template-columns:55px minmax(0,1fr) 24px;gap:8px;padding:13px 0;}
 .departure-title>strong{font-size:10px;}
 .departure-copy p{line-height:1.4;}
 .today-panel-foot{font-size:8px;}
 .today-dialog-card{padding:22px 18px;}
 .today-form-fields{grid-template-columns:1fr;}
 .today-field.full{grid-column:auto;}
 .today-busy-banner{align-items:flex-start;}
 .today-screen.is-busy .today-main-grid{grid-template-columns:1fr;}
}
@media (max-width:390px) {
 .today-pulse{grid-template-columns:1fr 1fr;}
 .pulse-card{padding:12px 11px;}
 .pulse-top{font-size:10px;}
 .pulse-card>strong{font-size:20px;}
 .today-heading h1{font-size:26px;}
 .today-link{font-size:9px;}
 .today-tabs button{padding:7px 6px;font-size:9px;}
 .today-quickbar>button{gap:7px;}
 .quick-symbol{width:29px;height:29px;}
 .today-departure{grid-template-columns:49px minmax(0,1fr) 22px;}
 .departure-clock strong{font-size:13px;}
 .today-panel-head h2{font-size:15px;}
 .activity-amount{font-size:9px;}
}

.today-refresh {border:0;background:transparent;color:var(--x-accent-ink);font-size:9px;font-weight:750;cursor:pointer;padding:4px 2px;}
.today-refresh:disabled {opacity:.6;cursor:wait;}
.today-screen.is-loading .today-departure-list {opacity:.48;filter:saturate(.6);pointer-events:none;}
.today-screen.is-loading .today-departure-list::after {content:"Updating departures…";display:block;padding:12px;text-align:center;color:var(--x-accent-ink);font-size:10px;font-weight:700;}


/* C1 repair: explicitly constrain the desktop quick-action bar to three equal tracks.
   Scope by both screen and component class so the shared screen layout cannot override it. */
@media (min-width:721px) {
  .today-screen .today-quickbar,
  body .today-screen .today-quickbar,
  body #today-quickbar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) !important;
    grid-template-rows: auto auto !important;
    grid-auto-flow: row !important;
    align-items: center !important;
    min-width: 0 !important;
  }
  .today-screen .today-quickbar > div,
  body #today-quickbar > div {
    grid-column: 1 / 4 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }
  .today-screen .today-quickbar > button:nth-of-type(1),
  body #today-quickbar > button:nth-of-type(1) { grid-column: 1 !important; grid-row: 2 !important; }
  .today-screen .today-quickbar > button:nth-of-type(2),
  body #today-quickbar > button:nth-of-type(2) { grid-column: 2 !important; grid-row: 2 !important; }
  .today-screen .today-quickbar > button:nth-of-type(3),
  body #today-quickbar > button:nth-of-type(3) { grid-column: 3 !important; grid-row: 2 !important; }
  .today-screen .today-quickbar > button,
  body #today-quickbar > button {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
}
@media (max-width:720px) {
  .today-screen .today-quickbar,
  body #today-quickbar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  }
  .today-screen .today-quickbar > div,
  body #today-quickbar > div { grid-column: 1 / -1 !important; }
}

/* AliensBrand C1 final cascade guard: the live gate targets this stable bar ID.
   The ID+class selector outranks shared shell/layout selectors on desktop. */
@media screen and (min-width:721px) {
  html body #today-quickbar.today-quickbar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: auto auto !important;
    grid-auto-flow: row !important;
  }
  html body #today-quickbar.today-quickbar > div {
    grid-column: 1 / 4 !important;
    grid-row: 1 !important;
  }
  html body #today-quickbar.today-quickbar > button:nth-of-type(1) {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  html body #today-quickbar.today-quickbar > button:nth-of-type(2) {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  html body #today-quickbar.today-quickbar > button:nth-of-type(3) {
    grid-column: 3 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
}


/* 17 Nov 2026: final live-gate guard for the desktop quick-action bar.
   Keep this at the end of the stylesheet and use the full app-shell path so
   shared layout rules cannot collapse the three action tracks. */
@media screen and (min-width:721px) {
  html body .app-shell .app-main .screen-container .today-screen #today-quickbar.today-quickbar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: auto auto !important;
    grid-auto-flow: row !important;
    align-items: center !important;
  }
  html body .app-shell .app-main .screen-container .today-screen #today-quickbar.today-quickbar > div {
    grid-column: 1 / 4 !important;
    grid-row: 1 !important;
  }
  html body .app-shell .app-main .screen-container .today-screen #today-quickbar.today-quickbar > button:nth-of-type(1) {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  html body .app-shell .app-main .screen-container .today-screen #today-quickbar.today-quickbar > button:nth-of-type(2) {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  html body .app-shell .app-main .screen-container .today-screen #today-quickbar.today-quickbar > button:nth-of-type(3) {
    grid-column: 3 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
}


/* 17 Nov 2026: final AliensBrand C1 gate rule.
   Anchor directly to the live bar ID (without depending on an ancestor class)
   so desktop shell wrappers cannot reduce the three action tracks to two. */
@media screen and (min-width:721px) {
  html body #today-quickbar.today-quickbar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: auto auto !important;
    grid-auto-flow: row !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html body #today-quickbar.today-quickbar > div {
    grid-column: 1 / 4 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }
  html body #today-quickbar.today-quickbar > button:nth-of-type(1) {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  html body #today-quickbar.today-quickbar > button:nth-of-type(2) {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  html body #today-quickbar.today-quickbar > button:nth-of-type(3) {
    grid-column: 3 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
}


/* 17 Nov 2026: apply C1 to the component class as well as its historical ID.
   The live gate reported a two-track quick-action bar after the ID-only fix;
   this class-wide rule also covers shell-rendered instances/clones. */
@media screen and (min-width:721px) {
  html body .today-quickbar,
  html body #today-quickbar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) !important;
    grid-template-rows: auto auto !important;
    grid-auto-flow: row !important;
    grid-auto-columns: minmax(0,1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  html body .today-quickbar > div,
  html body #today-quickbar > div {
    grid-column: 1 / 4 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }
  html body .today-quickbar > button:nth-of-type(1),
  html body #today-quickbar > button:nth-of-type(1) {
    grid-column: 1 !important; grid-row: 2 !important;
    width: 100% !important; min-width: 0 !important; flex: none !important;
  }
  html body .today-quickbar > button:nth-of-type(2),
  html body #today-quickbar > button:nth-of-type(2) {
    grid-column: 2 !important; grid-row: 2 !important;
    width: 100% !important; min-width: 0 !important; flex: none !important;
  }
  html body .today-quickbar > button:nth-of-type(3),
  html body #today-quickbar > button:nth-of-type(3) {
    grid-column: 3 !important; grid-row: 2 !important;
    width: 100% !important; min-width: 0 !important; flex: none !important;
  }
}


/* C1: final computed-grid lock for the live Today quick-action bar. */
@media screen and (min-width:721px) {
  #today-quickbar.today-quickbar {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    grid-auto-flow: row !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  #today-quickbar.today-quickbar > div { grid-column: 1 / 4 !important; grid-row: 1 !important; }
  #today-quickbar.today-quickbar > button:nth-of-type(1) { grid-column: 1 !important; grid-row: 2 !important; min-width: 0 !important; width: 100% !important; }
  #today-quickbar.today-quickbar > button:nth-of-type(2) { grid-column: 2 !important; grid-row: 2 !important; min-width: 0 !important; width: 100% !important; }
  #today-quickbar.today-quickbar > button:nth-of-type(3) { grid-column: 3 !important; grid-row: 2 !important; min-width: 0 !important; width: 100% !important; }
}
/* ==========================================================================
   ActivityHub — WCAG-AA contrast layer  (2026-11-21, CB0017-CSO)
   Semantic status and attention colors retain their contrast corrections.
   Measured before (real pixel current, beta deploy):
     light=5  dark=4  console_errors=0
   Violations: .new-button (4.47), .status-done (4.00/3.24),
   .status-ready (3.78/3.41), .status-full (4.17/3.03), .mark-amber (3.26/3.45)
   ========================================================================== */

/* 1. Primary New pill: theme-aware gradient with readable ink. */
.new-button {
    background:var(--new-gradient);
    color: #ffffff;
}

/* 2. Departure status pills — text darkened (light) / lightened (dark) */
.status-done  { color: #177848; }
.status-ready { color: #1f6296; }
.status-full  { color: #8a4310; }
.status-check { color: #7d4d09; }

:root[data-theme="dark"] .status-done  { color: #74cfa4; }
:root[data-theme="dark"] .status-ready { color: #86bdec; }
:root[data-theme="dark"] .status-full  { color: #e8a878; }
:root[data-theme="dark"] .status-check { color: #e0b46a; }

/* 3. Attention marks */
.mark-amber { color: #7f5310; }
.mark-red   { color: #a0392f; }
:root[data-theme="dark"] .mark-amber { color: #e6bd80; }
:root[data-theme="dark"] .mark-red   { color: #f0978d; }


/* Shared mobile-shell correction: anchor the dock to viewport insets instead
   of combining a 50% offset with a translate that can push it off-canvas. */
@media (max-width: 720px) {
  .mobile-bottom-nav {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    justify-content: space-between !important;
  }
  .mobile-bottom-nav .mobile-nav-item {
    min-width: 0 !important;
    flex: 1 1 0 !important;
  }
}


/* Owner review refinements: channel labels, calendar controls and mobile actions. */
.channel-line {
  grid-template-columns: minmax(0,1fr) auto 45px;
}
.channel-line > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.calendar-toolbar button[aria-label="Previous month"] svg {
  transform: rotate(180deg);
}
.calendar-toolbar .filter-chip {
  flex: 0 0 auto;
  white-space: nowrap;
}
.today-head-actions > .today-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .channel-line {
    grid-template-columns: minmax(0,1fr) auto 38px;
    gap: 6px;
  }
  .channel-line strong {
    white-space: nowrap;
    font-size: 10px;
  }
  .calendar-toolbar {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .calendar-toolbar h2 {
    min-width: 0;
    font-size: 13px;
  }
  .calendar-toolbar .btn,
  .calendar-toolbar .filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .today-head-actions {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 7px;
  }
  .today-head-actions > .today-btn {
    min-width: 0;
    padding-inline: 10px;
    font-size: 11px;
  }
}


/* 25 Nov 2026 · server live check 5319fe
   Keep the Today quick-action bar as a three-track CSS grid on desktop.
   Explicitly reset legacy flex/display declarations at the component boundary. */
@media screen and (min-width: 721px) {
  html body .today-screen .today-quickbar,
  html body #today-quickbar,
  html body .today-quickbar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: auto auto !important;
    grid-auto-flow: row !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html body .today-screen .today-quickbar > div,
  html body #today-quickbar > div,
  html body .today-quickbar > div {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }
  html body .today-screen .today-quickbar > button,
  html body #today-quickbar > button,
  html body .today-quickbar > button {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  html body .today-screen .today-quickbar > button:nth-of-type(1),
  html body #today-quickbar > button:nth-of-type(1),
  html body .today-quickbar > button:nth-of-type(1) { grid-column: 1 !important; grid-row: 2 !important; }
  html body .today-screen .today-quickbar > button:nth-of-type(2),
  html body #today-quickbar > button:nth-of-type(2),
  html body .today-quickbar > button:nth-of-type(2) { grid-column: 2 !important; grid-row: 2 !important; }
  html body .today-screen .today-quickbar > button:nth-of-type(3),
  html body #today-quickbar > button:nth-of-type(3),
  html body .today-quickbar > button:nth-of-type(3) { grid-column: 3 !important; grid-row: 2 !important; }
}
