:root {
  --primary: #005696;
  --primary-dark: #003d6b;
  --secondary: #f26522;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-logo {
  font-size: 2rem;
  background: #e0f2fe;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.brand-title span {
  color: var(--secondary);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #065f46;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-btn {
  text-decoration: none;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: var(--primary-dark);
}

.nav-btn.secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.nav-btn.secondary:hover {
  background: #e2e8f0;
}

/* Disclaimer Banner */
.disclaimer-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fef3c7;
  padding: 12px 0;
  font-size: 0.85rem;
  color: #92400e;
}

.disclaimer-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.warning-icon {
  font-size: 1.2rem;
}

/* Main Content */
.main-content {
  padding: 30px 20px;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.kpi-card.highlight {
  border-color: #38bdf8;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.kpi-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 6px 0;
  font-family: 'JetBrains Mono', monospace;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tabs */
.tab-container {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 2px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
  position: relative;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.tab-pane {
  display: none;
}

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

/* Cards & Layout */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.card-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.badge {
  background: #f1f5f9;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-wrapper {
  height: 280px;
  position: relative;
}

.mt-20 {
  margin-top: 20px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

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

.data-table th {
  text-align: left;
  padding: 12px;
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

/* Embed Box */
.embed-box {
  width: 100%;
  min-height: 1600px;
  height: 1600px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: visible;
  background: #ffffff;
  position: relative;
}

.embed-box iframe,
#dashboard-embed-container iframe {
  width: 100% !important;
  height: 1600px !important;
  min-height: 1600px !important;
  border: none !important;
  display: block !important;
}

.embed-card.fullscreen-mode {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  border-radius: 0;
  margin: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.embed-card.fullscreen-mode .embed-box {
  flex: 1;
  height: calc(100vh - 80px);
  min-height: unset;
}

.embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px auto;
}

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

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.text-center { text-align: center; }

.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

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

/* Architecture Grid */
.architecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.arch-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.arch-box h4 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.arch-box ul {
  padding-left: 18px;
  font-size: 0.85rem;
  color: #334155;
}

.arch-box li {
  margin-bottom: 8px;
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  margin-top: 40px;
  font-size: 0.85rem;
}

.footer-sub {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 6px;
}
