/* LogicSystem Customer Billing Portal — brand: Nunito + Material Blue */
:root {
  --blue: #2196F3;
  --blue-dark: #1565C0;
  --blue-light: #90CAF9;
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --fill: #F5F5F5;
  --text: #1A1A1A;
  --muted: #6B7280;
  --border: #E5E7EB;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
}
.mono { font-family: 'Roboto Mono', ui-monospace, monospace; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 22px; }
.brand-mark.lg { font-size: 40px; }
.brand-name { font-weight: 800; font-size: 18px; color: var(--blue-dark); }
.brand-sub { font-weight: 600; color: var(--muted); font-size: 14px; }
.topnav { display: flex; align-items: center; gap: 12px; }
.who { color: var(--muted); font-weight: 600; }

.container { flex: 1; width: 100%; max-width: 1100px; margin: 24px auto; padding: 0 20px; }
.footer {
  display: flex; justify-content: space-between; padding: 18px 24px;
  color: var(--muted); font-size: 13px; border-top: 1px solid var(--border);
}

.btn { display: inline-block; padding: 9px 16px; border-radius: 8px; font-weight: 700;
  font-family: inherit; font-size: 14px; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--border); }
.btn-block { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }

/* Auth */
.auth-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.auth-card { width: 100%; max-width: 400px; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head h1 { font-size: 22px; margin: 10px 0 6px; }
.form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.form input { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--fill); font-family: inherit; font-size: 15px; }
.form input:focus { outline: 2px solid var(--blue); border-color: var(--blue); background: #fff; }
.alert { background: #FDECEA; color: #B3261E; border: 1px solid #F5C6C0; padding: 10px 12px;
  border-radius: 8px; margin-bottom: 14px; font-weight: 600; }

/* Dashboard */
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.pagehead h1 { margin: 0; font-size: 26px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-label { color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; }
.stat-value { font-size: 28px; font-weight: 800; margin: 6px 0 2px; color: var(--blue-dark); }
.stat-sub { font-size: 13px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
h2 { font-size: 17px; margin: 0 0 14px; }
.small { font-size: 12.5px; }
.center { text-align: center; }
.muted { color: var(--muted); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .02em; padding: 8px 10px; border-bottom: 2px solid var(--border); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--fill); }
.table .r { text-align: right; }
.table tbody tr:hover { background: var(--fill); }

.pill { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--fill); }
.pill-running, .pill-active { background: #E3F2FD; color: var(--blue-dark); }
.pill-destroyed { background: #FDECEA; color: #B3261E; }

@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 4px; }
}
