:root {
    color-scheme: light;
    --navy: #102c4d;
    --navy-dark: #0b2038;
    --blue: #2365a5;
    --blue-pale: #eef5fc;
    --ink: #1c2a39;
    --muted: #6d7a89;
    --line: #e2e8ef;
    --surface: #ffffff;
    --background: #f5f7fa;
    --green: #1d8057;
    --red: #b74141;
    --shadow: 0 20px 55px rgba(20, 42, 67, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
}
a { color: var(--blue); }
.site-header {
    min-height: 78px;
    background: var(--navy);
    color: #fff;
}
.header-inner {
    width: min(1120px, calc(100% - 48px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}
.brand > span:last-child { display: grid; line-height: 1.25; }
.brand strong { font-size: 14px; font-weight: 700; letter-spacing: .01em; }
.brand small { margin-top: 4px; color: #c1cfdd; font-size: 11px; }
.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 12px;
    color: #d5e8fa;
    font-size: 24px;
}
.admin-link {
    color: #d5e3f1;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.admin-link:hover { color: #fff; }
.page-shell { width: min(700px, calc(100% - 40px)); margin: 60px auto 0; }
.intro { margin-bottom: 27px; }
.eyebrow {
    margin: 0 0 9px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
}
.intro h1, .admin-title-row h1, .login-card h1 {
    margin: 0;
    color: var(--navy-dark);
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 720;
    letter-spacing: -.04em;
    line-height: 1.2;
}
.intro > p:last-child { max-width: 615px; margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.form-card {
    padding: 32px;
    border: 1px solid #e9edf2;
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 27px; }
.card-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.required-mark { color: #c74c4c; }
.secure-note { padding: 6px 9px; border-radius: 20px; background: #f0f8f4; color: #28724f; font-size: 10px; font-weight: 700; white-space: nowrap; }
.secure-note span { margin-right: 4px; font-size: 8px; }
.field { min-width: 0; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field > label:not(.upload-box) { display: block; margin-bottom: 7px; color: #29394b; font-size: 12px; font-weight: 700; }
.optional-label { margin-left: 5px; color: #8b96a2; font-size: 10px; font-weight: 500; }
input[type="text"], input[type="url"], input[type="password"], select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #dce3ea;
    border-radius: 7px;
    outline: none;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder { color: #a0aab5; }
select { cursor: pointer; }
select:invalid { color: #a0aab5; }
input:focus, select:focus { border-color: #6a9bc9; box-shadow: 0 0 0 3px rgba(48, 112, 172, .12); }
.upload-box {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px dashed #b7c6d5;
    border-radius: 8px;
    background: #fbfcfe;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.upload-box:hover { border-color: var(--blue); background: #f5f9fd; }
.upload-box input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.upload-box:focus-within { outline: 3px solid rgba(48,112,172,.15); }
.upload-icon { display: grid; width: 37px; height: 37px; flex: 0 0 37px; place-items: center; border-radius: 9px; background: #eaf2fa; color: var(--blue); font-size: 23px; }
.upload-copy { display: grid; min-width: 0; flex: 1; }
.upload-copy strong { overflow: hidden; color: #29394b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.upload-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.upload-action { padding: 7px 11px; border: 1px solid #dbe3eb; border-radius: 6px; background: #fff; color: #30475f; font-size: 11px; font-weight: 700; }
.field-hint { margin: 6px 0 0; color: #84909c; font-size: 10px; }
.error-text { color: var(--red); }
.image-preview-wrap { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.image-preview-wrap img { width: 60px; height: 60px; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; }
.text-button { border: 0; padding: 5px; background: transparent; color: var(--red); font: inherit; font-size: 11px; cursor: pointer; }
.submit-button {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 7px;
    background: var(--navy);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.submit-button:hover { background: #17446f; }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: .75; }
.button-spinner { display: none; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.is-submitting .button-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.privacy-note { margin: 14px 0 0; color: #8994a0; font-size: 10px; text-align: center; }
.privacy-note a { color: var(--blue); text-decoration: none; }
.form-message { margin-bottom: 19px; padding: 11px 13px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; }
.form-message[hidden] { display: none; }
.is-success { border-color: #cce9da; background: #f0faf4; color: #226746; }
.is-error { border-color: #f0d3d1; background: #fff6f5; color: #973a36; }
.page-footer { padding: 25px 0 32px; color: #8b96a2; font-size: 10px; text-align: center; }
.page-footer span { margin: 0 5px; }

.admin-body { min-height: 100vh; }
.admin-shell { width: min(1240px, calc(100% - 48px)); margin: 42px auto 60px; }
.admin-title-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 26px; }
.admin-title-row h1 { font-size: 30px; }
.admin-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.export-actions { display: flex; gap: 8px; }
.secondary-button { display: inline-flex; min-height: 38px; align-items: center; padding: 0 13px; border: 1px solid #d7e0e9; border-radius: 6px; background: #fff; color: #27435f; font-size: 11px; font-weight: 700; text-decoration: none; }
.secondary-button:hover { border-color: #9eb5ca; background: #f8fafc; }
.filter-tabs { display: flex; gap: 20px; margin-bottom: 15px; border-bottom: 1px solid var(--line); }
.filter-tabs a { padding: 0 1px 10px; color: #758392; font-size: 12px; font-weight: 650; text-decoration: none; }
.filter-tabs a.active { border-bottom: 2px solid var(--blue); color: var(--navy); }
.table-card { overflow: hidden; border: 1px solid #e8edf2; border-radius: 10px; background: #fff; box-shadow: 0 8px 28px rgba(20,42,67,.04); }
.table-scroll { overflow-x: auto; }
.submission-table { width: 100%; min-width: 950px; border-collapse: collapse; font-size: 11px; }
.submission-table th { padding: 12px 14px; background: #f8fafc; color: #788594; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.submission-table td { padding: 13px 14px; border-top: 1px solid #edf0f3; vertical-align: middle; }
.submission-table td small { display: block; margin-top: 2px; color: #86919d; font-size: 10px; }
.submission-table a { font-weight: 600; text-decoration: none; }
.member-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.member-cell strong { display: block; max-width: 175px; overflow-wrap: anywhere; color: #273748; font-size: 11px; }
.member-cell small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-link { flex: 0 0 auto; }
.member-avatar { display: block; width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: #e9eef3; }
.table-secondary { color: #697787 !important; }
.muted { color: #929ca7; }
.status-badge { display: inline-block; padding: 4px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.status-pending { background: #fff5dc; color: #946a11; }
.status-approved { background: #e7f6ed; color: #28714b; }
.status-rejected { background: #fff0ef; color: #a34640; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions form { margin: 0; }
.action-button { padding: 5px 7px; border: 1px solid #dce3e9; border-radius: 5px; background: #fff; color: #425466; font: inherit; font-size: 9px; font-weight: 700; cursor: pointer; }
.approve-action { border-color: #d1eadb; color: #28714b; }
.reject-action, .delete-action { border-color: #f0d8d5; color: #a34640; }
.action-button:hover { background: #f7f9fb; }
.empty-state { padding: 70px 20px; border: 1px dashed #d8e0e8; border-radius: 10px; background: #fff; text-align: center; }
.empty-state > span { color: #8da4ba; font-size: 28px; }
.empty-state h2 { margin: 7px 0 0; font-size: 17px; }
.empty-state p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.pagination { display: flex; justify-content: space-between; margin: 18px 2px; color: var(--muted); font-size: 11px; }
.pagination a { font-weight: 650; text-decoration: none; }
.admin-footnote { margin-top: 24px; color: #8b96a2; font-size: 10px; text-align: center; }
.logout-form { margin: 0; }
.logout-button { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.admin-login-wrap { width: min(440px, calc(100% - 36px)); margin: 65px auto; }
.login-brand { margin: 0 0 23px 4px; }
.login-card { padding: 31px; }
.login-card h1 { font-size: 28px; }
.login-description { margin: 8px 0 23px; color: var(--muted); font-size: 12px; }
.login-card .field { margin-bottom: 16px; }
.login-card .submit-button { margin-top: 7px; }

@media (max-width: 640px) {
    .header-inner { width: calc(100% - 32px); min-height: 68px; }
    .site-header { min-height: 68px; }
    .brand-mark { width: 36px; height: 36px; }
    .page-shell { width: calc(100% - 30px); margin-top: 36px; }
    .intro h1 { font-size: 29px; }
    .intro > p:last-child { font-size: 13px; }
    .form-card { padding: 22px 18px; border-radius: 12px; }
    .card-heading { margin-bottom: 23px; }
    .secure-note { font-size: 9px; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .admin-shell { width: calc(100% - 28px); margin-top: 29px; }
    .admin-title-row { align-items: flex-start; flex-direction: column; gap: 14px; }
    .admin-title-row h1 { font-size: 26px; }
    .filter-tabs { gap: 17px; overflow-x: auto; }
    .filter-tabs a { white-space: nowrap; }
}

@media (max-width: 380px) {
    .card-heading { flex-direction: column; gap: 9px; }
    .upload-box { gap: 8px; padding: 10px; }
    .upload-action { padding: 6px 8px; }
}
