/* eSOZO Demos Portal — shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img  { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a      { color: inherit; text-decoration: none; }

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:      #06080f;
  --bg-2:    #0b1220;
  --bg-3:    #111b30;
  --line:    rgba(255,255,255,.08);
  --line-2:  rgba(255,255,255,.15);
  --ink:     #f8fafc;
  --ink-2:   #e2e8f0;
  --muted:   #94a3b8;
  --muted-2: #64748b;
  --blue:    #60a5fa;
  --blue-2:  #3b82f6;
  --blue-bg: rgba(59,130,246,.12);
  --green:   #34d399;
  --red:     #f87171;
  --red-bg:  rgba(248,113,113,.12);
  --yellow:  #fbbf24;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6,8,15,.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  height: 64px;
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.brand {
  font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
  color: var(--ink); display: flex; align-items: center; gap: 8px;
}
.brand .dot { color: var(--blue); }
.brand .badge {
  font-size: 10px; font-weight: 600; background: var(--blue-bg);
  color: var(--blue); padding: 2px 8px; border-radius: 999px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-chip {
  font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px;
}
.user-chip span { color: var(--ink-2); font-weight: 600; }

/* ── Buttons ── */
.btn {
  padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: none; cursor: pointer; display: inline-flex; align-items: center;
  gap: 6px; transition: all .15s; text-decoration: none; white-space: nowrap;
}
.btn-primary  { background: var(--blue-2); color: #fff; }
.btn-primary:hover  { background: #2563eb; }
.btn-ghost  { background: transparent; color: var(--muted); border: 1px solid var(--line-2); }
.btn-ghost:hover  { color: var(--ink); border-color: var(--muted-2); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid transparent; }
.btn-danger:hover { background: rgba(248,113,113,.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-logout { background: transparent; color: var(--muted-2); font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); }
.btn-logout:hover { color: var(--ink-2); border-color: var(--line-2); }

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.field input, .field select, .field textarea {
  background: var(--bg-2); border: 1px solid var(--line-2);
  color: var(--ink); padding: 10px 14px; border-radius: 8px;
  font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-2); }
.field select option { background: var(--bg-2); }
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Cards ── */
.card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px;
}

/* ── Table ── */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; font-weight: 700; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
td {
  padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.badge-green { background: rgba(52,211,153,.12); color: var(--green); }
.badge-blue  { background: var(--blue-bg); color: var(--blue); }
.badge-muted { background: rgba(148,163,184,.1); color: var(--muted); }
.badge-red   { background: var(--red-bg); color: var(--red); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px); z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px;
  padding: 32px; width: 100%; max-width: 520px;
  transform: translateY(12px); transition: transform .2s;
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.modal-close { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--ink); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-stack { display: flex; flex-direction: column; gap: 16px; }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  background: var(--bg-3); border: 1px solid var(--line-2);
  color: var(--ink-2); padding: 12px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 500; box-shadow: 0 8px 32px rgba(0,0,0,.4);
  transform: translateY(16px); opacity: 0; transition: all .25s; pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.success { border-color: rgba(52,211,153,.3); color: var(--green); }
#toast.error   { border-color: rgba(248,113,113,.3); color: var(--red); }

/* ── Alert ── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-error   { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248,113,113,.2); }
.alert-success { background: rgba(52,211,153,.1); color: var(--green); border: 1px solid rgba(52,211,153,.2); }

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--muted-2);
}
.empty-state .icon { font-size: 36px; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: 14px; }

/* ── Misc ── */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 32px 28px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.text-muted { color: var(--muted-2); font-size: 13px; }
.gap-2 { gap: 8px; }
.flex { display: flex; align-items: center; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
