/* AwoVoice v1.0 Studio Stylesheet */
:root {
  --bg: #070b14;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(56, 189, 248, 0.5);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.25);
  --indigo: #6366f1;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Shell Layout */
.app-shell {
  display: flex;
  flex: 1;
  height: calc(100vh - 46px);
  overflow: hidden;
}

/* Sidebar */
aside.sidebar {
  width: var(--sidebar-w);
  background: #060911;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 16px;
  overflow-y: auto;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.brand-title {
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}
.nav-tab-btn.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.sidebar-history-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 12px 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
}
.history-item {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.15s;
}
.history-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}
.history-item.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}
.history-item .hist-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item .hist-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Main Workspace */
main.workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 32px 48px;
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 55%);
}

.top-bar-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.active-meeting-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-gold {
  background: linear-gradient(135deg, #d97706, #eab308);
  color: #0f172a;
  font-weight: 700;
}
.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.3);
}

/* Tab Panels */
.tab-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
}
.tab-panel.active {
  display: flex;
}

/* Audio Capture / Input Card */
.record-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
}
.record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.05);
}
.mic-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.rec-timer {
  font-size: 32px;
  font-weight: 800;
  font-family: monospace;
  margin: 12px 0 6px;
  color: var(--accent);
}
.rec-pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rose);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 12px var(--rose);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.consent-gate {
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.consent-gate input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Status / Progress Card */
.progress-card {
  padding: 18px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Transcripts view */
.transcript-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
}
.utterance-item {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.15s;
}
.utterance-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.14);
}
.speaker-avatar {
  flex-shrink: 0;
}
.speaker-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.speaker-tag:hover {
  filter: brightness(1.2);
}
.speaker-tag.spk-0 { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.4); }
.speaker-tag.spk-1 { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.4); }
.speaker-tag.spk-2 { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.speaker-tag.spk-3 { background: rgba(245, 158, 11, 0.18); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.4); }
.utterance-body {
  flex: 1;
}
.utterance-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.utterance-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
}
.utterance-text {
  font-size: 14px;
  color: #e2e8f0;
  line-height: 1.6;
}

/* Executive Summary & Decisions */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.section-card h3 {
  margin: 0 0 14px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.decision-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.decision-item {
  padding: 12px 14px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  font-size: 13.5px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.decision-bullet {
  color: #818cf8;
  font-size: 16px;
  line-height: 1;
}

/* Action Items Checklist */
.action-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.15s;
}
.action-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.action-item.done {
  opacity: 0.55;
  text-decoration: line-through;
}
.action-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.action-left input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--emerald);
  cursor: pointer;
}
.action-text {
  font-size: 13.5px;
}
.action-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pill {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.pill-assignee { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; }
.pill-due { background: rgba(255, 255, 255, 0.08); color: #cbd5e1; }
.pill-prio-high { background: rgba(244, 63, 94, 0.15); color: #fda4af; }
.pill-prio-normal { background: rgba(245, 158, 11, 0.15); color: #fde68a; }

/* Missing Info / Risk Cards */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.risk-card {
  padding: 18px;
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
}
.risk-card.high {
  background: rgba(244, 63, 94, 0.05);
  border-color: rgba(244, 63, 94, 0.25);
}
.risk-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
}
.risk-card.high .risk-card-head {
  color: #fda4af;
}
.risk-card p {
  margin: 0;
  font-size: 13px;
  color: #cbd5e1;
}

/* Bridges (AwoQuote & AwoBom) */
.bridge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}
.bridge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bridge-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}
.bridge-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bridge-head .icon {
  font-size: 32px;
}
.bridge-head h4 {
  margin: 0;
  font-size: 18px;
}
.bridge-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.bridge-preview-table th, .bridge-preview-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.bridge-preview-table th {
  color: var(--text-muted);
  font-weight: 600;
}

/* Modals */
dialog.awo-modal {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: #fff;
  padding: 24px;
  max-width: 520px;
  width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75);
}
dialog.awo-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.modal-title {
  margin: 0 0 16px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.modal-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
}
.modal-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13.5px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Print View Styles (A4 Meeting Minutes) */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
  }
  .app-shell {
    height: auto !important;
    overflow: visible !important;
  }
  aside.sidebar, .top-portal-bar, .top-bar-actions, .nav-tabs, .btn, .consent-gate, .record-card, .toast-msg, dialog {
    display: none !important;
  }
  main.workspace {
    padding: 0 !important;
    background: none !important;
    overflow: visible !important;
  }
  .tab-panel {
    display: block !important;
    page-break-after: auto;
  }
  .print-header {
    display: block !important;
    border-bottom: 2px solid #000;
    padding-bottom: 12px;
    margin-bottom: 20px;
  }
  .section-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
    page-break-inside: avoid;
    margin-bottom: 16px;
  }
  .decision-item {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #000 !important;
  }
  .action-item {
    border-color: #e2e8f0 !important;
    background: #fff !important;
    color: #000 !important;
  }
  .utterance-item {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    color: #000 !important;
  }
  .speaker-tag {
    background: #eee !important;
    color: #000 !important;
    border: 1px solid #999 !important;
  }
}
