:root{
  --radius: 16px;
  --shadow: 0 16px 50px rgba(0,0,0,.35);
  --max: 1100px;
  --border: rgba(255,255,255,.12);
}
html[data-theme="dark"]{
  --bg: #0b1220;
  --surface: rgba(255,255,255,.06);
  --surface2: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --header: rgba(11,18,32,.72);
  --header2: rgba(11,18,32,.50);
}
html[data-theme="light"]{
  --bg: #f6f7fb;
  --surface: rgba(0,0,0,.04);
  --surface2: rgba(0,0,0,.06);
  --text: rgba(10,15,25,.92);
  --muted: rgba(10,15,25,.65);
  --header: rgba(255,255,255,.82);
  --header2: rgba(255,255,255,.60);
  --border: rgba(0,0,0,.10);
  --shadow: 0 16px 50px rgba(0,0,0,.12);
}
*{ 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", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(124,58,237,.20), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(59,130,246,.14), transparent 60%),
    radial-gradient(800px 600px at 60% 90%, rgba(16,185,129,.10), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height:1.45;
}
.container{ width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

.site-header{
  position: sticky; top:0; z-index:10;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, var(--header), var(--header2));
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding: 14px 0;
}
.brand{ display:flex; align-items:center; gap:12px; text-decoration:none; color:inherit; min-width: 220px; }
.brand-mark{
  width:40px;height:40px; border-radius:12px; display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(124,58,237,.35), rgba(59,130,246,.25));
  border:1px solid var(--border); box-shadow: 0 12px 30px rgba(0,0,0,.18); font-weight:800;
}
.brand-title{ font-weight:800; letter-spacing:.2px; }
.brand-subtitle{ font-size:12px; color: var(--muted); margin-top:2px; }

.header-actions{ display:flex; align-items:center; gap:10px; }
.nav{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.nav-link{ text-decoration:none; color:var(--text); padding:8px 10px; border-radius:10px; border:1px solid transparent; }
.nav-link:hover{ border-color: var(--border); background: var(--surface); }
.nav-link-muted{ color: var(--muted); }

.icon-btn{
  width:40px;height:40px; border-radius:12px;
  border:1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor:pointer; display:grid; place-items:center;
}
.icon-btn:hover{ background: var(--surface2); }

.site-main{ padding: 28px 0 46px; }

.card{
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-header{ padding: 18px 18px 0 18px; }
.h1{ margin:0 0 6px 0; font-size:28px; line-height:1.15; }
.muted{ color: var(--muted); }
.small{ font-size:12px; }

.tag{
  display:inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.1;
  border: 1px solid var(--border);
  background: rgba(59,130,246,.14);
  color: var(--muted);
}

.auth-wrap{ min-height: calc(100vh - 170px); display:grid; place-items:center; padding: 18px 0; }
.auth-card{ width: min(460px, 100%); padding-bottom: 18px; }
.form{ padding: 0 18px 18px; display:grid; gap:14px; }
.field{ display:grid; gap:6px; }
.label{ font-size:13px; color: var(--muted); }
.input{
  width:100%; padding:12px 12px; border-radius:12px;
  background: var(--surface); border:1px solid var(--border); color: var(--text); outline:none;
}
.input:focus{ border-color: rgba(124,58,237,.7); box-shadow: 0 0 0 4px rgba(124,58,237,.18); }

.hint{ display:flex; gap:10px; align-items:center; padding: 0 18px 18px; }
.pill{ font-size:12px; padding:4px 8px; border-radius:999px; background: rgba(59,130,246,.18); border: 1px solid var(--border); }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 11px 14px; border-radius:12px;
  border:1px solid var(--border);
  text-decoration:none; color: var(--text);
  background: var(--surface);
  cursor:pointer; user-select:none;
}
.btn:hover{ background: var(--surface2); }
.btn:active{ transform: translateY(1px); }
.btn-primary{
  border-color: rgba(124,58,237,.55);
  background: linear-gradient(180deg, rgba(124,58,237,.85), rgba(109,40,217,.85));
}
.btn-primary:hover{ background: linear-gradient(180deg, rgba(124,58,237,.95), rgba(109,40,217,.95)); }
.btn-icon{ opacity:.9; }
.actions{ padding: 18px; display:flex; gap:12px; flex-wrap:wrap; }

.grid{ display:grid; gap: 12px; }
.grid-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p18{ padding: 18px; }

.card-mini{ border-radius:14px; border:1px solid var(--border); background: var(--surface); padding:14px; }
.mini-title{ font-weight:700; margin-bottom:6px; }
.mini-text{ font-size:13px; }

.row{ display:flex; align-items:flex-start; justify-content:space-between; gap: 12px; }
.row-actions{ display:flex; gap: 10px; flex-wrap: wrap; justify-content:flex-end; }

.kv{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; margin-top:10px; }
.kv-item{
  border: 1px solid var(--border); border-radius:12px; padding:10px;
  background: linear-gradient(180deg, var(--surface2), var(--surface));
}
.kv-item span{ display:block; font-size:12px; color: var(--muted); }
.kv-item strong{ font-size:18px; }

.table-wrap{ padding: 10px 18px 18px; overflow:auto; }
.table-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.table{ width:100%; border-collapse:collapse; min-width:520px; margin-top:10px; }
.table th, .table td{ padding:12px 12px; border-bottom: 1px solid rgba(255,255,255,.10); text-align:left; vertical-align:middle; }
html[data-theme="light"] .table th, html[data-theme="light"] .table td{ border-bottom: 1px solid rgba(0,0,0,.08); }
.table th{ font-size:12px; text-transform:uppercase; letter-spacing:.7px; color: var(--muted); }
.right{ text-align:right !important; }
.badge{ display:inline-block; padding:5px 10px; border-radius:999px; border:1px solid var(--border); background: var(--surface); font-weight:700; letter-spacing:.4px; }

.alert{ margin: 14px 18px 0; padding:12px 12px; border-radius:12px; border:1px solid var(--border); background: var(--surface); }
.alert.compact{ margin: 10px 0 0; }
.alert-error{ border-color: rgba(239,68,68,.55); background: rgba(239,68,68,.12); }
.alert-warn{ border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.12); }

.site-footer{ border-top: 1px solid var(--border); background: var(--header2); }
.footer-inner{
  padding: 16px 0; color: var(--muted); font-size:13px;
  display:flex; gap:10px; align-items:center; justify-content:center; flex-wrap:wrap;
}
.footer-dot{ opacity:.6; }

@media (max-width: 980px){ .grid-3{ grid-template-columns: 1fr; } }
@media (max-width: 720px){
  .h1{ font-size:24px; }
  .grid-2{ grid-template-columns: 1fr; }
  .kv{ grid-template-columns: 1fr; }
  .brand{ min-width:auto; }
  .brand-subtitle{ display:none; }
  .header-inner{ padding:12px 0; }
  .nav{ justify-content:flex-start; }
  .table{ min-width: 0; }
  .table th, .table td{ padding: 10px 10px; }
}
@media (prefers-reduced-motion: reduce){ .btn:active{ transform:none; } }

.dropzone{
  margin-top:14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  padding: 16px;
}
html[data-theme="light"] .dropzone{ background: rgba(0,0,0,.03); }
.dropzone.dragover{
  border-style: solid;
  border-color: rgba(124,58,237,.7);
  box-shadow: 0 0 0 4px rgba(124,58,237,.18);
}
.dz-title{ font-weight: 700; margin-bottom: 4px; }
.dz-list{ margin-top: 10px; }
.file-ul{ margin: 0; padding-left: 18px; }
.file-ul li{ color: var(--muted); font-size: 13px; margin: 4px 0; }
select {
  color: #e5e7eb;
  background-color: #1f2937;
}

select option {
  color: #111827;
  background-color: #ffffff;
}

