/*
|--------------------------------------------------------------------------
| MI CLASE GRADUANDA — BACKOFFICE
|--------------------------------------------------------------------------
| Hoja de estilos reorganizada:
| - estilos globales y componentes
| - navegación por roles
| - módulos de estudiante, coordinador y campaña
| - referencias obsoletas a fotografías eliminadas
| - bloques duplicados consolidados
|--------------------------------------------------------------------------
*/

:root {
    --purple: #6c3eb8;
    --purple-dark: #4f2a8a;
    --purple-soft: #f1eafd;
    --gold: #c79a32;
    --cream: #fffaf0;
    --white: #ffffff;
    --text: #2d2833;
    --muted: #6d6675;
    --border: #e6deef;
    --shadow: 0 18px 50px rgba(79, 42, 138, .10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--text);
    background: #f8f6fb;
    font-family: Arial, sans-serif;
}

a { color: var(--purple-dark); }

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(108, 62, 184, .16), transparent 34%),
        linear-gradient(135deg, #ffffff, var(--cream));
}

.auth-card,
.form-card {
    width: 100%;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255,255,255,.97);
    box-shadow: var(--shadow);
}

.auth-card { max-width: 460px; }

.brand-mark {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(79,42,138,.25);
}

h1, h2 { margin-top: 0; }
.muted { color: var(--muted); }

label {
    display: block;
    margin: 16px 0 7px;
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d9cfe6;
    border-radius: 10px;
    background: #fff;
    font: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: 0;
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(108,62,184,.12);
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.btn {
    display: inline-block;
    padding: 14px 22px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    margin-top: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    box-shadow: 0 12px 28px rgba(79,42,138,.22);
}

.btn-secondary {
    color: var(--purple-dark);
    background: var(--purple-soft);
}

.btn-auto {
    width: auto;
    margin-top: 0;
}

.alert {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 10px;
}

.alert-error {
    color: #9b2525;
    border: 1px solid #edc8c8;
    background: #fff1f1;
}

.alert-success {
    color: #176b40;
    border: 1px solid #bfe3cd;
    background: #edf9f2;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 28px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.admin-nav a {
    padding: 9px 13px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.admin-nav a:hover { background: var(--purple-soft); }

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto;
}

.hero-panel {
    margin-bottom: 26px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(246,239,255,.94));
    box-shadow: var(--shadow);
}

.hero-panel h1,
.page-heading h1 {
    margin-bottom: 10px;
    color: var(--purple-dark);
    font-size: clamp(30px,5vw,48px);
}

.hero-panel p {
    max-width: 780px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.7;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

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

.card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(40,25,66,.06);
}

.card-link {
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(40,25,66,.11);
}

.stat-card span { display: block; margin-bottom: 12px; color: var(--muted); }
.stat-card strong { color: var(--purple-dark); font-size: 38px; }

.status {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.status-active { color: #176b40; background: #e7f7ed; }
.status-disabled { color: #7a3131; background: #f9e8e8; }
.status-draft { color: #65450b; background: #fff1c8; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(40,25,66,.05);
}

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

th, td {
    padding: 16px 18px;
    border-bottom: 1px solid #eee8f3;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--purple-dark);
    background: #faf7fd;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-full { grid-column: 1 / -1; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 26px;
}

.checkbox-row label {
    display: flex;
    align-items: center;
}

.section-gap { margin-top: 28px; }

.footer {
    padding: 28px 20px;
    color: #7a7282;
    text-align: center;
}

code {
    padding: 3px 7px;
    border-radius: 6px;
    background: #f1eafd;
    font-size: 16px;
}

@media (max-width: 860px) {
    .grid-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
    .topbar,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-user {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .grid-cards,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-full { grid-column: auto; }

    .auth-card,
    .hero-panel,
    .form-card {
        padding: 24px 20px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-auto { width: 100%; text-align: center; }
}


/* MÓDULO DEL PERFIL DEL ESTUDIANTE */

.student-dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clean-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.inline-note,
.inline-warning {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    line-height: 1.6;
}

.inline-note {
    border-left: 4px solid var(--gold);
    background: #fff8e8;
}

.inline-warning {
    color: #6d4a0d;
    border: 1px solid #efd99a;
    background: #fff9e9;
}

.alert-info {
    color: #4f3479;
    border: 1px solid #d5c2ef;
    background: #f4edfd;
}

.student-profile-form h2 {
    margin-top: 34px;
    color: var(--purple-dark);
    font-size: 24px;
}

.student-profile-form h2:first-child {
    margin-top: 0;
}

.student-profile-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.student-profile-form small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.5;
}

.student-profile-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.student-profile-form fieldset:disabled {
    opacity: .72;
}

.student-form-actions .btn-secondary {
    margin-top: 0;
}

@media (max-width: 760px) {
    .student-dashboard-grid {
        grid-template-columns: 1fr;
    }

    }   
/* MENÚ GENERAL POR ROLES */

.topbar {
    position: relative;
    z-index: 50;
    width: 100%;
    padding: 0 !important;
    color: #fff;
    background: linear-gradient(135deg, #6c3eb8 0%, #4f2a8a 100%) !important;
    box-shadow: 0 4px 18px rgba(55,31,88,.18);
}

.topbar-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: #fff !important;
    text-decoration: none !important;
}

.topbar-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    font-size: 14px;
    font-weight: 900;
}

.topbar-brand-text,
.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.topbar-brand-text small,
.topbar-user-info small {
    margin-top: 3px;
    color: rgba(255,255,255,.72);
    font-size: 12px;
}

.topbar-user {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 16px !important;
}

.topbar-user-info {
    align-items: flex-end;
}

.topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 15px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    color: #fff !important;
    background: rgba(255,255,255,.10);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
}

.role-menu {
    position: relative;
    z-index: 40;
    width: 100%;
    border-bottom: 1px solid #e7deef;
    background: rgba(255,255,255,.98);
    box-shadow: 0 5px 18px rgba(45,31,64,.06);
}

.role-menu-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 62px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
}

.role-menu-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #5e526c !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
}

.role-menu-link:hover {
    color: #4f2a8a !important;
    border-color: #ded0ee;
    background: #f6f0fc;
}

.role-menu-link.is-active {
    color: #fff !important;
    border-color: #6c3eb8;
    background: linear-gradient(135deg, #7347bd 0%, #5a3298 100%);
    box-shadow: 0 8px 20px rgba(79,42,138,.20);
}

.role-menu-icon {
    width: 21px;
    height: 21px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    font-size: 14px;
}

.role-menu-link:not(.is-active) .role-menu-icon {
    color: #6c3eb8;
    background: #f0e8fa;
}

.role-menu-link.is-active .role-menu-icon {
    background: rgba(255,255,255,.16);
}

.admin-nav {
    display: none !important;
}

.footer-inner {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

@media (max-width: 760px) {
    .topbar-inner {
        min-height: auto;
        padding: 15px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-user {
        width: 100%;
        justify-content: space-between;
    }

    .topbar-user-info {
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .topbar-user {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .topbar-logout {
        width: 100%;
    }
}

/* =========================================================
   CONTROL DE ESTUDIANTES POR COORDINADOR
========================================================= */

.coordinator-student-list {
    display: grid;
    gap: 24px;
}

.coordinator-student-card {
    padding: 26px;
}

.coordinator-student-summary {
    display: flex;
    align-items: center;
    gap: 20px;
}

.coordinator-student-info {
    min-width: 0;
}

.coordinator-student-info h2 {
    margin: 0 0 6px;
    color: var(--purple-dark);
}

.coordinator-student-info p {
    margin: 0;
    color: var(--muted);
}

.student-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.coordinator-action-grid {
    display: grid;
    grid-template-columns: minmax(240px, .8fr) minmax(320px, 1.4fr);
    gap: 20px;
    margin-top: 24px;
}

.coordinator-action-box {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #faf8fc;
}

.coordinator-action-box h3 {
    margin: 0 0 16px;
    color: var(--purple-dark);
    font-size: 18px;
}

.btn-success {
    color: #ffffff;
    background: #257a4c;
}

.btn-danger {
    color: #ffffff;
    background: #aa3434;
}

.coordinator-card-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
    .coordinator-student-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .coordinator-action-grid {
        grid-template-columns: 1fr;
    }

    .photo-action-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

/* AUTORIZACIÓN Y CONFIGURACIÓN DE APORTACIONES */

.coordinator-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.coordinator-settings-link {
    font-weight: 800;
}

.page-heading-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
}

.settings-sections {
    display: grid;
    gap: 28px;
}

.settings-card {
    max-width: none;
}

.settings-card-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.settings-card-heading h2 {
    margin: 0 0 7px;
    color: var(--purple-dark);
}

.settings-card-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.settings-number {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    font-weight: 900;
}

.consent-options {
    display: grid;
    gap: 12px;
    margin-top: 8px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #faf8fc;
}

.consent-options label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    line-height: 1.5;
}

.consent-options input[type="checkbox"] {
    margin-top: 3px;
}

.settings-card textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.6;
}

@media (max-width: 620px) {
    .settings-card-heading {
        flex-direction: column;
    }
}

/* =========================================================
   REVISIÓN Y PUBLICACIÓN DEL PERFIL
========================================================= */

.coordinator-review-link {
    color: var(--purple-dark);
    font-weight: 900;
}

.review-layout {
    display: grid;
    grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.review-sidebar {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 20px;
}

.review-sidebar .card h2 {
    margin-bottom: 16px;
    color: var(--purple-dark);
    font-size: 20px;
}

.review-checklist {
    display: grid;
    gap: 11px;
}

.review-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
}

.review-check span {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
}

.review-check p {
    margin: 2px 0 0;
    line-height: 1.45;
}

.review-check.is-ready {
    color: #176b40;
    background: #edf9f2;
}

.review-check.is-ready span {
    color: #fff;
    background: #257a4c;
}

.review-check.is-missing {
    color: #7c4d0a;
    background: #fff6df;
}

.review-check.is-missing span {
    color: #fff;
    background: #c58a22;
}

.review-actions-form {
    display: grid;
    gap: 11px;
}

.review-actions-form textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.6;
}

.btn-full {
    width: 100%;
    margin: 0;
    text-align: center;
}

.btn-warning {
    color: #4c3500;
    background: #efc65c;
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: .45;
    box-shadow: none;
}

.review-main {
    display: grid;
    gap: 20px;
}

.review-profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
}

.review-profile-header h2 {
    margin: 2px 0 8px;
    color: var(--purple-dark);
    font-size: 30px;
}

.review-profile-header p {
    margin: 5px 0;
    color: var(--muted);
}

.review-content-card h2 {
    margin-bottom: 16px;
    color: var(--purple-dark);
    font-size: 23px;
}

.review-text {
    color: #4f4855;
    font-size: 16px;
    line-height: 1.8;
    white-space: normal;
}

.review-course {
    display: flex;
    align-items: center;
    gap: 20px;
}

.review-course-image {
    width: 180px !important;
    height: 120px !important;
    min-width: 180px;
    object-fit: cover;
    border-radius: 16px;
    background: #f1edf4;
}

.review-course h3 {
    margin: 0 0 8px;
    color: var(--purple-dark);
}

.review-course p {
    color: var(--muted);
    line-height: 1.6;
}

.review-data-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.review-data-list div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #faf8fc;
}

.review-data-list dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.review-data-list dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.review-instructions {
    margin-top: 18px;
    padding: 17px;
    border-left: 4px solid var(--gold);
    border-radius: 12px;
    background: #fff9eb;
    line-height: 1.65;
}

.review-instructions p {
    margin-bottom: 0;
}

@media (max-width: 920px) {
    .review-layout {
        grid-template-columns: 1fr;
    }

    .review-sidebar {
        position: static;
    }
}

@media (max-width: 620px) {
    .review-profile-header,
    .review-course {
        align-items: flex-start;
        flex-direction: column;
    }

    .review-data-list {
        grid-template-columns: 1fr;
    }

    .review-course-image {
        width: 100% !important;
        height: 190px !important;
        min-width: 0;
    }
}

/* MÓDULO DE CAMPAÑA */

.campaign-form {
    display: grid;
    gap: 25px;
}

.campaign-section {
    max-width: none;
}

.campaign-section h2 {
    margin-bottom: 22px;
    color: var(--purple-dark);
}

.campaign-logo-preview {
    margin: 12px 0 16px;
}

.campaign-logo-preview img {
    display: block;
    width: 130px !important;
    height: 130px !important;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}

.campaign-form input[type="color"] {
    min-height: 52px;
    padding: 5px;
}

.campaign-form textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.65;
}

.campaign-options {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #faf8fc;
}

.campaign-options label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
}

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

.campaign-student {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #faf8fc;
    cursor: pointer;
}

.campaign-student input {
    width: auto;
    margin-top: 3px;
}

.campaign-student span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.campaign-student strong {
    color: var(--purple-dark);
}

.campaign-student small {
    color: var(--muted);
}

.campaign-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}

@media (max-width: 700px) {
    .campaign-students {
        grid-template-columns: 1fr;
    }

    .campaign-actions {
        flex-direction: column;
    }

    .campaign-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   EDITOR DEL PERFIL POR EL COORDINADOR
========================================================= */

.coordinator-profile-editor {
    display: block;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
    gap: 26px;
    align-items: start;
}

.editor-main,
.editor-sidebar {
    display: grid;
    gap: 22px;
}

.editor-sidebar {
    position: sticky;
    top: 18px;
}

.editor-section {
    max-width: none;
}

.editor-section h2 {
    margin-bottom: 20px;
    color: var(--purple-dark);
}

.editor-section textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.65;
}

.course-goal-note {
    margin-top: 16px;
    padding: 16px;
    border-left: 4px solid var(--gold);
    border-radius: 12px;
    background: #fff9eb;
    line-height: 1.6;
}

.campaign-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.campaign-summary div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #faf8fc;
}

.campaign-summary dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.campaign-summary dd {
    margin: 5px 0 0;
    font-weight: 700;
}

.campaign-instructions-preview {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #f7f2fc;
    line-height: 1.65;
}

.editor-public-image {
    display: block;
    width: 180px !important;
    height: 180px !important;
    margin: 0 auto 20px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(79,42,138,.13);
}

.image-choice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #faf8fc;
}

.image-choice input {
    width: auto;
    margin-top: 3px;
}

.editor-actions {
    display: grid;
    gap: 11px;
}

.btn-full {
    width: 100%;
    margin: 0;
}

.btn-success {
    color: #fff;
    background: #257a4c;
}

.btn-warning {
    color: #4c3500;
    background: #efc65c;
}

.btn-danger {
    color: #fff;
    background: #aa3434;
}

@media (max-width: 900px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-sidebar {
        position: static;
    }
}

@media (max-width: 620px) {
    .campaign-summary {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PULIDO GLOBAL DEL BACKOFFICE
========================================================= */

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button,
.btn,
a {
    -webkit-tap-highlight-color: transparent;
}

a,
button,
input,
select,
textarea {
    transition:
        color .18s ease,
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease,
        opacity .18s ease;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    line-height: 1.2;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary:hover {
    box-shadow: 0 15px 32px rgba(79,42,138,.28);
}

.btn-secondary:hover {
    background: #e8dcf8;
}

.btn-success:hover {
    background: #1f6d43;
}

.btn-warning:hover {
    background: #e5b948;
}

.btn-danger:hover {
    background: #942d2d;
}

input[disabled],
select[disabled],
textarea[disabled],
fieldset:disabled input,
fieldset:disabled select,
fieldset:disabled textarea {
    cursor: not-allowed;
}

fieldset:disabled {
    opacity: .78;
}

.page-shell {
    flex: 1 0 auto;
}

.card,
.form-card,
.hero-panel,
.table-wrap {
    backdrop-filter: blur(4px);
}

.card h2,
.form-card h2 {
    color: var(--purple-dark);
}

.alert {
    line-height: 1.55;
    box-shadow: 0 8px 22px rgba(44,31,60,.05);
}

.alert-info {
    color: #4f3479;
    border: 1px solid #d5c2ef;
    background: #f4edfd;
}

.status-paused {
    color: #6c4b0b;
    background: #fff0c5;
}

.status-completed {
    color: #4c3c64;
    background: #eee8f5;
}

.status-pending {
    color: #4f3479;
    background: #efe6fa;
}

/* Encabezado mejorado */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.14);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .4px;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.10);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.menu-toggle:hover {
    background: rgba(255,255,255,.18);
}

.menu-toggle span[aria-hidden="true"] {
    font-size: 18px;
    line-height: 1;
}

/* Pie de página mejorado */

.footer {
    flex: 0 0 auto;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,.72);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
}

.footer-inner > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.footer-inner strong {
    color: var(--purple-dark);
}

.footer-inner small {
    color: var(--muted);
}

/* Estudiantes del coordinador */

.coordinator-student-summary {
    align-items: flex-start;
}

.coordinator-student-info {
    width: 100%;
}

.coordinator-action-grid {
    grid-template-columns: 1fr;
}

.coordinator-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.coordinator-account-admin {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.coordinator-account-box {
    width: 100%;
    padding: 18px;
    border: 1px solid #eadfe8;
    border-radius: 16px;
    background: #fcfafc;
}

.coordinator-account-box h3 {
    margin: 0 0 12px;
    color: #5a405f;
    font-size: 16px;
}

.coordinator-account-box form {
    margin: 0;
}

/* Accesibilidad */

:focus-visible {
    outline: 3px solid rgba(199,154,50,.55);
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .topbar-inner {
        min-height: 72px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .role-menu {
        display: none;
    }

    .role-menu.is-open {
        display: block;
    }

    .role-menu-inner {
        min-height: 0;
        padding: 12px 0 16px;
        align-items: stretch;
        flex-direction: column;
        overflow: visible;
    }

    .role-menu-link {
        width: 100%;
        justify-content: flex-start;
    }

    body.menu-is-open {
        overflow: hidden;
    }
}

@media (max-width: 760px) {
    .topbar-inner {
        align-items: center;
        flex-direction: row;
        padding: 12px 0;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .topbar-user-info {
        display: none;
    }

    .topbar-avatar {
        display: none;
    }

    .topbar-logout {
        min-height: 40px;
        padding-inline: 13px;
    }

    .menu-toggle-label {
        display: none;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        text-align: left;
    }
}

@media (max-width: 620px) {
    .topbar-brand-text small {
        display: none;
    }

    .topbar-logo {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .topbar-brand-text strong {
        font-size: 14px;
    }

    .topbar-logout {
        font-size: 12px;
    }

    .page-shell {
        width: min(100% - 20px, 1180px);
        margin: 20px auto;
    }

    .coordinator-card-footer,
    .coordinator-card-footer .btn {
        width: 100%;
    }

    .coordinator-card-footer .btn {
        justify-content: center;
    }
}

@media (max-width: 430px) {
    .topbar-brand-text {
        display: none;
    }

    .topbar-inner {
        gap: 10px;
    }

    .topbar-actions {
        gap: 8px;
    }
}


