﻿:root {
  --bg: #050816;
  --panel: rgba(10, 16, 30, 0.92);
  --panel-2: rgba(16, 24, 44, 0.92);
  --surface: rgba(14, 22, 40, 0.94);
  --surface-card: linear-gradient(165deg, rgba(18, 28, 48, 0.96), rgba(10, 16, 30, 0.98));
  --text: #eef6ff;
  --muted: #8ea4c0;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --accent-on: #ffffff;
  --danger: #fb7185;
  --border: rgba(120, 156, 255, 0.16);
  --sidebar-w: 248px;
  --radius: 12px;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.46);
  --shadow-card: 0 14px 32px rgba(0, 0, 0, 0.28);
  --touch-min: 44px;
  --input-bg: #0f1419;
  --window-color: #050816;
  --theme-grid-opacity: 0.45;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

/* Embedded in SUPPIX shell: no nested Enterprise hub (parent sidebar) */
body.admin-v2-embed .nav-group:has(.nav-item-enterprise),
body.admin-v2-embed #tab-enterprise {
  display: none !important;
}

body.admin-v2-embed .sidebar-legacy-link {
  display: none !important;
}

body.admin-v2-embed .app-sidebar {
  width: 220px;
}

body.admin-v2-embed .embed-quick-nav {
  display: none !important;
}

body.embed-mode.admin-v2-embed {
  background: var(--bg);
}

body.embed-mode.admin-v2-embed::before {
  display: none;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

body.theme-black {
  background:
    radial-gradient(circle at 12% 12%, rgba(56, 189, 248, 0.18), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(99, 102, 241, 0.16), transparent 22%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(145deg, var(--bg) 0%, #081124 38%, var(--bg) 100%);
}

body.theme-white {
  background: var(--bg);
}

body.theme-white::before {
  opacity: var(--theme-grid-opacity, 0.08);
}

body.theme-white .panel,
body.theme-white .card,
body.theme-white .login-panel,
body.theme-white .sidebar,
body.theme-white .app-header,
body.theme-white .modal-card,
body.theme-white .join-modal-card {
  box-shadow: var(--shadow);
}

body.theme-white input,
body.theme-white select,
body.theme-white textarea,
body.theme-white .join-link-input {
  background: var(--input-bg, #ffffff);
  color: var(--text);
  border-color: var(--border);
}

body.theme-white button.ghost,
body.theme-white .nav-item,
body.theme-white .contract-item,
body.theme-white .thread-item {
  background: rgba(15, 23, 42, 0.03);
}

body.theme-white .session-boot-view,
body.theme-white .embed-auth-view {
  background: var(--bg);
  color: var(--text);
}

body.theme-black input,
body.theme-black select,
body.theme-black textarea {
  background: var(--input-bg, #0f1419);
  color: var(--text, #eef6ff);
  border-color: var(--border);
}

body.theme-black select option {
  background: #0f1419;
  color: #eef6ff;
}

body.theme-white select option {
  background: #ffffff;
  color: #0f172a;
}

body.theme-black .modal-card,
body.theme-black .join-modal-card {
  color: var(--text);
}

body.theme-black .modal-card .muted,
body.theme-white .modal-card .muted {
  color: var(--muted);
}

body.theme-black .modal-card input,
body.theme-black .modal-card select,
body.theme-black .modal-card textarea,
body.theme-white .modal-card input,
body.theme-white .modal-card select,
body.theme-white .modal-card textarea {
  color: var(--text);
  background: var(--input-bg);
  border-color: var(--border);
}

body.theme-black .topbar-actions select:not([multiple]),
body.theme-black .company-picker select:not([multiple]),
body.theme-black .lang-row-compact select {
  color: var(--text, #eef6ff);
}

body.theme-white .topbar-actions select:not([multiple]),
body.theme-white .company-picker select:not([multiple]),
body.theme-white .lang-row-compact select {
  color: var(--text, #0f172a);
  background: var(--input-bg, #ffffff);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 156, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 156, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.55), transparent 76%);
  opacity: 0.45;
}

/* WCAG: visible keyboard focus (section 6 / 17) */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.tab:focus-visible,
.nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#dashboardView,
main,
.tab-panel,
.stack-panel {
  overflow-x: hidden;
  max-width: 100%;
}

a {
  color: var(--accent-hover);
}

#app {
  min-height: 100dvh;
}

.session-boot-view,
.embed-auth-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 100dvh;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text);
}

.session-boot-view.hidden,
.embed-auth-view.hidden {
  display: none !important;
}

.session-boot-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: admin-v2-spin 0.8s linear infinite;
}

@keyframes admin-v2-spin {
  to {
    transform: rotate(360deg);
  }
}

.embed-auth-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

body.embed-mode.admin-v2-embed .login-panel {
  display: none !important;
}

#app > #dashboardView:not(.hidden) {
  flex: 1;
  min-height: 0;
}

.panel {
  max-width: 420px;
  margin: 4rem auto;
  padding: 2rem;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.login-brand-block {
  display: grid;
  place-items: center;
  gap: 8px;
  margin: -0.25rem 0 1.25rem;
  padding: 16px 14px 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.1), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(6, 182, 212, 0.22);
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.1);
}

.login-brand-logo {
  width: min(100%, 280px);
  max-height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(6, 182, 212, 0.16));
}

.login-brand-product {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-panel label {
  display: block;
  margin-bottom: 1rem;
}

.login-panel span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d131a;
  color: var(--text);
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  background: var(--accent);
  color: var(--accent-on, #fff);
  font-weight: 600;
}

button:hover {
  background: var(--accent-hover);
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.error {
  color: var(--danger);
  margin-top: 0.75rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.topbar h1 {
  margin: 0;
  font-size: 1.25rem;
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.company-picker {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.company-picker select {
  min-width: 180px;
  min-height: 36px;
  padding: 0.45rem 0.55rem;
  font-size: 0.85rem;
  line-height: 1.2;
}

.topbar-actions select:not([multiple]),
.company-picker select:not([multiple]) {
  min-height: 36px;
}

.btn-link {
  background: transparent;
  color: var(--accent-hover);
  padding: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.nfc-input {
  width: 120px;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}

/* Legacy horizontal tabs removed — sidebar + mobile bottom nav */
.tab.nav-item,
.tab.mobile-nav-item {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  font-weight: 500;
}

.tab.nav-item.active,
.tab.mobile-nav-item.active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(34, 168, 212, 0.35);
}

.tab-badge {
  display: inline-block;
  min-width: 1.15rem;
  padding: 0.1rem 0.4rem;
  margin-inline-start: 0.3rem;
  border-radius: 999px;
  background: #fbbf24;
  color: #1a1208;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
  vertical-align: middle;
}

.tab-badge.critical {
  background: var(--danger);
  color: #fff;
  animation: inbox-badge-pulse 1.4s ease-in-out infinite;
}

.tab-badge.badge-pulse-once {
  animation: inbox-badge-pop 0.55s ease-out;
}

@keyframes inbox-badge-pop {
  0% {
    transform: scale(0.85);
  }
  40% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes inbox-badge-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

main {
  padding: 1.5rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--surface-card, var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card-metric:hover,
.card:hover {
  border-color: rgba(56, 189, 248, 0.28);
}

.card-skeleton {
  opacity: 0.72;
}

.sector-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.12);
  color: #d7ebff;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  max-width: 100%;
}

.sector-chip::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #38bdf8;
  margin-inline-end: 0.4rem;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card-metric,
  .nav-item,
  .badge-pulse {
    transition: none !important;
    animation: none !important;
  }
}

.access-today-hint {
  grid-column: 1 / -1;
  margin: 0 0 0.15rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: rgba(148, 163, 184, 0.08);
}

.card.card-quiet {
  opacity: 0.72;
}

.card.card-quiet strong {
  color: var(--muted, #94a3b8);
}

.access-table-caption {
  margin: 0 0 0.5rem;
}

.card strong {
  display: block;
  font-size: 1.75rem;
  margin-top: 0.35rem;
}

.forecast-panel {
  margin-bottom: 1.5rem;
}

.analytics-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.analytics-period-btn.active {
  border-color: var(--accent, #a66a3d);
  color: var(--accent, #a66a3d);
}

.analytics-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.analytics-list {
  margin: 0;
  padding-inline-start: 1.1rem;
  line-height: 1.5;
}

.analytics-trends-panel {
  margin: 1rem 0 1.5rem;
}

.analytics-trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 140px;
  padding-top: 0.5rem;
}

.trend-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  height: 120px;
}

.trend-bar {
  width: 100%;
  max-width: 28px;
  background: linear-gradient(180deg, var(--accent, #a66a3d), rgba(166, 106, 61, 0.45));
  border-radius: 4px 4px 0 0;
  min-height: 6px;
}

.trend-bar-sat {
  background: linear-gradient(180deg, #3b82f6, rgba(59, 130, 246, 0.45));
}

.trend-bar-label {
  font-size: 0.65rem;
  color: var(--muted, #6b7280);
  margin-top: 0.25rem;
  writing-mode: horizontal-tb;
}

.analytics-alerts-panel {
  margin-bottom: 1.5rem;
}

.analytics-alerts-list {
  display: grid;
  gap: 0.5rem;
}

.analytics-alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.analytics-alert-warning {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.08);
}

.analytics-alert-info {
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.06);
}

.survey-invite-panel {
  margin-bottom: 1rem;
}

.survey-invite-card {
  padding: 1rem 1.1rem;
}

.survey-mail-banner {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.survey-mail-ok {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.survey-mail-pending {
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
}

.survey-invite-actions {
  margin: 0.75rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.survey-send-all-btn {
  min-width: 12rem;
}

.survey-send-all-btn[aria-busy="true"] {
  opacity: 0.85;
  cursor: wait;
}

.survey-invite-hint {
  flex: 1 1 14rem;
}

.survey-invite-feedback {
  margin: 0.65rem 0 0.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.survey-invite-feedback.ok {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
}

.survey-invite-feedback.err {
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

button:disabled,
button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.satisfaction-form label {
  display: block;
  margin-bottom: 0.75rem;
}

.satisfaction-form label > span {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.satisfaction-form input,
.satisfaction-form select,
.satisfaction-form textarea {
  width: 100%;
}

.satisfaction-check {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}

.satisfaction-check input {
  width: auto;
}

.satisfaction-roi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .satisfaction-roi-row {
    grid-template-columns: 1fr;
  }
}

.forecast-card {
  border-color: rgba(166, 106, 61, 0.35);
}

.forecast-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.forecast-summary {
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.forecast-stats {
  margin-bottom: 0.75rem;
}

.forecast-stats strong {
  font-size: 1.35rem;
}

.ops-command-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.ops-command-strip a {
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #152535;
  color: #5eead4;
  text-decoration: none;
}

.ops-command-strip a:hover {
  border-color: #5eead4;
}

.ops-strip-kpi {
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #111820;
  color: var(--muted);
}

.ops-strip-kpi strong {
  color: var(--text);
  margin-right: 0.25rem;
}

.lage-panel {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(145deg, #101820 0%, #152535 55%, #0f1a24 100%);
}

.lage-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.lage-panel-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.lage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.lage-kpi {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(17, 24, 32, 0.85);
}

.lage-kpi span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.lage-kpi strong {
  font-size: 1.35rem;
}

.lage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.lage-map-embed {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #0a1220;
  min-height: 260px;
}

.lage-map-embed iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
}

@media (max-width: 720px) {
  .lage-map-embed iframe {
    height: 220px;
  }
}

.lage-actions a,
.lage-actions button {
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #152535;
  color: #5eead4;
  text-decoration: none;
  cursor: pointer;
}

.compliance-autopilot-card {
  margin: 0.75rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #121a22;
}

.compliance-autopilot-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.compliance-autopilot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.ops-strip-tab {
  font-size: 0.82rem !important;
  padding: 0.4rem 0.75rem !important;
}

.inbox-toast {
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.global-toast {
  position: sticky;
  top: 0.5rem;
  z-index: 40;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.global-toast.ok {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.global-toast.err {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.work-times-feedback {
  margin: 0.35rem 0 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.work-times-feedback.ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.work-times-feedback.err {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.inbox-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.inbox-filter-chip {
  font-size: 0.8rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #111820;
  color: var(--muted);
  cursor: pointer;
}

.inbox-filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.inbox-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111820;
}

.inbox-bulk-bar .ghost {
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
}

.inbox-pick {
  margin-inline-end: 0.35rem;
  vertical-align: middle;
}

.inbox-row {
  cursor: pointer;
}
.inbox-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.inbox-detail-panel,
.inbox-ai-panel {
  margin-top: 0.85rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid rgba(120, 156, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.96), rgba(10, 14, 24, 0.98));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}
.inbox-ai-head h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}
.inbox-ai-body {
  color: var(--text);
  line-height: 1.55;
  font-size: 0.9rem;
}
.inbox-ai-body p {
  margin: 0 0 0.7rem;
}
.inbox-ai-body p:last-child {
  margin-bottom: 0.35rem;
}
.inbox-ai-body strong {
  color: #f3f8ff;
}
.inbox-ai-body code {
  font-size: 0.84em;
  background: rgba(125, 211, 252, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
}
.inbox-ai-panel #inboxAiOpenFull {
  margin-top: 0.65rem;
}
.inbox-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.inbox-detail-head h3 {
  margin: 0;
}
.inbox-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.sla-overdue {
  color: #f87171;
  font-weight: 600;
}

.sla-due-soon {
  color: #fbbf24;
}

.copilot-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 720px;
}

.copilot-form textarea {
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}

.copilot-answer {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  white-space: pre-wrap;
  max-height: 50vh;
  overflow: auto;
}

.inbox-toast.ok {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.inbox-toast.err {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.section-title {
  margin: 1.25rem 0 0.75rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.platform-banner {
  margin: 0 1.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, #152535, #1a3040);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.platform-banner strong {
  font-size: 1.1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.feature-card:hover {
  border-color: var(--accent);
}

.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.betrieb-action-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.betrieb-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 132px;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  background: linear-gradient(145deg, rgba(15, 76, 92, 0.42), rgba(20, 28, 40, 0.96));
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.betrieb-action-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.betrieb-action-card strong {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.betrieb-action-card .betrieb-action-icon {
  font-size: 1.45rem;
  line-height: 1;
}

.betrieb-action-card .betrieb-action-cta {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.betrieb-action-card.betrieb-action-locked {
  cursor: not-allowed;
  opacity: 0.72;
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(145deg, rgba(63, 29, 29, 0.35), rgba(20, 28, 40, 0.96));
  box-shadow: none;
}

.betrieb-action-card.betrieb-action-locked .betrieb-action-cta {
  color: #f87171;
}

.stack-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.panel-block h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.integration-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.integration-status-pill.is-ok {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(6, 78, 59, 0.25);
}

.integration-status-pill.is-warn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(120, 53, 15, 0.2);
}

.integration-status-pill.is-off {
  color: var(--muted);
}

.billing-invoices-table {
  margin: 0.65rem 0 0.85rem;
}


.billing-summary-panel .panel-block {
  margin: 0;
}

.billing-summary-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 0.75rem 0;
}

.inbox-empty-state {
  padding: 1.75rem 1rem;
}

.billing-summary-grid .metric {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.billing-summary-grid .metric span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.billing-summary-grid .metric strong {
  font-size: 1.1rem;
}

.billing-tab-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  align-items: start;
  margin-top: 0.75rem;
}

.billing-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.billing-invoices-list .billing-inv-row {
  cursor: pointer;
}

.billing-invoices-list .billing-inv-row.active {
  background: rgba(94, 234, 212, 0.08);
}

.billing-invoice-detail {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: var(--panel, rgba(0, 0, 0, 0.15));
}

.billing-detail-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
}

.billing-detail-dl dt {
  color: var(--muted);
}

.billing-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.billing-create-panel {
  margin-top: 1.25rem;
}

.billing-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .billing-tab-layout {
    grid-template-columns: 1fr;
  }
}

.layer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
}

.layer-pill {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #111820;
  font-size: 0.85rem;
}

/* Mitarbeiter-App (mobile tab) */
.mobile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  background: linear-gradient(145deg, rgba(15, 76, 92, 0.38), rgba(20, 28, 40, 0.98));
  border-color: rgba(94, 234, 212, 0.28);
}

.mobile-hero-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.mobile-hero-logo {
  flex-shrink: 0;
  border-radius: 11px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.mobile-hero-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.mobile-hero-title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.mobile-hero-sub {
  margin: 0;
  max-width: 36rem;
  line-height: 1.45;
}

.mobile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mobile-hero-btn {
  white-space: nowrap;
}

.mobile-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.mobile-channel-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 128px;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  background: rgba(12, 18, 26, 0.92);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

a.mobile-channel-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.mobile-channel-card--pending {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(20, 24, 32, 0.92);
}

.mobile-channel-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.mobile-channel-cta {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.mobile-channel-hint {
  margin-top: auto;
  line-height: 1.35;
}

.mobile-tech-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.mobile-tech-item strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
}

.mobile-legacy-block {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 20, 28, 0.65);
}

.mobile-legacy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
}

.mobile-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.mobile-mode-card {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #111820;
}

.mobile-mode-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.mobile-mode-card strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}

.mobile-mode-card p {
  margin: 0;
  line-height: 1.35;
}

.mobile-footnote {
  margin: 0;
  padding: 0 0.15rem;
}

/* Physical Operations — carousel stays inside panel (page does not move) */
.ops-panel {
  overflow: hidden;
  max-width: 100%;
}

.ops-panel-head {
  margin-bottom: 0.75rem;
}

.ops-carousel-shell {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  direction: ltr;
  isolation: isolate;
}

.ops-carousel-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  max-width: 100%;
}

.ops-carousel-track {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 0.85rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  padding: 0.25rem 0.15rem 0.65rem;
  scrollbar-width: thin;
  scrollbar-color: #3d4f63 transparent;
}

.ops-carousel-track::-webkit-scrollbar {
  height: 6px;
}

.ops-carousel-track::-webkit-scrollbar-thumb {
  background: #3d4f63;
  border-radius: 999px;
}

.ops-carousel-btn {
  flex-shrink: 0;
  align-self: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #1a2430;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ops-carousel-btn:hover {
  background: #243040;
  border-color: #4a6278;
}

.ops-carousel-hint {
  margin: 0.35rem 0 0;
  text-align: center;
}

.ops-layer-card {
  flex: 0 0 min(272px, 82vw);
  scroll-snap-align: start;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #141c26 0%, #0f151c 100%);
  min-height: 148px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.ops-layer-card:hover {
  border-color: #4a6278;
}

.ops-layer-card:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

.ops-layer-more {
  display: block;
  margin-top: 0.5rem;
}

.ops-layer-modal-card {
  max-width: 520px;
  width: min(520px, 94vw);
}

.ops-layer-modal-stat {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.ops-layer-detail-wrap {
  max-height: 50vh;
  overflow: auto;
}

.ops-layer-detail-table td:first-child {
  width: 42%;
  color: var(--muted);
  font-size: 0.82rem;
  vertical-align: top;
  padding: 0.35rem 0.5rem 0.35rem 0;
}

.ops-layer-detail-table td:last-child {
  font-size: 0.88rem;
  padding: 0.35rem 0;
}

.ops-layer-card.ops-tone-warn {
  border-color: #6b5420;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.12);
}

.ops-layer-card.ops-tone-danger {
  border-color: #6b3030;
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.15);
}

.ops-layer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.ops-layer-num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.ops-layer-icon {
  font-size: 1.25rem;
  opacity: 0.9;
}

.ops-layer-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.ops-layer-stat {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #e8eef4;
}

.ops-layer-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.ops-layer-meta li + li {
  margin-top: 0.15rem;
}

.ops-map-frame {
  width: 100%;
  height: 420px;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 0.75rem;
}

.hub-embed-frame {
  width: 100%;
  min-height: 68vh;
  height: calc(100vh - 12rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b1118;
}

body.embed-mode.admin-v2-embed .hub-embed-frame {
  flex: 1;
  min-height: 0;
  height: 100%;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-ok {
  background: #1a4d3a;
  color: #8fe8b8;
}

.badge-warn {
  background: #4d3a1a;
  color: #f0c878;
}

.badge-bad {
  background: #4d1a1a;
  color: #f0a0a0;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
}

.link-row a,
.link-row button.btn-link {
  font-size: 0.9rem;
}

.ops-embed-tab {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  background: var(--panel);
  color: var(--accent);
  cursor: pointer;
}

.ops-embed-tab.active {
  background: var(--accent);
  color: #0b1118;
  border-color: var(--accent);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: right;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
}

h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  overflow: hidden;
}

#deploymentModal.modal {
  touch-action: none;
}

#deploymentModal .deployment-modal-scroll {
  touch-action: pan-y;
}

.modal-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.modal-card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.join-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  background: #fff;
  border-radius: 12px;
}

.join-link-input {
  font-size: 0.75rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tool-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  align-items: end;
}

.tool-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.access-settings-form {
  grid-template-columns: minmax(12rem, 20rem);
  max-width: 40rem;
}

.access-settings-fieldset {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.access-settings-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 600;
}

.access-settings-fieldset .checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.platform-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.platform-plan-actions .feature-card {
  flex: 1 1 220px;
  text-align: start;
  font: inherit;
  color: inherit;
}

.geofence-coords-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  align-items: end;
}

.geofence-coords-row button {
  grid-column: auto;
  white-space: nowrap;
}

.ai-answer {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #0d131a;
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: pre-wrap;
  max-height: 200px;
  overflow: auto;
}

.audit-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
}
.audit-detail-modal-card {
  width: min(720px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: var(--panel, #121820);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.audit-detail-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.audit-detail-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.audit-detail-pre {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: #0d131a;
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 55vh;
  overflow: auto;
  font-size: 0.82rem;
}
.audit-detail-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lang-row-compact {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-inline-end: 0.5rem;
}
.lang-row-compact select {
  min-width: 4rem;
  padding: 0.25rem 0.35rem;
  font-size: 0.85rem;
}
.lang-row {
  margin-bottom: 1rem;
}

#geofenceMap {
  height: 280px;
  min-height: 280px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  background: #0d131a;
  position: relative;
  z-index: 0;
  overflow: hidden;
}

#geofenceMap .leaflet-container {
  height: 100% !important;
  width: 100% !important;
  background: #0d131a;
}

.wizard-form label {
  display: block;
  margin-bottom: 0.75rem;
}

.wizard-form span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.setup-checklist {
  font-size: 0.85rem;
  line-height: 1.6;
}

.setup-checklist .ok { color: #4ade80; }
.setup-checklist .miss { color: #f87171; }

/* —— App shell: sidebar + fast navigation —— */
#dashboardView {
  min-height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#dashboardView .app-shell {
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.app-shell {
  display: flex;
  min-height: 0;
  height: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, #0e151d 0%, #0a1016 100%);
  border-inline-end: 1px solid var(--border);
  padding: 1rem 0.75rem;
  position: relative;
  top: auto;
  align-self: stretch;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.25rem 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(168, 85, 247, 0.35));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(103, 232, 249, 0.25);
}

.sidebar-logo .tenant-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.sidebar-logo .tenant-logo-img:not(.hidden) + .sidebar-brand-mark,
.sidebar-logo .tenant-logo-img:not(.hidden) + [data-tenant-logo-fallback] {
  display: none;
}

.sidebar-brand-mark {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.feature-card[data-legacy-dashboard],
.legacy-dashboard-link {
  cursor: pointer;
  text-decoration: none;
}

.admin-v2 .legacy-dashboard-link.hidden,
.admin-v2 .sidebar-legacy-link.hidden {
  display: none !important;
}

.legacy-dashboard-link:hover {
  text-decoration: underline;
}

.platform-panel-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.platform-panel-grid .panel-block {
  margin: 0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.platform-skel-card {
  min-height: 5.5rem;
}

.platform-skel-card .skel-bar {
  display: block;
  height: 0.7rem;
  margin-top: 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--panel-2), rgba(148, 163, 184, 0.35), var(--panel-2));
  background-size: 200% 100%;
  animation: platform-skel-pulse 1.2s ease-in-out infinite;
}

.platform-skel-card .skel-bar.short {
  width: 55%;
}

@keyframes platform-skel-pulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.quick-links-primary {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 0.75rem;
}

.quick-links-more {
  margin-top: 0.5rem;
}

.quick-links-more summary {
  cursor: pointer;
  font-weight: 600;
}

.quick-links-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 0.75rem;
}

.platform-tech-details {
  margin-top: 0.75rem;
}

.platform-tech-details summary {
  cursor: pointer;
  font-weight: 600;
}

.platform-tech-details .mono {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

.platform-setup-banner {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: var(--panel-2);
}

.platform-setup-banner.ok {
  border-color: rgba(52, 211, 153, 0.35);
}

.platform-setup-banner.warn {
  border-color: rgba(251, 191, 36, 0.35);
}

.admin-superadmin-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.08);
  font-size: 0.92rem;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(94, 234, 212, 0.35) rgba(15, 23, 32, 0.6);
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(15, 23, 32, 0.5);
  border-radius: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(94, 234, 212, 0.35);
  border-radius: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 234, 212, 0.55);
}

.nav-group {
  margin-bottom: 0.5rem;
}

.nav-group-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
  padding: 0.35rem 0.55rem 0.25rem;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: start;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  min-height: var(--touch-min);
  font-size: 0.92rem;
}

.nav-item-enterprise {
  color: #fbbf24 !important;
  font-weight: 700;
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: inherit;
}

.nav-cmd-btn {
  width: 100%;
  font-size: 0.82rem;
  text-align: start;
}

.sidebar-legacy-link {
  font-size: 0.82rem;
  padding: 0.35rem 0.55rem;
  opacity: 0.85;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow: hidden;
}

.topbar-compact {
  padding: 0.85rem 1.25rem;
  flex-shrink: 0;
}

.topbar-compact .page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.topbar-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.cmd-kbd-btn {
  min-width: var(--touch-min);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 1.5rem 5rem;
}

.overview-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0 1.25rem 0.75rem;
  flex-shrink: 0;
}

.quick-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  min-height: var(--touch-min);
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}

.quick-bar-btn:hover {
  border-color: var(--accent-hover);
  background: var(--accent-soft);
}

.quick-bar-icon {
  font-size: 1.1rem;
  line-height: 1;
}

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

.command-palette:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
  pointer-events: auto;
}

.command-palette.hidden {
  display: none !important;
  pointer-events: none;
}

.command-palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.command-palette-panel {
  position: relative;
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem 1rem 0.75rem;
}

.command-palette-title {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.command-palette-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 0.5rem;
}

.command-palette-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 50vh;
  overflow-y: auto;
}

.command-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  text-align: start;
  font-size: 0.95rem;
  min-height: var(--touch-min);
  cursor: pointer;
}

.command-item:hover,
.command-item-active {
  background: var(--accent-soft);
}

.command-palette-hint {
  margin: 0.5rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

html[dir="rtl"] .app-sidebar {
  border-inline-end: none;
  border-inline-start: 1px solid var(--border);
}

@media (max-width: 900px) {
  .app-sidebar {
    display: none;
  }

  .app-content {
    padding-bottom: 5.5rem;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: var(--panel);
    border-top: 1px solid var(--border);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0));
    gap: 0.15rem;
    justify-content: space-around;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  }

  .mobile-nav-item {
    flex: 1;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.2rem;
    font-size: 0.68rem;
    min-height: 52px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
  }

  .openCommandPaletteBtnTop,
  #openCommandPaletteBtnTop {
    display: inline-flex;
  }
}

@media (min-width: 901px) {
  .overview-quick-bar {
    padding-inline: 1.5rem;
  }
}

.autopilot-panel h3 {
  margin: 0 0 0.35rem;
}

.autopilot-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.autopilot-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  min-height: var(--touch-min);
  font-size: 0.92rem;
}

.autopilot-toggle input {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.autopilot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.deployment-toolbar,
.deployment-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

.deployment-bulk-bar input[type="text"] {
  flex: 1 1 140px;
  min-width: 120px;
}

.modal-card.deployment-modal-card {
  display: flex;
  flex-direction: column;
  width: min(920px, 96vw);
  max-width: 96vw;
  height: min(92vh, 880px);
  max-height: min(92vh, 880px);
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.deployment-modal-header {
  flex-shrink: 0;
  padding: 1rem 1.25rem 0.65rem;
  border-bottom: 1px solid var(--border);
}

.deployment-modal-header h2 {
  margin: 0 0 0.25rem;
}

.deployment-modal-worker {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.deployment-quick-details {
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.deployment-quick-details summary {
  cursor: pointer;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
}

.deployment-quick-details summary::-webkit-details-marker {
  display: none;
}

.deployment-quick-details[open] summary {
  border-bottom: 1px solid var(--border);
}

.deployment-quick-details .deployment-bulk-bar {
  margin: 0;
  padding: 0.55rem 0.65rem 0.65rem;
}

.deployment-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 1.25rem 0.75rem;
}

.deployment-scroll-hint {
  margin: 0 0 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.1);
  color: var(--accent);
  font-size: 0.78rem;
}

.deployment-modal-footer {
  flex-shrink: 0;
  margin: 0;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.deployment-modal-footer .primary,
.deployment-modal-footer #deploymentSaveBtn {
  font-weight: 700;
}

.deployment-days-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
  padding: 0.35rem 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.15);
  overflow: visible;
  min-height: auto;
  max-height: none;
  flex: none;
}

.deployment-days-header,
.deployment-day-row {
  display: grid;
  grid-template-columns: 4.25rem minmax(140px, 1.6fr) 5.25rem 5.25rem minmax(90px, 1fr) 2.75rem minmax(9rem, auto);
  gap: 0.4rem;
  align-items: center;
  font-size: 0.85rem;
}

.deployment-days-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.35rem 0.15rem;
  margin-bottom: 0.15rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.deployment-day-row.weekend {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 0.15rem 0.1rem;
}

.deployment-day-row.is-free-day {
  background: rgba(16, 185, 129, 0.12);
  border-radius: 6px;
}

.deployment-day-row[style*="--dep-row-color"] {
  box-shadow: inset 3px 0 0 var(--dep-row-color, transparent);
}

.deployment-day-color {
  width: 2.25rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.deployment-day-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
}

.deployment-day-actions-inline .ghost {
  font-size: 0.72rem;
  padding: 0.25rem 0.45rem;
}

.deployment-day-row input[type="text"],
.deployment-day-row input[type="time"] {
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d131a;
  color: var(--text);
  font-size: 0.82rem;
}

.deployment-day-row input[type="time"] {
  padding: 0.35rem 0.35rem;
}

.deployment-day-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.deployment-weekday {
  display: block;
  font-size: 0.7rem;
  color: var(--accent-hover);
}

.deployment-day-declined {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
}

.deployment-decline-reason {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text, #e2e8f0);
}

.deployment-day-row.worker-declined {
  outline: 1px solid rgba(251, 191, 36, 0.35);
}

.deployment-declines-banner {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

.deployment-declines-banner-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: #92400e;
}

.deployment-declines-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.45;
}

.deployment-decline-clickable {
  cursor: pointer;
  border-radius: 6px;
  padding: 0.2rem 0.35rem;
  margin-left: -0.35rem;
}

.deployment-decline-clickable:hover {
  background: rgba(245, 158, 11, 0.2);
}

.deployment-day-row.deployment-day-highlight {
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.75);
  animation: deployment-day-pulse 1.2s ease 2;
}

@keyframes deployment-day-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.35);
  }
  50% {
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.95);
  }
}

.worker-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.worker-action-btn {
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  font-family: inherit;
}

.worker-action-btn-primary {
  background: linear-gradient(135deg, #06b6d4, #14b8a6);
  color: #fff;
  border-color: transparent;
}

.worker-action-btn-ghost {
  background: transparent;
  color: var(--accent-hover, #5eead4);
}

.join-modal-card {
  max-width: 420px;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(94, 234, 212, 0.25);
}

.join-modal-header {
  padding: 1.1rem 1.25rem 0.65rem;
  background: linear-gradient(160deg, rgba(15, 76, 92, 0.55), transparent);
}

.join-modal-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-hover, #5eead4);
}

.join-modal-worker {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.join-modal-hint {
  padding: 0 1.25rem;
  margin: 0 0 0.65rem;
}

.join-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1.25rem 0.75rem;
}

.join-qr-wrap img {
  border-radius: 12px;
  background: #fff;
  padding: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.join-modal-expires {
  padding: 0 1.25rem;
  margin: 0 0 0.5rem;
}

.join-link-label {
  display: block;
  padding: 0 1.25rem;
  margin-bottom: 0.25rem;
}

.join-link-input {
  margin: 0 1.25rem 1rem;
  width: calc(100% - 2.5rem);
}

.join-modal-actions {
  padding: 0 1.25rem 1.15rem;
  gap: 0.5rem;
}

.deployment-modal-declined-meta {
  margin: 0.35rem 0 0.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.deployment-modal-declined-meta.hidden {
  display: none;
}

.modal-card.deployment-pdf-preview-card {
  width: min(920px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.deployment-pdf-preview-frame {
  width: 100%;
  min-height: 62vh;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.chat-thread-list {
  display: grid;
  gap: 0.6rem;
}

.chat-thread-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem;
}

.chat-message-list {
  display: grid;
  gap: 0.5rem;
  max-height: 320px;
  overflow: auto;
  margin: 0.75rem 0;
}

.chat-message-bubble {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(15, 76, 92, 0.12);
  border: 1px solid rgba(94, 234, 212, 0.16);
}

.chat-message-bubble.admin {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.18);
}

.chat-reply-box {
  display: grid;
  gap: 0.5rem;
}

.chat-reply-box textarea {
  min-height: 96px;
}

@media (max-width: 720px) {
  .deployment-days-header {
    display: none;
  }

  .deployment-day-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "day day"
      "loc loc"
      "start end"
      "notes notes"
      "color actions";
    padding: 0.5rem 0.35rem;
    border-bottom: 1px solid var(--border);
  }

  .deployment-day-meta {
    grid-area: day;
    font-weight: 600;
    color: var(--text);
  }

  .deployment-day-row input[data-dep-field="location"] {
    grid-area: loc;
  }

  .deployment-day-row input[data-dep-field="start"] {
    grid-area: start;
  }

  .deployment-day-row input[data-dep-field="end"] {
    grid-area: end;
  }

  .deployment-day-row input[data-dep-field="notes"] {
    grid-area: notes;
  }

  .deployment-day-row input[data-dep-field="color"] {
    grid-area: color;
    justify-self: start;
  }

  .deployment-day-actions-inline {
    grid-area: actions;
    justify-content: flex-end;
  }
}

.deployment-month-bar {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.deployment-month-bar-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

.deployment-month-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.deployment-status-badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.deployment-status-badge.draft,
.deployment-status-badge.awaiting {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.deployment-status-badge.sent {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.deployment-confirm-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 1rem 0;
  font-size: 0.92rem;
  cursor: pointer;
}

.deployment-confirm-check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
}

body.embed-mode.admin-v2-embed {
  min-height: 100%;
  overflow: hidden;
}

body.embed-mode.admin-v2-embed #dashboardView {
  min-height: 100%;
  height: 100%;
}

body.embed-mode.admin-v2-embed .app-shell {
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}

body.embed-mode.admin-v2-embed .app-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-height: none;
  overflow: hidden;
}

body.embed-mode.admin-v2-embed .app-sidebar {
  display: none;
}

body.embed-mode.admin-v2-embed .mobile-bottom-nav {
  display: none !important;
}

body.embed-mode.admin-v2-embed #companyPickerWrap:not(.hidden) {
  display: flex;
  flex: 1 1 180px;
  min-width: 150px;
  max-width: 240px;
}

body.embed-mode.admin-v2-embed .company-picker select {
  width: 100%;
  min-height: 36px;
  padding: 0.45rem 0.55rem;
  font-size: 0.85rem;
  line-height: 1.2;
}

body.embed-mode.admin-v2-embed .topbar-compact {
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.embed-mode.admin-v2-embed .topbar-compact .topbar-actions {
  align-items: center;
}

body.embed-mode.admin-v2-embed .topbar-actions select,
body.embed-mode.admin-v2-embed .topbar-actions .lang-row-compact select {
  min-height: 36px;
  padding: 0.4rem 0.5rem;
}

body.command-palette-open {
  overflow: hidden;
}

body.embed-mode.admin-v2-embed .app-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.75rem 1rem 1rem;
}

body.embed-mode.admin-v2-embed .topbar-compact {
  flex-shrink: 0;
  padding: 0.45rem 0.75rem;
}

body.embed-mode.admin-v2-embed .topbar-compact .page-title,
body.embed-mode.admin-v2-embed .topbar-compact #userLine {
  display: none;
}

body.embed-mode.admin-v2-embed .topbar-compact .topbar-actions {
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
}

body.embed-mode.admin-v2-embed .topbar-compact .cmd-kbd-btn,
body.embed-mode.admin-v2-embed .topbar-compact #refreshBtn {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
}

body.embed-mode.admin-v2-embed #logoutBtn {
  display: none;
}

body.embed-mode.admin-v2-embed #platformBanner:not(.hidden) {
  flex-shrink: 0;
}

body.embed-mode.admin-v2-embed .command-palette {
  z-index: 2147483000;
}

.embed-quick-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
  overflow-x: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.embed-quick-nav-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.embed-quick-nav-btn.primary {
  border-color: var(--accent-hover);
  background: var(--accent-soft);
  color: var(--accent);
}

.embed-quick-nav-btn:hover {
  border-color: var(--accent-hover);
}

#deploymentMonthBar.deployment-highlight {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
  transition: outline-color 0.2s;
}

body.embed-mode.admin-v2-embed #tab-enterprise.tab-panel:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.app-content:has(#tab-enterprise:not(.hidden)) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-content:has(#tab-enterprise:not(.hidden)) #tab-enterprise > .muted.small {
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

#tab-enterprise.tab-panel:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#tab-enterprise.tab-panel:not(.hidden) .hub-embed-frame {
  flex: 1;
  min-height: 0;
  height: auto;
}
