/* AlpenDesk — Swiss KMU Front-Desk OS Design System */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-hover: rgba(255, 255, 255, 0.04);

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-sub: #6b7280;

  --swiss-red: #da291c;
  --swiss-red-glow: rgba(218, 41, 28, 0.25);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --blue: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.25);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-card-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.swiss-flag {
  font-size: 28px;
  line-height: 1;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--swiss-red);
  color: white;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.practice-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13px;
}

.practice-name {
  font-weight: 700;
  color: #fff;
}

.doctor-name {
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--amber);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.sovereignty-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.aios-return-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bg-card-border);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.aios-return-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Nav Bar */
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--bg-card-border);
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: #fff;
  background: var(--bg-hover);
}

.nav-tab.active {
  color: #fff;
  border-bottom-color: var(--swiss-red);
}

.tab-badge.pulse {
  background: var(--swiss-red);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 9999px;
}

.tab-counter {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 9999px;
  font-size: 11px;
}

.system-telemetry {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-sub);
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.telemetry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

/* KPI Banner */
.kpi-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 28px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.kpi-card.highlight-emerald {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(17, 24, 39, 0.85));
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.kpi-growth {
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.kpi-status-badge {
  font-size: 11px;
  font-weight: 700;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}

.kpi-subtag {
  font-size: 11px;
  color: var(--text-sub);
}

.kpi-num {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-hint {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* Main Content & Tabs */
.main-content {
  flex: 1;
  padding: 0 28px 40px;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

/* Simulator View */
.simulator-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.console-panel, .operations-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.console-panel {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  padding: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bg-card-border);
}

.panel-title-group {
  display: flex;
  gap: 12px;
}

.panel-icon {
  font-size: 24px;
}

.panel-title-group h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.panel-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.call-status-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.call-status-pill.live {
  background: var(--swiss-red);
  color: #fff;
  animation: pulse-ring 1.5s infinite;
}

/* Scenarios */
.deck-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 10px;
}

.deck-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sub);
}

.canton-pill {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.scenario-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.scenario-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.scenario-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.scenario-card.active {
  background: rgba(218, 41, 28, 0.08);
  border-color: var(--swiss-red);
}

.scenario-badge {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.scenario-badge.urgent { color: #f87171; }
.scenario-badge.booking { color: #60a5fa; }
.scenario-badge.mandate { color: #fbbf24; }
.scenario-badge.prescription { color: #34d399; }

.scenario-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scenario-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.rev-tag {
  color: var(--emerald);
  font-weight: 700;
}

/* Custom Caller Accordion */
.custom-caller-accordion {
  margin-top: 12px;
}

.accordion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--bg-card-border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.custom-caller-form {
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.custom-caller-form input,
.custom-caller-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  border-radius: 6px;
  padding: 8px 10px;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
}

.custom-run-btn {
  background: var(--swiss-red);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Call Actions */
.call-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
}

.btn-call {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-call.start {
  background: var(--emerald);
  color: #064e3b;
  box-shadow: 0 4px 14px var(--emerald-glow);
}

.btn-call.start:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-call.end {
  background: var(--swiss-red);
  color: white;
  box-shadow: 0 4px 14px var(--swiss-red-glow);
}

.btn-audio-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.live-call-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  font-size: 13px;
}

.call-timer {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Equalizer */
.equalizer-wrapper {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.equalizer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
}

.eq-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.eq-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald);
  border-radius: 50%;
}

.dialect-badge {
  color: #93c5fd;
  font-weight: 600;
}

.eq-bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
}

.eq-bar {
  flex: 1;
  background: var(--emerald);
  border-radius: 2px;
  height: 4px;
  transition: height 0.15s ease;
}

.equalizer-wrapper.active .eq-bar {
  animation: eq-bounce 0.8s infinite ease-in-out alternate;
}

@keyframes eq-bounce {
  0% { height: 4px; opacity: 0.4; }
  100% { height: 32px; opacity: 1; background: var(--emerald); }
}

/* Dialogue Console */
.dialogue-console {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 16px;
  min-height: 280px;
}

.console-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-sub);
}

.compliance-tag {
  color: var(--emerald);
  font-size: 11px;
}

.dialogue-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-sub);
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.dialogue-bubble {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  animation: fade-in-up 0.25s ease-out;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dialogue-bubble.caller {
  align-self: flex-start;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #bfdbfe;
}

.dialogue-bubble.ai {
  align-self: flex-end;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.bubble-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
  font-weight: 700;
}

.bubble-lang-tag {
  font-size: 10px;
  opacity: 0.8;
  font-family: var(--font-mono);
}

/* Operations Panel Cards */
.op-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 18px;
  backdrop-filter: blur(8px);
}

.op-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-card-border);
}

.op-card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex: 1;
  margin-left: 8px;
}

.triage-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.triage-badge-large {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
}

.triage-badge-large.urgent {
  background: rgba(218, 41, 28, 0.2);
  border: 1px solid var(--swiss-red);
  color: #fca5a5;
}

.triage-reason {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.triage-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.check-icon {
  color: var(--emerald);
  font-weight: 700;
  margin-right: 4px;
}

/* Calendar Card */
.sync-verified-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald);
}

.calendar-booking-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.booking-field {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.booking-field.highlight-slot {
  background: rgba(16, 185, 129, 0.08);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.slot-val {
  color: var(--emerald);
  font-weight: 700;
}

.b-label {
  color: var(--text-sub);
}

.b-val {
  color: #fff;
  text-align: right;
}

/* Swiss Phone Mockup */
.sms-status-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald);
}

.swiss-phone-screen {
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 16px;
  padding: 14px;
  position: relative;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.phone-notch {
  width: 50px;
  height: 4px;
  background: #334155;
  border-radius: 9999px;
  margin: 0 auto 10px;
}

.phone-recipient {
  font-size: 11px;
  color: var(--text-sub);
  text-align: center;
  margin-bottom: 10px;
}

.sms-bubble {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.45;
  position: relative;
}

.bubble-time {
  display: block;
  font-size: 10px;
  color: var(--text-sub);
  text-align: right;
  margin-top: 6px;
}

/* ROI Card */
.roi-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roi-data {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.roi-label {
  font-size: 12px;
  color: var(--text-muted);
}

.roi-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--emerald);
}

.roi-desc {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.4;
}

/* VIEW 2: LOGS TABLE */
.logs-header-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  padding: 8px 14px;
  flex: 1;
  min-width: 280px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
}

.log-filter-pills {
  display: flex;
  gap: 6px;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.filter-pill.active {
  background: var(--swiss-red);
  color: white;
  border-color: var(--swiss-red);
}

.btn-export-audit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bg-card-border);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  overflow-x: auto;
}

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

.data-table th {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid var(--bg-card-border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-action-btn {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* VIEW 3: CALENDAR */
.calendar-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.current-date-badge {
  background: var(--swiss-red);
  color: white;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
}

.cal-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-box.lunch { background: rgba(245, 158, 11, 0.3); border: 1px solid var(--amber); }
.legend-box.urgent { background: rgba(218, 41, 28, 0.3); border: 1px solid var(--swiss-red); }
.legend-box.normal { background: rgba(255, 255, 255, 0.1); }

.calendar-grid {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  overflow: hidden;
}

.cal-col {
  border-right: 1px solid var(--bg-card-border);
}

.cal-col:last-child {
  border-right: none;
}

.cal-head {
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--bg-card-border);
  font-size: 13px;
  display: flex;
  flex-direction: column;
}

.cal-head small {
  color: var(--text-sub);
  font-size: 11px;
}

.cal-cell {
  height: 52px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
  display: flex;
  align-items: center;
}

.cal-col.time-col .cal-cell {
  font-family: var(--font-mono);
  color: var(--text-sub);
  justify-content: center;
}

.cal-cell.lunch-marker {
  color: var(--amber);
  font-weight: 700;
}

.cal-cell.active-now {
  background: rgba(218, 41, 28, 0.15);
  color: #fca5a5;
  font-weight: 800;
}

.slot {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.slot.booked {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #60a5fa;
  color: #e2e8f0;
}

.slot.urgent-booked {
  background: rgba(218, 41, 28, 0.2);
  border: 1px solid var(--swiss-red);
  border-left: 4px solid var(--swiss-red);
  color: #fee2e2;
  font-weight: 700;
}

.slot.free {
  border: 1px dashed var(--bg-card-border);
  color: var(--text-sub);
}

.lunch-block {
  background: rgba(245, 158, 11, 0.06);
  border-left: 2px dashed rgba(245, 158, 11, 0.4);
}

.lunch-label {
  color: #fde68a;
  font-weight: 600;
  font-size: 11px;
}

/* VIEW 4: SETTINGS */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 24px;
}

.settings-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.settings-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.setting-item {
  margin-bottom: 20px;
}

.setting-item label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 8px;
}

.form-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.time-setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-card-border);
}

.time-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  border-radius: 6px;
  padding: 6px 10px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
}

.toggle-setting {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #374151;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider { background-color: var(--emerald); }
input:checked + .slider:before { transform: translateX(20px); }

.action-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.btn-save-settings {
  background: var(--swiss-red);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.save-status {
  font-size: 12px;
  color: var(--emerald);
  display: none;
}

/* VIEW 5: COMPLIANCE */
.compliance-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.compliance-badge-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(218, 41, 28, 0.15), rgba(17, 24, 39, 0.9));
  border: 1px solid rgba(218, 41, 28, 0.3);
  border-radius: 16px;
  padding: 24px;
}

.cert-crest {
  font-size: 48px;
}

.cert-info h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.cert-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.cert-status {
  margin-left: auto;
  text-align: right;
}

.cert-verified {
  display: inline-block;
  background: var(--emerald);
  color: #064e3b;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 4px;
}

.cert-status small {
  display: block;
  font-size: 11px;
  color: var(--text-sub);
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.audit-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.audit-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.audit-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.audit-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.audit-tag.passed {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.audit-footer {
  text-align: center;
}

.btn-download-cert {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bg-card-border);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-download-cert:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Modal Drawer */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 20px;
}

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--bg-card-border);
}

.modal-title-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.modal-icon { font-size: 24px; }
.modal-title-group h3 { font-size: 16px; font-weight: 700; color: #fff; }
.modal-meta { font-size: 12px; color: var(--text-muted); }

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

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

.audio-player-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-play-pause {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--emerald);
  border: none;
  color: #064e3b;
  font-weight: 800;
  cursor: pointer;
}

.player-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.waveform-scrub {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.waveform-progress {
  height: 100%;
  background: var(--emerald);
}

.btn-speed {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.modal-details-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.transcript-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.notes-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  margin-top: 10px;
}

.tag-red { color: #f87171; font-weight: 700; }
.tag-green { color: #34d399; font-weight: 700; }

.btn-sync-pms {
  width: 100%;
  background: var(--blue);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .kpi-banner { grid-template-columns: repeat(2, 1fr); }
  .simulator-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .compliance-grid { grid-template-columns: 1fr; }
  .calendar-grid { grid-template-columns: 60px 1fr; }
}

@media (max-width: 640px) {
  .app-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .main-nav { overflow-x: auto; }
  .kpi-banner { grid-template-columns: 1fr; }
  .scenario-list { grid-template-columns: 1fr; }
}
