:root {
    --ink: #172033;
    --muted: #64748b;
    --line: #dbe4ee;
    --surface: #ffffff;
    --brand: #0f766e;
    --brand-dark: #0b5d57;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --success: #16794b;
    --success-bg: #edfdf5;
    --shadow: 0 24px 70px rgba(15, 23, 42, .13);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Noto Sans Devanagari", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 10%, rgba(45, 212, 191, .2), transparent 32%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, .16), transparent 34%),
        #f5f8fb;
}

button, input, textarea { font: inherit; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 4vw, 60px);
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.site-logo { color: var(--ink); font-weight: 850; text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; font-weight: 700; }
.site-header nav a, .site-header nav button { color: var(--brand); background: none; border: 0; padding: 0; font-weight: 800; text-decoration: none; cursor: pointer; }
.site-header nav form { margin: 0; }

.page-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 42px 18px;
}

.form-card {
    width: min(100%, 780px);
    padding: clamp(24px, 5vw, 52px);
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(219, 228, 238, .95);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.compact-card { width: min(100%, 500px); }

.brand-mark, .success-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), #14b8a6);
    color: white;
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow: 0 12px 28px rgba(15, 118, 110, .28);
}

.success-icon { border-radius: 50%; font-size: 28px; }

.eyebrow {
    margin: 0 0 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.04em; }
.subtitle { margin: 12px 0 30px; color: var(--muted); line-height: 1.65; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.form-grid .field { margin-bottom: 0; }
.field.full { grid-column: 1 / -1; }
.field span { font-size: 14px; font-weight: 750; }
.field small { color: var(--muted); line-height: 1.45; }

input, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    color: var(--ink);
    background: #fbfdff;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

textarea { resize: vertical; }
input:focus, textarea:focus { border-color: #2dd4bf; background: white; box-shadow: 0 0 0 4px rgba(45, 212, 191, .16); }
input[readonly] { color: #475569; background: #f1f5f9; cursor: not-allowed; }
.uppercase { text-transform: uppercase; }

.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 24px 0 18px;
    color: #475569;
    font-size: 13px;
    line-height: 1.55;
}
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--brand); }

.primary-button, .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s, background .2s, box-shadow .2s;
}

.primary-button { width: 100%; color: white; background: var(--brand); box-shadow: 0 12px 24px rgba(15, 118, 110, .23); }
.primary-button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.secondary-button { color: var(--brand); background: #eafaf7; }
.secondary-button:hover { background: #d7f5ef; }
.link-button { margin-top: 16px; }
.small-button { min-height: 38px; padding: 8px 14px; }
.auto-width { width: auto; }
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    padding: 12px 20px;
    color: white;
    background: var(--danger);
    cursor: pointer;
    font-weight: 800;
}
.danger-button:hover { background: #8f1c13; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.danger-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 50%;
    color: white;
    background: var(--danger);
    font-size: 28px;
    font-weight: 900;
}
.danger-text { color: var(--danger); }

.privacy-note { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { margin: 0 0 24px; padding: 14px 16px; border-radius: 12px; line-height: 1.55; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert-error { color: var(--danger); background: var(--danger-bg); border: 1px solid #fecaca; }
.alert-success { color: var(--success); background: var(--success-bg); border: 1px solid #bbf7d0; }

.success-card { text-align: center; }
.success-card .success-icon { margin-left: auto; margin-right: auto; }
.reference-box { margin: 24px auto 14px; padding: 14px; border: 1px dashed #7dd3c7; border-radius: 12px; background: #f0fdfa; }
.mail-status { color: var(--success); }
.mail-status.warning { color: #a15c00; }
.success-card .secondary-button { margin-top: 18px; }
.success-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.text-link { display: block; margin-top: 20px; color: var(--brand); text-align: center; font-weight: 700; text-decoration: none; }
.muted-link { color: var(--muted); font-size: 13px; }
.auth-switch { margin: 22px 0 0; text-align: center; color: var(--muted); }
.auth-switch a { color: var(--brand); font-weight: 800; text-decoration: none; }

.dashboard-body { background: #f5f7fb; }
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px clamp(18px, 4vw, 60px);
    background: white;
    border-bottom: 1px solid var(--line);
}
.admin-header h1 { font-size: clamp(25px, 3vw, 34px); }
.admin-actions { display: flex; align-items: center; gap: 16px; color: var(--muted); font-weight: 700; }
.admin-actions form { margin: 0; }
.dashboard-main { padding: 28px clamp(18px, 4vw, 60px) 60px; }
.stat-card, .table-card { background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 35px rgba(15, 23, 42, .06); }
.stat-card { display: inline-grid; gap: 6px; min-width: 220px; padding: 20px 24px; margin-bottom: 22px; }
.stats-row { display: flex; flex-wrap: wrap; gap: 16px; }
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-card strong { font-size: 30px; }
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 1500px; border-collapse: collapse; font-size: 13px; }
.user-table { min-width: 1180px; }
.users-table { min-width: 900px; }
th, td { padding: 14px 16px; border-bottom: 1px solid #edf2f7; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #f8fafc; color: #475569; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:hover { background: #fbfefe; }
.address-cell { min-width: 220px; max-width: 320px; white-space: normal; }
.empty-cell { padding: 44px; text-align: center; color: var(--muted); }
.status { display: inline-block; padding: 5px 9px; border-radius: 999px; font-weight: 800; }
.status.sent { color: var(--success); background: var(--success-bg); }
.status.not-sent { color: #a15c00; background: #fff7e6; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 18px; color: var(--muted); }
.pagination a { color: var(--brand); font-weight: 800; text-decoration: none; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.action-link { display: inline-flex; padding: 7px 10px; border-radius: 9px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.edit-link { color: var(--brand); background: #eafaf7; }
.delete-link { color: var(--danger); background: var(--danger-bg); }
.count-badge { display: inline-grid; place-items: center; min-width: 30px; min-height: 30px; padding: 4px 8px; border-radius: 999px; color: var(--brand); background: #eafaf7; font-weight: 850; }
.password-panel { margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.password-panel > p { margin: 6px 0 18px; color: var(--muted); font-size: 13px; }

@media (max-width: 680px) {
    .page-shell { padding: 18px 12px; }
    .form-card { padding: 24px 18px; border-radius: 18px; }
    .form-grid { grid-template-columns: 1fr; gap: 18px; }
    .field.full { grid-column: auto; }
    .admin-header { align-items: flex-start; flex-direction: column; }
    .admin-actions { width: 100%; justify-content: space-between; }
    .admin-actions { flex-wrap: wrap; }
    .form-actions { align-items: stretch; flex-direction: column-reverse; }
    .form-actions .secondary-button, .form-actions .primary-button, .form-actions .danger-button { width: 100%; }
    .site-header { align-items: flex-start; flex-direction: column; gap: 10px; }
    .site-header nav { width: 100%; flex-wrap: wrap; }
}
