/* =============================================================================
   style.css — calleyandallen platform.

   Mobile-first base styles. No external fonts or CDNs.
   System font stack only.
   ============================================================================= */

/* ---- Reset / base ------------------------------------------------------ */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
        Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
    background: #fafafa;
    margin: 0;
}

main {
    padding: 1.25rem;
    max-width: 60rem;
    margin: 0 auto;
}

h1 {
    font-size: 1.75rem;
    margin: 0.5rem 0 1rem;
}

h2 {
    font-size: 1.25rem;
    margin: 0.5rem 0 0.5rem;
}

p {
    margin: 0 0 1rem 0;
}

a {
    color: #0a4ea8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", monospace;
    font-size: 0.95em;
    background: #efefef;
    padding: 0.1em 0.35em;
    border-radius: 3px;
}


/* ---- Site header / nav ------------------------------------------------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.brand {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.brand:hover {
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-greeting {
    color: #555;
    font-size: 0.95rem;
}

.nav-link {
    color: #0a4ea8;
    font-size: 0.95rem;
}

.logout-form {
    display: inline;
    margin: 0;
}

.logout-button {
    background: none;
    border: none;
    padding: 0;
    color: #0a4ea8;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.logout-button:hover {
    text-decoration: underline;
}


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

.flashes {
    list-style: none;
    padding: 0;
    margin: 0.75rem auto 0;
    max-width: 60rem;
}

.flash {
    padding: 0.75rem 1.25rem;
    margin: 0 1.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.flash-success {
    background: #ecf8e8;
    border-color: #c2e3b1;
    color: #2d5e1c;
}

.flash-error {
    background: #fbe9e9;
    border-color: #f1b0b0;
    color: #802121;
}

.flash-info {
    background: #e8f0f8;
    border-color: #b1cce3;
    color: #1c4a73;
}


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

.auth-card {
    max-width: 24rem;
    margin: 1rem auto;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.auth-card h1 {
    margin-top: 0;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
    width: 100%;
    padding: 0.55rem 0.65rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

.field input:focus {
    outline: 2px solid #0a4ea8;
    outline-offset: 1px;
    border-color: #0a4ea8;
}

.field-checkbox {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.field-checkbox label {
    margin: 0;
    font-weight: 400;
    font-size: 0.95rem;
}

.field-error {
    display: block;
    color: #802121;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}


/* ---- Buttons ---------------------------------------------------------- */

.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #0a4ea8;
    color: #fff;
    border-color: #0a4ea8;
}

.btn-primary:hover {
    background: #083d83;
    border-color: #083d83;
    text-decoration: none;
}


/* ---- Card grid (dashboard) ------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
}

.card {
    display: block;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    border-color: #0a4ea8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

.card-title {
    margin: 0 0 0.4rem;
    color: #0a4ea8;
}

.card-description {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
}


/* ---- Admin: shared helpers -------------------------------------------- */

.muted {
    color: #555;
    font-size: 0.95rem;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-rule {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 2rem 0 1.5rem;
}

/* A link-styled button, for POST actions that shouldn't look like <a>. */
.btn-link {
    background: none;
    border: none;
    padding: 0;
    margin-left: 0.75rem;
    color: #0a4ea8;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
}

.inline-form {
    display: inline;
    margin: 0;
}


/* ---- Admin: data tables ----------------------------------------------- */

/* Wrapper lets wide tables scroll horizontally on a phone instead of
   blowing out the page width. */
.table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.data-table thead th {
    background: #f5f5f5;
    font-weight: 600;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}


/* ---- Admin: status badges --------------------------------------------- */

.badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #eee;
    color: #444;
}

.badge-admin {
    background: #e6e1f8;
    color: #4a3a86;
}

.badge-active {
    background: #ecf8e8;
    color: #2d5e1c;
}

.badge-inactive {
    background: #fbe9e9;
    color: #802121;
}


/* ---- Admin: forms ----------------------------------------------------- */

.stack-form {
    max-width: 28rem;
}

.checkbox-group {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin: 0 0 1.25rem;
}

.checkbox-group legend {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0 0.35rem;
}

.checkbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checkbox-list li {
    padding: 0.2rem 0;
}
