/* ==========================================================================
   Rally Manager — design tokens
   Palette: stone (#EDEAE2), ink (#20242B), rally yellow (#F2B705),
            stage green (#2F5233), alert rust (#B8412F)
   Type: Oswald (display/plate), Inter (body), JetBrains Mono (data/timing)
   Signature: chevron corner marks referencing pace-note direction arrows
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500&display=swap');

:root {
    --stone: #EDEAE2;
    --stone-dim: #E1DDD1;
    --ink: #20242B;
    --ink-soft: #4B505C;
    --yellow: #F2B705;
    --green: #2F5233;
    --rust: #B8412F;
    --white: #FFFFFF;

    --radius: 3px;
    --border: 2px solid var(--ink);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--stone);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

h1, h2, h3, .brand, .btn, th {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

code, .mono, .stat-value {
    font-family: 'JetBrains Mono', monospace;
}

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

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: var(--ink);
    border-bottom: 4px solid var(--yellow);
}

.brand {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.site-header nav a {
    color: var(--stone);
    text-decoration: none;
    margin-left: 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.site-header nav a:hover {
    border-bottom-color: var(--yellow);
}

.site-footer {
    text-align: center;
    padding: 24px;
    color: var(--ink-soft);
    font-size: 0.85rem;
}

/* ---------------- Signature: chevron corner card ---------------- */
/* Rally pace notes use chevron arrows to mark corner severity;
   we reuse that mark as a corner flourish on card-style panels. */

.card {
    position: relative;
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
}

.card::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 24px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid var(--yellow);
}

.card h1, .card h2 {
    margin-top: 0;
}

.plate {
    display: inline-block;
    background: var(--ink);
    color: var(--yellow);
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius);
    letter-spacing: 0.08em;
    font-size: 0.85rem;
}

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

label {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    margin-bottom: 6px;
    margin-top: 18px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--stone);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--ink);
}

input:focus {
    outline: 3px solid var(--yellow);
    outline-offset: 1px;
}

.help-text {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-top: 4px;
}

.field-error {
    color: var(--rust);
    font-size: 0.85rem;
    margin-top: 4px;
}

.btn {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 28px;
    background: var(--yellow);
    color: var(--ink);
    border: var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: var(--ink);
    color: var(--yellow);
}

.btn-secondary {
    background: var(--stone);
}

/* ---------------- Flash messages ---------------- */

.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid;
}

.flash-error   { background: #F6E4E0; border-color: var(--rust);  color: var(--rust); }
.flash-success { background: #E4EDE6; border-color: var(--green); color: var(--green); }

/* ---------------- Dashboard bits ---------------- */

.team-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.team-logo {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--stone-dim);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--stone-dim);
}

.stat-label {
    color: var(--ink-soft);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-weight: 500;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

th, td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--stone-dim);
    font-size: 0.9rem;
}

th {
    font-size: 0.75rem;
    color: var(--ink-soft);
}

tr.is-you td {
    background: #FBF0C7;
    font-weight: 600;
}
