:root {
  --bg: #f4f7ff;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-border: rgba(17, 37, 74, 0.12);
  --text: #132646;
  --muted: #4f658b;
  --primary: #005f73;
  --primary-2: #0a9396;
  --secondary: #ee9b00;
  --danger: #b3261e;
  --success: #1f7a4f;
  --shadow: 0 16px 34px rgba(10, 26, 63, 0.13);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 10%, #d8f3ff, transparent 40%), radial-gradient(circle at 85% 18%, #ffe8bc, transparent 34%), var(--bg);
  min-height: 100vh;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.orb {
  position: absolute;
  filter: blur(42px);
  opacity: 0.38;
}

.orb-a {
  width: 380px;
  height: 380px;
  left: -70px;
  top: -100px;
  background: #0a9396;
}

.orb-b {
  width: 340px;
  height: 340px;
  right: -80px;
  top: 20px;
  background: #ee9b00;
}

.grid-noise {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(11, 43, 84, 0.04) 1px, transparent 1px), linear-gradient(to bottom, rgba(11, 43, 84, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.22;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.8rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow);
}

.topbar h1 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
}

.topbar p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.session-block {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.4rem 2rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.login-panel {
  max-width: 430px;
  margin: 3rem auto;
  padding: 1.3rem;
}

.login-panel h2 {
  margin: 0;
  font-family: 'Fraunces', serif;
}

.login-panel p {
  color: var(--muted);
}

.workspace {
  display: grid;
  gap: 0.95rem;
}

.hero {
  padding: 1rem 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.hero h2 {
  margin: 0;
  font-family: 'Fraunces', serif;
}

.hero p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  align-items: end;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem;
  overflow-x: auto;
}

.tab-btn {
  border: 1px solid rgba(10, 62, 114, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.tab-btn.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
}

.tab {
  display: none;
  padding: 1rem;
}

.tab.active {
  display: block;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.kpi {
  border: 1px solid rgba(11, 40, 84, 0.12);
  border-radius: 12px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.74);
}

.kpi h4 {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.kpi .value {
  margin-top: 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.split {
  display: grid;
  gap: 0.7rem;
}

.split.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.split.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  font-family: 'Fraunces', serif;
}

.form {
  display: grid;
  gap: 0.45rem;
}

.form.compact input,
.form.compact textarea,
.form.compact select,
.hero input {
  width: 100%;
  border: 1px solid rgba(12, 39, 77, 0.18);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 0.52rem 0.6rem;
  font: inherit;
  color: var(--text);
}

.form.compact textarea {
  min-height: 68px;
  resize: vertical;
}

.inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}

.btn {
  border: 0;
  border-radius: 10px;
  font: inherit;
  padding: 0.52rem 0.8rem;
  cursor: pointer;
  font-weight: 700;
}

.btn.primary {
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  color: #fff;
}

.btn.secondary {
  background: linear-gradient(120deg, #ee9b00, #ca6702);
  color: #fff;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(11, 43, 84, 0.16);
  color: var(--text);
}

.list {
  display: grid;
  gap: 0.45rem;
  max-height: 360px;
  overflow: auto;
  padding-right: 0.1rem;
}

.item {
  border-radius: 11px;
  border: 1px solid rgba(11, 40, 84, 0.12);
  background: rgba(255, 255, 255, 0.88);
  padding: 0.52rem 0.62rem;
  display: grid;
  gap: 0.2rem;
}

.item strong {
  font-size: 0.9rem;
}

.item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.note {
  min-height: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.error {
  min-height: 1rem;
  color: var(--danger);
  font-size: 0.82rem;
}

.hidden {
  display: none;
}

@media (max-width: 1180px) {
  .split.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .split.two,
  .split.three,
  .split.four {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .hero-actions {
    width: 100%;
  }

  .session-block {
    flex-direction: column;
    align-items: flex-end;
  }
}
