:root {
  --bg: #0b1020;
  --panel: #121933;
  --panel-2: #182144;
  --line: rgba(255,255,255,.08);
  --text: #edf2ff;
  --muted: #a7b1d1;
  --accent: #6ea8ff;
  --accent-2: #8b5cf6;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, rgba(110,168,255,.18), transparent 30%), radial-gradient(circle at top left, rgba(139,92,246,.16), transparent 28%), var(--bg);
}
a { color: inherit; text-decoration: none; }
.layout { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  background: rgba(8,12,26,.72);
  backdrop-filter: blur(12px);
}
.main { padding: 28px; }
.brand-box { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.brand-icon {
  width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; font-weight: 800;
  box-shadow: var(--shadow);
}
.brand-title { font-size: 1.25rem; font-weight: 800; }
.brand-sub, .muted, .tiny, small { color: var(--muted); }
.nav-links { display: grid; gap: 8px; margin: 22px 0; }
.nav-links a, .btn, button {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  color: var(--text); border-radius: 14px; padding: 12px 14px; transition: .18s ease;
}
.nav-links a:hover, .btn:hover, button:hover { transform: translateY(-1px); border-color: rgba(110,168,255,.45); }
.side-card, .card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.side-card { padding: 16px; margin-top: 14px; }
.status { margin-top: 8px; font-weight: 700; }
.status.ok { color: #9af4b1; }
.status.off { color: #ffd28a; }
.topbar { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.topbar h1 { margin: 0 0 8px; font-size: 2rem; }
.top-stats { display: flex; gap: 12px; }
.mini-stat { min-width: 150px; padding: 14px 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.mini-stat span { display: block; color: var(--muted); font-size: .88rem; margin-bottom: 6px; }
.mini-stat strong { font-size: 1.2rem; }
.card { padding: 22px; margin-bottom: 20px; }
.hero { display: grid; grid-template-columns: 1.35fr .9fr; gap: 18px; align-items: stretch; }
.hero h2 { margin: 8px 0 10px; font-size: 2rem; line-height: 1.15; }
.eyebrow { color: #a8c8ff; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.search-form, .inline-form, .toolbar-row, .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
input[type="text"], input[type="file"], textarea {
  width: 100%; background: rgba(255,255,255,.03); color: var(--text); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px; outline: none;
}
.search-form input { flex: 1; min-width: 260px; }
textarea { resize: vertical; min-height: 180px; }
button, .btn { cursor: pointer; font-weight: 700; }
.ghost { background: transparent; }
.small { padding: 8px 12px; border-radius: 12px; }
.grid-4, .grid-2 { display: grid; gap: 16px; margin-bottom: 20px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric span, .stat-card span { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.metric strong, .stat-card strong { font-size: 1.65rem; }
.stat-card { padding: 18px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 12px; }
.stat-card.accent { background: linear-gradient(135deg, rgba(110,168,255,.16), rgba(139,92,246,.16)); }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 14px; }
.split { justify-content: space-between; }
.batch-form { display: grid; gap: 12px; }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { text-align: left; background: rgba(255,255,255,.03); position: sticky; top: 0; }
.empty { text-align: center; color: var(--muted); }
.cell-main { font-weight: 700; }
.cell-sub { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.flash-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.flash { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); }
.flash.success { background: rgba(34,197,94,.14); }
.flash.error { background: rgba(239,68,68,.14); }
.detail-hero { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.large { font-size: 1.05rem; line-height: 1.65; }
.tag-wrap { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.tag { padding: 8px 12px; border-radius: 999px; background: rgba(110,168,255,.12); border: 1px solid rgba(110,168,255,.24); font-size: .88rem; }
.detail-list { display: grid; gap: 12px; }
.detail-list div { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.detail-list dt { color: var(--muted); font-size: .9rem; }
.detail-list dd { margin: 0; font-weight: 600; }
.bullet-clean, .ordered-clean { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.stack-block { display: grid; gap: 10px; margin-bottom: 16px; }
.summary-box { padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 10px; }
.slim-gap { gap: 12px; }
.code-block {
  white-space: pre-wrap; word-break: break-word; margin: 0; padding: 18px; border-radius: 18px;
  background: #0c1224; border: 1px solid var(--line); overflow: auto;
}
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .topbar, .detail-hero { flex-direction: column; }
  .main { padding: 18px; }
}

.brand-box-pro { align-items: center; }
.brand-logo { width: 64px; height: 64px; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.08); }
.compact-head { margin-bottom: 8px; }
.mode-switch-form { margin: 0; }
.mode-inline-note { margin-top: 10px; color: var(--muted); }

.login-body{background:radial-gradient(circle at top,#14233c 0,#09111d 45%,#050910 100%);min-height:100vh;margin:0;font-family:Inter,Arial,sans-serif;color:#e9eef8}
.login-shell{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:24px}
.login-card{width:min(460px,100%);background:rgba(9,16,29,.88);border:1px solid rgba(255,255,255,.08);border-radius:24px;padding:28px;box-shadow:0 20px 60px rgba(0,0,0,.35);backdrop-filter:blur(10px)}
.login-brand{display:flex;align-items:center;gap:16px;margin-bottom:20px}.login-logo{width:72px;height:72px;object-fit:cover;border-radius:18px}.login-title{margin:0 0 6px}.login-form{display:flex;flex-direction:column;gap:10px}.login-form input,.batch-form input[type=text],.batch-form input[type=password]{width:100%;box-sizing:border-box}.login-form button{margin-top:8px}
.user-panel{padding:14px}.user-row{display:flex;align-items:center;gap:12px}.user-row-lg{align-items:flex-start}.user-avatar{width:46px;height:46px;border-radius:14px;object-fit:cover;border:1px solid rgba(255,255,255,.1)}.user-avatar.lg{width:62px;height:62px;border-radius:16px}.full{width:100%}.user-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}.user-card{border:1px solid rgba(255,255,255,.08);border-radius:20px;padding:16px;background:rgba(255,255,255,.02)}.user-actions-stack{display:flex;flex-direction:column;gap:10px;margin-top:14px}


/* ===== Precision responsive layout ===== */
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
.strong { font-weight: 800; }
.btn-primary {
  background: linear-gradient(135deg, rgba(110,168,255,.95), rgba(139,92,246,.92));
  border-color: rgba(255,255,255,.08);
  color: #fff;
}
.btn-primary:hover { border-color: rgba(255,255,255,.18); }

.layout {
  grid-template-columns: 290px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.main {
  min-width: 0;
}
.topbar {
  align-items: center;
}
.topbar > div:first-child,
.detail-hero > div:first-child,
.hero > * {
  min-width: 0;
}
.hero,
.grid-2,
.grid-4,
.user-grid {
  align-items: stretch;
}
.card,
.side-card,
.stat-card,
.user-card,
.mini-stat {
  overflow: hidden;
}
.table-wrap {
  -webkit-overflow-scrolling: touch;
}
input[type="text"], input[type="password"], input[type="file"], textarea {
  min-height: 48px;
}
textarea { min-height: 180px; }
button, .btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== Login redesign ===== */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(110,168,255,.22), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(139,92,246,.18), transparent 30%),
    linear-gradient(180deg, #08101b 0%, #091221 42%, #060b13 100%);
}
.login-shell-pro {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  padding: 24px;
  gap: 22px;
}
.login-panel {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(11,18,33,.78), rgba(8,13,24,.9));
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
  backdrop-filter: blur(16px);
}
.login-panel-brand {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand-top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.login-logo-pro {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 36px rgba(0,0,0,.35);
}
.login-brand-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: .02em;
}
.login-brand-sub {
  color: var(--muted);
  font-size: .98rem;
}
.login-brand-content {
  display: grid;
  gap: 18px;
  max-width: 760px;
}
.login-headline {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}
.login-copy {
  margin: 0;
  color: #c2cae1;
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 60ch;
}
.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.login-feature-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.08);
}
.login-feature-card strong { font-size: 1rem; }
.login-feature-card span {
  color: var(--muted);
  line-height: 1.6;
  font-size: .94rem;
}
.login-panel-form {
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card-pro {
  width: min(100%, 520px);
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(16,25,48,.88), rgba(10,16,29,.95));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
}
.login-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.login-title-pro {
  margin: 6px 0 8px;
  font-size: 2rem;
}
.login-subcopy {
  margin: 0;
  line-height: 1.7;
}
.login-badge {
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(110,168,255,.12);
  border: 1px solid rgba(110,168,255,.28);
  color: #dbe8ff;
  font-size: .84rem;
  font-weight: 700;
}
.login-form-pro {
  display: grid;
  gap: 16px;
}
.field-group {
  display: grid;
  gap: 8px;
}
.field-group label {
  color: #dfe7fb;
  font-weight: 700;
  font-size: .95rem;
}
.login-form-pro input {
  width: 100%;
  min-height: 54px;
  padding: 15px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
}
.login-form-pro input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: rgba(110,168,255,.55);
  box-shadow: 0 0 0 4px rgba(110,168,255,.12);
}
.btn-login {
  width: 100%;
  margin-top: 4px;
  min-height: 54px;
  border-radius: 16px;
  font-size: 1rem;
}
.login-footer-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  line-height: 1.65;
  font-size: .92rem;
}

@media (max-width: 1180px) {
  .login-shell-pro {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .login-panel-brand {
    gap: 26px;
  }
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    overflow: visible;
    padding: 16px;
  }
  .main {
    padding: 16px;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .top-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mini-stat {
    min-width: 0;
  }
  .search-form, .inline-form, .toolbar-row, .hero-actions, .actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .search-form input { min-width: 0; }
  table { min-width: 680px; }
}
@media (max-width: 700px) {
  .login-shell-pro {
    padding: 12px;
    gap: 14px;
  }
  .login-panel-brand,
  .login-panel-form,
  .login-card-pro {
    padding: 18px;
  }
  .login-card-header {
    flex-direction: column;
  }
  .login-feature-grid,
  .top-stats {
    grid-template-columns: 1fr;
  }
  .login-logo-pro {
    width: 68px;
    height: 68px;
    border-radius: 18px;
  }
  .login-brand-title {
    font-size: 1.45rem;
  }
  .login-title-pro {
    font-size: 1.6rem;
  }
  .login-headline {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
    line-height: 1.14;
  }
  .brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }
  .brand-title { font-size: 1.1rem; }
  .brand-sub { font-size: .84rem; }
  .card, .side-card { border-radius: 20px; }
  th, td { padding: 12px 12px; }
  .table-wrap { border-radius: 16px; }
}


/* ===== ORIONRING PRO additions ===== */
.error-card h2 { font-size: 4rem; margin: 8px 0; }
.toolbar-row .ghost { white-space: nowrap; }

/* ===== Management, help, loading, and futuristic polish ===== */
select {
  width: 100%;
  min-height: 48px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
}
select:focus { border-color: rgba(110,168,255,.55); box-shadow: 0 0 0 4px rgba(110,168,255,.12); }
option { background: #10182d; color: var(--text); }
label { display: grid; gap: 8px; color: #dfe7fb; font-weight: 700; }
label input, label select, label textarea { margin-top: 2px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-actions, .horizontal-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.smart-card { position: relative; overflow: visible; }
.smart-card::before, .interactive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(110,168,255,.12), transparent 38%, rgba(139,92,246,.12));
  mask: linear-gradient(#000, transparent 62%);
}
.interactive-hero { position: relative; }
.help-panel {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(110,168,255,.24);
  background: rgba(110,168,255,.08);
  color: #dfe8ff;
  line-height: 1.65;
  animation: panelIn .18s ease-out;
}
.help-panel p { margin: 6px 0 0; color: var(--muted); }
.help-panel code { color: #eaf1ff; background: rgba(255,255,255,.08); border-radius: 8px; padding: 2px 6px; }
.quick-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.help-chip {
  min-height: 54px;
  border-radius: 18px;
  justify-content: flex-start;
  background: linear-gradient(135deg, rgba(110,168,255,.10), rgba(139,92,246,.08));
}
.btn.danger, button.danger, .danger {
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.12);
  color: #ffd1d1;
}
.btn.danger:hover, button.danger:hover, .danger:hover { border-color: rgba(239,68,68,.7); }
.management-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.management-card { display: grid; gap: 16px; }
.user-edit-form { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.reset-form { display: grid; grid-template-columns: 1fr auto; }
.role-pill {
  display: inline-flex;
  width: fit-content;
  margin: 7px 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}
.role-pill.super { color: #dbe8ff; border-color: rgba(110,168,255,.35); background: rgba(110,168,255,.12); }
.checkline { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.checkline input { width: auto; min-height: auto; }
.animated-stack .stat-card { animation: floaty 5s ease-in-out infinite; }
.animated-stack .stat-card:nth-child(2) { animation-delay: .2s; }
.animated-stack .stat-card:nth-child(3) { animation-delay: .4s; }
.pulse-soft { box-shadow: 0 0 0 0 rgba(110,168,255,.22); animation: pulseGlow 2.8s ease-in-out infinite; }
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(3,7,16,.72);
  backdrop-filter: blur(14px);
}
.loading-overlay.show { display: grid; }
.loading-card {
  width: min(460px, 100%);
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(16,25,48,.94), rgba(8,13,24,.98));
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
  padding: 28px;
  text-align: center;
}
.loading-kicker { color: #a8c8ff; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; font-size: .78rem; margin-top: 12px; }
.loading-card h2 { margin: 10px 0 8px; }
.loading-card p { margin: 0 auto 18px; color: var(--muted); line-height: 1.7; }
.loading-progress { height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.loading-progress i { display: block; width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .28s ease; }
.loading-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--muted); font-size: .9rem; }
.orbital-loader { position: relative; width: 92px; height: 92px; margin: 0 auto; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); }
.orbital-loader span { position: absolute; inset: 8px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); animation: spin 1.1s linear infinite; }
.orbital-loader span:nth-child(2) { inset: 18px; border-top-color: var(--accent-2); animation-duration: 1.6s; animation-direction: reverse; }
.orbital-loader span:nth-child(3) { inset: 34px; background: radial-gradient(circle, rgba(110,168,255,.9), rgba(139,92,246,.18)); border: 0; animation: pulseCore 1.4s ease-in-out infinite; }
.login-minimal-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 2; }
.ultra-login { overflow-x: hidden; }
.login-glow { position: fixed; border-radius: 999px; filter: blur(55px); opacity: .56; pointer-events: none; }
.login-glow-a { width: 320px; height: 320px; background: rgba(110,168,255,.34); left: -80px; top: -80px; }
.login-glow-b { width: 360px; height: 360px; background: rgba(139,92,246,.26); right: -120px; bottom: -120px; }
.login-neo-card {
  width: min(520px, 100%);
  display: grid;
  gap: 22px;
  padding: 34px;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(13,22,42,.78), rgba(7,12,23,.94));
  box-shadow: 0 34px 90px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
}
.login-orbit-mark { width: 118px; height: 118px; margin: 0 auto; display: grid; place-items: center; position: relative; }
.login-orbit-mark .login-logo-pro { width: 76px; height: 76px; z-index: 2; }
.login-orbit-mark span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(110,168,255,.34); animation: spin 7s linear infinite; }
.login-orbit-mark span:nth-child(3) { inset: 14px; border-color: rgba(139,92,246,.32); animation-duration: 5s; animation-direction: reverse; }
.login-center-copy { text-align: center; }
.login-center-copy h1 { margin: 8px 0 8px; font-size: clamp(2.1rem, 8vw, 3.4rem); letter-spacing: -.04em; }
.login-center-copy p { color: var(--muted); margin: 0; line-height: 1.7; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 112px; }
.password-toggle { position: absolute; right: 8px; bottom: 8px; min-height: 38px; }
.compact-note { text-align: center; font-size: .88rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseCore { 0%,100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(110,168,255,.0); } 50% { box-shadow: 0 0 0 12px rgba(110,168,255,.06); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) {
  .form-grid-2, .quick-help-grid, .reset-form { grid-template-columns: 1fr; }
  .management-grid { grid-template-columns: 1fr; }
  .form-actions, .horizontal-actions { display: grid; grid-template-columns: 1fr; }
  .loading-meta { flex-direction: column; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}


/* ===== Modern flexible responsive refresh ===== */
:root {
  --glass: rgba(13, 22, 42, .68);
  --glass-strong: rgba(16, 25, 48, .86);
  --ring: rgba(110,168,255,.28);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(110,168,255,.20), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(139,92,246,.16), transparent 30%),
    linear-gradient(180deg, #080e1a 0%, #0b1020 45%, #080c16 100%);
}

.layout {
  grid-template-columns: clamp(250px, 22vw, 310px) minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, rgba(8,13,26,.86), rgba(8,13,26,.64));
  box-shadow: inset -1px 0 0 rgba(255,255,255,.04);
}

.main {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2vw, 34px);
}

.card,
.side-card,
.mini-stat,
.stat-card,
.user-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025)),
    var(--glass);
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 22px 60px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(16px);
}

.hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  min-height: 300px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.data-summary-card::before {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle at 22% 20%, rgba(110,168,255,.16), transparent 28%),
              radial-gradient(circle at 78% 22%, rgba(139,92,246,.12), transparent 26%);
  pointer-events: none;
}

.hero > *,
.data-summary-card > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: clamp(2rem, 4.3vw, 4.45rem);
  line-height: .98;
  letter-spacing: -.055em;
  max-width: 980px;
}

.hero-copy p {
  max-width: 820px;
  font-size: clamp(.98rem, 1.25vw, 1.14rem);
  line-height: 1.8;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: stretch;
  margin-top: 18px;
}

.search-form input {
  min-width: 0;
}

.btn,
button,
.btn-primary,
.nav-links a {
  border-radius: 16px;
  will-change: transform;
}

.btn-primary {
  box-shadow: 0 14px 36px rgba(110,168,255,.22);
}

.nav-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links a:hover,
.btn:hover,
button:hover {
  box-shadow: 0 14px 26px rgba(0,0,0,.18);
}

.topbar {
  flex-wrap: wrap;
}

.top-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.metric.card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric strong,
.stat-card strong {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  letter-spacing: -.03em;
}

.section-head h2,
.card > h2 {
  margin-top: 0;
  letter-spacing: -.025em;
}

.table-wrap {
  max-width: 100%;
  background: rgba(255,255,255,.018);
}

table {
  min-width: 860px;
}

th {
  z-index: 2;
  backdrop-filter: blur(14px);
}

tr:hover td {
  background: rgba(255,255,255,.025);
}

.actions form,
.hero-actions form,
.horizontal-actions form {
  margin: 0;
}

.danger {
  border-color: rgba(239,68,68,.36) !important;
  color: #ffb4b4 !important;
}

.danger:hover {
  background: rgba(239,68,68,.12) !important;
}

.data-summary-card {
  position: relative;
  overflow: hidden;
}

.analysis-lead {
  max-width: 1120px;
  margin-top: 0;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.soft-box {
  background: rgba(255,255,255,.04);
}

.soft-box h3 {
  margin: 0 0 8px;
}

.compact-list {
  gap: 8px;
}

.batch-summary-grid {
  margin: 4px 0 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-weight: 800;
  text-transform: capitalize;
}

.status-fetched,
.status-cache {
  color: #a7f3d0;
  border-color: rgba(34,197,94,.32);
  background: rgba(34,197,94,.10);
}

.status-skip {
  color: #fde68a;
  border-color: rgba(245,158,11,.32);
  background: rgba(245,158,11,.10);
}

.status-error {
  color: #fecaca;
  border-color: rgba(239,68,68,.34);
  background: rgba(239,68,68,.10);
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea,
select {
  background: rgba(5,10,22,.48);
  border-color: rgba(255,255,255,.11);
  color: var(--text);
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 4px rgba(110,168,255,.10);
}

@media (max-width: 1180px) {
  .hero,
  .analysis-grid {
    grid-template-columns: 1fr;
  }
  .search-form {
    grid-template-columns: 1fr 1fr;
  }
  .search-form input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px;
  }
  .brand-box {
    margin-bottom: 12px;
  }
  .nav-links {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    margin: 14px 0;
  }
  .nav-links a {
    white-space: nowrap;
  }
  .top-stats,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-actions,
  .toolbar-row,
  .section-head {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 14px;
  }
  .card {
    padding: 16px;
    border-radius: 22px;
  }
  .hero h2 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }
  .search-form,
  .form-actions,
  .hero-actions,
  .toolbar-row,
  .inline-form,
  .top-stats,
  .grid-4 {
    display: grid;
    grid-template-columns: 1fr;
  }
  .search-form input,
  .search-form button,
  .hero-actions > *,
  .hero-actions form,
  .hero-actions .btn,
  .toolbar-row > *,
  .toolbar-row form,
  .inline-form > *,
  .actions > *,
  .actions form,
  .actions .btn {
    width: 100%;
  }
  .topbar h1 {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }
  .login-neo-card {
    padding: 24px;
    border-radius: 28px;
  }
  .password-wrap input {
    padding-right: 16px;
  }
  .password-toggle {
    position: static;
    margin-top: 8px;
    width: 100%;
  }
}

/* ===== Date filter controls ===== */
.database-head { align-items: center; }
.filter-panel {
  display: grid;
  gap: 14px;
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.025);
}
.filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(160px, 1fr));
  gap: 12px;
}
.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}
input[type="date"], input[type="number"], input[type="password"] {
  width: 100%;
  min-height: 48px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .75; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-actions .btn, .filter-actions button { white-space: nowrap; }
@media (max-width: 1100px) {
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .filter-grid { grid-template-columns: 1fr; }
  .filter-actions .btn, .filter-actions button { width: 100%; }
}

/* ===== Batch progress and destructive actions ===== */
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(239,68,68,.32);
  border-radius: 18px;
  background: rgba(239,68,68,.08);
}
.delete-all-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.delete-all-form input[type="text"] {
  width: 220px;
  min-height: 46px;
}
.btn.danger,
button.danger,
.danger {
  border-color: rgba(239,68,68,.45);
  background: linear-gradient(180deg, rgba(239,68,68,.28), rgba(239,68,68,.14));
  color: #ffe9e9;
}
.btn.danger:hover,
button.danger:hover {
  border-color: rgba(239,68,68,.75);
}
.batch-progress-panel {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
}
.batch-progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
}
.batch-progress-fill {
  height: 100%;
  min-width: 2%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: width .25s ease;
}
.batch-progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .92rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  font-weight: 800;
  font-size: .86rem;
}
.status-fetched { background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.32); }
.status-cache { background: rgba(110,168,255,.16); border-color: rgba(110,168,255,.32); }
.status-skip { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.30); }
.status-error { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.32); }

@media (max-width: 900px) {
  .danger-zone { align-items: stretch; flex-direction: column; }
  .delete-all-form { flex-direction: column; align-items: stretch; }
  .delete-all-form input[type="text"] { width: 100%; }
}
