/* ===============================
   DESIGN TOKENS
================================ */

:root {
    /* --- Core palette --- */
    --bg-page: #f2f3f5;
    --bg-panel: #ffffff;
    --bg-soft: #f3f4f6;

    --border: #e5e7eb;

    /* --- Text scale --- */
    --text-strong: #111827;
    --text-default: #374151;
    --text-muted: #6b7280;
    --text-subtle: #9ca3af;

    --accent: #2a6a7c;
    --accent-dark: #215463;
    --accent-strong: #183f4b;

    --accent-soft: rgba(42, 106, 124, 0.15);
    --accent-muted: rgba(42, 106, 124, 0.12);
    --accent-border: rgba(42, 106, 124, 0.35);

    /* --- Status --- */
    --danger: #dc2626;
    --warning: #f59e0b;
    --success: #16a34a;

    /* --- Radii --- */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* --- Shadows --- */
    --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.05);
}

/* ===============================
   BASE
================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    background: var(--bg-page);
    color: var(--text-default);
}

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-strong);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }

.page-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ===============================
   GLOBAL LINK STYLE
================================ */

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s ease;
}

a:hover,
a:focus {
    opacity: 0.75;
}

/* visited links shouldn't go purple */
a:visited {
    color: var(--accent);
}

/* ===============================
   HEADER, NAV AND FOOTER
================================ */

.site-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.25rem 2rem;   /* ↓ was 0.75rem */
    align-items: center;
    gap: 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
}

/* logo */

.logo img {
    height: 80px;
    display: block;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    flex: 1;
    justify-self: start;
}

.main-nav li {
    display: flex;
    align-items: center;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-list a {
    color: var(--text-default);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.2rem 0.35rem;  /* ↓ slimmer */
    line-height: 1.1;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-list a:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text-strong);
}

.nav-link {
    color: #e8edf0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.4rem 0.2rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.08);
}

.site-header .nav-list a {
    color: var(--accent);
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
    background: transparent;
}

.site-header .nav-list a:hover {
    background: transparent !important;
    opacity: 0.7;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    all: unset;
    font: inherit;
    color: inherit;
    display: inline-block;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.site-footer {
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-top: 3rem;
    padding: 2rem 0;
    background: transparent;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===============================
   INPUTS
================================ */

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea,
select {
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    font: inherit;
    color: var(--text-strong);
    width: 100%;
    transition: border 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 2px var(--accent-soft);
}

form textarea,
form select {
    background: #f3f4f6 !important;
    border: 1px solid var(--border) !important;
    color: var(--text-strong) !important;
}

form textarea:focus,
form select:focus {
    background: white !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.checkbox-field {
    padding: 0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-weight: 500;
}

.radio-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* custom circle */
.radio-ui {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border 0.15s ease, background 0.15s ease;
}

/* inner dot */
.radio-ui::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* checked state */
.radio-option input:checked + .radio-ui::after {
    opacity: 1;
    transform: scale(1);
}

/* focus ring */
.radio-option input:focus + .radio-ui {
    box-shadow: 0 0 0 2px var(--accent-soft);
}

button,
input[type="submit"] {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}

button:hover,
input[type="submit"]:hover {
    background: var(--accent-dark);
}

.btn-primary {
    background: var(--accent);
    color: white !important;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-secondary {
    background: var(--border);
    color: var(--text-strong);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-dark);
    color: white !important;
}

.btn-secondary:hover {
    background: #d1d5db;
}
