:root {
    font-family: Arial, "Helvetica Neue", sans-serif;
    color: #10233f;
    background: #fff;
    --navy: #10233f;
    --green: #009b57;
    --green-dark: #007b46;
    --mint: #edf8f2;
    --line: #d9e2de;
    --muted: #667085;
    --danger: #b42318;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
.hp-field { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }

.public-page { min-height: 100vh; background: #f5faf7; }
.form-panel { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.public-card { width: min(100%, 560px); background: #fff; border: 1px solid #e1e9e5; border-radius: 14px; padding: 34px 40px 38px; box-shadow: 0 16px 50px rgba(0, 84, 48, .08); }
.public-brand { display: flex; justify-content: center; margin-bottom: 28px; }
.public-brand img { display: block; width: 124px; height: auto; }
.public-form header { margin-bottom: 26px; text-align: center; }
.public-form h1, .success-view h1 { font-size: 30px; letter-spacing: -.8px; line-height: 1.2; margin-bottom: 10px; }
.public-form header p, .success-view p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.public-form header strong { color: var(--navy); }
.fields { display: grid; grid-template-columns: 1fr; gap: 17px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { color: #263852; font-size: 13px; font-weight: 700; }
.field input { width: 100%; height: 52px; border: 1px solid #cbd7d1; border-radius: 8px; outline: 0; padding: 0 14px; color: var(--navy); background: #fff; font-size: 16px; transition: .15s ease; }
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 155, 87, .1); }
.field input[aria-invalid="true"] { border-color: #f04438; }
.field input::placeholder { color: #98a5af; }
.field em, .field-error { color: var(--danger); font-size: 12px; font-style: normal; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 22px 0 18px; color: #34465c; font-size: 14px; line-height: 1.45; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); flex: 0 0 auto; }
.button { min-height: 50px; border: 0; border-radius: 8px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14px; text-decoration: none; transition: .18s ease; }
.button-primary { width: 100%; color: #fff; background: var(--green); box-shadow: 0 7px 18px rgba(0, 155, 87, .16); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { color: var(--navy); background: #fff; border: 1px solid var(--line); }
.privacy { margin: 20px auto 0; max-width: 400px; color: #667484; font-size: 11px; line-height: 1.45; text-align: center; }
.form-error, .alert { color: var(--danger); background: #fff1f0; border: 1px solid #ffd4d0; padding: 11px 13px; border-radius: 7px; font-size: 13px; margin: 0 0 18px; }
.alert-success { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.success-view { width: 100%; padding: 24px 0 10px; text-align: center; }
.success-view p { max-width: 440px; margin: 0 auto 28px; }
.success-icon { margin: 0 auto 22px; width: 74px; height: 74px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 34px; font-weight: 700; box-shadow: 0 12px 30px rgba(0, 155, 87, .2); }

@media (max-width: 760px) {
    .public-page { background: #fff; }
    .form-panel { display: block; padding: 22px 18px 34px; }
    .public-card { max-width: 500px; margin: 0 auto; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
    .public-brand { margin-bottom: 24px; }
    .public-brand img { width: 108px; }
    .public-form h1, .success-view h1 { font-size: 26px; }
    .public-form header { margin-bottom: 24px; }
    .public-form header p { font-size: 14px; }
    .fields { gap: 16px; }
    .field input { height: 54px; }
    .button { min-height: 52px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.admin-body { background: #f7f9f8; }
.admin-logo { display: block; width: 86px; height: auto; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f3f9f6; }
.login-card { width: min(100%, 420px); padding: 38px; display: grid; gap: 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(16, 35, 63, .09); border-radius: 13px; }
.login-card h1 { margin-bottom: 7px; font-size: 28px; }
.login-card p { margin: 0; color: var(--muted); }
.login-card .form-error { margin: 0; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 20px 22px; background: #fff; border-right: 1px solid var(--line); }
.sidebar .admin-logo { margin: 0 10px 38px; width: 78px; }
.sidebar nav { display: grid; }
.sidebar nav a { padding: 12px 13px; color: var(--green-dark); background: var(--mint); border-radius: 7px; font-size: 14px; font-weight: 700; text-decoration: none; }
.sidebar-logout { margin-top: auto; }
.sidebar-logout button { width: 100%; border: 0; padding: 12px 13px; color: #526174; background: transparent; border-radius: 7px; text-align: left; }
.sidebar-logout button:hover { color: var(--danger); background: #fff5f4; }
.admin-main { min-width: 0; padding: 36px clamp(22px, 3.5vw, 56px); }
.admin-header { display: flex; align-items: center; gap: 24px; margin-bottom: 26px; }
.admin-header h1 { margin-bottom: 5px; font-size: 31px; letter-spacing: -.8px; }
.admin-header p { margin: 0; color: var(--muted); font-size: 14px; }
.header-actions { margin-left: auto; display: flex; gap: 10px; }
.button-auto { width: auto; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.metric { min-height: 104px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.metric span { display: block; margin-bottom: 12px; color: #647386; font-size: 12px; }
.metric strong { font-size: 24px; }
.table-section { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.toolbar { padding: 17px; border-bottom: 1px solid var(--line); }
.search-box { width: min(100%, 470px); height: 43px; display: flex; border: 1px solid #cfd8df; border-radius: 7px; overflow: hidden; }
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 155, 87, .08); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 0 13px; color: var(--navy); }
.search-box button { border: 0; border-left: 1px solid var(--line); padding: 0 18px; color: var(--green-dark); background: #f4faf7; font-weight: 700; }
.table-scroll { overflow: auto; position: relative; min-height: 320px; }
table { width: 100%; min-width: 1000px; border-collapse: collapse; font-size: 12.5px; }
th { padding: 13px 15px; color: #566477; background: #fbfcfd; border-bottom: 1px solid var(--line); font-size: 11px; text-align: left; white-space: nowrap; }
td { padding: 15px; color: #445267; border-bottom: 1px solid #e7ecef; white-space: nowrap; }
td strong { color: #172b4b; }
tbody tr:hover { background: #fbfefc; }
.row-actions { display: flex; align-items: center; gap: 10px; }
.row-actions a, .row-actions button { border: 0; padding: 0; color: var(--green-dark); background: transparent; font-size: 12px; text-decoration: none; }
.row-actions button { color: var(--danger); }
.empty-state { display: grid; place-content: center; min-height: 260px; padding: 30px; color: var(--muted); text-align: center; }
.empty-state h2 { margin-bottom: 7px; color: var(--navy); font-size: 19px; }
.empty-state p { margin: 0; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; color: var(--muted); font-size: 12px; }
.pagination div { display: flex; align-items: center; gap: 12px; }
.pagination a { padding: 7px 11px; color: #425168; background: #fff; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pagination strong { color: var(--navy); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; background: rgba(9, 22, 43, .28); }
.drawer { width: min(100%, 450px); height: 100%; overflow: auto; padding: 28px; background: #fff; box-shadow: -18px 0 55px rgba(11, 30, 66, .12); }
.drawer > header { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.drawer h2 { margin-bottom: 6px; font-size: 22px; }
.drawer header p { margin: 0; color: var(--muted); font-size: 13px; }
.drawer-close { color: #667487; font-size: 28px; line-height: 1; text-decoration: none; }
.drawer footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 26px; }

@media (max-width: 1050px) {
    .metrics { grid-template-columns: 1fr 1fr; }
    .admin-header { align-items: flex-start; flex-wrap: wrap; }
    .header-actions { width: 100%; margin-left: 0; }
}

@media (max-width: 760px) {
    .admin-shell { display: block; }
    .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; gap: 15px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar .admin-logo { width: 55px; margin: 0; }
    .sidebar nav { flex: 1; }
    .sidebar nav a { display: inline-flex; padding: 9px 11px; }
    .sidebar-logout { margin: 0; }
    .sidebar-logout button { padding: 9px 11px; }
    .admin-main { padding: 23px 16px; }
    .admin-header h1 { font-size: 26px; }
    .admin-header p { display: none; }
    .header-actions { gap: 8px; }
    .header-actions .button { flex: 1; padding: 0 10px; }
    .metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric { min-height: 88px; padding: 15px; }
    .metric strong { font-size: 20px; }
    .pagination { align-items: flex-start; flex-direction: column; gap: 15px; }
    .login-card { padding: 30px 24px; }
}

@media (max-width: 430px) {
    .header-actions { flex-direction: column; }
    .metrics { grid-template-columns: 1fr; }
    .metric { min-height: auto; }
    .drawer { padding: 22px 18px; }
}
