:root {
  --bg: #071019;
  --card: rgba(13, 27, 39, .88);
  --card-2: rgba(17, 34, 48, .96);
  --line: rgba(145, 184, 209, .16);
  --text: #e9f5ff;
  --muted: #8ca5b8;
  --primary: #49d3ff;
  --primary-2: #2ea4ff;
  --success: #5ae09f;
  --warning: #ffcf68;
  --danger: #ff7285;
  --shadow: 0 22px 70px rgba(0,0,0,.32);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(46,164,255,.15), transparent 30%),
    radial-gradient(circle at 87% 12%, rgba(73,211,255,.08), transparent 26%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .25;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 52px 0 34px; position: relative; }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.eyebrow { font-size: 12px; letter-spacing: .18em; color: var(--primary); font-weight: 800; }
h1 { font-size: clamp(34px, 5vw, 62px); line-height: .98; margin: 12px 0 16px; letter-spacing: -.04em; }
.lead { max-width: 780px; color: #afc5d5; font-size: 17px; line-height: 1.65; margin: 0; }
.privacy-badge { flex: 0 0 auto; display: flex; gap: 9px; align-items: center; border: 1px solid rgba(90,224,159,.24); background: rgba(90,224,159,.07); color: #b9f5d5; border-radius: 999px; padding: 10px 14px; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(90,224,159,.1); }

.notice { border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; line-height: 1.55; font-size: 14px; }
.notice.warning { background: rgba(255,207,104,.08); border: 1px solid rgba(255,207,104,.23); color: #f3ddb0; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.card { background: linear-gradient(180deg, rgba(18,37,52,.94), rgba(10,23,34,.94)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; backdrop-filter: blur(12px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card-head > div:first-child { display: flex; align-items: center; gap: 12px; }
.card h2 { font-size: 19px; margin: 0; letter-spacing: -.015em; }
.step { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: var(--primary); background: rgba(73,211,255,.08); border: 1px solid rgba(73,211,255,.19); }

.button { border: 0; border-radius: 10px; padding: 10px 14px; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: transform .12s ease, opacity .12s ease, border-color .12s ease, background .12s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .38; pointer-events: none; }
.button.primary { color: #03131c; background: linear-gradient(135deg, var(--primary), #7ee7ff); }
.button.secondary { color: #ccefff; background: rgba(73,211,255,.08); border: 1px solid rgba(73,211,255,.22); }
.button.ghost { color: #b8ccda; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.button.danger-ghost { color: #ffacb6; background: rgba(255,114,133,.05); border: 1px solid rgba(255,114,133,.16); }
.button.compact { padding: 8px 12px; font-size: 12px; }

.dropzone { min-height: 190px; border: 1px dashed rgba(73,211,255,.34); border-radius: 15px; background: rgba(73,211,255,.035); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; cursor: pointer; padding: 24px; transition: .15s ease; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: rgba(73,211,255,.07); }
.drop-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: rgba(73,211,255,.1); color: var(--primary); font-size: 24px; }
.muted, small { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.status { margin-top: 13px; font-size: 13px; color: var(--muted); min-height: 20px; }
.status.ok { color: var(--success); }
.status.err { color: var(--danger); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
label > span:first-child { display: block; font-size: 13px; color: #c9d9e4; font-weight: 700; margin-bottom: 7px; }
em { color: var(--muted); font-weight: 500; font-size: 11px; font-style: normal; }
input[type="text"], input[type="number"] { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: rgba(3,13,21,.65); color: var(--text); padding: 11px 12px; outline: none; font: inherit; font-size: 13px; }
input:focus { border-color: rgba(73,211,255,.55); box-shadow: 0 0 0 3px rgba(73,211,255,.07); }
label small { display: block; margin-top: 6px; line-height: 1.45; font-size: 11px; }
.suffix-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(3,13,21,.65); overflow: hidden; }
.suffix-input input { border: 0; border-radius: 0; background: transparent; }
.suffix-input span { padding-right: 12px; color: var(--muted); font-size: 12px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.check { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); padding: 12px; cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--primary-2); }
.check b { display: block; font-size: 12px; }
.check small { margin-top: 3px; }

.table-card { overflow: hidden; }
.pill { border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: #b7cad8; font-size: 12px; padding: 8px 11px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th { text-align: left; color: #7e9bb0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 11px 10px; background: rgba(1,8,13,.34); }
td { padding: 8px 8px; border-top: 1px solid rgba(145,184,209,.09); }
td input[type="text"], td input[type="number"] { padding: 8px 9px; }
td:first-child { text-align: center; width: 60px; }
td input[type="checkbox"] { accent-color: var(--primary-2); }
.row-delete { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255,114,133,.14); background: rgba(255,114,133,.05); color: #ff9baa; cursor: pointer; }
.empty { text-align: center; padding: 26px; color: var(--muted); font-size: 13px; }
.empty.hidden { display: none; }

.actions { display: flex; gap: 8px; }
.generate { width: 100%; border: 1px solid rgba(73,211,255,.28); background: linear-gradient(90deg, rgba(73,211,255,.10), rgba(46,164,255,.045)); color: var(--text); border-radius: 14px; padding: 15px; display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; font: inherit; }
.generate:hover { border-color: rgba(73,211,255,.55); }
.generate-icon { width: 37px; height: 37px; border-radius: 50%; background: var(--primary); color: #06151d; display: grid; place-items: center; font-size: 13px; padding-left: 2px; }
.generate b, .generate small { display: block; text-align: left; }
.generate small { margin-top: 3px; }
.script-preview { margin: 16px 0 0; max-height: 470px; overflow: auto; background: #030b11; border: 1px solid rgba(73,211,255,.12); border-radius: 13px; padding: 16px; color: #c7e7f7; font: 12px/1.55 "Cascadia Code", Consolas, monospace; white-space: pre; }
.validation { margin-top: 14px; border-radius: 11px; padding: 12px 14px; font-size: 13px; line-height: 1.55; }
.validation.error { background: rgba(255,114,133,.07); border: 1px solid rgba(255,114,133,.20); color: #ffc1c8; }
.validation.ok { background: rgba(90,224,159,.07); border: 1px solid rgba(90,224,159,.20); color: #bdf4d8; }
.hidden { display: none !important; }

.steps-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.steps-list li { display: flex; align-items: flex-start; gap: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.02); border-radius: 12px; padding: 13px; color: #bdd0dc; font-size: 13px; line-height: 1.55; }
.steps-list li > span { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: var(--primary); background: rgba(73,211,255,.08); font-weight: 900; font-size: 11px; }
code { color: #9fe9ff; background: rgba(73,211,255,.06); border: 1px solid rgba(73,211,255,.09); padding: 2px 5px; border-radius: 5px; }
footer { color: #5e788b; text-align: center; font-size: 12px; padding: 18px 0 4px; }

@media (max-width: 900px) {
  .hero { flex-direction: column; }
  .grid.two, .form-grid, .checks, .steps-list { grid-template-columns: 1fr; }
  .privacy-badge { align-self: flex-start; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 18px, 1180px); padding-top: 28px; }
  .card { padding: 15px; border-radius: 14px; }
  .card-head { align-items: flex-start; flex-direction: column; }
  .actions { width: 100%; }
  .actions .button { flex: 1; }
  h1 { font-size: 38px; }
}
