/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:    #00d4ff;
  --bg0:      #050810;
  --bg1:      #080d1a;
  --bg2:      #0c1222;
  --bg3:      #111827;
  --border:   #1a2540;
  --text:     #e8edf5;
  --muted:    #6b7a99;
  --green:    #00ff9d;
  --orange:   #ff6b35;
  --red:      #ff3b5c;
  --purple:   #b44fff;
  --radius:   10px;
  --shadow:   0 4px 24px rgba(0,0,0,.5);
}

body.dxtt-body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg0);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Typography ───────────────────────────────────────────── */
.dxtt-h1 { font-size: 1.75rem; font-weight: 800; color: #fff; margin-bottom: .5rem; }
.dxtt-muted { color: var(--muted); }
.dxtt-sm { font-size: .82rem; }
.dxtt-mono { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: .85rem; }
.dxtt-cyan { color: var(--brand); }
.dxtt-stag { font-size: .75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--brand); font-weight: 700; margin-bottom: .25rem; }

/* ── Layout ───────────────────────────────────────────────── */
.dxtt-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,212,255,.08) 0%, transparent 70%), var(--bg0);
}

.dxtt-login-box {
  width: 100%;
  max-width: 440px;
}

.dxtt-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dxtt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.dxtt-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dxtt-brand-inline {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 1px;
}

.dxtt-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ── Brand / Logo ─────────────────────────────────────────── */
.dxtt-brand { text-align: center; margin-bottom: 32px; }
.dxtt-logo { max-height: 56px; width: auto; }
.dxtt-logo-txt {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), #0090b3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 900; color: var(--bg0);
  margin-bottom: 8px;
  box-shadow: 0 0 30px rgba(0,212,255,.3);
}
.dxtt-brand-name { font-size: 1.25rem; font-weight: 800; color: #fff; }
.dxtt-brand-sub  { font-size: .85rem; color: var(--muted); }

/* ── Card ─────────────────────────────────────────────────── */
.dxtt-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px;
  box-shadow: var(--shadow);
}

.dxtt-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ── Form ─────────────────────────────────────────────────── */
.dxtt-fg { margin-bottom: 16px; }
.dxtt-fg label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 6px;
}
.dxtt-fg input,
.dxtt-fg textarea,
.dxtt-fg select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}
.dxtt-fg input::placeholder,
.dxtt-fg textarea::placeholder { color: var(--muted); }
.dxtt-fg input:focus,
.dxtt-fg textarea:focus,
.dxtt-fg select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,212,255,.15);
}
.dxtt-fg textarea { resize: vertical; min-height: 110px; }
.dxtt-fg select option { background: var(--bg3); }

.dxtt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Buttons ──────────────────────────────────────────────── */
.dxtt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: var(--brand);
  color: var(--bg0);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  text-decoration: none;
  font-family: inherit;
}
.dxtt-btn:hover { opacity: .88; transform: translateY(-1px); }
.dxtt-btn:active { transform: translateY(0); }
.dxtt-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.dxtt-btn-sm { width: auto; padding: 8px 16px; font-size: .88rem; }

.dxtt-btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.dxtt-btn-ghost:hover { color: var(--text); border-color: var(--text); opacity: 1; }

/* ── Alert ────────────────────────────────────────────────── */
.dxtt-alert {
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255,59,92,.12);
  border: 1px solid rgba(255,59,92,.3);
  color: #ff6b6b;
  font-size: .9rem;
  margin-bottom: 16px;
}

/* ── Stats row ────────────────────────────────────────────── */
.dxtt-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0 28px;
}
.dxtt-stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dxtt-stat-val {
  font-size: 2rem;
  font-weight: 900;
  color: var(--brand);
  font-family: 'JetBrains Mono', monospace;
}
.dxtt-stat-lbl {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

/* ── Table ────────────────────────────────────────────────── */
.dxtt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.dxtt-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  font-weight: 700;
}
.dxtt-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(26,37,64,.5);
  vertical-align: middle;
}
.dxtt-table tr:last-child td { border-bottom: none; }
.dxtt-table tr:hover td { background: rgba(0,212,255,.03); }

/* ── Badges ───────────────────────────────────────────────── */
.dxtt-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: rgba(107,122,153,.2);
  color: var(--muted);
}
.dxtt-badge-open { background: rgba(255,59,92,.15); color: #ff6b6b; }
.dxtt-badge-prog { background: rgba(255,107,53,.15); color: var(--orange); }
.dxtt-badge-wait { background: rgba(180,79,255,.15); color: var(--purple); }
.dxtt-badge-done { background: rgba(0,255,157,.15); color: var(--green); }

/* ── Misc ─────────────────────────────────────────────────── */
.dxtt-loading {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-size: .9rem;
}
.dxtt-loading::before {
  content: '';
  display: block;
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dxtt-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}
.dxtt-empty p { font-size: 1.1rem; margin-bottom: 20px; }

.dxtt-link {
  text-align: center;
  margin-top: 20px;
  font-size: .9rem;
  color: var(--muted);
}
.dxtt-link a { color: var(--brand); text-decoration: none; font-weight: 700; }
.dxtt-link a:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .dxtt-header { padding: 12px 16px; }
  .dxtt-main { padding: 24px 16px; }
  .dxtt-stats { grid-template-columns: repeat(2, 1fr); }
  .dxtt-grid2 { grid-template-columns: 1fr; }
  .dxtt-card { padding: 20px 16px; }
  .dxtt-h1 { font-size: 1.4rem; }
  .dxtt-table th:nth-child(3),
  .dxtt-table td:nth-child(3),
  .dxtt-table th:nth-child(5),
  .dxtt-table td:nth-child(5) { display: none; }
}
