:root {
  --bg: #071625;
  --panel: #0a2540;
  --panel-2: #102d4b;
  --line: rgba(0, 224, 255, .18);
  --text: #f5f7fa;
  --muted: #9fb7c8;
  --cyan: #00e0ff;
  --green: #22c55e;
  --yellow: #facc15;
  --purple: #8b5cf6;
  --paper: #f5f7fa;
  --ink: #06111f;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="light"] {
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel-2: #eef4ff;
  --line: rgba(37, 99, 235, .16);
  --text: #121826;
  --muted: #65728a;
  --cyan: #2563eb;
  --green: #16a46b;
  --yellow: #d99706;
  --purple: #7c3aed;
  --paper: #ffffff;
  --ink: #121826;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% -10%, rgba(0, 224, 255, .18), transparent 30%),
    linear-gradient(135deg, #06111f 0%, #071625 48%, #0a2540 100%);
  color: var(--text);
}
body[data-theme="light"] {
  background:
    radial-gradient(circle at 12% -8%, rgba(37, 99, 235, .10), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(124, 58, 237, .08), transparent 26%),
    linear-gradient(135deg, #ffffff 0%, #f7f9ff 54%, #eef6ff 100%);
}
body[data-portal-page]:not(.portal-ready) {
  visibility: hidden;
}
a { color: inherit; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.mobile-portal-bar { display: none; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(6, 17, 31, .92);
  padding: 22px 18px;
}
body[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, .86);
  box-shadow: 18px 0 50px rgba(20, 34, 66, .06);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -.04em;
}
.brand img { width: 36px; height: 36px; }
.brand span { color: var(--green); }
.role {
  margin: 6px 0 22px 46px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.nav-label {
  margin: 18px 10px 7px;
  color: #6f879b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}
.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: rgba(0, 224, 255, .08);
}
.main { min-width: 0; }
.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 22, 37, .78);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 5;
}
body[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 35px rgba(20, 34, 66, .05);
}
.topbar h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.03em;
}
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
}
.btn.primary { background: var(--green); border-color: var(--green); color: #06140c; }
.theme-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
}
.theme-toggle button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}
.theme-toggle button.active {
  background: var(--cyan);
  color: var(--ink);
}
.content { padding: 30px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}
.panel,
.card {
  background: rgba(10, 37, 64, .78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .16);
}
body[data-theme="light"] .panel,
body[data-theme="light"] .card,
body[data-theme="light"] .ops-card,
body[data-theme="light"] .row,
body[data-theme="light"] .day-head,
body[data-theme="light"] .day-cell {
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 18px 45px rgba(20, 34, 66, .07);
}
.panel { padding: 24px; }
.eyebrow {
  display: inline-flex;
  color: var(--cyan);
  border: 1px solid rgba(0, 224, 255, .34);
  background: rgba(0, 224, 255, .08);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.headline {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: .96;
  letter-spacing: -.06em;
}
.lead { color: #cfe1ed; font-size: 17px; max-width: 720px; }
body[data-theme="light"] .lead { color: #40506a; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card { padding: 18px; }
.card h2,
.card h3 { margin: 0 0 8px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); line-height: 1.55; }
.metric {
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -.05em;
  color: var(--green);
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
  margin-top: 12px;
}
.progress span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: linear-gradient(90deg, var(--cyan), var(--green));
}
.list { display: grid; gap: 10px; }
.row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
}
.row strong { display: block; }
.row small { color: var(--muted); }
.date { color: var(--cyan); font-weight: 950; font-size: 12px; text-transform: uppercase; }
.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
}
.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  text-align: left;
}
.table th {
  color: #7f97aa;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.table td { color: #dce9f2; }
body[data-theme="light"] .table td,
body[data-theme="light"] .day-event { color: var(--text); }
.empty {
  border: 1px dashed rgba(250, 204, 21, .36);
  background: rgba(250, 204, 21, .08);
  color: #ffe98f;
  border-radius: var(--radius);
  padding: 14px;
}
.ops-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.ops-card {
  background: rgba(10, 37, 64, .78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.ops-card strong {
  display: block;
  color: var(--green);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.05em;
}
.ops-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  margin-top: 8px;
  text-transform: uppercase;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.field-grid input,
.field-grid select,
.field-grid textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
}
body[data-theme="light"] .field-grid input,
body[data-theme="light"] .field-grid select,
body[data-theme="light"] .field-grid textarea,
body[data-theme="light"] .icon-btn {
  background: rgba(255, 255, 255, .92);
}
.field-grid textarea {
  min-height: 82px;
  padding-top: 10px;
  resize: vertical;
}
.field-grid label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.field-grid .wide { grid-column: span 2; }
.field-grid .full { grid-column: 1 / -1; }
.icon-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.icon-btn {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}
.icon-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.day-head,
.day-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 37, 64, .62);
}
.day-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  padding: 10px;
  text-transform: uppercase;
}
.day-cell {
  min-height: 116px;
  padding: 10px;
}
.day-cell.muted { opacity: .42; }
.day-num {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 8px;
}
.day-event {
  display: block;
  margin-top: 6px;
  border-left: 3px solid var(--green);
  padding-left: 7px;
  color: #dce9f2;
  font-size: 12px;
  line-height: 1.35;
}
.day-event.podcast { border-left-color: var(--purple); }
.day-event.delivery { border-left-color: var(--yellow); }
.day-event.mentoria { border-left-color: var(--cyan); }
.podcast-cover {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0,224,255,.12), rgba(34,197,94,.08)),
    rgba(255,255,255,.04);
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 36px;
  margin-bottom: 14px;
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .mobile-portal-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 17, 31, .94);
    backdrop-filter: blur(14px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  body[data-theme="light"] .mobile-portal-bar {
    background: rgba(255, 255, 255, .92);
  }
  .mobile-portal-bar a {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    background: rgba(255,255,255,.05);
  }
  .mobile-portal-bar a.active {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0, 224, 255, .10);
  }
  .sidebar {
    position: static;
    height: auto;
    max-height: 0;
    overflow: hidden;
    padding: 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  body.show-mobile-sidebar .sidebar {
    max-height: 80vh;
    overflow: auto;
    padding: 18px;
  }
  .hero,
  .grid,
  .ops-dashboard,
  .field-grid,
  .grid.two { grid-template-columns: 1fr; }
  .field-grid .wide,
  .field-grid .full { grid-column: auto; }
  .month-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; padding: 18px; }
  .content { padding: 18px; }
  .row { grid-template-columns: 1fr; }
}
