/* MeetForms · estilos compartidos (administración y formulario público) */

:root {
    --violet: #667eea;
    --violet-dark: #5568d3;
    --violet-soft: #eef1ff;
    --purple: #764ba2;
    --bg: #f4f5fb;
    --card: #ffffff;
    --text: #1e2334;
    --muted: #6b7280;
    --border: #e4e7f1;
    --border-strong: #cfd4e6;
    --danger: #dc3545;
    --danger-soft: #fdecee;
    --success: #16914f;
    --success-soft: #e8f7ef;
    --warning: #b45309;
    --warning-soft: #fef4e6;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 6px 24px rgba(30, 35, 52, .07);
    --shadow-sm: 0 2px 8px rgba(30, 35, 52, .06);
    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--violet-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }

:focus-visible {
    outline: 3px solid rgba(102, 126, 234, .35);
    outline-offset: 2px;
}

/* ---------- Arranque / spinner ---------- */

.app-root { min-height: 100vh; }

.boot-screen {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.boot-logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--violet), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid var(--border-strong);
    border-top-color: var(--violet);
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 2.4s; }
}

/* ---------- Autenticación ---------- */

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(900px 500px at 10% 0%, rgba(102, 126, 234, .22), transparent 60%),
        radial-gradient(800px 500px at 100% 100%, rgba(118, 75, 162, .22), transparent 60%),
        var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 34px 32px 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--violet), var(--purple));
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 19px;
    box-shadow: 0 4px 14px rgba(102, 126, 234, .35);
}

.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand-tag { font-size: 12px; color: var(--muted); }

.auth-title { font-size: 22px; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.auth-hint { color: var(--muted); font-size: 12px; margin-top: 16px; text-align: center; }

.login-error {
    background: var(--danger-soft);
    color: #a1202d;
    border: 1px solid #f5c2c9;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13.5px;
    margin-bottom: 14px;
}

/* ---------- Shell ---------- */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 252px;
    flex: 0 0 252px;
    background: linear-gradient(165deg, #3b3f74 0%, #2b2e56 55%, #24263f 100%);
    color: #e8eaff;
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 2px 8px 20px;
}

.sidebar-brand .brand-mark { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; box-shadow: none; }
.sidebar-brand .brand-name { color: #fff; font-size: 16px; }
.sidebar-brand .brand-tag { color: #a9aee0; font-size: 11px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #c9cdf0;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}

.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }

.nav-link.active {
    background: rgba(255, 255, 255, .13);
    color: #fff;
    box-shadow: inset 3px 0 0 #9aa6ff;
}

.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; opacity: .9; }

.sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 12px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.user-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.user-role { font-size: 11.5px; color: #a9aee0; }

.main {
    flex: 1;
    min-width: 0;
    padding: 30px 34px 56px;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.page-head h1 { font-size: 25px; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.content { max-width: 1120px; }

/* ---------- Tarjetas y estadísticas ---------- */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-title { font-size: 16px; font-weight: 650; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--violet), var(--purple));
}

.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.stat-hint { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Tablas ---------- */

.table-wrap { overflow-x: auto; }

table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.table th {
    text-align: left;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    background: #fafbff;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table.table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background: #fafbff; }

.row-click { cursor: pointer; }
.row-click.active { background: var(--violet-soft); }

.cell-title { font-weight: 600; }
.cell-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Badges / chips ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-green { background: var(--success-soft); color: #107040; }
.badge-gray { background: #eef0f6; color: #5b6273; }
.badge-violet { background: var(--violet-soft); color: #4050b5; }
.badge-amber { background: var(--warning-soft); color: var(--warning); }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f0f2f9;
    color: #4b5268;
    font-size: 12px;
    font-weight: 600;
}

.chip + .chip { margin-left: 4px; }

/* ---------- Botones ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .05s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-dark); color: #fff; }

.btn-secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: #f7f8fc; color: var(--text); }

.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c02a38; color: #fff; }

.btn-danger-soft { background: var(--danger-soft); color: #a1202d; border-color: #f5c2c9; }
.btn-danger-soft:hover { background: #fbdce0; }

.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 7px; }
.btn-icon { padding: 6px 9px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-link {
    background: none;
    border: 0;
    color: var(--violet-dark);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

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

/* ---------- Formularios ---------- */

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3d4356;
    margin-bottom: 6px;
}

.input, .select, .textarea {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, .18);
}

.textarea { min-height: 90px; resize: vertical; }
.input-sm { padding: 6px 9px; font-size: 13px; }

.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: #3d4356;
    cursor: pointer;
    user-select: none;
}

.check input { width: 16px; height: 16px; accent-color: var(--violet); cursor: pointer; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

/* ---------- Alertas / estados ---------- */

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13.5px;
    border: 1px solid transparent;
    margin-bottom: 16px;
}

.alert-error { background: var(--danger-soft); border-color: #f5c2c9; color: #a1202d; }
.alert-success { background: var(--success-soft); border-color: #b7e6cb; color: #107040; }
.alert-info { background: var(--violet-soft); border-color: #d4dbff; color: #3c4bb0; }
.alert-warn { background: var(--warning-soft); border-color: #f7d9a6; color: #8a4c06; }

.empty-state {
    text-align: center;
    padding: 46px 24px;
    color: var(--muted);
}

.empty-state h3 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; margin-bottom: 18px; }

.empty-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: var(--violet-soft);
    color: var(--violet-dark);
    display: grid;
    place-items: center;
    font-size: 24px;
}

.skeleton {
    height: 54px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #eef0f7 25%, #f7f8fc 50%, #eef0f7 75%);
    background-size: 200% 100%;
    animation: shimmer 1.3s infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Toasts ---------- */

.toasts {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-width: min(380px, calc(100vw - 36px));
}

.toast {
    background: #23263d;
    color: #fff;
    border-radius: 10px;
    padding: 11px 15px;
    font-size: 13.5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
    display: flex;
    align-items: flex-start;
    gap: 9px;
    animation: toast-in .18s ease;
}

.toast-success { border-left: 4px solid #34d399; }
.toast-error { border-left: 4px solid #f87171; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Modal ---------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(24, 27, 45, .55);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 70;
}

.modal {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    padding: 22px;
    animation: modal-in .16s ease;
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(.97); }
    to { opacity: 1; transform: scale(1); }
}

.modal h3 { font-size: 17px; margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

/* ---------- Editor de campos ---------- */

.fields-list { display: flex; flex-direction: column; gap: 12px; }

.field-row {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fbfcff;
    padding: 12px;
}

.field-row-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px auto;
    gap: 10px;
    align-items: center;
}

.field-row-options { margin-top: 10px; }

.field-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.field-actions { display: flex; gap: 4px; }

.add-field-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-strong);
}

.add-field-bar .select { max-width: 240px; }

.type-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--violet-soft);
    color: #4050b5;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
}

/* ---------- Compartir ---------- */

.share-row { display: flex; gap: 8px; align-items: center; }
.share-row .input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
.code-box {
    background: #f6f7fc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    color: #444b63;
    white-space: pre-wrap;
    word-break: break-all;
}
.share-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- Respuestas ---------- */

.response-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.detail-list { display: flex; flex-direction: column; gap: 0; }

.detail-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:first-child { padding-top: 0; }
.detail-item:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.detail-value { font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.detail-value a { font-weight: 600; }

/* ---------- Disponibilidad ---------- */

.days-grid { display: flex; flex-direction: column; gap: 10px; }

.day-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fbfcff;
    padding: 12px 14px;
}

.day-card.on { border-color: #cdd6ff; background: #f8f9ff; }

.day-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.day-name { font-weight: 650; font-size: 14px; }

.range-row {
    display: grid;
    grid-template-columns: 120px 18px 120px auto;
    gap: 8px;
    align-items: center;
    margin-top: 9px;
}

.range-sep { text-align: center; color: var(--muted); }
.ranges-empty { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* ---------- Página pública ---------- */

.public-body {
    background:
        radial-gradient(1000px 500px at 0% 0%, rgba(102, 126, 234, .16), transparent 55%),
        radial-gradient(900px 500px at 100% 100%, rgba(118, 75, 162, .14), transparent 55%),
        var(--bg);
    min-height: 100vh;
}

.public-app {
    max-width: 680px;
    margin: 0 auto;
    padding: 34px 18px 46px;
}

.public-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 32px;
}

.public-head {
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.public-title { font-size: 25px; line-height: 1.25; }
.public-desc { color: var(--muted); font-size: 14.5px; margin-top: 7px; white-space: pre-wrap; }

.public-field { margin-bottom: 18px; }
.public-label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 7px; color: #343a4d; }
.req { color: #d0343f; margin-left: 2px; }

.public-section-title {
    font-size: 17px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin: 26px 0 16px;
}

.public-paragraph { color: #555d72; font-size: 14px; white-space: pre-wrap; }

/* Calendario de citas */

.appt-calendar {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fbfcff;
    padding: 12px;
    max-width: 360px;
}

.appt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.appt-month {
    font-size: 14px;
    font-weight: 650;
    text-transform: capitalize;
}

.appt-nav {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.appt-nav:hover:not(:disabled) { background: var(--violet-soft); }
.appt-nav:disabled { opacity: .4; cursor: not-allowed; }

.appt-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.appt-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    padding-bottom: 2px;
}

.appt-day {
    border: 1px solid transparent;
    background: #fff;
    border-radius: 7px;
    padding: 6px 0;
    font: inherit;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.appt-day:hover:not(:disabled) { background: var(--violet-soft); }
.appt-day:disabled { background: transparent; color: #c3c8d6; cursor: not-allowed; }
.appt-day.selected { background: var(--violet); border-color: var(--violet); color: #fff; font-weight: 700; }
.appt-day.blank { visibility: hidden; }

.appt-selected {
    font-size: 12.5px;
    color: var(--violet-dark);
    font-weight: 600;
    margin-top: 8px;
    min-height: 16px;
}

.slot:disabled { opacity: .45; cursor: not-allowed; }

.field-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; }

.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.slots-loading { font-size: 13px; color: var(--muted); margin-top: 9px; }

.slot {
    border: 1px solid #cdd4ec;
    background: #fff;
    color: #3742a0;
    border-radius: 8px;
    padding: 7px 12px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 650;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}

.slot:hover { background: var(--violet-soft); border-color: #aab5f0; }

.slot.active {
    background: var(--violet);
    border-color: var(--violet);
    color: #fff;
    box-shadow: 0 3px 10px rgba(102, 126, 234, .32);
}

.captcha-box {
    background: #f7f8fd;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 22px 0 4px;
}

.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-question { font-weight: 650; font-size: 14.5px; white-space: nowrap; }
.captcha-row .input { max-width: 140px; }

.public-actions { margin-top: 22px; }
.public-footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }
.public-footer a { color: var(--muted); }

.success-screen { text-align: center; padding: 18px 6px 8px; }

.success-icon {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: var(--success-soft);
    color: var(--success);
    display: grid;
    place-items: center;
}

.success-screen h2 { font-size: 22px; margin-bottom: 7px; }
.success-screen p { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.error-page { text-align: center; padding: 44px 30px; }
.error-code {
    font-size: 60px;
    font-weight: 800;
    letter-spacing: -.04em;
    background: linear-gradient(135deg, var(--violet), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 10px;
}
.error-page h1 { font-size: 22px; margin-bottom: 8px; }
.error-page .btn { margin-top: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .response-layout { grid-template-columns: 1fr; }
    .main { padding: 24px 22px 44px; }
}

@media (max-width: 780px) {
    .app-shell { flex-direction: column; }
    .sidebar {
        width: 100%;
        flex: 0 0 auto;
        height: auto;
        position: static;
        padding: 14px 14px 10px;
    }
    .sidebar-brand { padding-bottom: 12px; }
    .sidebar-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
    .nav-link { white-space: nowrap; padding: 8px 11px; }
    .sidebar-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; }
    .user-chip { padding: 0; }
    .main { padding: 20px 16px 40px; }
    .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
    .page-actions { justify-content: flex-start; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .field-row-top { grid-template-columns: 1fr; }
    .range-row { grid-template-columns: 1fr 14px 1fr auto; }
    .public-card { padding: 24px 20px; border-radius: 14px; }
    .share-row { flex-direction: column; align-items: stretch; }
}

@media (max-width: 520px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 25px; }
    .cell-actions { justify-content: flex-start; }
    .captcha-row { flex-wrap: wrap; }
}
