:root{
  --bg:#f4f7fb;
  --bg2:#eef3ff;
  --card:#ffffff;
  --card2:#f8fbff;
  --text:#182033;
  --muted:#66738f;
  --line:rgba(24,32,51,.10);
  --primary:#6d4aff;
  --primary2:#3f8cff;
  --green:#16a34a;
  --amber:#f59e0b;
  --red:#ef4444;
  --blue:#2563eb;
  --slate:#64748b;
  --white:#fff;
}
*{box-sizing:border-box}
html,body{max-width:100%;overflow-x:hidden}
body{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(63,140,255,.10), transparent 28%),
    radial-gradient(circle at top right, rgba(109,74,255,.10), transparent 30%),
    linear-gradient(180deg, #f8fbff, #f3f7ff 52%, #edf3fb);
  color:var(--text);
  min-height:100vh;
}
a{text-decoration:none;color:inherit}
.container{max-width:1480px;margin:0 auto;padding:24px}
.topbar{
  max-width:1480px;
  margin:0 auto;
  padding:22px 24px 10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}
.brand-wrap{display:flex;align-items:center;gap:16px;min-width:0}
.brand-logo{
  max-height:60px;
  max-width:220px;
  display:block;
  background:#fff;
  border-radius:14px;
  padding:8px 12px;
  box-shadow:0 8px 24px rgba(22,34,66,.08);
}
.brand-fallback{
  padding:12px 16px;
  border-radius:14px;
  background:linear-gradient(135deg, rgba(109,74,255,.08), rgba(63,140,255,.10));
  color:#16213b;
  font-weight:700;
  border:1px solid var(--line);
}
.brand-fallback.large{padding:18px 22px}
.eyebrow{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.18em;
  color:#6e7a96;
  margin-bottom:6px;
}
.page-title{
  margin:0;
  font-size:28px;
  color:#182033;
  word-break:break-word;
}
.topbar-actions{display:flex;gap:10px;flex-wrap:wrap}
.tabs{
  max-width:1480px;
  margin:0 auto;
  padding:0 24px 8px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.tab{
  padding:12px 18px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  color:#31405f;
  box-shadow:0 8px 20px rgba(28,42,74,.05);
}
.tab.active{
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  border-color:transparent;
  color:#fff;
}
.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-bottom:18px;
}
.stat-link{display:block}
.stat-card{
  padding:20px;
  border-radius:20px;
  color:#fff;
  box-shadow:0 15px 40px rgba(0,0,0,.10);
  transition:transform .18s ease, box-shadow .18s ease;
  min-height:120px;
}
.stat-link:hover .stat-card{
  transform:translateY(-3px);
  box-shadow:0 20px 46px rgba(0,0,0,.14);
}
.stat-card span{display:block;font-size:13px;color:rgba(255,255,255,.86)}
.stat-card strong{display:block;font-size:34px;margin-top:8px}
.gradient-a{background:linear-gradient(135deg,#3f8cff,#56ccf2)}
.gradient-b{background:linear-gradient(135deg,#8b5cf6,#c084fc)}
.gradient-c{background:linear-gradient(135deg,#10b981,#34d399)}
.gradient-d{background:linear-gradient(135deg,#ef4444,#fb7185)}
.panel{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(24,32,51,.08);
  border-radius:24px;
  padding:18px;
  box-shadow:0 20px 50px rgba(23,35,64,.08);
  backdrop-filter:blur(10px);
  margin-bottom:18px;
}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.form-panel{max-width:1100px;margin:0 auto}
.filter-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}
.filter-head h3{
  margin:0;
  font-size:20px;
  color:#1c2740;
}
.clean-filters{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:14px;
  align-items:end;
}
.field{display:flex;flex-direction:column;gap:8px;min-width:0}
.field label{font-size:13px;color:#57657f}
.field input,.field select,.field textarea{
  width:100%;
  background:#f7faff;
  color:#182033;
  border:1px solid rgba(24,32,51,.10);
  border-radius:14px;
  padding:12px 14px;
  outline:none;
  min-height:46px;
}
.field textarea{resize:vertical;min-height:110px}
.field input::placeholder,.field textarea::placeholder{color:#8b97b0}
.search-wide{grid-column:auto}
.clean-filter-actions{
  grid-column:1 / -1;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:2px;
}
.form-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}
.field.span-2{grid-column:span 2}
.field.full{grid-column:1 / -1}
.section-title{
  grid-column:1 / -1;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.16em;
  color:#6e7a96;
  padding-top:4px;
  border-top:1px solid var(--line);
}
.records-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(420px,1fr));
  gap:18px;
}
.record-card{
  background:#fff;
  border:1px solid rgba(24,32,51,.08);
  border-radius:24px;
  padding:18px;
  box-shadow:0 18px 40px rgba(23,35,64,.07);
}
.record-card-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:16px;
}
.record-main{min-width:0}
.record-domain{
  margin:0;
  font-size:24px;
  line-height:1.2;
  color:#182033;
  word-break:break-word;
}
.record-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-top:8px;
  color:#66738f;
  font-size:13px;
  word-break:break-word;
}
.record-status-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.record-sections{
  display:grid;
  gap:14px;
  margin-bottom:16px;
}
.record-sections.two-cols{
  grid-template-columns:1fr 1fr;
}
.record-sections.one-col{
  grid-template-columns:1fr;
}
.info-box{
  border-radius:18px;
  padding:16px;
  border:1px solid rgba(24,32,51,.08);
}
.domain-box{
  background:linear-gradient(180deg,#fcfdff,#f5f8ff);
}
.hosting-box{
  background:linear-gradient(180deg,#fbfffd,#f4fff9);
}
.info-box-title{
  font-size:14px;
  font-weight:800;
  color:#23314d;
  margin-bottom:12px;
}
.kv-list{
  display:grid;
  gap:10px;
}
.kv-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding-bottom:10px;
  border-bottom:1px dashed rgba(24,32,51,.08);
}
.kv-item:last-child{
  border-bottom:none;
  padding-bottom:0;
}
.kv-label{
  color:#6a7691;
  font-size:13px;
  flex:0 0 42%;
}
.kv-value{
  text-align:right;
  color:#182033;
  font-weight:700;
  flex:1;
  word-break:break-word;
}
.muted{color:var(--muted);word-break:break-word}
.small{font-size:12px}
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}
.badge.green{background:rgba(34,197,94,.12);color:#137a39}
.badge.amber{background:rgba(245,158,11,.14);color:#9a5b00}
.badge.red{background:rgba(239,68,68,.14);color:#a91d33}
.badge.blue{background:rgba(37,99,235,.12);color:#1d4ed8}
.badge.slate{background:rgba(100,116,139,.12);color:#475569}
.btn{
  border:none;
  border-radius:14px;
  padding:12px 16px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:700;
  text-align:center;
}
.btn.primary{
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#fff;
}
.btn.ghost{
  background:#fff;
  color:#24324d;
  border:1px solid rgba(24,32,51,.10);
}
.btn.success{
  background:rgba(34,197,94,.10);
  color:#0f8a3a;
  border:1px solid rgba(34,197,94,.18);
}
.btn.danger{
  background:rgba(239,68,68,.10);
  color:#b91c1c;
  border:1px solid rgba(239,68,68,.18);
}
.btn.danger-outline{
  background:#fff;
  color:#b91c1c;
  border:1px solid rgba(239,68,68,.22);
}
.btn.small{padding:10px 14px;font-size:12px}
.full-width{width:100%}
.record-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding-top:14px;
  border-top:1px solid rgba(24,32,51,.08);
}
.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,.10);color:#146534}
.flash.error{background:rgba(239,68,68,.10);color:#b91c1c}
.empty-state{text-align:center;color:#6b7893;padding:34px 16px}
.login-shell{
  min-height:calc(100vh - 80px);
  display:grid;
  place-items:center;
}
.login-card{
  width:min(520px,100%);
  background:rgba(255,255,255,.95);
  border:1px solid rgba(24,32,51,.08);
  border-radius:28px;
  padding:28px;
  box-shadow:0 30px 80px rgba(0,0,0,.10);
}
.login-brand{display:flex;justify-content:center;margin-bottom:18px}
.login-logo{
  max-height:72px;
  max-width:260px;
  background:#fff;
  padding:10px 14px;
  border-radius:16px;
  box-shadow:0 10px 24px rgba(22,34,66,.08);
}
.login-copy h2{margin:0 0 8px;font-size:28px;color:#182033}
.login-copy p{margin:0 0 18px;color:#6a7691;line-height:1.6}

@media (max-width:1180px){
  .stats-grid{grid-template-columns:repeat(2,1fr)}
  .clean-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .records-grid{grid-template-columns:1fr}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  .container{padding:16px}
  .topbar{padding:18px 16px 10px;flex-direction:column;align-items:flex-start}
  .tabs{padding:0 16px 8px}
  .stats-grid{grid-template-columns:1fr}
  .clean-filters,.form-grid,.record-sections.two-cols,.record-sections.one-col{grid-template-columns:1fr}
  .field.span-2{grid-column:span 1}
  .topbar-actions,.clean-filter-actions,.record-actions{width:100%}
  .topbar-actions .btn,
  .clean-filter-actions .btn,
  .record-actions .btn{width:100%}
  .record-card-head{flex-direction:column}
  .record-status-pills{justify-content:flex-start}
  .kv-item{flex-direction:column}
  .kv-label,.kv-value{flex:auto;text-align:left}
}
