:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color-scheme: dark;
  background: #0b1020;
  color: #f8fafc;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(99,102,241,.18), transparent 35%),
    #0b1020;
}
.card {
  width: min(820px, 100%);
  padding: 30px;
  border: 1px solid #263248;
  border-radius: 20px;
  background: rgba(17,24,39,.96);
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.compact { width: min(460px, 100%); }
.topbar, .status-row, .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
h1 { margin: 5px 0 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.brand {
  color: #a5b4fc;
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .14em;
}
.muted { color: #aeb9ca; line-height: 1.65; }
.stack { display: grid; gap: 18px; margin-top: 24px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 8px; font-weight: 650; }
input, select, button, .button-link, textarea {
  font: inherit;
}
input, select {
  width: 100%;
  padding: 13px;
  border: 1px solid #36445e;
  border-radius: 11px;
  color: #f8fafc;
  background: #111827;
}
.drop-zone {
  padding: 28px;
  border: 2px dashed #53627b;
  border-radius: 15px;
  cursor: pointer;
  transition: .2s ease;
}
.drop-zone:hover { border-color: #818cf8; background: rgba(99,102,241,.06); }
.drop-zone span { color: #94a3b8; font-size: .9rem; font-weight: 400; }
button, .button-link {
  padding: 13px 16px;
  border: 0;
  border-radius: 11px;
  background: #6366f1;
  color: white;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
button:hover, .button-link:hover { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: wait; }
.secondary { background: #263248; }
.small { padding: 9px 12px; font-size: .9rem; }
.panel {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid #334155;
  border-radius: 15px;
  background: #0f172a;
}
progress { width: 100%; height: 18px; margin-top: 12px; }
.actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 18px; }
textarea {
  width: 100%;
  min-height: 320px;
  margin-top: 18px;
  padding: 15px;
  resize: vertical;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #080d18;
  color: #e5e7eb;
  line-height: 1.55;
}
.error, .warning {
  margin-top: 18px;
  padding: 13px;
  border-radius: 11px;
}
.error { background: #7f1d1d; }
.warning { background: #78350f; }
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .card { padding: 22px; }
}


.wide { width: min(1050px, 100%); }
h2 { margin: 0; }
.compact-text { margin: 4px 0 0; }
.editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}
.rename-box {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #111827;
}
.rename-box button { min-height: 48px; }
#preview { min-height: 500px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.danger { background: #7f1d1d; }
.success {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #14532d;
}
.inline-message { margin-top: 14px; }
@media (max-width: 760px) {
  .rename-box { grid-template-columns: 1fr; }
  .editor-heading { align-items: flex-start; flex-direction: column; }
}


.login-card {
  max-width: 460px;
  margin: 8vh auto;
}

.log-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.log-summary strong {
  font-size: 2rem;
}

.logs-table-wrapper {
  overflow-x: auto;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
}

.logs-table th,
.logs-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.logs-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.empty-state {
  padding: 28px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  opacity: 0.8;
}


.logs-table code {
  font-size: 0.92rem;
  white-space: nowrap;
}

input[name="nigend"] {
  letter-spacing: 0.18em;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
