@import url("/css/carbon-fiber.css");

:root {
  --bg: #0a1628;
  --card: #132238;
  --accent: #00b4d8;
  --text: #e8f1ff;
  --muted: #8ba3c7;
  --error: #ff6b6b;
  --ok: #51cf66;
  --border: #2a4060;
}
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text);
  min-height: 100vh;
}
.view.hidden { display: none; }
.view { padding: 24px; max-width: 1100px; margin: 0 auto; }
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.card.narrow { max-width: 480px; margin: 10vh auto 0; }
.topbar, .dash-header, .panel-head, .header-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
h1 { margin: 0 0 8px; font-size: 1.5rem; }
h2 { margin: 0 0 12px; font-size: 1.15rem; color: var(--accent); }
.subtitle, .muted { color: var(--muted); font-size: .92rem; }
label { display: block; margin: 12px 0 6px; font-size: .88rem; }
input, select, textarea {
  width: 100%; padding: 12px; border-radius: 8px;
  border: 1px solid var(--border); background: #0d1e33; color: var(--text);
}
textarea { resize: vertical; min-height: 72px; }
button {
  margin-top: 16px; padding: 12px 20px; border: none; border-radius: 8px;
  background: var(--accent); color: #001220; font-weight: 700; cursor: pointer;
}
button.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); margin-top: 0; }
.lang-switch a { color: var(--accent); text-decoration: none; font-size: .85rem; margin-left: 8px; }
.lang-switch a.active { font-weight: 700; text-decoration: underline; }
.error-msg { color: var(--error); font-size: .88rem; min-height: 1.2em; }
.status-msg { font-size: .88rem; min-height: 1.2em; margin-top: 8px; }
.status-msg.ok { color: var(--ok); }
.status-msg.error { color: var(--error); }
.back-link { display: block; margin-top: 20px; color: var(--accent); text-decoration: none; font-size: .88rem; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin: 20px 0;
}
.stat {
  background: var(--card); border-radius: 12px; padding: 16px;
  border: 1px solid var(--border);
}
.stat span { display: block; color: var(--muted); font-size: .82rem; margin-bottom: 6px; }
.stat strong { font-size: 1.4rem; }
.panel {
  background: var(--card); border-radius: 12px; padding: 20px;
  margin-bottom: 20px; border: 1px solid var(--border);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); }
.consent input { width: auto; margin-top: 3px; }
.safety-callout {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid #ffd43b;
  background: rgba(255, 212, 59, 0.08);
}
.safety-callout strong {
  color: #ffd43b;
  display: block;
  margin-bottom: 8px;
  font-size: .92rem;
}
.safety-intro {
  color: #c5d8f0;
  font-size: .88rem;
  margin: 0 0 10px;
  line-height: 1.55;
}
.safety-list {
  margin: 0 0 10px;
  padding-left: 20px;
  line-height: 1.65;
  color: #c5d8f0;
  font-size: .86rem;
}
.safety-list li { margin-bottom: 6px; }
.safety-disclaimer { font-size: .82rem; margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
td a { color: var(--accent); margin-right: 8px; }
.badge-status { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: #1a3a5c; }
    .badge-status.completed { background: #1b4332; color: #95d5b2; }
    .badge-status.processing, .badge-status.queued { background: #1a3a5c; color: #8ecae6; }
.badge-status.failed { background: #4a1515; color: #ffb3b3; }
.dash-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  margin: 0;
  padding: 10px 18px;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-bottom: none;
  font-weight: 600;
}
.tab-btn.active {
  background: var(--card);
  color: var(--accent);
  border-color: var(--border);
}
.tab-panel.hidden { display: none; }
.session-list { display: flex; flex-direction: column; gap: 12px; }
.session-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: #0d1e33;
}
.session-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.session-card-head strong { color: var(--text); }
.session-jobs { font-size: .85rem; color: var(--muted); margin: 0; padding-left: 18px; }
.session-jobs li { margin-bottom: 4px; }
.session-jobs a { color: var(--accent); }
.package-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: #0d1e33;
}
.package-info { margin: 0 0 12px; line-height: 1.6; }
.package-info.has-package { color: var(--text); }
.package-warn {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: .88rem;
  line-height: 1.5;
}
.package-warn.low-credits {
  background: #3d2e00;
  border: 1px solid #ffd43b;
  color: #ffe066;
}
.package-warn.expiring {
  background: #2a1a00;
  border: 1px solid #ff922b;
  color: #ffc078;
}
.package-warn.expired {
  background: #4a1515;
  border: 1px solid #ff6b6b;
  color: #ffb3b3;
}
.week-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.week-label {
  font-size: .9rem;
  color: var(--text);
  min-width: 140px;
  text-align: center;
}
.agenda-week-list { display: flex; flex-direction: column; gap: 12px; }
.agenda-slot-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: #0d1e33;
}
.agenda-slot-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.agenda-slot-meta { font-size: .85rem; color: var(--muted); margin: 0 0 8px; }
.agenda-booked-list { font-size: .85rem; margin: 0 0 10px; padding-left: 18px; color: var(--muted); }
.agenda-book-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.agenda-book-row select { flex: 1; min-width: 160px; }
.dash-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.partner-logo-header {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  flex-shrink: 0;
}
.logo-preview-wrap { margin-top: 12px; }
.logo-preview {
  display: block;
  max-height: 72px;
  max-width: 220px;
  margin-top: 8px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px;
}
.white-label-plan-note {
  margin: 0 0 12px;
  font-size: .85rem;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  .dash-header { flex-direction: column; align-items: flex-start; }
}
