:root{
  /* =========================
     LIGHT THEME (WHITE/COOL)
     ========================= */
  --bg0:#f6f8ff;
  --bg1:#ffffff;

  --cardA: rgba(255,255,255,.92);
  --cardB: rgba(255,255,255,.78);

  --line: rgba(15,23,42,.12);
  --line2: rgba(15,23,42,.10);

  --text: rgba(15,23,42,.92);   /* slate-900 */
  --muted: rgba(15,23,42,.65);
  --muted2: rgba(15,23,42,.50);

  --primary:#2563eb;
  --primary2:#1d4ed8;

  --good:#16a34a;
  --bad:#dc2626;
  --warn:#d97706;
  --idle:#64748b;

  --shadow: 0 18px 55px rgba(2,6,23,.10);
  --r: 20px;
}

*{ 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";
  color: var(--text);
  background:
    radial-gradient(900px 620px at 12% 10%, rgba(37,99,235,.12), transparent 60%),
    radial-gradient(900px 700px at 88% 18%, rgba(22,163,74,.10), transparent 55%),
    radial-gradient(900px 720px at 50% 100%, rgba(217,119,6,.08), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

/* subtle grain + vignette */
.bg{
  position: fixed;
  inset: 0;
  pointer-events:none;
  background:
    linear-gradient(to bottom, rgba(15,23,42,.05), transparent 16%),
    radial-gradient(1px 1px at 12% 20%, rgba(15,23,42,.10), transparent 55%),
    radial-gradient(1px 1px at 44% 70%, rgba(15,23,42,.08), transparent 55%),
    radial-gradient(1px 1px at 82% 38%, rgba(15,23,42,.08), transparent 55%);
  opacity:.55;
}
.bg::after{
  content:"";
  position:absolute; inset:-40px;
  background: radial-gradient(70% 60% at 50% 50%, transparent 45%, rgba(15,23,42,.06));
}

/* layout */
.wrap{
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 18px 46px;
}

.hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom: 16px;
}

.brand{
  display:flex;
  gap:14px;
  align-items:center;
}

.logo{
  width:48px;
  height:48px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  font-weight:900;
  letter-spacing:.5px;
  color:#fff;
  background: linear-gradient(135deg, rgba(37,99,235,.98), rgba(29,78,216,.72));
  box-shadow: 0 16px 36px rgba(37,99,235,.18);
  position:relative;
  overflow:hidden;
}
.logo::after{
  content:"";
  position:absolute; inset:-30%;
  background: conic-gradient(from 180deg, rgba(255,255,255,.0), rgba(255,255,255,.35), rgba(255,255,255,.0));
  animation: spin 5.5s linear infinite;
  opacity:.55;
}
@keyframes spin{ to { transform: rotate(360deg);} }

h1{
  margin:0;
  font-size: 22px;
  letter-spacing:.2px;
}
.hero p{
  margin:6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height:1.5;
}

/* summary pills */
.pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  margin-top: 6px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.72);
  color: rgba(15,23,42,.86);
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(2,6,23,.06);
}
.pill b{ font-weight:800; }
.pill .dot3{
  width:8px; height:8px; border-radius:50%;
  background: var(--idle);
  box-shadow: 0 0 0 4px rgba(100,116,139,.14);
}
.pill.good .dot3{ background: var(--good); box-shadow: 0 0 0 4px rgba(22,163,74,.14); }
.pill.bad  .dot3{ background: var(--bad);  box-shadow: 0 0 0 4px rgba(220,38,38,.12); }
.pill.warn .dot3{ background: var(--warn); box-shadow: 0 0 0 4px rgba(217,119,6,.14); }

/* cards with gradient border */
.card{
  position:relative;
  border-radius: var(--r);
  padding: 18px;
  background: linear-gradient(180deg, var(--cardA), var(--cardB));
  box-shadow: var(--shadow);
  border: 1px solid rgba(15,23,42,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow:hidden;
  margin-top: 14px;
}
.card::before{
  content:"";
  position:absolute; inset:0;
  padding:1px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(37,99,235,.30),
    rgba(22,163,74,.18),
    rgba(217,119,6,.16),
    rgba(37,99,235,.18)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
  opacity:.65;
}

.card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 12px;
}
.card-head h2{
  margin:0;
  font-size: 15px;
  letter-spacing:.2px;
}
.hint{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align:right;
}

/* form */
.label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 8px;
}
.req{ color: #ef4444; font-weight:900; }

.textarea-wrap{
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow:hidden;
  background: rgba(255,255,255,.72);
}
textarea{
  width:100%;
  min-height: 160px;
  resize: vertical;
  border:0;
  outline:none;
  padding: 14px 14px 12px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
textarea::placeholder{ color: rgba(15,23,42,.38); }

.meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(15,23,42,.08);
  color: var(--muted2);
  font-size: 12px;
}
.dot{ opacity:.65; }

/* buttons */
.actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top: 12px;
}
.btn{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  color: rgba(15,23,42,.90);
  padding: 10px 14px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 800;
  font-size: 13px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  user-select:none;
}
.btn:hover{
  background: rgba(255,255,255,.92);
  border-color: rgba(15,23,42,.18);
  box-shadow: 0 14px 30px rgba(2,6,23,.08);
}
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity:.6; cursor:not-allowed; }

.btn.primary{
  color:#fff;
  border-color: rgba(37,99,235,.40);
  background: linear-gradient(135deg, rgba(37,99,235,.98), rgba(29,78,216,.82));
  box-shadow: 0 16px 36px rgba(37,99,235,.16);
}
.btn.primary:hover{
  background: linear-gradient(135deg, rgba(37,99,235,1), rgba(29,78,216,.92));
}
.btn.ghost{ background: rgba(255,255,255,.70); }

.btn-icon{
  width:26px;
  height:26px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.22);
  font-size: 14px;
}

/* toolbar for results */
.toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin-top: 10px;
}

.search{
  flex: 1;
  min-width: 220px;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.72);
}
.search span{
  opacity:.7;
  font-size: 13px;
}
.search input{
  width:100%;
  border:0;
  outline:none;
  background:transparent;
  color: var(--text);
  font-size: 13px;
}
.search input::placeholder{ color: rgba(15,23,42,.38); }

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.chip{
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.72);
  color: rgba(15,23,42,.86);
  font-weight:800;
  font-size: 12px;
  cursor:pointer;
  transition: .15s ease;
}
.chip:hover{
  border-color: rgba(15,23,42,.22);
  background: rgba(255,255,255,.92);
}
.chip.active{
  border-color: rgba(37,99,235,.35);
  background: rgba(37,99,235,.10);
  box-shadow: 0 14px 30px rgba(37,99,235,.10);
}

/* message + loading */
.msg{
  margin-left:auto;
  color: var(--muted);
  font-size: 12px;
  display:flex;
  align-items:center;
  gap:10px;
}
.loader{
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(15,23,42,.18);
  border-top-color: rgba(15,23,42,.70);
  animation: spin .9s linear infinite;
  display:none;
}
.msg.loading .loader{ display:inline-block; }

/* table */
.table-wrap{
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow:hidden;
  background: rgba(255,255,255,.72);
}

.table{
  width:100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table thead th{
  text-align:left;
  padding: 12px 14px;
  background: rgba(15,23,42,.04);
  border-bottom: 1px solid rgba(15,23,42,.08);
  color: rgba(15,23,42,.82);
  font-weight:900;
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(10px);
}
.table tbody td{
  padding: 11px 14px;
  border-bottom: 1px solid rgba(15,23,42,.06);
  color: rgba(15,23,42,.88);
}

.table tbody tr:nth-child(2n){
  background: rgba(15,23,42,.02);
}
.table tbody tr:hover{
  background: rgba(37,99,235,.06);
}
.table tbody tr:last-child td{ border-bottom: 0; }

.domain-cell{
  display:flex;
  gap:10px;
  align-items:center;
}
.domain{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono";
  font-size: 12.5px;
  color: rgba(15,23,42,.92);
}
.sub{
  font-size: 12px;
  color: var(--muted2);
}

.actions-mini{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
}
.icon-btn{
  width:34px;
  height:34px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.72);
  color: rgba(15,23,42,.86);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: .15s ease;
}
.icon-btn:hover{
  background: rgba(255,255,255,.92);
  border-color: rgba(15,23,42,.20);
}

.empty td{
  text-align:center;
  color: rgba(15,23,42,.55);
  padding: 22px 14px;
}

/* badges */
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .2px;
  background: rgba(255,255,255,.65);
}
.badge .dot2{
  width:8px;
  height:8px;
  border-radius: 50%;
  background: var(--idle);
  box-shadow: 0 0 0 4px rgba(100,116,139,.14);
}
.badge.good .dot2{ background: var(--good); box-shadow: 0 0 0 4px rgba(22,163,74,.14); }
.badge.bad  .dot2{ background: var(--bad);  box-shadow: 0 0 0 4px rgba(220,38,38,.12); }
.badge.warn .dot2{ background: var(--warn); box-shadow: 0 0 0 4px rgba(217,119,6,.14); }

.footnote{
  margin-top: 10px;
  color: var(--muted2);
  font-size: 12px;
  line-height:1.5;
}

.footer{
  margin-top: 16px;
  color: var(--muted2);
  font-size: 12px;
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:center;
  opacity:.95;
}
.footer code{
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.10);
  padding: 2px 8px;
  border-radius: 10px;
  color: rgba(15,23,42,.86);
}
.sep{ opacity:.6; }

/* small screens */
@media (max-width: 760px){
  .hero{ flex-direction: column; align-items:flex-start; }
  .pills{ justify-content:flex-start; }
  .hint{ text-align:left; }
}

/* smoother if user allows */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
