:root {
  --bg: #f6f4ee;
  --panel: #ffffff;
  --text: #171717;
  --muted: #77746d;
  --line: #e6e0d4;
  --black: #101010;
  --chip: #f2eee6;
  --ok: #e8f5e9;
  --warning: #fff4d6;
  --critical: #ffe1df;
  --expired: #f0e4ff;
  --available: #dff8ec;
  --unknown: #eeeeee;
  --radius: 22px;
  --shadow: 0 22px 70px rgba(18, 18, 18, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 10% 0%, #fff7d9 0, transparent 34%), var(--bg);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero h1, h2 { margin: 0; letter-spacing: -0.05em; line-height: 0.95; }
.hero h1 { font-size: clamp(46px, 8vw, 94px); max-width: 950px; }
h2 { font-size: 30px; }

.hero-copy {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 760px;
  margin: 22px 0 0;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 700;
}

.hero-card, .panel {
  background: rgba(255,255,255,0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card__label { color: var(--muted); font-size: 14px; }
.hero-card strong { font-size: 72px; line-height: 1; letter-spacing: -0.08em; }
.hero-card small { color: var(--muted); line-height: 1.4; }

.panel { padding: 24px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
}

.password-field { flex: 1; max-width: 360px; }

.grid-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin-bottom: 24px;
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-weight: 700; font-size: 13px; }
input, select, textarea {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 13px 14px;
  color: var(--text);
  outline: none;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #111; }

button {
  border: 0;
  background: var(--black);
  color: #fff;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 800;
  transition: transform .16s ease, opacity .16s ease;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .5; cursor: wait; }
button.secondary { background: #f2eee6; color: #111; border: 1px solid var(--line); }
button.danger { background: #ffe1df; color: #991b1b; }

.hint { margin: 0; color: var(--muted); line-height: 1.45; }

.list-panel { padding: 0; overflow: hidden; }
.list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.filters { display: flex; gap: 12px; align-items: center; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1120px; }
th, td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #fbfaf7; }
td { font-size: 14px; }
.domain-name { font-size: 17px; font-weight: 900; letter-spacing: -0.02em; }
.domain-note { display: block; color: var(--muted); margin-top: 6px; max-width: 280px; line-height: 1.35; }
.small { color: var(--muted); font-size: 12px; margin-top: 5px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  background: var(--chip);
  white-space: nowrap;
}
.chip.ok { background: var(--ok); }
.chip.warning { background: var(--warning); }
.chip.critical { background: var(--critical); }
.chip.expired { background: var(--expired); }
.chip.available { background: var(--available); }
.chip.unknown { background: var(--unknown); }
.status-list { display: flex; flex-wrap: wrap; gap: 6px; max-width: 260px; }
.status-list .chip { font-weight: 700; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.actions button { padding: 9px 12px; font-size: 12px; }
.empty-state { padding: 28px; color: var(--muted); margin: 0; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #111;
  color: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  max-width: 380px;
  box-shadow: var(--shadow);
  z-index: 20;
}

dialog {
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(560px, calc(100% - 24px));
}
dialog::backdrop { background: rgba(0,0,0,.38); }
.dialog-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 980px) {
  .hero, .grid-layout { grid-template-columns: 1fr; }
  .toolbar, .list-head, .filters { flex-direction: column; align-items: stretch; }
  .password-field { max-width: none; }
}

@media (max-width: 620px) {
  .app-shell { width: min(100% - 20px, 1480px); padding-top: 20px; }
  .panel, .hero-card, .list-head { padding: 18px; }
  .two-cols { grid-template-columns: 1fr; }
  .hero h1 { font-size: 44px; }
}

.error-text { color: #9b1c1c; }
.wide-dialog { width: min(1120px, calc(100% - 24px)); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 4px;
}
.info-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfaf7;
  padding: 12px;
  min-width: 0;
}
.info-grid span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
}
.info-grid strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfaf7;
  overflow: hidden;
}
summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 900;
}
.raw-box {
  margin: 0;
  padding: 16px;
  max-height: 430px;
  overflow: auto;
  background: #111;
  color: #f6f6f6;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 980px) {
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .info-grid { grid-template-columns: 1fr; }
  .dialog-head { flex-direction: column; }
}
