:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #111722;
  --panel-2: #161f2d;
  --text: #edf6ff;
  --muted: #9fb1c5;
  --line: #263446;
  --blue: #2f7df6;
  --cyan: #18d6e8;
  --orange: #f39b3d;
  --danger: #ff647c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(24, 214, 232, .16), transparent 30%), linear-gradient(135deg, #080b10 0%, #111722 55%, #0b111a 100%);
  color: var(--text);
}

a { color: var(--cyan); }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 56px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.brand { font-weight: 760; letter-spacing: .02em; }
.brand span { color: var(--cyan); }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav a, button, .button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #142033;
  color: var(--text);
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
}
button.primary, .button.primary { background: linear-gradient(135deg, var(--blue), #0dbbd0); border-color: transparent; }
button.warning { background: #2a1d15; border-color: rgba(243,155,61,.5); }
button.danger { background: #2a151b; border-color: rgba(255,100,124,.5); }
button:disabled { opacity: .5; cursor: not-allowed; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.panel, .card { background: rgba(17, 23, 34, .88); border: 1px solid var(--line); border-radius: 8px; padding: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
h1 { font-size: clamp(30px, 5vw, 56px); line-height: 1; margin: 0 0 14px; letter-spacing: 0; }
h2 { margin: 0 0 14px; font-size: 22px; }
p { color: var(--muted); line-height: 1.6; }
.notice { border-left: 3px solid var(--cyan); padding: 12px 14px; background: rgba(24,214,232,.08); color: #dffcff; }
.warn { border-left-color: var(--orange); background: rgba(243,155,61,.08); }
.dropzone { display: grid; place-items: center; min-height: 230px; border: 2px dashed #38506c; border-radius: 8px; background: rgba(9,15,24,.55); text-align: center; padding: 24px; transition: .18s ease; }
.dropzone.drag { border-color: var(--cyan); background: rgba(24,214,232,.1); }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c121c;
  color: var(--text);
  padding: 10px 12px;
}
label { display: grid; gap: 7px; margin: 12px 0; color: var(--muted); font-size: 14px; }
.checkline {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  color: var(--text);
}
.checkline input { width: 18px; min-height: 18px; margin-top: 3px; }
.delete-panel { margin-top: 14px; border-color: rgba(243,155,61,.5); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.progress { height: 10px; overflow: hidden; border-radius: 999px; background: #07101a; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan), var(--blue)); transition: width .18s ease; }
.result { display: grid; gap: 12px; margin-top: 18px; }
.result textarea {
  min-height: 78px;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: pre-wrap;
}
.muted { color: var(--muted); }
.error { color: var(--danger); }
.success { color: #8ff5c2; }
.table { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(90px, .6fr) minmax(130px, .8fr) minmax(130px, .8fr) minmax(120px, .8fr) minmax(180px, auto); gap: 10px; align-items: center; padding: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 8px; }
.row > div { min-width: 0; overflow-wrap: anywhere; }
.row .actions { margin-top: 0; }
.row .actions button, .row .actions .button { padding: 8px 10px; min-height: 36px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.hidden { display: none !important; }
small { color: var(--muted); }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .row { grid-template-columns: 1fr; }
}
