/* adamapi customer portal — shares brand tokens with /site's styles.css */

:root {
  --bg: #08080a;
  --bg-soft: #131316;
  --glass: rgba(255,255,255,0.05);
  --glass-strong: rgba(255,255,255,0.09);
  --glass-border: rgba(255,255,255,0.10);
  --white: #f7f6f2;
  --grey: #a4a29b;
  --grey-dim: #6f6d68;
  --accent: #ff4519;
  --accent-2: #ffb199;
  --accent-glow: rgba(255,69,25,0.32);
  --good: #3ddc84;
  --warn: #ffc65c;
  --bad: #ff5c5c;
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --display: "Bahnschrift", var(--sys);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--white); font-family: var(--sys);
  line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }

.mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1000px 620px at 8% -8%, rgba(255,69,25,0.14), transparent 55%),
    radial-gradient(760px 520px at 96% 8%, rgba(255,177,153,0.06), transparent 50%);
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }
@media (max-width: 560px) { .wrap { padding: 0 18px; } }

/* ---------- nav ---------- */
.navbar { position: sticky; top: 0; z-index: 50; display: flex; justify-content: center; padding-top: 18px; }
nav {
  width: min(760px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 10px 11px 22px; border-radius: 999px;
  background: rgba(16,16,18,0.65); backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: 0 10px 34px rgba(0,0,0,0.4);
}
.logo { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-email { font-size: 13px; color: var(--grey); }
.nav-btn {
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--white);
  padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s cubic-bezier(0.16,1,0.3,1);
}
.nav-btn:hover { border-color: rgba(255,255,255,0.32); }
.nav-btn:active { transform: scale(0.95); }
.nav-btn.primary { background: var(--white); color: #111; border: none; }

/* ---------- auth pages ---------- */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; position: relative; z-index: 1; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 36px 32px; backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}
.auth-card h1 { font-family: var(--display); font-size: 26px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-card .auth-sub { color: var(--grey); font-size: 14px; margin-bottom: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--grey); margin-bottom: 7px; font-weight: 600; }
.field input {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 12px 14px; color: var(--white); font-size: 14.5px; font-family: var(--sys);
  transition: border-color 0.2s ease;
}
.field input:focus { outline: none; border-color: var(--accent); }
.auth-submit {
  width: 100%; background: var(--accent); color: #150f0c; border: none; padding: 13px; border-radius: 999px;
  font-weight: 700; font-size: 14.5px; cursor: pointer; margin-top: 6px;
  box-shadow: 0 8px 26px var(--accent-glow); transition: transform 0.15s cubic-bezier(0.16,1,0.3,1);
}
.auth-submit:active { transform: scale(0.97); }
.auth-submit:disabled { opacity: 0.6; cursor: default; }
.auth-error { color: var(--bad); font-size: 13px; margin-top: 12px; min-height: 16px; }
.auth-foot { margin-top: 22px; font-size: 13.5px; color: var(--grey); text-align: center; }
.auth-foot a { color: var(--accent-2); font-weight: 600; }
.starter-key-box {
  margin-top: 18px; padding: 14px; border-radius: 12px; background: rgba(255,69,25,0.08);
  border: 1px solid rgba(255,69,25,0.3); font-family: var(--mono); font-size: 12.5px; word-break: break-all;
}

/* ---------- dashboard layout ---------- */
.dash { padding: 40px 32px 80px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.dash-head h1 { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.plan-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--glass-border); color: var(--accent-2); margin-left: 10px; vertical-align: middle;
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 800px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-tile { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 16px; padding: 20px; backdrop-filter: blur(10px); }
.stat-tile .stat-label { font-size: 12px; color: var(--grey); margin-bottom: 8px; }
.stat-tile .stat-value { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.stat-tile .stat-sub { font-size: 11.5px; color: var(--grey-dim); margin-top: 4px; }

.panel { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 18px; padding: 26px; backdrop-filter: blur(10px); margin-bottom: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -0.005em; }
.panel-actions { display: flex; gap: 10px; }

.btn { border-radius: 999px; padding: 10px 18px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--glass-border); background: var(--glass); color: var(--white); transition: transform 0.15s cubic-bezier(0.16,1,0.3,1), border-color 0.2s ease; }
.btn:hover { border-color: rgba(255,255,255,0.3); }
.btn:active { transform: scale(0.95); }
.btn-accent { background: var(--accent); color: #150f0c; border: none; box-shadow: 0 6px 18px var(--accent-glow); }
.btn-danger { color: var(--bad); }
.btn:disabled { opacity: 0.45; cursor: default; }

/* alerts */
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); }
.alert-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.alert-item.critical .dot { background: var(--bad); }
.alert-item.warning .dot { background: var(--warn); }
.alert-item.info .dot { background: var(--grey); }

/* table */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; color: var(--grey-dim); font-weight: 600; padding: 0 12px 10px; text-transform: uppercase; letter-spacing: 0.03em; }
td { padding: 13px 12px; border-top: 1px solid rgba(255,255,255,0.07); vertical-align: middle; }
tr:first-child td { border-top: none; }
.mono { font-family: var(--mono); font-size: 12.5px; color: var(--grey); }
.status-pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; display: inline-block; }
.status-active { background: rgba(61,220,132,0.14); color: var(--good); }
.status-revoked, .status-expired { background: rgba(255,92,92,0.14); color: var(--bad); }
.status-limit_reached { background: rgba(255,198,92,0.14); color: var(--warn); }
.type-pill { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--glass-strong); color: var(--grey); margin-left: 8px; }
.progress-track { width: 90px; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.empty-row { color: var(--grey-dim); text-align: center; padding: 30px 0; }

/* usage chart */
.chart-wrap { display: flex; align-items: flex-end; gap: 3px; height: 130px; margin-top: 6px; }
.chart-bar { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(255,69,25,0.35)); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.chart-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--grey-dim); margin-top: 8px; }

/* modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { width: 100%; max-width: 380px; background: var(--bg-soft); border: 1px solid var(--glass-border); border-radius: 18px; padding: 26px; box-shadow: 0 30px 70px rgba(0,0,0,0.6); }
.modal-card h3 { font-family: var(--display); font-size: 18px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.copy-hint { font-size: 12px; color: var(--grey-dim); margin-top: 8px; }
.hidden { display: none !important; }

::selection { background: var(--accent); color: #150f0c; }
