/* --- Global Reset --- */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
                 Arial, "Noto Sans", sans-serif;
    line-height: 1.7;
    color: #222222;             /* dark gray for text */
    background-color: #ffffff;  /* white background */
    margin: 0;
    padding: 0;
}

/* --- Header --- */
header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0; /* light gray divider */
    position: sticky;
    top: 0;
    z-index: 10;
}

H2 a{text-decoration:none;}

/* --- Global link styles --- */
a {
    color: #000000;                /* stays monochrome */
    text-decoration: underline;    /* clearly visible in text */
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;    /* a bit of breathing room */
}

/* Darken slightly on tap/click */
a:active {
    color: #222222;
}

/* Keep hover effect subtle for desktops */
a:hover {
    color: #888888;
}

.header-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1rem 1rem calc(1rem + 20px);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #000000; /* pure black title */
    text-align: left;
    line-height: 1.2;
}

header .payoff {
    font-size: 0.9rem;
    color: #888888; /* medium gray for subtle contrast */
    font-style: italic;
    text-align: right;
    white-space: nowrap;
    line-height: 1.2;
    padding-right: 1em;
}

/* --- Header links remain clean --- */
header a {
    text-decoration: none;
    border-bottom: none;
    color: #000000;
}

/* --- Main Content --- */
main {
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1rem;
}

article {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

article h2 {
    font-size: 1.3rem;
    margin: 0 0 0.3rem;
    color: #000000;
}

article small {
    display: block;
    color: #888888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

article p {
    margin: 0;
    color: #222222;
    font-size: 1rem;
}




/* --- Forms --- */
form input, form textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    background: #ffffff;
    color: #222222;
}

form button {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

form button:hover {
    background: #222222;
}

/* --- Footer --- */
footer {
    text-align: center;
    color: #888888;
    font-size: 0.85rem;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
}

/* --- Images --- */
img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --- Utility --- */
.logout {
    text-align: right;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #000000;
}

.back-link:hover {
    color: #888888;
}

/* --- Mobile adjustments --- */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }
    article {
        padding: 1rem;
    }
    article h2 {
        font-size: 1.1rem;
    }
}


/* --- Admin layout adjustments for small screens --- */
.admin-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.admin-table th,
.admin-table td {
    padding: 0.6rem;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #f9f9f9;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-actions a,
.admin-actions button {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}

.admin-actions a:hover,
.admin-actions button:hover {
    background: #222;
}

/* --- Mobile adjustments --- */
@media (max-width: 700px) {
    .admin-container {
        padding: 0.5rem;
    }

    .admin-table th, .admin-table td {
        padding: 0.5rem;
        font-size: 0.95rem;
    }

    /* Turn table into stacked cards for readability */
    .admin-table, .admin-table thead, .admin-table tbody, .admin-table th, .admin-table td, .admin-table tr {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        margin-bottom: 1.2rem;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: #fff;
        padding: 0.5rem;
    }

    .admin-table th {
        display: none; /* Hide header row */
    }

    .admin-table td {
        border: none;
        padding: 0.4rem 0;
    }

    .admin-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.2rem;
        color: #888;
    }

    .admin-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
}
