:root{
  --bg:#0b0f17;
  --card:#121a2a;
  --text:#e7eefc;
  --muted:#a7b3cc;
  --border:#24314d;
  --accent:#7aa2ff;
}

/* ---------------- Base ---------------- */
*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:linear-gradient(180deg,#060912,#0b0f17);
  color:var(--text);
}

/* nicer rendering */
html,body{ -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }

a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline}

/* ---------------- Layout ---------------- */
.container{
  max-width:1100px;
  margin:0 auto;
  padding:24px;
}

/* ---------------- Navigation ---------------- */
.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;

  position:sticky;
  top:0;
  z-index:50;
  padding:14px 0;
  margin-bottom:22px;

  backdrop-filter:blur(10px);
  background:rgba(6,9,18,.6);
  border-bottom:1px solid rgba(36,49,77,.45);
}

/* Brand */
.brand{font-weight:800;letter-spacing:.2px}

.brand-link{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
}

.brand-logo{
  height:40px;
  width:auto;
  display:block;
}

.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.brand-name{
  font-size:16px;
  font-weight:900;
}

.brand-tagline{
  font-size:12px;
  color:var(--muted);
  opacity:.9;
  white-space:nowrap;
}

@media (max-width:640px){
  .brand-tagline{display:none}
}

/* Nav links */
.links{
  display:flex;
  gap:16px;
}

.links a{
  position:relative;
  font-size:14px;
  color:var(--muted);
  padding:6px 2px;
}

.links a:hover{
  color:var(--text);
  text-decoration:none;
}

.links a.is-active{
  color:var(--text);
}

.links a.is-active::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:-6px;
  height:2px;
  border-radius:2px;
  background:linear-gradient(90deg,var(--accent),#9bd0ff);
}

/* ---------------- Hero ---------------- */
.hero{
  padding:26px;
  border:1px solid var(--border);
  background:rgba(18,26,42,.88);
  border-radius:18px;

  /* subtle depth */
  box-shadow: 0 0 0 1px rgba(36,49,77,.15) inset;
}

.hero h1{
  margin:0 0 10px 0;
  font-size:28px;
  letter-spacing:-0.03em;
}

.hero h2{
  letter-spacing:-0.02em;
}

.hero .small{
  max-width:70ch;
}

/* ---------------- Grid ---------------- */
.grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}

@media (max-width:900px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .grid{grid-template-columns:1fr}
}

/* ---------------- Cards ---------------- */
.card{
  border:1px solid var(--border);
  background:rgba(18,26,42,.78);
  border-radius:16px;
  padding:16px;

  transition:
    transform .15s ease,
    border-color .15s ease,
    background .15s ease;

  box-shadow: 0 0 0 1px rgba(36,49,77,.12) inset;
}

.card:hover{
  transform:translateY(-3px);
  border-color:rgba(167,179,204,.35);
  background:rgba(18,26,42,.9);
}

.card h3{
  margin:0 0 6px 0;
}

/* ---------------- Text ---------------- */
.small{
  font-size:14px;
  line-height:1.45;
  color:var(--muted);
}

.k{
  font-size:13px;
  color:var(--muted);
}

/* ---------------- Badges ---------------- */
.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  margin-right:6px;
  margin-top:8px;

  font-size:12px;
  color:var(--muted);

  border-radius:999px;
  border:1px solid rgba(36,49,77,.8);
  background:rgba(12,18,32,.55);
}

/* ---------------- Forms ---------------- */
.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

input,select{
  background:#0c1220;
  color:var(--text);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;

  transition:border-color .12s ease, background .12s ease;
}

input:focus,select:focus{
  outline:none;
  border-color:rgba(122,162,255,.7);
  background:rgba(12,18,32,.8);
}

/* ---------------- Buttons ---------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#0c1220;

  transition:
    transform .12s ease,
    border-color .12s ease,
    background .12s ease;
}

.btn:hover{
  transform:translateY(-1px);
  border-color:rgba(167,179,204,.55);
  text-decoration:none;
}

.btn:active{
  transform:translateY(0px);
}

/* Primary CTA */
.btn-primary{
  background:linear-gradient(
    180deg,
    rgba(255,255,255,.10),
    rgba(255,255,255,.04)
  );
  border-color:rgba(167,179,204,.6);
}

/* Disabled */
.btn[disabled], .btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none !important;
}

/* ---------------- Table ---------------- */
.table{
  width:100%;
  margin-top:16px;

  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;

  box-shadow:0 0 0 1px rgba(36,49,77,.35) inset;
}

.table th,
.table td{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}

/* ✅ FIX: прибрали sticky, щоб th не перекривали перший рядок */
.table th{
  background:rgba(12,18,32,.9);
  text-align:left;
  position:static;
  z-index:auto;
}

.table tr:last-child td{
  border-bottom:none;
}

/* ---------------- Footer ---------------- */
.footer{
  margin-top:32px;
  font-size:13px;
  color:var(--muted);
}

.footer .small{
  opacity:.9;
}

