/* Design system mirrored from my.easysendglobal.com (probe 2026-06-09):
   Golos Text font, light theme, pink accent, pill-shaped controls. */

:root {
  --bg: #ececf0;
  --panel: #ffffff;
  --content-bg: #f5f6fa;
  --border: #e2e8f0;
  --text: #2d2c33;
  --text-soft: rgba(18, 18, 18, 0.64);
  --muted: #86858c;
  --faint: rgba(18, 18, 18, 0.48);
  --subtle: rgba(18, 18, 18, 0.04);
  --subtle-2: rgba(18, 18, 18, 0.08);
  --accent: #e7428b;
  --accent-soft: rgba(231, 66, 139, 0.1);
  --green: #008a53;
  --green-bg: rgba(0, 173, 104, 0.08);
  --red: #d33;
  --red-bg: rgba(221, 51, 51, 0.08);
  --amber: #946300;
  --amber-bg: rgba(255, 184, 0, 0.12);
  --radius: 12px;
  --radius-pill: 32px;
  --shadow-card: 0 1px 2px rgba(18, 18, 18, 0.04);
  --shadow-auth: 0 4px 24px rgba(18, 18, 18, 0.06);
}

html[data-theme="dark"] {
  --bg: #14161c;
  --panel: #1c1f27;
  --content-bg: #181b22;
  --border: #2a2e3a;
  --text: #e6e8ee;
  --text-soft: rgba(230, 232, 238, 0.72);
  --muted: #8b90a0;
  --faint: rgba(230, 232, 238, 0.48);
  --subtle: rgba(255, 255, 255, 0.06);
  --subtle-2: rgba(255, 255, 255, 0.1);
  --accent-soft: rgba(231, 66, 139, 0.18);
  --green: #2ecf8e;
  --green-bg: rgba(0, 173, 104, 0.16);
  --red: #ff6b6b;
  --red-bg: rgba(221, 51, 51, 0.16);
  --amber: #ffc14d;
  --amber-bg: rgba(255, 184, 0, 0.14);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-auth: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 "Golos Text", system-ui, -apple-system, "Segoe UI",
        Roboto, sans-serif;
}

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
}
.brand { padding: 4px 8px 20px; }
.brand .name { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.brand .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}
.nav a:hover { background: var(--subtle); }
.nav a.active { background: var(--accent); color: #fff; font-weight: 500; }
.nav a .ico { width: 18px; text-align: center; color: var(--faint); }
.nav a.active .ico { color: #fff; }

.sidebar .foot { margin-top: auto; padding-top: 16px; }
.sidebar .foot button {
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  padding: 0 12px;
}
.sidebar .foot button:hover { background: var(--subtle); color: var(--text); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.topbar .stat {
  background: var(--content-bg);
  border-radius: var(--radius);
  padding: 8px 18px;
  text-align: center;
}
.topbar .stat .label { font-size: 11px; color: var(--muted); }
.topbar .stat .value { font-size: 15px; font-weight: 600; }
.topbar .who { font-size: 14px; color: var(--text-soft); }

.content { padding: 24px 28px; }
.content h1 { font-size: 26px; font-weight: 700; margin: 0 0 20px; }

/* ---------- Cards ---------- */
.card {
  background: var(--panel);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}

/* ---------- Pills / tabs ---------- */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--subtle);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.pill:hover { background: var(--subtle-2); }
.pill.active { background: var(--accent); color: #fff; }

/* ---------- Tables ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
table.list td {
  font-size: 15px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: var(--content-bg); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.warn { background: var(--amber-bg); color: var(--amber); }
.badge.err { background: var(--red-bg); color: var(--red); }
.badge.neutral { background: var(--subtle-2); color: var(--text); }

/* ---------- Forms ---------- */
label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--muted); }
input, select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--subtle);
  color: var(--text-soft);
}
.btn:hover { background: var(--subtle-2); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #d63a7f; }
.btn.block { width: 100%; }

.err-msg { color: var(--red); margin-top: 14px; font-size: 14px; }

/* ---------- Section pages (toolbars, filters, pagination) ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar h1 { margin: 0; }
.toolbar .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.filters input, .filters select { width: auto; padding: 9px 12px; }
.filters input[type="date"] { min-width: 150px; }
.filters .grow { flex: 1; min-width: 180px; }

.pill .count {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 12px;
}
.pill:not(.active) .count { background: var(--subtle-2); }

.cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cell-main { font-weight: 600; }
td .mono { font-family: ui-monospace, monospace; font-size: 13px; }
table.list a { color: inherit; text-decoration: none; }
table.list a:hover { color: var(--accent); }

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
}
.pager a, .pager span.dis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--subtle);
  color: var(--text-soft);
  text-decoration: none;
}
.pager a:hover { background: var(--subtle-2); }
.pager span.dis { opacity: 0.4; }

.flash-ok, .flash-err {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.flash-ok { background: var(--green-bg); color: var(--green); }
.flash-err { background: var(--red-bg); color: var(--red); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat-grid .stat {
  background: var(--content-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-grid .label { font-size: 12px; color: var(--muted); }
.stat-grid .value { font-size: 20px; font-weight: 700; margin-top: 2px; }

.dl {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-word; }
@media (max-width: 700px) {
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dt { margin-top: 10px; }
}

.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input { width: 160px; }
.card + .card, .card + h2, h2 + .card { margin-top: 20px; }
.content h2 { font-size: 19px; font-weight: 700; margin: 24px 0 14px; }

/* ---------- Auth pages (login / setup) ---------- */
body.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.auth-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 32px;
  width: 380px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-auth);
}
.auth-card h1 { font-size: 32px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.3px; }
.auth-card p.lead { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.auth-card .btn { margin-top: 22px; }

/* easysend-style label-less inputs on auth cards */
.auth-card input, .auth-card select {
  height: 56px;
  padding: 16px;
  margin-top: 12px;
  background: var(--subtle);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(18, 18, 18, 0.06);
  font-size: 15px;
}
.auth-card input::placeholder { color: var(--faint); }
.auth-card input:focus, .auth-card select:focus {
  box-shadow: inset 0 0 0 2px rgba(231, 66, 139, 0.92);
}
html[data-theme="dark"] .auth-card input,
html[data-theme="dark"] .auth-card select {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .auth-card input:focus,
html[data-theme="dark"] .auth-card select:focus {
  box-shadow: inset 0 0 0 2px rgba(231, 66, 139, 0.92);
}
.auth-card label { margin: 14px 0 0; }
.auth-card label + input, .auth-card label + select { margin-top: 6px; }

/* 2FA screen */
.auth-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.auth-head h1 { margin: 0; font-size: 24px; }
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--subtle);
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
}
.btn-back:hover { background: var(--subtle-2); }
.otp-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.otp-box {
  width: 46px;
  height: 56px;
  padding: 0;
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 0;
  background: var(--subtle);
  box-shadow: inset 0 0 0 1px var(--border);
}
.auth-card .otp-box { margin-top: 0; height: 56px; width: 46px; padding: 0; }
.otp-box:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(231, 66, 139, 0.92);
}
.auth-card code {
  display: block;
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-top: 6px;
  word-break: break-all;
  font-size: 13px;
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  width: 38px;
  height: 38px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--subtle); }
.theme-toggle .moon { display: inline; }
.theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: inline; }
body.auth .theme-toggle { position: fixed; top: 16px; right: 16px; }

/* ---------- Tables on small screens ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Mobile ---------- */
.burger {
  display: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  width: 38px;
  height: 38px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.scrim { display: none; }

@media (max-width: 900px) {
  .burger { display: inline-flex; align-items: center; justify-content: center; }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }
  .shell.nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  }
  .shell.nav-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.4);
  }

  .topbar {
    justify-content: space-between;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .content { padding: 16px; }
  .content h1 { font-size: 22px; margin-bottom: 14px; }
  .card { padding: 16px; border-radius: var(--radius); }
  table.list th { padding: 10px 12px; }
  table.list td { padding: 12px; font-size: 14px; }
  .auth-card { padding: 24px 20px; }
}
