/* Beam — clean, credible, in-between */

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --text-dim: #9ca3af;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --alt-row: #fafafa;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

header.site-header {
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.site-header .page {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
}

.brand {
    font-size: 20px;
    font-weight: 650;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

nav.site-nav {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

nav.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
}
nav.site-nav a:hover { color: var(--text); }
nav.site-nav a.active { color: var(--text); font-weight: 600; }

main {
    padding: 40px 0 60px;
}

footer.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 60px;
}

.site-footer .page {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-footer .footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
}
.site-footer a:hover { color: var(--text); }

/* ---------- Typography ---------- */

h1 {
    font-size: 28px;
    font-weight: 650;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 20px;
    font-weight: 650;
    margin: 32px 0 12px;
    letter-spacing: -0.01em;
}

p { margin: 0 0 14px; }

.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: 13px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Cards / boxes ---------- */

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

.card + .card { margin-top: 0; }

.card h2:first-child, .card h3:first-child { margin-top: 0; }

/* ---------- Forms ---------- */

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 550;
    color: var(--text);
    margin-bottom: 5px;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="email"] {
    width: 100%;
    padding: 9px 11px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    outline: none;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.field .hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 18px;
    font-size: 14px;
}

.checkbox-row input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px; height: 16px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 9px 18px;
    font-size: 14.5px;
    font-weight: 550;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    transition: background 0.1s ease;
}

.btn:hover { background: #f9fafb; }

.btn.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-dark); text-decoration: none; }

.btn.danger {
    color: var(--error);
    border-color: var(--error);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.small {
    padding: 5px 10px;
    font-size: 13px;
}

/* ---------- Alerts / status ---------- */

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid;
    margin: 0 0 16px;
    font-size: 14px;
}

.alert.error   { background: var(--error-bg);   border-color: #fecaca; color: var(--error); }
.alert.success { background: var(--success-bg); border-color: #bbf7d0; color: var(--success); }
.alert.warning { background: var(--warning-bg); border-color: #fde68a; color: var(--warning); }
.alert.info    { background: #eff6ff;           border-color: #bfdbfe; color: var(--accent); }

.hidden { display: none !important; }

/* ---------- Badges ---------- */

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 999px;
    border: 1px solid;
}

.badge.active   { background: var(--success-bg); color: var(--success); border-color: #bbf7d0; }
.badge.expired  { background: #f3f4f6; color: var(--text-muted); border-color: var(--border); }
.badge.revoked  { background: var(--error-bg); color: var(--error); border-color: #fecaca; }

/* ---------- Tables ---------- */

table.keys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.keys-table th,
table.keys-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

table.keys-table th {
    font-weight: 550;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

table.keys-table tr:nth-child(even) td { background: var(--alt-row); }

.key-display {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.key-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---------- Hero ---------- */

.hero {
    padding: 20px 0 8px;
}

.hero .price {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: -8px;
    margin-bottom: 20px;
}

.hero .cta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.feature-list li {
    padding: 6px 0 6px 20px;
    position: relative;
    color: var(--text);
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* ---------- Empty state ---------- */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .big {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 4px;
    font-weight: 500;
}

/* ---------- Mobile ---------- */

@media (max-width: 520px) {
    body { font-size: 14.5px; }
    h1 { font-size: 24px; }
    .site-header .page { flex-direction: column; gap: 8px; align-items: flex-start; }
    nav.site-nav { flex-wrap: wrap; gap: 12px; }
    table.keys-table { font-size: 13px; }
    table.keys-table th, table.keys-table td { padding: 8px 8px; }
}



/* ---------- Password visibility toggle (attached by password-toggle.js) ---------- */

.pw-wrap {
    position: relative;
    display: block;
}

.pw-wrap input {
    padding-right: 40px !important;  /* leave space for the eye button */
}

.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.pw-toggle:hover {
    color: var(--text);
    background: #f3f4f6;
}

.pw-toggle:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
