:root {
    --gold: #E3B341;
    --gold-dark: #B8860B;
    --green: #16A34A;
    --red: #B02A24;
    --navy: #0D111C;
    --text-light: #F5F0E1;
    --text-dark: #1A1A1A;
    --card-bg: #161B29;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--navy);
    color: var(--text-light);
}

/* Global link color — main.css loads on every single page site-wide, so no
   link anywhere can ever fall back to browser-default blue. Pages with their
   own richer link styling (app.css scoped to .user-area/.admin-area) override
   this naturally via normal CSS cascade/specificity. */
a {
    color: var(--gold);
    text-decoration: none;
}
a:hover { color: #F5D98B; }
a:visited { color: var(--gold); }

.site-header, .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: var(--card-bg);
}

.site-header nav a, .sidebar nav a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #F5D98B 0%, #E3B341 40%, #B8860B 100%);
    color: var(--text-dark);
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(227,179,65,0.3); }

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--green);
    color: var(--green);
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.12s ease;
}
.btn-secondary:hover { background: rgba(22,163,74,0.12); }

.btn-large { padding: 14px 32px; font-size: 1.1em; }

.hero { text-align: center; padding: 80px 20px; }
.tagline { color: var(--green); font-weight: bold; letter-spacing: 2px; }

.vault-display {
    margin: 40px auto;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--gold-dark);
    border-radius: 12px;
    padding: 24px;
}

.auth-page {
    max-width: 420px;
    margin: 60px auto;
    padding: 32px;
    background: var(--card-bg);
    border-radius: 12px;
}

/* ---------------------------------------------------------------
   Global form styling — applies everywhere (previously only
   .auth-page had styled inputs, leaving every admin/user page form
   using unstyled browser defaults that break on mobile)
   --------------------------------------------------------------- */
label {
    display: block;
    margin-bottom: 14px;
    font-size: 0.9em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="file"],
input[type="tel"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #0D111C;
    color: var(--text-light);
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(227,179,65,0.2);
}

input[type="checkbox"], input[type="radio"] {
    width: auto;
    margin-top: 0;
    vertical-align: middle;
}

textarea { min-height: 90px; resize: vertical; }

form { max-width: 560px; }
form.form-wide { max-width: 100%; }

button, input[type="submit"] {
    font-family: inherit;
    font-size: 1em;
    min-height: 44px; /* tap-friendly target size */
}

.btn-primary, .btn-secondary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-error { background: rgba(176,42,36,0.2); border: 1px solid var(--red); color: #ff9d97; }
.alert-info { background: rgba(227,179,65,0.15); border: 1px solid var(--gold); color: var(--gold); }

.badge-warning {
    background: var(--red);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* ------------------------------------------------------------
   NOTE: internal app-shell styles (sidebar, topbar, cards,
   tables, dashboard) live in app.css, scoped to .user-area /
   .admin-area. Public landing + auth pages use public.css.
   ------------------------------------------------------------ */
