:root {
  --bg: #07111f;
  --bg-soft: #0c1d33;
  --panel: rgba(255,255,255,0.06);
  --panel-strong: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.10);
  --text: #f8fbff;
  --muted: #b6c7db;
  --primary: #54c8ff;
  --primary-dark: #123f68;
  --success: #8de2b7;
  --danger: #ff8f8f;
  --warning: #ffdca8;
  --radius: 22px;
  --shadow: 0 20px 60px rgba(0,0,0,.18);
  --font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(84,200,255,.16), transparent 30%),
    radial-gradient(circle at left, rgba(37,99,235,.14), transparent 28%),
    linear-gradient(135deg, #06101d 0%, #0a1b33 45%, #0d2748 100%);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.top-space { padding: 24px 0 48px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.card.padded { padding: 24px; }
.hero { padding: 24px 0 32px; }
.hero-header {
  display:flex; justify-content:space-between; gap:16px; align-items:center;
  margin-bottom: 32px; padding: 18px 20px;
}
.brand-kicker {
  display:inline-flex; padding:8px 14px; border-radius:999px; background:rgba(84,200,255,.12);
  border:1px solid rgba(84,200,255,.18); color:#d9f5ff; font-size:.95rem;
}
.hero-brand {
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
}
.hero-logo {
  width: 180px;
  max-width: 45vw;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
}
.home-logo-wrap {
  display:flex;
  justify-content:center;
  margin-bottom: 18px;
}
.home-logo-breathing {
  margin-top: 16px;
  margin-bottom: 34px;
  padding-top: 8px;
  padding-bottom: 10px;
}
.home-logo-standalone {
  width: min(460px, 80vw);
  height: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.home-badge-row {
  display:flex;
  justify-content:flex-end;
}
.home-title {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  max-width: none;
  width: 100%;
}
h1, h2, h3 { margin: 0; letter-spacing: -.03em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 5vw, 4.3rem); max-width: 11ch; }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
h3 { font-size: 1.1rem; }
p.lead { max-width: 45rem; color: var(--muted); line-height: 1.8; font-size: 1.08rem; }
.kpi, .chip, .badge, .muted-box { border-radius: 999px; }
.kpi { padding: 10px 14px; border: 1px solid var(--border); background: rgba(255,255,255,.05); color: var(--muted); }
.choice-primary {
  background: linear-gradient(180deg, rgba(8,23,44,.92), rgba(10,31,58,.98));
  border: 1px solid rgba(84,200,255,.18);
}
.choice-secondary { background: rgba(255,255,255,.05); }
.choice-title { font-size: 1.65rem; margin-bottom: 10px; }
.choice-desc { color: var(--muted); line-height: 1.75; max-width: 38rem; }
.home-refined .hero-header { margin-bottom: 24px; }
.home-hero-card { padding: 28px 30px; }
.home-hero-content {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.home-title-centered {
  max-width: none;
  text-wrap: balance;
}
.home-lead-centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.home-choice-grid {
  grid-template-columns: 1.35fr 1fr;
  align-items: stretch;
}
.home-choice-main {
  position: relative;
  overflow: hidden;
  border-color: rgba(84,200,255,.34);
  box-shadow: 0 24px 56px rgba(0,0,0,.28), 0 0 0 1px rgba(84,200,255,.16) inset;
}
.home-choice-main::after {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle, rgba(84,200,255,.20) 0%, rgba(84,200,255,0) 62%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}
.home-choice-main .choice-title { font-size: 1.9rem; }
.home-choice-main .btn { min-width: 220px; }
.home-choice-side { opacity: .96; }
.home-choice-main .choice-title,
.home-choice-main .choice-desc,
.home-choice-main .btn { position: relative; z-index: 1; }
.home-recommended-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(141,226,183,.45);
  background: rgba(141,226,183,.16);
  color: #dcffed;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding: 14px 18px; border-radius: 16px; border: 1px solid transparent; font-weight: 600;
  cursor: pointer; transition: .2s ease; font-size: .98rem;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fff; color: #0a1523; }
.btn-secondary { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.16); }
.btn-danger { background: #5a1f1f; color: #fff; border-color: #7d3131; }
.btn-ghost { background: transparent; color:#fff; border-color: var(--border); }
.row { display:flex; gap: 16px; align-items:center; }
.col { display:flex; flex-direction:column; gap: 16px; }
.section { margin-top: 24px; }
.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:16px; }
.form-grid-full { grid-column: 1 / -1; }
label { display:block; margin-bottom:8px; color:#dce8f6; font-weight:600; font-size:.96rem; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width:100%; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color:#fff; outline:none; font: inherit;
}
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #cde8ff 50%),
    linear-gradient(135deg, #cde8ff 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
select:focus, input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus {
  border-color: rgba(84,200,255,.5);
  box-shadow: 0 0 0 3px rgba(84,200,255,.14);
}
select option {
  color: #eef5ff;
  background: #112842;
}
select option:checked {
  background: #1a395b;
  color: #ffffff;
}
input::placeholder, textarea::placeholder { color: #8ea3ba; }
textarea { min-height: 110px; resize: vertical; }
.check-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.check-item {
  display:flex; align-items:center; gap:10px; padding: 12px 14px;
  border-radius: 14px; border:1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03);
  margin: 0;
}
input[type="checkbox"], input[type="radio"] {
  width: 18px; height: 18px; min-width: 18px; min-height: 18px; margin: 0;
  accent-color: #54c8ff; cursor: pointer;
}
.check-item span { color: #e5f1ff; font-weight: 500; }
.notice { padding: 14px 16px; border-radius: 16px; background: rgba(141,226,183,.12); border:1px solid rgba(141,226,183,.18); color:#dff8e9; }
.error { padding: 14px 16px; border-radius: 16px; background: rgba(255,143,143,.12); border:1px solid rgba(255,143,143,.18); color:#ffe3e3; }
.table-wrap { overflow:auto; border-radius: 20px; border:1px solid var(--border); }
table { width:100%; border-collapse: collapse; min-width: 860px; background: rgba(255,255,255,.03); }
th, td { padding: 14px 14px; text-align:left; border-bottom:1px solid rgba(255,255,255,.08); }
th { color:#b9cbe0; font-weight:600; background: rgba(255,255,255,.04); }
td { color:#eef5ff; }
.tag { display:inline-flex; padding:7px 12px; border-radius:999px; font-size:.84rem; border:1px solid rgba(255,255,255,.11); }
.tag.info { background: rgba(84,200,255,.12); color:#d6f5ff; }
.tag.warn { background: rgba(255,220,168,.12); color:#ffe6b9; }
.tag.ok { background: rgba(141,226,183,.12); color:#defae8; }
.tag.bad { background: rgba(255,143,143,.12); color:#ffdede; }
.header-actions { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.user-chip { display:flex; align-items:center; gap:12px; }
.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}
.avatar-circle-lg {
  width: 64px;
  height: 64px;
}
.subtle { color: var(--muted); line-height:1.7; }
.detail-grid { display:grid; grid-template-columns: 340px 1fr; gap:24px; }
.file-box, .info-box, .notes-box { padding: 20px; border-radius: 20px; border: 1px solid var(--border); background: rgba(255,255,255,.04); }
.small { font-size: .92rem; color: var(--muted); }
.stat-box { padding: 18px; border-radius: 22px; border:1px solid var(--border); background: rgba(255,255,255,.04); }
.stat-box strong { display:block; font-size: 2rem; margin-top: 10px; }
.stat-box-sweet {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(84,200,255,.08));
  border-color: rgba(84,200,255,.25);
}
.soft-spot {
  border-color: rgba(141,226,183,.25);
  background: linear-gradient(120deg, rgba(141,226,183,.07), rgba(84,200,255,.06));
}
.soft-spot-kicker {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .82rem;
  color: #d6ffe9;
  border: 1px solid rgba(141,226,183,.24);
  background: rgba(141,226,183,.10);
}
.soft-spot-message {
  margin-top: 10px;
  color: #edf8ff;
  line-height: 1.65;
  font-size: 1rem;
}
.sweet-list { display:flex; flex-direction:column; gap:10px; }
.sweet-chip {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  padding: 11px 14px;
  color: #eaf4ff;
}
.table-empty {
  text-align: center;
  padding: 18px 12px;
  color: #d8e8fb;
}
#app-toast-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1600;
}
.app-toast {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 16px)) scale(.97);
  opacity: 0;
  min-width: 280px;
  max-width: min(560px, calc(100vw - 36px));
  text-align: center;
  padding: 15px 20px;
  border-radius: 18px;
  border: 1px solid rgba(141,226,183,.48);
  background: linear-gradient(135deg, rgba(7,44,34,.97), rgba(8,58,45,.97));
  color: #ecfff4;
  box-shadow: 0 24px 54px rgba(0,0,0,.35);
  font-weight: 600;
  letter-spacing: .01em;
  transition: opacity .2s ease, transform .28s ease;
}
.app-toast::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(141,226,183,.24);
  border: 1px solid rgba(141,226,183,.48);
}
.app-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.app-toast.hide {
  opacity: 0;
  transform: translate(-50%, calc(-50% - 12px)) scale(.97);
}
.app-toast-error {
  border-color: rgba(255,143,143,.48);
  background: linear-gradient(135deg, rgba(71,20,20,.97), rgba(95,28,28,.97));
  color: #ffeaea;
}
.app-toast-error::before {
  content: "!";
  background: rgba(255,143,143,.2);
  border-color: rgba(255,143,143,.48);
}
.nav {
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding: 18px 20px; margin-bottom: 24px;
}
.nav a { color:#d6e7fb; }
.filters { display:grid; grid-template-columns: 2fr repeat(4,1fr); gap:12px; margin-bottom: 16px; }
.mobile-stack { display:flex; gap:12px; flex-wrap:wrap; }
.dashboard-stack { display:grid; gap:18px; }
.dashboard-nav { margin-bottom: 0; }
.dashboard-message { margin-bottom: 0; }
.dashboard-kpis { gap: 16px; }
.dashboard-panels { gap: 16px; }
.dashboard-panel { height: 100%; }
.dashboard-actions .btn { min-height: 46px; }
.dashboard-actions-row .btn { min-height: 44px; }
hr.sep { border:0; height:1px; background: rgba(255,255,255,.08); margin:20px 0; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .form-grid, .filters, .detail-grid { grid-template-columns: 1fr; }
  .hero-header, .nav, .row { flex-direction: column; align-items: flex-start; }
  h1 { max-width: unset; }
  .container { width: min(100% - 20px, 1180px); }
  .home-logo-breathing {
    margin-top: 4px;
    margin-bottom: 20px;
  }
  .home-hero-card {
    padding: 22px 18px;
  }
  .home-choice-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-actions { width: 100%; }
  .dashboard-actions .btn,
  .dashboard-actions form,
  .dashboard-actions-row .btn { width: 100%; }
}
