/* ==========================================================
   Payout Slip Portal — responsive stylesheet
   Mobile-first: base styles target small screens, then widen.
   ========================================================== */

:root {
    --brand: #1f4e79;
    --brand-dark: #163a5c;
    --accent: #2e8b57;
    --danger: #c0392b;
    --border: #dde3ea;
    --bg: #f6f8fa;
    --text: #1d2733;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--brand);
    color: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.site-nav a {
    color: #eaf1f8;
    text-decoration: none;
    margin-left: 16px;
    font-size: 0.95rem;
}

.site-nav a:first-child { margin-left: 0; }
.site-nav a:hover { text-decoration: underline; }

/* ---------- Main content ---------- */
.page-content {
    padding: 24px 16px 48px;
    min-height: 60vh;
}

h2 {
    color: var(--brand-dark);
    margin-top: 0;
    font-size: 1.4rem;
}

h3 {
    color: var(--brand-dark);
    font-size: 1.1rem;
}

/* ---------- Forms ---------- */
form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    max-width: 480px;
}

.input {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.input label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.92rem;
}

.input input,
.input select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    width: 100%;
}

.input input:focus,
.input select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.15);
}

button,
.button {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}

button:hover,
.button:hover {
    background: var(--brand-dark);
}

/* ---------- Tables ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

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

th {
    background: #eef2f6;
    color: var(--brand-dark);
    width: 40%;
}

/* Responsive table: stack rows as key/value cards on narrow screens */
@media (max-width: 560px) {
    table, thead, tbody, th, td, tr {
        display: block;
        width: 100%;
    }

    thead { display: none; }

    tr {
        margin-bottom: 10px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
    }

    td, th {
        border-bottom: none;
    }

    td[data-label]::before,
    th[data-label]::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--brand-dark);
        font-size: 0.8rem;
        margin-bottom: 2px;
    }
}

/* ---------- Flash messages ---------- */
.message {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.message.success {
    background: #e7f6ec;
    color: #1e6b3a;
    border: 1px solid #b7e3c5;
}

.message.error {
    background: #fdecea;
    color: var(--danger);
    border: 1px solid #f3b9b2;
}

/* ---------- Footer ---------- */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 16px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7684;
}

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
    .page-content { padding: 36px 16px 60px; }
    form { padding: 28px; }
}

@media (min-width: 900px) {
    .container { padding: 0 24px; }
}
