@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design tokens ──────────────────────────────────────────────────────── */

:root {
  /* Background scale — neutral charcoal */
  --bg-base:     #0c0c0c;
  --bg-surface:  #141414;
  --bg-elevated: #1c1c1c;
  --bg-hover:    #252525;

  /* Text — neutral */
  --text-primary:   #ebebeb;
  --text-secondary: #888888;
  --text-muted:     #484848;
  --text-inverted:  #0c0c0c;

  /* Accent — cornflower blue */
  --accent:          #5b9cf6;
  --accent-hover:    #7ab2ff;
  --accent-dim:      rgba(91, 156, 246, 0.1);
  --accent-border:   rgba(91, 156, 246, 0.22);
  --accent-glow:     rgba(91, 156, 246, 0.14);

  /* Violet — indigo complement */
  --violet:          #8b7cf8;
  --violet-dim:      rgba(139, 124, 248, 0.1);

  /* Status */
  --green:           #52d4a4;
  --green-dim:       rgba(82, 212, 164, 0.1);
  --yellow:          #f6c90e;
  --yellow-dim:      rgba(246, 201, 14, 0.1);
  --red:             #e05a6a;
  --red-dim:         rgba(224, 90, 106, 0.1);

  /* Border — blue tint */
  --border:          rgba(91, 156, 246, 0.09);
  --border-bright:   rgba(91, 156, 246, 0.18);

  /* Shadows — flat, none on surfaces */
  --shadow-sm:   none;
  --shadow-md:   none;
  --shadow-lg:   none;
  --shadow-glow: 0 0 24px rgba(91, 156, 246, 0.22);

  /* Fonts */
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Spacing */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  font: 17px/1.6 var(--sans);
  color: var(--text-secondary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; }

#root { min-height: 100svh; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

code, pre {
  font-family: var(--mono);
  font-size: 0.875em;
}

code {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Animations ─────────────────────────────────────────────────────────── */

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

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

@keyframes shimmer {
  from { background-position: -400px 0; }
  to   { background-position:  400px 0; }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes borderPulse {
  0%, 100% { border-color: rgba(91, 156, 246, 0.18); }
  50%       { border-color: rgba(91, 156, 246, 0.5); }
}

@keyframes scanline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* ── Spinner ────────────────────────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-bright);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm { width: 12px; height: 12px; border-width: 1.5px; }

.spinner-lg { width: 24px; height: 24px; border-width: 3px; }

/* ── Skeleton ───────────────────────────────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  text-decoration: none;
  font-family: var(--sans);
  white-space: nowrap;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: var(--text-inverted);
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 0 20px rgba(91,156,246,0.25); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-bright);
}

.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-bright); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) { background: var(--bg-elevated); color: var(--text-primary); }

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: rgba(252,129,129,0.25);
}

.btn-danger:hover:not(:disabled) { background: var(--red-dim); }

.btn-sm { padding: 5px 12px; font-size: 13px; }

.btn-lg { padding: 12px 24px; font-size: 16px; font-weight: 600; }

.btn-xl { padding: 14px 32px; font-size: 17px; font-weight: 700; }

/* ── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

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

.card-body { padding: 20px; }

.card-glass {
  background: rgba(14, 20, 32, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
}

/* ── Badges ─────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-running   { background: var(--green-dim);  color: var(--green); }

.badge-error     { background: var(--red-dim);    color: var(--red); }

.badge-provisioning { background: var(--yellow-dim); color: var(--yellow); animation: glowPulse 2s ease-in-out infinite; }

.badge-pending   { background: var(--bg-elevated); color: var(--text-muted); }

.badge-deleting  { background: var(--red-dim);    color: var(--red); }

.badge-accent    { background: var(--accent-dim); color: var(--accent); }

/* ── Forms ──────────────────────────────────────────────────────────────── */

.form-grid { display: grid; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

label { font-size: 13px; font-weight: 500; color: var(--text-primary); }

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  padding: 9px 13px;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--sans);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: none;
  outline: 2px solid var(--accent-dim);
  outline-offset: 0;
}

select option { background: var(--bg-elevated); }

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

.form-actions { display: flex; gap: 10px; padding-top: 8px; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid;
}

.alert-error   { background: var(--red-dim);    color: var(--red);    border-color: rgba(252,129,129,0.2); }

.alert-success { background: var(--green-dim);  color: var(--green);  border-color: rgba(72,187,120,0.2); }

.alert-info    { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-border); }

/* ── Tables ─────────────────────────────────────────────────────────────── */

.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

thead { background: var(--bg-elevated); }

th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: rgba(255,255,255,0.02); }

.td-mono  { font-family: var(--mono); font-size: 13px; color: var(--accent); }

.td-muted { color: var(--text-secondary); }

/* ── Tabs ───────────────────────────────────────────────────────────────── */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }

.tab {
  padding: 10px 16px;
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: var(--sans);
  transition: color 0.15s;
}

.tab:hover { color: var(--text-primary); }

.tab-active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Modal ──────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: 0;
  padding: 28px;
  width: 100%; max-width: 480px;
  animation: slideUp 0.2s ease;
}

.modal-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0 0 20px; }

.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ── Usage / stat cards ─────────────────────────────────────────────────── */

.usage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }

.usage-card { padding: 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); }

.usage-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }

.usage-value { font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px; }

.usage-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ── Section header ─────────────────────────────────────────────────────── */

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

.section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0; }

/* ── Loading / empty ────────────────────────────────────────────────────── */

.loading {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 64px;
  color: var(--text-secondary); font-size: 14px;
}

.error-msg {
  padding: 14px 16px;
  background: var(--red-dim);
  border: 1px solid rgba(252,129,129,0.2);
  border-radius: var(--radius-sm);
  color: var(--red); font-size: 14px;
}

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 24px; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--radius-md); gap: 12px;
}

.empty-state-title { font-size: 16px; font-weight: 500; color: var(--text-primary); margin: 0; }

.empty-state p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* ── Secret box ─────────────────────────────────────────────────────────── */

.secret-box {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 13px; color: var(--accent);
  word-break: break-all; margin-top: 12px;
}

.secret-notice { font-size: 13px; color: var(--yellow); margin-top: 8px; }
/* ── App shell ─────────────────────────────────────────────────────────── */
.app { display: flex; flex-direction: column; min-height: 100svh; }

/* ── Dashboard layout ──────────────────────────────────────────────────── */
.dashboard-shell {
  display: flex;
  min-height: 100svh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 20;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-logo-icon {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--text-inverted);
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 8px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--sans);
  width: 100%;
  transition: color 0.15s, background 0.15s;
}

.nav-item:hover { color: var(--text-primary); background: var(--bg-elevated); }
.nav-item-active { color: var(--accent); background: transparent; border-left: 2px solid var(--accent); padding-left: 8px; }
.nav-item-active:hover { background: var(--accent-dim); }

.nav-icon { font-size: 15px; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.topbar-breadcrumb-sep { color: var(--text-muted); }
.topbar-breadcrumb-current { color: var(--text-primary); font-weight: 500; }

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

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  background: none;
  border: none;
  font-family: var(--sans);
  transition: color 0.15s, background 0.15s;
}
.user-menu:hover { color: var(--text-primary); background: var(--bg-elevated); }

.user-avatar {
  width: 28px; height: 28px;
  border-radius: 0;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-inverted);
  flex-shrink: 0;
}

/* ── Dashboard content ──────────────────────────────────────────────────── */
.dashboard-content {
  margin-left: 220px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.dashboard-main {
  flex: 1;
  padding: 28px 32px;
  max-width: 1200px;
  width: 100%;
}

/* ── Page header ────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.4px;
}

.page-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 3px; }

/* ── Stat cards ─────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px;
  border-left: 2px solid var(--border);
  transition: border-color 0.15s;
}
.stat-card:hover { border-left-color: var(--accent); }

.stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.8px; }
.stat-sub { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.stat-trend-up   { color: var(--green); }
.stat-trend-down { color: var(--red); }

/* ── Service cards ──────────────────────────────────────────────────────── */
.service-grid { display: grid; gap: 10px; }

.service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0;
  border-left: 2px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.service-card:hover {
  border-left-color: var(--accent);
  background: var(--bg-elevated);
}

.service-card-left { display: flex; flex-direction: column; gap: 4px; }
.service-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.service-meta { font-size: 13px; color: var(--text-secondary); display: flex; gap: 12px; flex-wrap: wrap; }
.service-meta-dot::before { content: '·'; margin-right: 4px; color: var(--text-muted); }
.service-card-right { display: flex; align-items: center; gap: 12px; }

/* ── Service detail ─────────────────────────────────────────────────────── */
.service-header {
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0;
  border-top: 2px solid var(--accent);
  margin-bottom: 24px;
}
.service-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.service-header-title { display: flex; align-items: center; gap: 10px; }
.service-header h1 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 0; letter-spacing: -0.3px; }
.service-attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.service-attr { display: flex; flex-direction: column; gap: 2px; }
.service-attr-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.service-attr-value { font-size: 14px; color: var(--text-primary); font-weight: 500; word-break: break-all; }

/* ── Breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border-bright); }

/* ── Progress bar ───────────────────────────────────────────────────────── */
.progress-bar { height: 4px; background: var(--bg-elevated); border-radius: 0; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 0;
  transition: width 0.4s ease;
}
.progress-fill-warn { background: var(--yellow); }

/* ── Provisioning stepper ───────────────────────────────────────────────── */
.stepper { display: flex; gap: 0; margin: 16px 0; overflow: hidden; }
.step-item { display: flex; align-items: center; gap: 8px; flex: 1; padding: 10px 12px; position: relative; }
.step-item:not(:last-child)::after {
  content: '→';
  position: absolute; right: -2px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 12px; z-index: 1;
}
.step-dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.step-dot-done { background: var(--green-dim); color: var(--green); border: 1px solid rgba(72,187,120,0.3); }
.step-dot-active { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border); animation: glowPulse 1.5s ease-in-out infinite; }
.step-dot-pending { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.step-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.step-label-active { color: var(--text-primary); }

/* ── Wizard ─────────────────────────────────────────────────────────────── */
.wizard-steps {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.wizard-step { display: flex; align-items: center; gap: 8px; padding: 0 16px 0 0; }
.wizard-step:first-child { padding-left: 0; }
.wizard-step-num {
  width: 26px; height: 26px; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  font-family: var(--mono);
}
.wizard-step-active .wizard-step-num { background: var(--accent); color: var(--text-inverted); }
.wizard-step-done .wizard-step-num { background: var(--green-dim); color: var(--green); border: 1px solid rgba(72,187,120,0.3); }
.wizard-step-pending .wizard-step-num { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.wizard-step-label { font-size: 14px; font-weight: 500; }
.wizard-step-active .wizard-step-label { color: var(--text-primary); }
.wizard-step-pending .wizard-step-label { color: var(--text-muted); }
.wizard-step-connector { flex: 1; height: 1px; background: var(--border); margin: 0 12px; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.plan-card {
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.15s;
}
.plan-card:hover { border-top-color: var(--border-bright); }
.plan-card-selected { border-top-color: var(--accent); background: var(--bg-elevated); }
.plan-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.plan-price { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; }
.plan-price-unit { font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.plan-desc { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }
.plan-features { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 5px; }
.plan-features li { font-size: 13px; color: var(--text-secondary); display: flex; gap: 6px; }
.plan-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ── Landing Page ───────────────────────────────────────────────────────── */
.landing {
  background: var(--bg-base);
  color: var(--text-secondary);
  position: relative;
}

/* Global page ambient — two large drifting blue glows behind all sections */
.landing::before {
  content: '';
  position: fixed;
  top: 30vh;
  left: -20vw;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(91,156,246,0.055) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: pageGlow1 26s ease-in-out infinite;
  z-index: 0;
}
.landing::after {
  content: '';
  position: fixed;
  bottom: 10vh;
  right: -15vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(91,156,246,0.045) 0%, rgba(139,124,248,0.03) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: pageGlow2 32s ease-in-out infinite;
  z-index: 0;
}
@keyframes pageGlow1 {
  0%, 100% { transform: translate(0, 0); opacity: 1; }
  35%       { transform: translate(8vw, -12vh); opacity: 0.7; }
  70%       { transform: translate(-4vw, 8vh); opacity: 0.9; }
}
@keyframes pageGlow2 {
  0%, 100% { transform: translate(0, 0); opacity: 0.8; }
  45%       { transform: translate(-10vw, 8vh); opacity: 1; }
  75%       { transform: translate(5vw, -10vh); opacity: 0.6; }
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
  position: sticky;
  top: 0;
  z-index: 50;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.landing-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

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

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-bright);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg-base);
  overflow: hidden;
}

/* Animated blue ambient orbs */
.hero-bg::before,
.hero-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.hero-bg::before {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(91,156,246,0.13) 0%, transparent 70%);
  top: -180px;
  left: -100px;
  animation: orbDrift1 18s ease-in-out infinite;
}
.hero-bg::after {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(91,156,246,0.10) 0%, rgba(139,124,248,0.07) 50%, transparent 70%);
  bottom: -100px;
  right: -80px;
  animation: orbDrift2 22s ease-in-out infinite;
}

@keyframes orbDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  33%       { transform: translate(120px, 60px) scale(1.12); opacity: 1; }
  66%       { transform: translate(40px, 100px) scale(0.92); opacity: 0.7; }
}
@keyframes orbDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  40%       { transform: translate(-90px, -70px) scale(1.15); opacity: 1; }
  70%       { transform: translate(-30px, -130px) scale(0.9); opacity: 0.6; }
}

/* ── Hero storage particles ─────────────────────────────────────────────── */
@keyframes nodeBob {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(var(--bob, -12px)); }
}
@keyframes nodeFade {
  0%, 100% { opacity: var(--lo, 0.35); }
  50%       { opacity: var(--hi, 0.7); }
}
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0   rgba(91, 156, 246, 0.3); }
  60%  { box-shadow: 0 0 0 10px rgba(91, 156, 246, 0); }
  100% { box-shadow: 0 0 0 0   rgba(91, 156, 246, 0); }
}
@keyframes flowRight {
  0%   { width: 0;   opacity: 0; }
  15%  { opacity: 0.7; }
  85%  { opacity: 0.7; }
  100% { width: var(--w, 160px); opacity: 0; }
}
@keyframes dotTravel {
  0%   { left: 0;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: var(--w, 160px); opacity: 0; }
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Base node — positioned absolutely at fixed spot, bobs gently */
.hero-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  animation:
    nodeBob  var(--bob-dur, 6s)  ease-in-out var(--delay, 0s) infinite,
    nodeFade var(--fade-dur, 8s) ease-in-out var(--delay, 0s) infinite;
}

/* File card */
.hero-node-file {
  width: 52px; height: 60px;
  border: 1px solid rgba(91, 156, 246, 0.45);
  background: rgba(91, 156, 246, 0.06);
  position: relative;
  flex-shrink: 0;
}
.hero-node-file::before {
  content: '';
  position: absolute;
  top: 12px; left: 8px; right: 8px;
  height: 1px;
  background: rgba(91, 156, 246, 0.5);
  box-shadow: 0 6px 0 rgba(91, 156, 246, 0.35), 0 12px 0 rgba(91, 156, 246, 0.2);
}
.hero-node-file::after {
  content: '';
  position: absolute;
  top: -1px; right: -1px;
  width: 13px; height: 13px;
  border-left: 1px solid rgba(91, 156, 246, 0.45);
  border-bottom: 1px solid rgba(91, 156, 246, 0.45);
  background: var(--bg-base);
}

/* Bucket card */
.hero-node-bucket {
  width: 56px; height: 48px;
  border: 1px solid rgba(91, 156, 246, 0.4);
  background: rgba(91, 156, 246, 0.05);
  position: relative;
  flex-shrink: 0;
  animation: pulseRing 3.5s ease-out var(--delay, 0s) infinite;
}
.hero-node-bucket::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: rgba(91, 156, 246, 0.2);
  border-bottom: 1px solid rgba(91, 156, 246, 0.45);
}
.hero-node-bucket::after {
  content: '';
  position: absolute;
  top: 18px; left: 8px; right: 8px;
  height: 1px;
  background: rgba(91, 156, 246, 0.25);
  box-shadow: 0 6px 0 rgba(91, 156, 246, 0.15);
}

/* Label under node */
.hero-node-label {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(91, 156, 246, 0.6);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Progress bar on some nodes */
.hero-node-bar {
  width: 52px; height: 3px;
  background: rgba(91, 156, 246, 0.12);
  position: relative;
  flex-shrink: 0;
}
.hero-node-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--fill, 60%);
  background: rgba(91, 156, 246, 0.5);
}

/* Data stream lines with travelling dot */
.hero-stream {
  position: absolute;
  height: 1px;
  background: rgba(91, 156, 246, 0.2);
  overflow: visible;
  animation: flowRight var(--dur, 5s) ease var(--delay, 0s) infinite;
}
.hero-stream-dot {
  position: absolute;
  top: -2px;
  width: 5px; height: 5px;
  background: rgba(91, 156, 246, 0.9);
  border-radius: 50%;
  animation: dotTravel var(--dur, 5s) ease var(--delay, 0s) infinite;
}

.hero-orb-1,
.hero-orb-2 { display: none; }

/* Moving accent line across hero */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-border) 30%, var(--accent) 50%, var(--accent-border) 70%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  padding: 80px 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 28px;
  font-family: var(--mono);
  animation: fadeIn 0.6s ease, borderPulse 3s ease-in-out 1s infinite;
}

.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: glowPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent);
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 20px;
  animation: slideUp 0.7s ease 0.1s both;
}

.hero-title-accent {
  color: var(--accent);
  text-shadow: 0 0 40px rgba(91,156,246,0.25), 0 0 80px rgba(91,156,246,0.1);
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.65;
  animation: slideUp 0.7s ease 0.2s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: slideUp 0.7s ease 0.3s both;
}

/* ── Terminal mockup ─────────────────────────────────────────────────────── */
.hero-terminal {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  overflow: hidden;
  animation: slideUp 0.7s ease 0.4s both;
  position: relative;
}

.hero-terminal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(91, 156, 246, 0.012) 3px,
    rgba(91, 156, 246, 0.012) 4px
  );
  pointer-events: none;
  z-index: 0;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-bright);
  background: var(--bg-elevated);
  position: relative;
  z-index: 1;
}

.terminal-dots { display: flex; gap: 6px; }
.terminal-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--border-bright); }
.terminal-dot:nth-child(1) { background: #ff4d6a; }
.terminal-dot:nth-child(2) { background: #f6c90e; }
.terminal-dot:nth-child(3) { background: #00d68f; }

.terminal-title {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  letter-spacing: 0.5px;
  flex: 1;
  text-align: center;
  margin-right: 50px;
}

.terminal-body {
  padding: 20px 22px 24px;
  font-size: 13px;
  line-height: 1.75;
  font-family: var(--mono);
  position: relative;
  z-index: 1;
}

.terminal-line { display: flex; flex-wrap: wrap; gap: 0; white-space: pre; }
.terminal-spacer { height: 10px; display: block; }

.t-prompt { color: var(--accent); user-select: none; }
.t-cmd    { color: var(--text-primary); }
.t-flag   { color: var(--violet); }
.t-url    { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.t-date   { color: var(--text-muted); display: inline-block; min-width: 90px; }
.t-size   { color: var(--accent); display: inline-block; min-width: 62px; }
.t-file   { color: var(--text-primary); }
.t-success { color: var(--green); }
.t-dim    { color: var(--text-secondary); }
.t-progress { color: var(--green); letter-spacing: 0; }
.t-cursor { animation: blink 1.1s step-end infinite; color: var(--accent); }
.t-indent { display: inline-block; width: 20px; }

/* ── Stats bar ──────────────────────────────────────────────────────────── */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 28px 48px;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 160px;
  text-align: center;
  padding: 0 24px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-item-value { font-size: 32px; font-weight: 700; color: var(--accent); letter-spacing: -1px; font-family: var(--display); text-shadow: 0 0 20px rgba(91,156,246,0.2); }
.stat-item-label { font-size: 14px; color: var(--text-secondary); margin-top: 6px; font-family: var(--mono); letter-spacing: 0.5px; }

/* ── Section container ──────────────────────────────────────────────────── */
.section { padding: 88px 48px; position: relative; overflow: hidden; }
.section-center { text-align: center; }
.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.section-label::before {
  content: '//';
  opacity: 0.45;
}
.section-heading {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Features grid ──────────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; margin-top: 48px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.feature-card {
  padding: 28px 24px;
  background: transparent;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s;
  /* scroll entrance */
  opacity: 0;
  transform: translateY(20px);
}
.feature-card.reveal {
  animation: revealCard 0.5s ease forwards;
  animation-delay: var(--reveal-delay, 0s);
}
@keyframes revealCard {
  to { opacity: 1; transform: none; }
}
/* Mouse-spotlight overlay */
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(91,156,246,0.14) 0%, rgba(91,156,246,0.04) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.feature-card:hover::after { opacity: 1; }
.feature-card:hover { background: rgba(91,156,246,0.04); border-right-color: rgba(91,156,246,0.25); border-bottom-color: rgba(91,156,246,0.25); }
.feature-icon {
  font-size: 22px;
  margin-bottom: 14px;
  color: var(--accent);
  line-height: 1;
  transition: text-shadow 0.2s;
}
.feature-card:hover .feature-icon { text-shadow: 0 0 16px rgba(91,156,246,0.6); }
.feature-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }

/* ── Interactive feature diagrams ───────────────────────────────────────── */
.feature-diagrams {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 48px;
  border: 1px solid var(--border);
}

.feature-diagram-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.feature-diagram-row:last-child { border-bottom: none; }

.diagram-panel {
  padding: 32px 28px;
  position: relative;
  border-right: 1px solid var(--border);
  opacity: 0;
  transform: translateY(16px);
}
.diagram-panel:last-child { border-right: none; }
.diagram-panel.reveal {
  animation: revealCard 0.55s ease forwards;
  animation-delay: var(--reveal-delay, 0s);
}
.diagram-panel-full {
  grid-column: 1 / -1;
  border-right: none;
}
.diagram-panel-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  font-family: var(--mono);
}
.diagram-panel-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-family: var(--display);
}
.diagram-panel-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ArchDiagram */
.arch-tier-detail {
  position: absolute;
  bottom: 0; right: 0;
  font-size: 11px;
  color: rgba(91,156,246,0.7);
  font-family: var(--mono);
  transition: opacity 0.2s;
  text-align: right;
  max-width: 200px;
  line-height: 1.4;
}

/* CostChart */
.cost-chart {
  width: 100%;
}
.cost-chart-legend {
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
}
.cost-legend-item {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
}
.cost-legend-item::before {
  content: '';
  display: inline-block;
  width: 32px; height: 4px;
}
.cost-legend-us { color: rgba(91,156,246,0.9); }
.cost-legend-us::before { background: rgba(91,156,246,0.9); }
.cost-legend-aws { color: #ff9900; }
.cost-legend-aws::before { background: #ff9900; }

.cost-row { margin-bottom: 28px; }
.cost-row-label { font-size: 15px; color: var(--text-secondary); margin-bottom: 12px; font-family: var(--mono); }
.cost-row-bars { display: flex; flex-direction: column; gap: 8px; }
.cost-bar-wrap { display: flex; align-items: center; gap: 14px; height: 28px; }
.cost-bar {
  height: 16px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
  min-width: 0;
}
.cost-bar-us  { background: rgba(91,156,246,0.85); }
.cost-bar-aws { background: rgba(255,153,0,0.75); }
.cost-bar-label { font-size: 15px; font-family: var(--mono); white-space: nowrap; font-weight: 600; }
.cost-bar-label-us  { color: rgba(91,156,246,0.9); }
.cost-bar-label-aws { color: #ff9900; }
.cost-bar-note { font-size: 12px; color: rgba(82,212,164,0.85); font-family: var(--mono); margin-left: 6px; }

.cost-total-row {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cost-total-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-family: var(--mono); flex: 0 0 auto; }
.cost-total-values { display: flex; align-items: baseline; gap: 12px; }
.cost-total-us  { font-size: 36px; font-weight: 700; color: var(--accent); font-family: var(--display); }
.cost-total-us span  { font-size: 16px; font-weight: 400; color: var(--text-secondary); }
.cost-total-vs  { font-size: 14px; color: var(--text-muted); }
.cost-total-aws { font-size: 24px; font-weight: 500; color: #ff9900; text-decoration: line-through; opacity: 0.8; }
.cost-total-aws span { font-size: 14px; }
.cost-total-saving {
  margin-left: auto;
  font-size: 14px; font-weight: 700;
  color: rgba(82,212,164,0.9);
  background: rgba(82,212,164,0.1);
  padding: 6px 16px;
  font-family: var(--mono);
}

/* ArchDiagram */
.arch-diagram {
  position: relative;
  width: 100%;
  height: 280px;
}

/* RegionConstellation */
.region-constellation {
  width: 100%;
  height: 480px;
}

/* GlobeMap */
.globe-wrap {
  width: 100%;
  margin-top: 24px;
}

.globe-canvas-area {
  position: relative;
  width: 100%;
  min-height: 400px;
  background: var(--bg-base);
}

.globe-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.globe-region-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--sans);
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
  flex: 1;
  min-width: 140px;
}
.globe-region-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.globe-region-active {
  background: var(--accent-dim);
  color: var(--text-primary);
}
.globe-region-active .globe-region-dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

.globe-region-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(91,156,246,0.4);
  flex-shrink: 0;
}

.globe-region-name { font-size: 13px; font-weight: 600; text-align: left; }
.globe-region-sub { font-size: 10px; font-family: var(--mono); color: var(--accent); opacity: 0.7; text-align: left; }
.globe-region-ping { margin-left: auto; font-size: 11px; font-family: var(--mono); color: var(--green); }

.globe-detail {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  background: var(--bg-elevated);
  animation: fadeIn 0.2s ease;
}
.globe-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.globe-detail-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.globe-detail-sub { font-size: 11px; font-family: var(--mono); color: var(--accent); }
.globe-detail-stats {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.globe-detail-stat {
  flex: 1;
  min-width: 110px;
  padding: 8px 16px 8px 0;
  border-right: 1px solid var(--border);
}
.globe-detail-stat:last-child { border-right: none; }
.globe-detail-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 3px; }
.globe-detail-stat-val { font-size: 18px; font-weight: 700; font-family: var(--mono); color: var(--text-primary); }
.globe-stat-green { color: var(--green); }

/* DataFlowDiagram */
.data-flow-outer {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 40px;
}

.upload-diagram-wrap {
  width: 100%;
  height: 340px;
  margin-top: 24px;
}

/* ── StorageTierSelector ────────────────────────────────────────────────── */
@keyframes gaugeIn {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}
@keyframes blockIn {
  from { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
  to   { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
}

.storage-tier-selector {
  margin-top: 40px;
  border: 1px solid var(--border);
}

.tier-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.tier-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
  text-align: left;
  position: relative;
}
.tier-tab:last-child { border-right: none; }
.tier-tab::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--tier-color, var(--accent));
  transform: scaleX(0);
  transition: transform 0.2s;
}
.tier-tab-active { color: var(--text-primary); background: rgba(91,156,246,0.04); }
.tier-tab-active::after { transform: scaleX(1); }
.tier-tab:hover { background: rgba(91,156,246,0.03); color: var(--text-primary); }
.tier-tab-tagline {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--mono);
}
.tier-tab-active .tier-tab-tagline { color: rgba(91,156,246,0.6); }

.tier-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 320px;
}

.tier-info {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tier-media-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 12px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.tier-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.tier-usecases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tier-usecase {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid;
  font-family: var(--mono);
}

.tier-spec-row {
  display: flex;
  gap: 32px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.tier-spec-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 4px; }
.tier-spec-value { font-size: 15px; font-weight: 700; font-family: var(--mono); }

/* Right side: gauges */
.tier-gauges {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
}

.tier-gauge-wrap {
  display: flex;
  justify-content: center;
}

.tier-throughput { display: flex; flex-direction: column; gap: 8px; }
.tier-tp-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-family: var(--mono); }
.tier-tp-track {
  height: 6px;
  background: rgba(91,156,246,0.1);
  position: relative;
  overflow: hidden;
}
.tier-tp-fill {
  height: 100%;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.tier-tp-value { font-size: 14px; font-weight: 700; font-family: var(--mono); }

.tier-data-vis {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
}
.tier-data-block {
  flex: 1;
  animation: blockIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 768px) {
  .tier-panel { grid-template-columns: 1fr; }
  .tier-info { border-right: none; border-bottom: 1px solid var(--border); }
  .tier-tabs { grid-template-columns: 1fr; }
  .tier-tab { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
  .feature-diagram-row { grid-template-columns: 1fr; }
  .diagram-panel { border-right: none; border-bottom: 1px solid var(--border); }
  .arch-diagram { height: 180px; }
  .region-constellation { height: 160px; }
}

/* ── Storage classes ────────────────────────────────────────────────────── */
.storage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 48px; border: 1px solid var(--border); }
.storage-card {
  padding: 28px 24px;
  background: transparent;
  border-right: 1px solid var(--border);
  border-radius: 0;
  text-align: left;
  transition: background 0.2s;
  opacity: 0;
  transform: translateY(20px);
}
.storage-card.reveal {
  animation: revealCard 0.5s ease forwards;
  animation-delay: var(--reveal-delay, 0s);
}
.storage-card:last-child { border-right: none; }
.storage-card:hover { background: var(--bg-surface); }
.storage-card-featured { border-top: 2px solid var(--accent); background: var(--bg-surface); }
.storage-class-name { font-size: 18px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.storage-class-tagline { font-size: 13px; color: var(--accent); margin-bottom: 16px; font-weight: 600; }
.storage-class-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.storage-class-specs { display: flex; flex-direction: column; gap: 8px; }
.storage-spec { display: flex; justify-content: space-between; font-size: 13px; }
.storage-spec-label { color: var(--text-secondary); }
.storage-spec-value { color: var(--text-primary); font-weight: 600; font-family: var(--mono); }

/* ── Pricing table ──────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 48px; border: 1px solid var(--border); }

.pricing-card {
  background: transparent;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
}
.pricing-card.reveal {
  animation: revealCard 0.5s ease forwards;
  animation-delay: var(--reveal-delay, 0s);
}
  transition: background 0.15s;
  position: relative;
}
.pricing-card:last-child { border-right: none; }
.pricing-card:hover { background: rgba(255,255,255,0.015); }
.pricing-card-featured {
  background: var(--bg-surface);
  border-top: 2px solid var(--accent);
  margin-top: -1px;
}

.pricing-popular {
  display: inline-block;
  background: var(--accent);
  color: var(--text-inverted);
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.pricing-plan-name { font-size: 22px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.pricing-plan-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }

.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.pricing-amount { font-size: 36px; font-weight: 800; color: var(--text-primary); letter-spacing: -1px; }
.pricing-currency { font-size: 20px; font-weight: 700; color: var(--text-secondary); }
.pricing-period { font-size: 14px; color: var(--text-secondary); }

.pricing-storage { font-size: 15px; color: var(--accent); font-weight: 700; margin-bottom: 20px; }

.pricing-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pricing-features li { font-size: 14px; color: var(--text-secondary); display: flex; gap: 8px; line-height: 1.4; }
.pricing-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.pricing-features li.no::before { content: '—'; color: var(--text-muted); }

.pricing-cta { margin-top: 24px; }

.pricing-note { font-size: 12px; color: var(--text-muted); margin-top: 8px; text-align: center; }

.aws-compare {
  margin-top: 48px;
  padding: 24px 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0;
  border-top: 2px solid var(--border-bright);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.aws-compare-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 20px; text-align: center; }
.aws-compare-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.aws-compare-row:last-child { border-bottom: none; }
.aws-compare-label { color: var(--text-secondary); }
.aws-compare-us   { color: var(--green); font-weight: 700; font-family: var(--mono); }
.aws-compare-them { color: var(--red); font-weight: 600; font-family: var(--mono); text-decoration: line-through; opacity: 0.8; }

/* ── Testimonials ───────────────────────────────────────────────────────── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 48px; border: 1px solid var(--border); }
.testimonial-card {
  padding: 32px 28px;
  background: transparent;
  border-right: 1px solid var(--border);
  border-radius: 0;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
}
.testimonial-card.reveal {
  animation: revealCard 0.5s ease forwards;
  animation-delay: var(--reveal-delay, 0s);
}
.testimonial-card:last-child { border-right: none; }
.testimonial-quote {
  font-size: 17px; color: var(--text-secondary); line-height: 1.75; margin-bottom: 20px;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
}
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar {
  width: 32px; height: 32px; border-radius: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--accent); flex-shrink: 0;
  font-family: var(--mono);
}
.testimonial-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.testimonial-role { font-size: 12px; color: var(--text-secondary); }

/* ── CTA section ────────────────────────────────────────────────────────── */
.cta-section {
  padding: 96px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-bright);
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-border) 30%, var(--accent) 50%, var(--accent-border) 70%, transparent 100%);
}
.cta-section::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 100%, rgba(91,156,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-title { font-family: var(--display); font-size: clamp(28px, 4vw, 52px); font-weight: 700; color: var(--text-primary); letter-spacing: -1px; margin-bottom: 16px; position: relative; z-index: 1; }
.cta-sub { font-size: 18px; color: var(--text-secondary); margin-bottom: 36px; position: relative; z-index: 1; font-family: var(--mono); font-size: 14px; letter-spacing: 0.5px; }
.cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ── Landing footer ─────────────────────────────────────────────────────── */
.landing-footer {
  padding: 32px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.landing-footer-logo { height: 24px; width: auto; display: block; opacity: 0.7; }
.landing-footer-copy { font-size: 15px; color: var(--text-muted); }

/* ── Auth pages ─────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-bg-orb-1 {
  position: absolute; top: -200px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(91,156,246,0.04) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.auth-bg-orb-2 {
  position: absolute; bottom: -150px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,124,248,0.04) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}

/* Grid lines on auth page */
.auth-page::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(91,156,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91,156,246,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-top: 2px solid var(--accent);
  border-radius: 0;
  padding: 36px;
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.3s ease;
  position: relative;
  z-index: 1;
}

.auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 28px; text-decoration: none; }
.auth-logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--text-inverted);
}
.auth-logo-text { font-size: 20px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }

.auth-title { font-size: 22px; font-weight: 800; color: var(--text-primary); text-align: center; margin-bottom: 6px; letter-spacing: -0.4px; }
.auth-sub { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 28px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 4px 0; }
.auth-divider-line { flex: 1; height: 1px; background: var(--border); }
.auth-divider-text { font-size: 12px; color: var(--text-muted); }

.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-secondary); }
.auth-footer a { color: var(--accent); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

.password-strength { margin-top: 6px; }
.password-strength-bar { display: flex; gap: 3px; margin-bottom: 4px; }
.password-strength-seg { height: 3px; flex: 1; border-radius: 2px; background: var(--bg-elevated); transition: background 0.2s; }
.password-strength-seg-filled-weak   { background: var(--red); }
.password-strength-seg-filled-medium { background: var(--yellow); }
.password-strength-seg-filled-strong { background: var(--green); }
.password-strength-label { font-size: 11px; color: var(--text-muted); }

/* ── Billing page ───────────────────────────────────────────────────────── */
.billing-grid { display: grid; gap: 12px; }
.billing-card {
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--border);
  border-radius: 0;
}
.billing-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.billing-card-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.billing-card-plan { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.billing-card-amount { font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: -0.5px; }
.billing-progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.billing-usage-row {
  display: flex;
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  flex-wrap: wrap;
}
.billing-usage-item {
  flex: 1;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 16px;
}
.billing-usage-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.billing-usage-val { font-size: 14px; font-weight: 600; font-family: var(--mono); color: var(--text-primary); }

/* ── Settings page ──────────────────────────────────────────────────────── */
.settings-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 16px;
  overflow: hidden;
}
.settings-section-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.settings-section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.settings-section-desc { font-size: 13px; color: var(--text-secondary); }
.settings-section-body { padding: 20px; }
.settings-danger { border-color: rgba(252,129,129,0.2); }
.settings-danger .settings-section-header { background: rgba(252,129,129,0.04); }

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 60px 24px;
    gap: 40px;
  }
  .hero-terminal { display: none; }
  .hero-content { align-items: center; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .dashboard-content { margin-left: 0; }
  .landing-nav { padding: 0 20px; }
  .section { padding: 56px 20px; }
  .stats-bar { padding: 20px; }
  .landing-footer { padding: 24px 20px; }
  .cta-section { padding: 64px 20px; }
  .section-label { justify-content: center; }

  .storage-grid,
  .pricing-grid,
  .testimonials-grid { grid-template-columns: 1fr; }
  .storage-card,
  .pricing-card,
  .testimonial-card { border-right: none; border-bottom: 1px solid var(--border); }
  .storage-card:last-child,
  .pricing-card:last-child,
  .testimonial-card:last-child { border-bottom: none; }
}

/* ── TransferSimulation ─────────────────────────────────────────────────── */
@keyframes tsimRowIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: none; }
}

.tsim-outer {
  margin-top: 40px;
  border: 1px solid var(--border-bright);
  background: var(--bg-surface);
  overflow: hidden;
}

.tsim-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.tsim-topbar-left, .tsim-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.tsim-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.tsim-dot-green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.tsim-topbar-label { font-size: 15px; font-weight: 600; color: var(--text-primary); font-family: var(--sans); }
.tsim-topbar-region { font-size: 14px; color: var(--accent); font-family: var(--mono); }
.tsim-topbar-stat { font-size: 14px; color: var(--text-secondary); font-family: var(--mono); }
.tsim-green { color: var(--green); }

.tsim-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  min-height: 420px;
}

.tsim-files {
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--border);
}

.tsim-file-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  opacity: 0;
}
.tsim-file-row-in {
  animation: tsimRowIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.tsim-file-icon {
  font-size: 22px;
  color: var(--accent);
  opacity: 0.7;
  padding-top: 3px;
  flex-shrink: 0;
  font-family: var(--mono);
}

.tsim-file-body { flex: 1; min-width: 0; }

.tsim-file-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.tsim-file-name {
  font-size: 15px;
  font-family: var(--mono);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tsim-file-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  flex-shrink: 0;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tsim-status-up { background: var(--accent-dim); color: var(--accent); }
.tsim-status-done { background: var(--green-dim); color: var(--green); }

.tsim-progress-track {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 8px;
}
.tsim-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 0;
  min-width: 0;
}

.tsim-file-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
}
.tsim-file-size { font-size: 13px; font-family: var(--mono); color: var(--text-secondary); }
.tsim-file-speed { font-size: 13px; font-family: var(--mono); color: var(--accent); margin-left: auto; }
.tsim-file-pct { font-size: 13px; font-family: var(--mono); color: var(--text-muted); width: 38px; text-align: right; }

/* Cost panel */
.tsim-cost-panel {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}
.tsim-cost-col { flex: 1; }
.tsim-cost-header {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
  font-family: var(--sans);
}
.tsim-cost-section { margin-bottom: 14px; }
.tsim-cost-label { font-size: 12px; color: var(--text-muted); font-family: var(--sans); margin-bottom: 3px; }
.tsim-cost-value { font-size: 22px; font-weight: 700; font-family: var(--mono); }
.tsim-cost-accent { color: var(--accent); }
.tsim-cost-green { color: var(--green); }
.tsim-cost-red { color: var(--red); }
.tsim-cost-divider { height: 1px; background: var(--border); margin: 16px 0; }
.tsim-cost-total-row { display: flex; align-items: baseline; justify-content: space-between; }
.tsim-cost-total-label { font-size: 12px; color: var(--text-muted); font-family: var(--sans); }
.tsim-cost-total-val { font-size: 28px; font-weight: 700; font-family: var(--mono); }
.tsim-cost-vs {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 16px 0;
}

.tsim-cost-us .tsim-cost-header { color: var(--accent); }
.tsim-cost-aws .tsim-cost-header { color: var(--red); }

@media (max-width: 900px) {
  .tsim-body { grid-template-columns: 1fr; }
  .tsim-files { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ── RegionGrid ─────────────────────────────────────────────────────────── */
@keyframes rgridIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.rgrid-outer { margin-top: 32px; }

.rgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
}

.rgrid-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px;
  background: var(--bg-surface);
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: background 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}
.rgrid-card:nth-child(3n) { border-right: none; }
.rgrid-card:nth-last-child(-n+3) { border-bottom: none; }
.rgrid-card:hover { background: var(--bg-elevated); }
.rgrid-card-active {
  background: rgba(91,156,246,0.06);
  border-color: rgba(91,156,246,0.35);
}
.rgrid-card-active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}

.rgrid-status {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rgrid-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: glowPulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
.rgrid-status-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--green);
}

.rgrid-city {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rgrid-flag { font-size: 22px; line-height: 1; }
.rgrid-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.rgrid-sub {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--accent);
  opacity: 0.7;
}

.rgrid-quick {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}
.rgrid-quick-item { display: flex; flex-direction: column; gap: 1px; }
.rgrid-quick-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.rgrid-quick-val {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-primary);
}

.rgrid-load-track {
  height: 3px;
  background: var(--bg-hover);
  overflow: hidden;
  margin-top: 6px;
}
.rgrid-load-fill {
  height: 100%;
  background: var(--accent);
  opacity: 0.6;
  transition: width 0.4s ease;
}
.rgrid-load-label {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* Detail panel */
.rgrid-detail {
  border: 1px solid rgba(91,156,246,0.3);
  border-top: none;
  padding: 18px 24px;
  background: rgba(91,156,246,0.04);
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  animation: rgridIn 0.2s ease;
}
.rgrid-detail-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.rgrid-detail-flag { font-size: 28px; }
.rgrid-detail-name { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.rgrid-detail-sub { font-size: 11px; font-family: var(--mono); color: var(--accent); margin-top: 2px; }
.rgrid-detail-stats {
  display: flex;
  gap: 0;
  flex: 1;
  flex-wrap: wrap;
}
.rgrid-detail-stat {
  flex: 1;
  min-width: 100px;
  padding: 4px 20px 4px 0;
  border-right: 1px solid var(--border);
}
.rgrid-detail-stat:last-child { border-right: none; }
.rgrid-detail-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.rgrid-detail-stat-val {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-primary);
}
.rgrid-green { color: var(--green); }

@media (max-width: 768px) {
  .rgrid { grid-template-columns: repeat(2, 1fr); }
  .rgrid-card:nth-child(3n) { border-right: 1px solid var(--border); }
  .rgrid-card:nth-child(2n) { border-right: none; }
  .rgrid-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .rgrid-card:nth-last-child(-n+2) { border-bottom: none; }
}

/* ===== Toast notifications ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  pointer-events: all;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: toastIn 0.2s ease;
  min-width: 280px;
  max-width: 400px;
  backdrop-filter: blur(8px);
}

.toast-success { background: rgba(16, 185, 129, 0.92); }
.toast-error   { background: rgba(239, 68, 68, 0.92); }
.toast-info    { background: rgba(99, 179, 237, 0.92); }

.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg  { line-height: 1.3; }

@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ===== Copy button ===== */
.copy-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  line-height: 1;
  transition: all 0.15s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn-copied { border-color: var(--green) !important; color: var(--green) !important; }

/* ===== Skeleton loading ===== */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--elevated) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-label  { height: 12px; width: 60%; margin-bottom: 8px; }
.skeleton-value  { height: 32px; width: 80%; margin-bottom: 6px; }
.skeleton-sub    { height: 12px; width: 50%; }
.skeleton-name   { height: 16px; width: 140px; margin-bottom: 6px; }
.skeleton-plan   { height: 12px; width: 200px; }
.skeleton-amount { height: 24px; width: 60px; }
.skeleton-bar-full { height: 8px; width: 100%; border-radius: 4px; }

/* ===== Error boundary ===== */
.error-boundary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.error-boundary-inner {
  text-align: center;
  padding: 40px;
  max-width: 400px;
}
.error-boundary-icon { font-size: 48px; color: var(--red, #ef4444); margin-bottom: 16px; }
.error-boundary-inner h2 { color: var(--text-primary); margin-bottom: 12px; }
.error-boundary-inner p  { color: var(--text-secondary); margin-bottom: 24px; font-size: 14px; }

/* ===== Secret row (credential display) ===== */
.secret-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}

/* ===== Mobile responsive dashboard ===== */
.sidebar-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 240px;
  }
  .sidebar-mobile-open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  .dashboard-shell {
    grid-template-columns: 1fr !important;
  }
  .dashboard-content {
    padding-left: 0 !important;
    width: 100%;
  }
  .topbar-hamburger {
    display: flex !important;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .service-grid .service-card {
    padding: 12px !important;
  }
}

.topbar-hamburger {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  margin-right: 12px;
}
