/* JuCalc — premium UI */
:root{
  --bg:#0B1220;
  --panel:#0F1B30;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.10);
  --text:#EAF0FF;
  --muted: rgba(234,240,255,0.70);
  --muted2: rgba(234,240,255,0.55);
  --primary:#2D50D6;
  --accent:#E4A41E;
  --danger:#FF5C7A;
  --ok:#2FE6A6;
  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 24px;
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --serif: Newsreader, ui-serif, Georgia, "Times New Roman", serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color:var(--text);
  background: radial-gradient(1200px 600px at 25% 10%, rgba(45,80,214,.25), transparent 60%),
              radial-gradient(900px 500px at 85% 10%, rgba(228,164,30,.18), transparent 55%),
              linear-gradient(180deg, #070C16, var(--bg));
  overflow-x:hidden;
}

.bg-orb{
  position:fixed; inset:auto; width:520px; height:520px;
  filter: blur(60px);
  opacity:.55;
  pointer-events:none;
  transform: translateZ(0);
}
.orb1{ left:-140px; top:-120px; background: radial-gradient(circle, rgba(45,80,214,.75), transparent 60%);}
.orb2{ right:-180px; bottom:-160px; background: radial-gradient(circle, rgba(228,164,30,.55), transparent 62%);}

.app{
  display:flex;
  min-height:100%;
  padding:22px;
  gap:18px;
}

.sidebar{
  width:340px;
  background: rgba(255,255,255,0.05);
  border:1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:16px;
  backdrop-filter: blur(14px);
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding:8px 10px;
  border-radius:14px;
  background: rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
}
.brand__logo{ width:44px; height:44px; }
.brand__name{ font-weight:800; letter-spacing:.2px; font-size:18px;}
.brand__tag{ color:var(--muted2); font-size:12px; margin-top:2px;}

.nav{ display:flex; flex-direction:column; gap:8px;}
.nav__item{
  width:100%;
  border:1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color:var(--text);
  padding:12px 12px;
  border-radius: 14px;
  text-align:left;
  cursor:pointer;
  transition: .18s ease;
  display:flex; align-items:center; gap:10px;
}
.nav__item:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.05);}
.nav__item.is-active{
  border-color: rgba(45,80,214,0.55);
  background: linear-gradient(180deg, rgba(45,80,214,0.22), rgba(255,255,255,0.04));
}
.dot{
  width:9px;height:9px;border-radius:99px;
  background: rgba(234,240,255,0.40);
}
.nav__item.is-active .dot{ background: var(--primary); box-shadow: 0 0 0 6px rgba(45,80,214,.18);}

.main{
  flex:1;
  background: rgba(255,255,255,0.04);
  border:1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  overflow:hidden;
}

.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding:22px 22px 14px 22px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  gap:16px;
}
h1{ margin:0; font-size:26px; letter-spacing:-.2px}
.muted{ color: var(--muted); margin:6px 0 0 0; line-height:1.35;}

.panel{ padding:20px 22px 24px 22px; }
.hidden{ display:none !important;}

.grid2{ display:grid; grid-template-columns: 1.2fr 1fr; gap:14px;}
@media (max-width: 1100px){
  .app{ flex-direction:column; }
  .sidebar{ width:100%; }
  .grid2{ grid-template-columns:1fr; }
}

.card{
  background: var(--card);
  border:1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding:16px;
}
.card.subtle{ background: rgba(255,255,255,0.035);}
.card__title{
  font-weight:700;
  margin:0 0 10px 0;
  letter-spacing:.1px;
}
.row{ display:flex; align-items:center; }
.row.space{ justify-content:space-between; }
.row.gap{ gap:10px; }
.grow{ flex:1; }

.field{ display:flex; flex-direction:column; gap:6px; }
.field span{ font-size:12px; color:var(--muted2); }
.field input, .field select, .field textarea{
  width:100%;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(10,16,30,0.55);
  color: var(--text);
  outline:none;
}
.field textarea{ resize: vertical; min-height: 90px; }

.btn{
  appearance:none;
  border:none;
  cursor:pointer;
  padding:10px 14px;
  border-radius: 14px;
  color: #0B1220;
  background: linear-gradient(180deg, rgba(45,80,214,1), rgba(45,80,214,.78));
  font-weight:700;
  box-shadow: 0 10px 24px rgba(45,80,214,.25);
  transition: .18s ease;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.03); }
.btn:active{ transform: translateY(0px); }
.btn--ghost{
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.10);
  box-shadow:none;
}
.file{ width:100%; }

.hint{ margin-top:10px; font-size:12px; color:var(--muted2); line-height:1.35; }
.divider{ height:1px; background: rgba(255,255,255,0.08); margin:14px 0; }

.drop{
  position:relative;
  border-radius: 16px;
  padding:16px;
  border:1px dashed rgba(234,240,255,0.25);
  background: rgba(10,16,30,0.35);
  text-align:center;
  overflow:hidden;
}
.drop__input{
  position:absolute; inset:0;
  opacity:0;
  cursor:pointer;
}
.drop__icon{ font-size:24px; }
.drop__title{ font-weight:800; margin-top:8px; }
.drop__subtitle{ color:var(--muted2); font-size:12px; margin-top:4px; }

.status{
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(10,16,30,0.40);
  color: var(--muted);
}
.status.ok{ border-color: rgba(47,230,166,.25); color: rgba(47,230,166,.95); }
.status.bad{ border-color: rgba(255,92,122,.25); color: rgba(255,92,122,.95); }

.mini{
  margin-top:10px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  color: var(--muted2);
  font-size:12px;
}
.mini b{ color: var(--text); }

.tablewrap{
  width:100%;
  overflow:auto;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,0.08);
}
.table{
  width:100%;
  border-collapse: collapse;
  min-width: 980px;
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,0.07);
  font-size:13px;
}
.table th{
  position:sticky; top:0;
  background: rgba(12,18,32,0.92);
  backdrop-filter: blur(10px);
  text-align:left;
  font-size:12px;
  color: rgba(234,240,255,0.78);
}
.table td.right, .table th.right{ text-align:right; }
.table tbody tr:hover{ background: rgba(255,255,255,0.03); }

.tiny{ font-size:11px; }
.footer{ margin-top:auto; padding-top:8px; }
.footer .muted{ color:var(--muted2); }

.bullets{ margin:8px 0 0 18px; color:var(--muted); line-height:1.4; }
.chips{ display:flex; flex-wrap:wrap; gap:10px; }
.chip{
  cursor:pointer;
  border-radius: 999px;
  padding:10px 12px;
  background: rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.10);
  color: var(--text);
  font-weight:600;
}
.chip:hover{ background: rgba(255,255,255,0.07); }
