/* DomeSense Pitch Deck Platform - Theme & Design System */
:root {
  --bg-black: #000000;
  --bg-card: #0c0e14;
  --bg-card-hover: #131722;
  --bg-panel: #11141c;
  --bg-input: #07080c;
  
  --lego-blue: #0055BF;
  --lego-blue-hover: #004399;
  --lego-blue-glow: rgba(0, 85, 191, 0.4);
  --lego-blue-subtle: rgba(0, 85, 191, 0.12);
  --cyan-accent: #38bdf8;
  
  --text-white: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-subtle: #1e293b;
  --border-active: #0055BF;
  --border-glass: rgba(255, 255, 255, 0.08);
  
  --status-active: #10b981;
  --status-active-bg: rgba(16, 185, 129, 0.12);
  --status-inactive: #64748b;
  --status-inactive-bg: rgba(100, 116, 139, 0.15);
  --status-locked: #ef4444;
  --status-locked-bg: rgba(239, 68, 68, 0.15);
  
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-glow: 0 0 25px rgba(0, 85, 191, 0.25);
}

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

body {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
.app-header {
  height: 56px;
  background-color: rgba(7, 8, 12, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #0055BF, #38bdf8);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--lego-blue-glow);
}

.brand-icon svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.brand-title span {
  color: var(--cyan-accent);
  font-weight: 500;
  margin-left: 4px;
}

.badge-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--lego-blue-subtle);
  color: var(--cyan-accent);
  border: 1px solid rgba(0, 85, 191, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Layout Containers */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container-full, .admin-layout {
  max-width: 100% !important;
  padding: 20px 32px !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--lego-blue);
  color: var(--text-white);
  box-shadow: 0 2px 10px rgba(0, 85, 191, 0.35);
}

.btn-primary:hover {
  background-color: var(--lego-blue-hover);
  box-shadow: 0 4px 18px rgba(0, 85, 191, 0.55);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #1e2430;
  color: var(--text-white);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: #272f40;
  border-color: var(--text-dim);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-white);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--lego-blue);
  color: var(--cyan-accent);
}

.btn-danger {
  background-color: transparent;
  color: #94a3b8;
  border-color: var(--border-subtle);
}

.btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-icon-delete {
  background: transparent;
  color: #94a3b8;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Cards & Panels */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--lego-blue);
  box-shadow: 0 0 0 3px rgba(0, 85, 191, 0.25);
}

.form-select {
  padding: 6px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--lego-blue);
}

/* 2FA 5-Digit Code Input Box */
.code-input-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.code-digit-input {
  width: 52px;
  height: 64px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--cyan-accent);
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.code-digit-input:focus {
  outline: none;
  border-color: var(--lego-blue);
  box-shadow: 0 0 16px var(--lego-blue-glow);
  background: #001124;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-active {
  background-color: var(--status-active-bg);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.status-active::before { background-color: #34d399; box-shadow: 0 0 6px #34d399; }

.status-inactive {
  background-color: var(--status-inactive-bg);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.status-inactive::before { background-color: #94a3b8; }

.status-locked {
  background-color: var(--status-locked-bg);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}
.status-locked::before { background-color: #f87171; box-shadow: 0 0 6px #f87171; }

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.custom-table th {
  background-color: #07090e;
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.76rem;
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-white);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background-color: var(--bg-card-hover);
}

/* Modals & Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #0d0f17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 85, 191, 0.15);
  overflow: hidden;
  transform: scale(0.95);
  transition: all 0.2s ease;
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090a10;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #090a10;
}

/* Pitch Deck Presentation Viewer */
.deck-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  gap: 0;
  flex: 1;
}

.presentation-stage {
  width: 100%;
  max-width: 1320px;
  height: calc(100vh - 84px);
  max-height: calc((100vw - 48px) * 9 / 16);
  aspect-ratio: 16 / 9;
  background-color: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 85, 191, 0.12);
}

.slide-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.custom-slide {
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
  background: radial-gradient(circle at top right, #0a1628 0%, #000000 70%);
  position: relative;
}

.custom-slide.active {
  display: flex;
  animation: fadeIn 0.25s ease-in-out;
}

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

.slide-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-card);
  padding: 14px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.slide-indicator {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-indicator span {
  color: var(--cyan-accent);
}

.progress-bar-container {
  flex: 1;
  max-width: 360px;
  height: 6px;
  background: #1e2430;
  border-radius: 9999px;
  margin: 0 24px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0055BF, #38bdf8);
  border-radius: 9999px;
  transition: width 0.25s ease;
}

/* Floating Simulated Inbox Drawer */
.dev-drawer-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: #0055BF;
  color: white;
  border: 1px solid #38bdf8;
  border-radius: 9999px;
  padding: 10px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 85, 191, 0.6);
  transition: all 0.2s ease;
}

.dev-drawer-toggle:hover {
  background: #004399;
  transform: translateY(-2px);
}

.inbox-badge {
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 9999px;
  font-weight: 800;
}

/* Analytics Chart / Visualizer */
.analytics-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: #08090f;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.metric-card .value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cyan-accent);
  margin-top: 4px;
}

.metric-card .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.slide-chart-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.slide-chart-bar .label {
  width: 90px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.slide-chart-bar .bar-bg {
  flex: 1;
  height: 24px;
  background: #141722;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.slide-chart-bar .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0055BF, #38bdf8);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.slide-chart-bar .time-text {
  width: 80px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-white);
  font-family: var(--font-mono);
}

/* Alert Boxes */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-info {
  background: var(--lego-blue-subtle);
  border: 1px solid rgba(0, 85, 191, 0.3);
  color: #7dd3fc;
}

/* Portal Gateway Card */
.gateway-hero {
  text-align: center;
  max-width: 640px;
  margin: 40px auto 0;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.gateway-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gateway-card:hover {
  border-color: var(--lego-blue);
  box-shadow: 0 8px 30px rgba(0, 85, 191, 0.2);
  transform: translateY(-2px);
}
