/* ════════════════════════════════════════════════════
   base.css — shared across every page
   ════════════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── VARIABLES ── */
:root {
    --bg:          #05050f;
    --bg2:         #080814;
    --card:        rgba(255,255,255,0.03);
    --border:      rgba(0,180,255,0.15);
    --primary:     #00c3ff;
    --primary-dim: rgba(0,195,255,0.12);
    --text:        #ddeeff;
    --muted:       #5b7a90;

    /* Tells the browser our native form controls (select option lists,
       scrollbars, date pickers) should use dark UI chrome instead of the
       OS light default -- otherwise an open <select> popup renders with a
       light system background behind our light --text colour and options
       become unreadable. */
    color-scheme: dark;
}

/* ── BASE ELEMENTS ── */
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

a { text-decoration: none; color: inherit; }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── BUTTONS ── */
.btn-primary {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    background: var(--primary);
    color: #000;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(0,195,255,0.3);
    transition: all 0.2s;
}
.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0,195,255,0.65);
    transform: translateY(-1px);
}

.btn-ghost {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text);
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-full {
    width: 100%;
    padding: 10px;
    border-radius: 7px;
    font-size: 0.86rem;
    font-weight: 600;
    background: var(--primary);
    color: #000;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0,195,255,0.2);
    transition: all 0.2s;
}
.btn-full:hover { box-shadow: 0 0 22px rgba(0,195,255,0.45); }

.btn-outline {
    flex: 1;
    padding: 9px;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(0,195,255,0.35);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-outline:hover { background: var(--primary-dim); }

.btn-lg {
    padding: 14px 38px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    background: var(--primary);
    color: #000;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 26px rgba(0,195,255,0.4);
    transition: all 0.2s;
}
.btn-lg:hover { box-shadow: 0 0 44px rgba(0,195,255,0.7); transform: translateY(-2px); }

/* ── BADGES ── */
.badge {
    display: inline-block;
    font-size: 0.67rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.badge-active  { background: rgba(40,200,64,0.1);  color: #28c840; border: 1px solid rgba(40,200,64,0.2); }
.badge-expired { background: rgba(255,95,87,0.1);  color: #ff5f57; border: 1px solid rgba(255,95,87,0.2); }
.badge-pwd     { background: var(--primary-dim);   color: var(--primary); border: 1px solid rgba(0,195,255,0.2); }

/* ── FORM INPUTS (shared between auth and dashboard quick-create) ── */
.form-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--text);
    width: 100%;
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input::placeholder { color: var(--muted); }
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,195,255,0.08);
}
select.form-input option,
select.quick-input option,
select option {
    background: var(--bg2);
    color: var(--text);
}

.form-label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.form-group { margin-bottom: 14px; }

/* Shared export control: one compact, keyboard-accessible format chooser used
   identically everywhere (link analytics, campaign, bulk/import results, owner
   console accounts). Rendered by z4ps_export_control_html() and js/export.js. */
.export-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.export-control-label {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 2px;
}
.export-fmt-btn {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    display: inline-block;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.export-fmt-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-dim);
}
.export-fmt-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ── SHARED PAGE CHROME (nav / logo-bar / footer) ──
   Rendered by the partials in templates/partials/ (nav.php, logo-bar.php,
   footer.php) on EVERY page that uses layouts/public.php. These styles used to
   live only inside home.css and pricing.css, so any public page whose
   page-specific stylesheet did not re-declare them (report.css, legal.css)
   rendered the shared nav/logo/footer completely unstyled. They belong here in
   the always-loaded base sheet so the chrome is styled once, for every page.
   Pages may still override the logo-bar size (home/pricing do).
   Scoped to .site-nav rather than the bare `nav` element: a bare-element
   selector here also matched the dashboard sidebar's <nav class="sidebar-nav">
   (base.css loads on every page), turning the sidebar's nav list into its own
   fixed, full-viewport-width, semi-opaque bar that covered the dashboard
   content at any screen width. */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(5,5,15,0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-logo { display: none; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.logo-bar {
    margin-top: 64px;
    background: #000;
    width: 100%;
    display: flex; justify-content: center; align-items: center;
    padding: 32px 24px;
    border-bottom: 1px solid rgba(0,180,255,0.18);
}
.logo-bar img { width: clamp(240px, 40vw, 480px); }

footer {
    background: #000;
    border-top: 1px solid var(--border);
    padding: 48px 24px 28px;
}
/* Centre the footer content on the page column instead of pushing the logo to
   the far left and the links to the far right (space-between read as the links
   being "right-aligned"). Logo on top, links centred below, copy underneath --
   consistent on every page and tidy on mobile. */
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
}
.footer-logo img { height: 52px; opacity: 0.85; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    list-style: none;
}
.footer-links a { font-size: 0.83rem; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-copy {
    width: 100%;
    text-align: center;
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 12px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    /* The logo-bar sits between the fixed nav and the hero; on a phone its
       default 32px vertical padding is pure above-the-fold cost, so tighten it
       (and cap the wordmark) to help the hero clear the fold. Applies to every
       public page, all of which want a leaner header on mobile. */
    .logo-bar { padding: 14px 18px; }
    .logo-bar img { width: clamp(180px, 52vw, 240px); }
}
