/* ============================================
   IM METHOD — ESTILOS GLOBALES
   Inspirado en el diseño del formulario original
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- VARIABLES ---- */
:root {
    --bg: #edf4fb;
    --bg-card: #ffffff;
    --navy: #1a2f4a;
    --teal: #4fa8b8;
    --teal-light: #7dc4d0;
    --blue-mid: #4a7fb5;
    --blue-label: #3d6fa3;
    --text: #3a3a3a;
    --text-light: #6b7a8d;
    --border: #ccdff0;
    --border-focus: #4fa8b8;
    --info-bg: #ddeef8;
    --info-border: #4fa8b8;
    --success: #3a9e7e;
    --error: #c0392b;
    --shadow: 0 2px 20px rgba(26,47,74,0.08);
    --radius: 10px;
    --radius-sm: 6px;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

/* ---- BASE ---- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
    min-height: 100vh;
}

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

/* ============================================
   FORMULARIOS PÚBLICOS
   ============================================ */

.form-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* -- Header / Intro -- */
.form-header {
    text-align: center;
    margin-bottom: 48px;
}

.form-brand {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.form-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(36px, 7vw, 52px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.15;
    margin-bottom: 28px;
}

.form-header h1 em {
    font-style: italic;
    color: var(--teal);
}

.form-intro-text {
    font-size: 14.5px;
    color: var(--blue-label);
    line-height: 1.8;
    margin-bottom: 14px;
}

.form-intro-text strong {
    font-weight: 600;
    color: var(--navy);
}

.form-intro-italic {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 14px;
    color: var(--teal);
    line-height: 1.8;
    margin-top: 16px;
}

.form-disclaimer {
    background: var(--info-bg);
    border-left: 3px solid var(--info-border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 13px;
    color: var(--navy);
    line-height: 1.7;
    margin-top: 24px;
    text-align: left;
}

/* -- Secciones del formulario -- */
.form-section {
    margin-bottom: 40px;
}

.section-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.section-subtitle {
    font-size: 13.5px;
    color: var(--text-light);
    margin-bottom: 28px;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin-bottom: 28px;
}

/* -- Campos -- */
.field-group {
    margin-bottom: 22px;
}

.field-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 8px;
}

.field-label .required {
    color: var(--teal);
    margin-left: 3px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .field-row { grid-template-columns: 1fr; }
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    background: var(--bg-card);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder { color: #b0bec9; }

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(79,168,184,0.12);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234fa8b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* -- Radio / Checkbox estilizados -- */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 14px;
    color: var(--text);
    user-select: none;
}

.radio-option:hover,
.checkbox-option:hover {
    border-color: var(--teal-light);
    background: #f4fbfd;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-right: 12px;
    accent-color: var(--teal);
    cursor: pointer;
    border: none;
    padding: 0;
}

.radio-option.selected,
.checkbox-option.selected {
    border-color: var(--teal);
    background: #f0fbfd;
}

/* -- Pregunta estilo dosha -- */
.dosha-question {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.dosha-question:last-child { border-bottom: none; }

.dosha-q-number {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dosha-q-text {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 16px;
}

.dosha-options {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.dosha-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
}

.dosha-option:hover { border-color: var(--teal-light); background: #f4fbfd; }

.dosha-option input[type="radio"] {
    width: 17px;
    height: 17px;
    min-width: 17px;
    margin-top: 1px;
    accent-color: var(--teal);
    border: none;
    padding: 0;
}

.dosha-option-badge {
    display: inline-block;
    width: 22px;
    height: 22px;
    min-width: 22px;
    background: var(--teal);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 22px;
    margin-top: 1px;
}

.dosha-option-text { font-size: 14px; color: var(--text); }

/* -- Botón submit -- */
.btn-submit {
    display: block;
    width: 100%;
    padding: 16px 32px;
    background: var(--navy);
    color: white;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.03em;
    margin-top: 32px;
}
.btn-submit:hover { background: var(--teal); transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }

/* -- Navegación multi-step -- */
.step-nav {
    display: flex;
    gap: 12px;
    margin-top: 36px;
    align-items: center;
}

.btn-next {
    flex: 1;
    padding: 15px 24px;
    background: var(--navy);
    color: white;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.02em;
}
.btn-next:hover  { background: var(--teal); transform: translateY(-1px); }
.btn-next:active { transform: translateY(0); }

.btn-prev {
    padding: 15px 20px;
    background: transparent;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-prev:hover { border-color: var(--teal); color: var(--teal); }

/* Error de validación */
.input-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231,76,60,0.10) !important;
}

/* Campo de contraseña con ojito */
.pw-field { position: relative; }
.pw-field input { padding-right: 46px; }
.pw-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1;
    padding: 6px 8px; opacity: .55; transition: opacity .2s; border-radius: 6px;
}
.pw-eye:hover { opacity: 1; }

/* -- Progreso -- */
.progress-bar-wrap {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    padding: 14px 0 10px;
    margin-bottom: 32px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.section-counter {
    font-size: 12px;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 0.08em;
}

.progress-track {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--blue-mid));
    border-radius: 2px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-light);
    text-align: right;
    margin-top: 6px;
}

/* -- Página de éxito -- */
.success-page {
    max-width: 520px;
    margin: 80px auto;
    text-align: center;
    padding: 0 20px;
}

.success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--teal), var(--blue-mid));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    font-size: 32px;
}

.success-page h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    color: var(--navy);
    margin-bottom: 16px;
}

.success-page p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   PANEL ADMIN
   ============================================ */

.admin-body {
    background: #f0f4f8;
    font-family: var(--font-body);
}

/* -- Login -- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo .brand {
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--teal);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-logo h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--navy);
}

.login-card .field-group { margin-bottom: 18px; }

.login-card .field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

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

.alert-error { background: #fdecea; color: #c0392b; border-left: 3px solid #c0392b; }
.alert-success { background: #e8f8f2; color: #1e7e5a; border-left: 3px solid #2ecc71; }
.alert-info { background: var(--info-bg); color: var(--navy); border-left: 3px solid var(--teal); }

/* -- Sidebar + Layout -- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--navy);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.sidebar-logo {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo .brand {
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--teal-light);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
}

.sidebar-logo h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: white;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    padding: 8px 24px 6px;
    margin-top: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 24px;
    color: rgba(255,255,255,0.72);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: white;
    text-decoration: none;
}

.nav-item.active {
    background: rgba(79,168,184,0.15);
    color: var(--teal-light);
    border-left-color: var(--teal);
    font-weight: 500;
}

.nav-item .icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* -- Main content -- */
.main-content {
    flex: 1;
    overflow-x: hidden;
    background: #f0f4f8;
}

.topbar {
    background: white;
    border-bottom: 1px solid #e2eaf4;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--navy);
    font-weight: 600;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-light);
}

.topbar-user a {
    color: var(--teal);
    font-size: 13px;
}

.content-area {
    padding: 32px;
}

/* -- Cards de stats -- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--teal);
}

.stat-card.accent-blue { border-left-color: var(--blue-mid); }
.stat-card.accent-navy { border-left-color: var(--navy); }
.stat-card.accent-success { border-left-color: var(--success); }

.stat-number {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

/* -- Tablas -- */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e8f0f8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 17px;
    color: var(--navy);
    font-weight: 600;
}

.card-body { padding: 24px; }

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 12px 16px;
    border-bottom: 2px solid #e8f0f8;
    background: #fafcff;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f4f8;
    font-size: 14px;
    color: var(--text);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fbff; }

/* -- Badges -- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}

.badge-pending { background: #fff4e0; color: #c07b00; }
.badge-completed { background: #e4f9f0; color: #1a7a50; }
.badge-expired { background: #fdecea; color: #c0392b; }
.badge-unread { background: #fff0f8; color: #a0148a; }
.badge-form1 { background: var(--info-bg); color: var(--blue-mid); }
.badge-form2 { background: #f0f0ff; color: #5a4db0; }

/* -- Botones admin -- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: var(--font-body);
}

.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--teal); color: white; text-decoration: none; }
.btn-teal { background: var(--teal); color: white; }
.btn-teal:hover { background: var(--teal-light); color: white; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }
.btn-danger { background: #fdecea; color: var(--error); }
.btn-danger:hover { background: var(--error); color: white; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* -- Formulario admin enviar -- */
.form-send-wrap {
    max-width: 600px;
}

.form-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 6px;
}

.type-option {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.type-option:hover { border-color: var(--teal-light); }
.type-option.selected { border-color: var(--teal); background: #f0fbfd; }
.type-option input { display: none; }
.type-option .type-name { font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 4px; }
.type-option .type-desc { font-size: 12px; color: var(--text-light); }

/* -- Vista de respuesta individual -- */
.response-view { max-width: 800px; }

.response-section {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.response-section-header {
    background: var(--bg);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.response-section-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--navy);
}

.response-qa {
    padding: 14px 24px;
    border-bottom: 1px solid #f0f4f8;
}

.response-qa:last-child { border-bottom: none; }

.response-q {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.response-a {
    font-size: 15px;
    color: var(--navy);
    font-weight: 400;
}

/* -- Dosha resultado -- */
.dosha-result {
    background: linear-gradient(135deg, var(--navy) 0%, #2a4a6a 100%);
    color: white;
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 16px;
    text-align: center;
}

.dosha-result h4 { font-family: var(--font-heading); font-size: 20px; margin-bottom: 8px; }
.dosha-result p { font-size: 13.5px; opacity: 0.8; line-height: 1.6; }

/* -- Link share -- */
.link-box {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.link-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-light);
    background: #f8fbff;
}

/* -- Mobile sidebar toggle -- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 26px;
    color: var(--navy);
    padding: 6px 10px;
    border-radius: 8px;
    line-height: 1;
}
.hamburger:hover { background: rgba(0,0,0,.05); }
.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
    /* Layout en columna */
    .admin-layout { flex-direction: column; }

    /* Hamburger flotante en topbar */
    #menuToggle {
        position: fixed; top: 14px; left: 12px; z-index: 120;
        background: #fff; box-shadow: 0 4px 14px rgba(26,47,74,.18);
        border-radius: 10px; padding: 8px 12px;
    }
    .topbar { padding-left: 60px !important; } /* hueco para el hamburger */

    /* Sidebar como drawer lateral */
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: 260px; min-width: 260px; max-width: 80vw;
        transform: translateX(-100%); transition: transform .25s ease;
        z-index: 110; box-shadow: 0 0 40px rgba(0,0,0,.18);
        overflow-y: auto;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-nav { display: block; }
    .hamburger { display: inline-flex; align-items: center; }

    /* Fondo oscuro al abrir */
    .sidebar-backdrop {
        display: block; position: fixed; inset: 0;
        background: rgba(0,0,0,.45); z-index: 105;
        opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

    /* Topbar: hamburger + título; user pequeño */
    .main-content { width: 100%; min-width: 0; }
    .topbar {
        padding: 12px 16px;
        display: grid; grid-template-columns: auto 1fr auto; gap: 10px;
        align-items: center;
    }
    .topbar h1 { font-size: 17px; line-height: 1.2; }
    .topbar-user { font-size: 12px; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
    .topbar-user .btn { padding: 7px 12px; font-size: 11.5px; }
    .topbar-user .btn-sm { padding: 6px 10px; font-size: 11px; }

    .content-area { padding: 18px 14px; }

    /* Stats: una columna */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-number { font-size: 26px; }

    /* Cards y form-row */
    .card-header { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
    .card-body { padding: 16px; }
    .field-row { grid-template-columns: 1fr; }
    .form-type-selector { grid-template-columns: 1fr; }
    .form-send-wrap { max-width: 100%; }

    /* Tablas: que hagan scroll horizontal con dedo, sin romper */
    .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 560px; }
    th, td { padding: 11px 12px; font-size: 13px; }

    /* Botones de acciones más compactos en filas */
    td .btn { padding: 7px 11px; font-size: 11.5px; }
    td .btn-sm { padding: 6px 9px; font-size: 11px; }

    /* Modals — adaptados a mobile, scrolleables si la lista es larga */
    .modal-overlay { padding: 14px; align-items: flex-start; padding-top: 30px; overflow-y: auto; }
    .modal { padding: 22px; width: 100%; max-width: 100%; max-height: calc(100vh - 60px); overflow-y: auto; }
    .modal h3 { font-size: 19px; }
    .modal-buttons { flex-direction: column-reverse; gap: 8px; }
    .modal-buttons .btn { width: 100%; justify-content: center; }

    /* Link box (admin send_form, account_view) */
    .link-box { flex-direction: column; align-items: stretch; }
    .link-input { width: 100%; }

    /* Sidebar interno */
    .sidebar-logo { padding: 22px 22px 18px; display: flex; align-items: center; justify-content: space-between; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .topbar h1 { font-size: 15px; }
}

/* Barra de acciones de página (Alumnas / Vista previa / Volver) — se separa de la topbar */
.page-actions {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.page-actions .btn { padding: 8px 14px; font-size: 12.5px; }
.page-actions .spacer { flex: 1; }
.page-actions .back { font-size: 13px; color: var(--text-light); text-decoration: none; }
.page-actions .back:hover { color: var(--navy); }

/* -- Utilidades -- */
.text-muted { color: var(--text-light); font-size: 13px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* -- Empty state -- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-family: var(--font-heading); color: var(--navy); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* -- Confirmación eliminar -- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
    background: white;
    border-radius: 16px;
    padding: 36px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal h3 { font-family: var(--font-heading); font-size: 22px; color: var(--navy); margin-bottom: 12px; }
.modal p { font-size: 14px; color: var(--text-light); margin-bottom: 24px; }
.modal-buttons { display: flex; gap: 12px; justify-content: center; }

/* ============================================
   AULA VIRTUAL (lado alumna)
   ============================================ */
.aula-body { background: var(--bg); }

.aula-topbar {
    background: var(--navy);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
}
.aula-brand { text-decoration: none; line-height: 1.1; }
.aula-brand-label { display: block; font-size: 9.5px; letter-spacing: 0.22em; color: var(--teal-light); text-transform: uppercase; font-weight: 600; }
.aula-brand-title { display: block; font-family: var(--font-heading); font-size: 17px; color: #fff; font-weight: 600; }
.aula-nav-right { display: flex; align-items: center; gap: 16px; }
.aula-user { color: rgba(255,255,255,.8); font-size: 14px; }
.aula-logout { color: var(--teal-light); font-size: 13px; text-decoration: none; }
.aula-bell { position: relative; font-size: 19px; text-decoration: none; }
.aula-bell-count {
    position: absolute; top: -7px; right: -9px; background: #e0436b; color: #fff;
    font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; line-height: 17px;
    border-radius: 9px; text-align: center; padding: 0 4px;
}

.aula-container { max-width: 860px; margin: 0 auto; padding: 36px 20px 80px; }
.aula-h1 { font-family: var(--font-heading); font-size: 30px; color: var(--navy); font-weight: 700; margin-bottom: 8px; }
.aula-h2 { font-family: var(--font-heading); font-size: 20px; color: var(--navy); font-weight: 600; margin-bottom: 16px; }
.aula-muted { color: var(--text-light); font-size: 14px; }

.aula-member-banner {
    background: linear-gradient(135deg, var(--teal), var(--blue-mid));
    color: #fff; padding: 14px 20px; border-radius: 10px; font-weight: 500;
    font-size: 14px; margin-bottom: 28px;
}

.aula-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.aula-course-card {
    display: block; background: #fff; border-radius: 14px; padding: 22px;
    box-shadow: var(--shadow); text-decoration: none; transition: transform .15s, box-shadow .15s;
    border-top: 4px solid var(--teal);
}
.aula-course-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(26,47,74,.12); text-decoration: none; }
.aula-course-title { font-family: var(--font-heading); font-size: 18px; color: var(--navy); font-weight: 600; margin-bottom: 6px; }
.aula-course-desc { font-size: 13px; color: var(--text-light); line-height: 1.6; }
.aula-course-prog { font-size: 12px; color: var(--teal); font-weight: 600; margin-top: 6px; }

.aula-card { background: #fff; border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }

.aula-task-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0; border-bottom: 1px solid #f0f4f8; text-decoration: none; color: var(--text);
}
.aula-task-row:last-child { border-bottom: none; }
.aula-task-row:hover { color: var(--navy); text-decoration: none; }

.aula-module {
    background: #fff; border-radius: 14px; padding: 26px; box-shadow: var(--shadow);
    margin-bottom: 22px;
}
.aula-module-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.aula-module-num { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
.aula-module-title { font-family: var(--font-heading); font-size: 22px; color: var(--navy); margin-bottom: 10px; }
.aula-module-intro { color: var(--text); line-height: 1.7; margin-bottom: 16px; }

.aula-live { background: #fff4f4; border-left: 3px solid #e0436b; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }

.aula-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 10px; overflow: hidden; margin-bottom: 16px; background: #000; }
.aula-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.aula-files { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.aula-file {
    display: inline-block; background: #edf4fb; border-radius: 8px; padding: 10px 14px;
    font-size: 13px; color: var(--navy); text-decoration: none; transition: background .15s;
}
.aula-file:hover { background: #dceaf6; text-decoration: none; }

.aula-tasks { border-top: 1px solid #f0f4f8; margin-top: 8px; }

.aula-notif {
    display: block; background: #fff; border-radius: 10px; padding: 16px 18px;
    margin-bottom: 10px; box-shadow: var(--shadow); text-decoration: none; color: var(--text);
    border-left: 3px solid transparent;
}
.aula-notif.unread { border-left-color: var(--teal); background: #f4fbfd; }
.aula-notif:hover { text-decoration: none; }
.aula-notif-date { font-size: 11.5px; color: var(--text-light); margin-top: 6px; }

.aula-empty { text-align: center; padding: 50px 20px; color: var(--text-light); }
.aula-empty p { margin-top: 12px; line-height: 1.6; }

/* -- Mentorías -- */
.aula-daynav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.aula-daychip {
    display: inline-block; background: #fff; border: 1.5px solid var(--border);
    border-radius: 20px; padding: 7px 16px; font-size: 13px; font-weight: 600;
    color: var(--navy); text-decoration: none; transition: all .15s;
}
.aula-daychip:hover { border-color: var(--teal); text-decoration: none; }
.aula-daychip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.aula-daychip.locked { color: #aebccb; background: #f4f7fb; cursor: not-allowed; }

.aula-block {
    background: #fff; border-radius: 12px; padding: 22px 24px;
    box-shadow: var(--shadow); margin-bottom: 16px; border-left: 4px solid var(--teal);
}
.aula-block-title { font-family: var(--font-heading); font-size: 18px; color: var(--navy); font-weight: 600; margin-bottom: 8px; }
.aula-block-time { font-size: 13px; color: var(--blue-mid); font-weight: 600; margin-bottom: 8px; }
.aula-block-body { color: var(--text); line-height: 1.8; white-space: pre-wrap; }

@media (max-width: 560px) {
    .aula-user { display: none; }
    .aula-topbar { padding: 12px 18px; }
}
