/* Modern, schlicht, responsive */
:root{
  --bg:#0b1020;
  --panel:#0f1730;
  --card:#0e1630;
  --text:#eaf0ff;
  --muted:#aeb9df;
  --line:rgba(255,255,255,.10);
  --accent:#7c9cff;
  --accent2:#46e6b0;
  --danger:#ff6b6b;

  --radius:16px;
  --shadow: 0 14px 40px rgba(0,0,0,.35);
  --shadow2: 0 8px 20px rgba(0,0,0,.25);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(124,156,255,.25), transparent 60%),
    radial-gradient(800px 450px at 95% 10%, rgba(70,230,176,.20), transparent 55%),
    linear-gradient(180deg, var(--bg), #050915 65%);
}

.container{
  width:min(1100px, 92vw);
  margin:0 auto;
}

.header{
  border-bottom:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.06), transparent);
  padding: 26px 0 18px;
}

.header__inner{
  display:flex;
  gap:20px;
  align-items:flex-start;
  justify-content:space-between;
}

h1{
  margin:10px 0 6px;
  font-size: 32px;
  letter-spacing: .2px;
}

.sub{
  margin:0;
  color:var(--muted);
  line-height:1.4;
}

.badge{
  display:inline-flex;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  font-size:12px;
  backdrop-filter: blur(10px);
}

.header__meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.meta-card{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding:10px 12px;
  min-width:120px;
}

.meta-label{
  font-size:12px;
  color:var(--muted);
}
.meta-value{
  font-size:18px;
  margin-top:4px;
}

.grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:18px;
  padding:18px 0 26px;
}

@media (max-width: 980px){
  .grid{grid-template-columns:1fr}
  .header__inner{flex-direction:column; align-items:flex-start}
  .header__meta{justify-content:flex-start}
}

.card{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding:16px 16px 14px;
}

.card h2{
  margin:0 0 10px;
  font-size:18px;
}

.hint{
  margin:0 0 12px;
  color:var(--muted);
  line-height:1.45;
  font-size:13px;
}

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

.section-title{
  margin-top:6px;
  padding-top:10px;
  border-top:1px dashed var(--line);
  color: rgba(234,240,255,.92);
  font-size:13px;
  letter-spacing:.4px;
  text-transform: uppercase;
}

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
@media (max-width: 560px){
  .row{grid-template-columns:1fr}
}

.field label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin: 0 0 6px;
}

.field input, .field select{
  width:100%;
  padding:10px 10px;
  border:1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline: none;
}

.field input:focus, .field select:focus{
  border-color: rgba(124,156,255,.6);
  box-shadow: 0 0 0 4px rgba(124,156,255,.12);
}

.help{
  margin-top:6px;
  font-size:12px;
  color: var(--muted);
}

.optional{
  font-size:11px;
  color: rgba(174,185,223,.8);
}

.components{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.comp{
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius:14px;
  padding:12px;
}

.comp__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.comp__name{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:600;
}
.comp__pill{
  font-size:11px;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:999px;
  padding:4px 8px;
}
.comp__body{
  margin-top:10px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:10px;
}
@media (max-width: 760px){
  .comp__body{grid-template-columns:1fr}
}

.switch{
  display:flex;
  align-items:center;
  gap:10px;
}
.switch input{
  width:18px; height:18px;
}

.actions{
  display:flex;
  gap:10px;
  margin-top:6px;
}
.btn{
  border:1px solid rgba(124,156,255,.55);
  background: rgba(124,156,255,.20);
  color:var(--text);
  padding:10px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:600;
}
.btn:hover{filter: brightness(1.06)}
.btn:active{transform: translateY(1px)}
.btn--ghost{
  border-color: var(--line);
  background: rgba(255,255,255,.03);
  color: rgba(234,240,255,.92);
}
.btn--small{
  padding:8px 10px;
  border-radius: 10px;
  font-size:12px;
}

.disclaimer{
  margin: 10px 0 0;
  font-size:12px;
  color: var(--muted);
  line-height:1.45;
}

.empty{
  border:1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align:center;
  color: var(--muted);
}
.empty__icon{font-size:28px}
.empty__title{margin-top:8px; color:var(--text); font-weight:700}
.empty__text{margin-top:6px; font-size:13px; line-height:1.45}

.kpis{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-bottom:12px;
}
@media (max-width: 760px){
  .kpis{grid-template-columns:1fr}
}

.kpi{
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding:12px;
}
.kpi__label{font-size:12px; color:var(--muted)}
.kpi__value{font-size:22px; margin-top:6px; font-weight:800}
.kpi__sub{font-size:12px; color:var(--muted); margin-top:4px}

.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.toggle{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--muted);
  font-size:13px;
}
.toggle input{width:18px; height:18px}

.chart{
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  border-radius: 14px;
  padding:12px;
  margin-bottom:12px;
}
.chart__title{font-size:12px; color:var(--muted); margin-bottom:10px}
.chart__bars{
  display:grid;
  grid-template-columns: repeat(30, 1fr);
  gap:3px;
  height:110px;
  align-items:end;
}
.bar{
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, rgba(124,156,255,.85), rgba(70,230,176,.65));
  opacity:.85;
}
.bar--zero{
  background: rgba(255,255,255,.06);
  opacity:.6;
}
.bar:hover{
  opacity:1;
  outline: 2px solid rgba(255,255,255,.16);
  outline-offset: 2px;
}
.bar[data-tip]{
  position:relative;
}
.bar[data-tip]:hover::after{
  content: attr(data-tip);
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  bottom: 120%;
  white-space:nowrap;
  font-size:11px;
  padding:6px 8px;
  border-radius:10px;
  background: rgba(0,0,0,.65);
  border:1px solid var(--line);
  color: var(--text);
  pointer-events:none;
  z-index:5;
}

.chart__legend{
  display:flex;
  justify-content:space-between;
  margin-top:8px;
  color: var(--muted);
  font-size:12px;
}

.table-wrap{
  overflow:auto;
  border-radius: 14px;
  border:1px solid var(--line);
}

.table{
  width:100%;
  border-collapse: collapse;
  min-width: 520px;
}
.table thead th{
  position:sticky;
  top:0;
  background: rgba(8,12,26,.92);
  color: var(--muted);
  font-weight:600;
  font-size:12px;
  text-align:left;
  padding:10px 10px;
  border-bottom:1px solid var(--line);
}
.table tbody td{
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  vertical-align:top;
}
.table tbody tr:hover{
  background: rgba(255,255,255,.03);
}

.pill{
  display:inline-flex;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  font-size:12px;
  color: rgba(234,240,255,.92);
  margin: 0 6px 6px 0;
}

.footer{
  border-top: 1px solid var(--line);
  padding: 14px 0 22px;
  display:flex;
  justify-content:space-between;
  color: var(--muted);
  font-size:12px;
}

.muted{opacity:.85}

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.72);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}
