* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

/* ─── NAVBAR ─────────────────────────────────────────── */
.navbar {
    background-color: #1e3a5f;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
}

.navbar-links a:hover {
    color: white;
}

.navbar-logout-form {
    margin: 0;
}

.navbar-logout-form button {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    font: inherit;
}

.navbar-logout-form button:hover {
    color: white;
}

/* ─── CONTENIDO ──────────────────────────────────────── */
.contenido {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.contenido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.contenido h1 {
    margin-bottom: 25px;
    color: #1e3a5f;
    font-size: 1.6rem;
}

/* ─── TARJETAS DASHBOARD ─────────────────────────────── */
.tarjetas {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.tarjeta {
    background: white;
    border-radius: 10px;
    padding: 25px;
    flex: 1;
    min-width: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tarjeta h3 {
    color: #1e3a5f;
    margin-bottom: 10px;
}

.tarjeta .numero {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 15px;
}

/* ─── BOTONES ────────────────────────────────────────── */
.btn-primary {
    background-color: #2563eb;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-primary:hover { background-color: #1d4ed8; }

.btn-secondary {
    background-color: #64748b;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
}

.btn-secondary:hover { background-color: #475569; }

.btn-danger {
    background-color: #dc2626;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
}

.btn-danger:hover { background-color: #b91c1c; }

.btn-success {
    background-color: #16a34a;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
}

.btn-success:hover { background-color: #15803d; }

/* ─── TABLA ──────────────────────────────────────────── */
.tabla {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tabla thead {
    background-color: #1e3a5f;
    color: white;
}

.tabla th, .tabla td {
    padding: 14px 18px;
    text-align: left;
    font-size: 0.9rem;
}

.tabla tbody tr:hover {
    background-color: #f8fafc;
}

.tabla tbody tr:nth-child(even) {
    background-color: #f1f5f9;
}

.tabla-vacia {
    text-align: center;
    color: #94a3b8;
    padding: 30px;
}

.acciones {
    display: flex;
    gap: 8px;
}

/* ─── BADGES ─────────────────────────────────────────── */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-activo {
    background-color: #dcfce7;
    color: #16a34a;
}

.badge-inactivo {
    background-color: #fee2e2;
    color: #dc2626;
}

/* ─── FORMULARIO ─────────────────────────────────────── */
.formulario-card {
    background: white;
    border-radius: 10px;
    padding: 35px;
    max-width: 550px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.campo {
    margin-bottom: 20px;
}

.campo label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.campo input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
}

.campo input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.error-msg {
    color: #dc2626;
    font-size: 0.82rem;
    margin-top: 4px;
    display: block;
}

.form-botones {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

/* ─── LOGIN ──────────────────────────────────────────── */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e3a5f;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-card h2 {
    text-align: center;
    color: #1e3a5f;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

/* ─── ALERTAS ────────────────────────────────────────── */
.alerta {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alerta-error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.alerta-exito {
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
}

.alerta-info {
    background-color: #dbeafe;
    color: #2563eb;
    border: 1px solid #93c5fd;
}

/* Login estilo prototipo UTP */
.login-page {
    height: 100vh;
    background: #f4f4f6;
    color: #151821;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.login-topbar {
    height: 58px;
    background: #ffffff;
    border-bottom: 1px solid #d9dce3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 42px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e00000;
    font-size: 18px;
}

.login-brand__mark,
.login-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e00000;
    color: #ffffff;
    font-weight: 900;
}

.login-brand__mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.login-brand__mark svg {
    width: 17px;
    height: 17px;
}

.login-help {
    color: #171923;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.login-help{border:0;background:transparent;cursor:pointer;font:inherit}

.login-shell {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(480px, 1fr) minmax(420px, 1fr);
    min-height: 0;
}

.login-visual {
    position: relative;
    overflow: hidden;
    background: #eff8fb;
    border-right: 1px solid #d9dce3;
    min-height: 0;
}

.login-visual__image {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: block;
    object-fit: cover;
    object-position: center bottom;
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(135deg, rgba(160, 172, 190, 0.2) 8%, transparent 8%, transparent 50%, rgba(160, 172, 190, 0.2) 50%, rgba(160, 172, 190, 0.2) 58%, transparent 58%),
        radial-gradient(circle, rgba(120, 132, 150, 0.22) 0 7px, transparent 8px);
    background-size: 92px 92px, 150px 150px;
    opacity: 0.38;
}

.campus-scene {
    position: absolute;
    inset: 40px 30px 0;
}

.campus-building {
    position: absolute;
    left: 0;
    bottom: 120px;
    width: 170px;
    height: 270px;
    background: #f2f5f8;
    border: 2px solid #717987;
    transform: skewY(-7deg);
    box-shadow: 14px 16px 0 rgba(15, 23, 42, 0.06);
}

.campus-building span {
    float: left;
    width: 42px;
    height: 52px;
    margin: 18px 0 0 24px;
    background: #dceaf4;
    border: 2px solid #8ca0b2;
}

.campus-logo {
    width: 68px;
    height: 42px;
    margin: 18px auto 0;
    background: #e00000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 3px;
}

.teacher-illustration {
    position: absolute;
    left: 230px;
    bottom: 0;
    width: 310px;
    height: 470px;
}

.teacher-head {
    position: absolute;
    left: 95px;
    top: 20px;
    width: 104px;
    height: 118px;
    background: #f2a574;
    border: 4px solid #171923;
    border-radius: 48% 48% 45% 45%;
    box-shadow: inset 0 16px 0 #3d271e;
}

.teacher-head::after {
    content: "";
    position: absolute;
    left: 24px;
    top: 46px;
    width: 58px;
    height: 18px;
    border: 3px solid #171923;
    border-left: 0;
    border-right: 0;
    border-radius: 16px;
}

.teacher-body {
    position: absolute;
    left: 58px;
    top: 132px;
    width: 185px;
    height: 330px;
    background: #073763;
    border: 4px solid #172033;
    border-radius: 70px 70px 22px 22px;
}

.teacher-body::before {
    content: "";
    position: absolute;
    left: 62px;
    top: 0;
    width: 64px;
    height: 185px;
    background: #ffffff;
    clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%);
}

.teacher-tablet {
    position: absolute;
    left: 120px;
    top: 242px;
    width: 112px;
    height: 142px;
    background: #93a3b5;
    border: 4px solid #172033;
    border-radius: 12px;
    transform: rotate(-12deg);
}

.teacher-tablet::after {
    content: "";
    position: absolute;
    left: 45px;
    top: 56px;
    width: 20px;
    height: 20px;
    background: #d7e1ea;
    border-radius: 50%;
}

.teacher-arm {
    position: absolute;
    right: 0;
    top: 185px;
    width: 130px;
    height: 24px;
    background: #f2a574;
    border: 4px solid #172033;
    border-radius: 24px;
    transform: rotate(-25deg);
}

.student-group,
.chart-board {
    position: absolute;
    background: #ffffff;
    border: 2px solid #9aa6b5;
    box-shadow: 0 10px 0 rgba(15, 23, 42, 0.06);
}

.student-group {
    bottom: 46px;
    width: 115px;
    height: 58px;
    border-radius: 14px;
}

.student-group--left {
    left: 16px;
}

.student-group--right {
    right: 72px;
}

.chart-board {
    right: 80px;
    bottom: 170px;
    width: 120px;
    height: 85px;
}

.chart-board::after {
    content: "";
    position: absolute;
    left: 20px;
    bottom: 18px;
    width: 12px;
    height: 24px;
    background: #e00000;
    box-shadow: 24px -16px 0 #8392a5, 48px -4px 0 #e00000;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    min-height: 0;
    overflow: auto;
}

.login-card--prototype {
    width: 100%;
    max-width: 370px;
    padding: 42px 36px 22px;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

.login-card--prototype h1 {
    margin: 18px 0 10px;
    text-align: center;
    font-size: 25px;
    color: #161922;
}

.login-card--prototype p {
    margin: 0 0 30px;
    text-align: center;
    color: #8d929d;
    font-size: 13px;
}

.login-card__icon {
    width: 58px;
    height: 58px;
    margin: 0 auto;
    display: flex;
    align-self: center;
    align-items: center;
    justify-content: center;
    flex: 0 0 58px;
    border-radius: 50%;
    background: #ffe1e4;
    color: #e00000;
}

.login-card__icon svg {
    display: block;
    width: 28px;
    height: 28px;
    margin: 0;
    transform: none;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-field label {
    display: block;
    margin-bottom: 8px;
    color: #151821;
    font-size: 13px;
    font-weight: 700;
}

.login-input {
    height: 40px;
    border: 1px solid #cfd4dd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: #ffffff;
}

.login-input span {
    color: #8a92a0;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
}

.login-input span svg {
    width: 17px;
    height: 17px;
}

.login-input input {
    width: 100%;
    border: 0;
    outline: 0;
    font: inherit;
    color: #151821;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.login-options label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8d929d;
}

.login-options a {
    color: #e00000;
    text-decoration: none;
    font-weight: 700;
}
.login-forgot{padding:0;border:0;color:#d50000;background:transparent;font:inherit;font-weight:700;cursor:pointer}

/* Modales reutilizables del acceso */
.login-modal{position:fixed;z-index:1500;inset:0;display:grid;place-items:center;padding:18px}.login-modal[hidden]{display:none}.login-modal__backdrop{position:absolute;inset:0;background:rgba(12,18,28,.62)}.login-modal__dialog{position:relative;width:min(480px,100%);max-height:calc(100vh - 36px);overflow:auto;border-radius:12px;background:#fff;box-shadow:0 24px 65px rgba(0,0,0,.25)}.login-modal__dialog>header{display:grid;grid-template-columns:42px 1fr 30px;align-items:center;gap:11px;padding:18px;border-bottom:1px solid #e5e8ed}.login-modal__dialog>header>span{display:grid;place-items:center;width:39px;height:39px;border-radius:50%;color:#d50000;background:#ffe3e3}.login-modal__dialog>header svg{width:19px;height:19px}.login-modal__dialog h2{margin:0;color:#151821;font-size:18px}.login-modal__dialog header p{margin:4px 0 0;color:#78808d;font-size:11px}.login-modal__dialog header button{width:30px;height:30px;border:0;border-radius:50%;color:#68717e;background:#f1f3f5;font-size:19px;cursor:pointer}.login-modal__body{display:grid;gap:10px;padding:17px 18px}.login-modal__body article{display:flex;align-items:center;gap:11px;padding:12px;border:1px solid #e3e7ed;border-radius:8px;background:#fafbfc}.login-modal__body article>svg{width:18px;height:18px;color:#d50000}.login-modal__body article strong,.login-modal__body article a,.login-modal__body article p{display:block}.login-modal__body article strong{margin-bottom:4px;font-size:11px}.login-modal__body article a,.login-modal__body article p{margin:0;color:#656d79;font-size:11px;text-decoration:none}.login-modal__dialog>footer{display:flex;justify-content:flex-end;padding:12px 18px;border-top:1px solid #e5e8ed}.login-modal__dialog>footer button,.login-recuperacion__contacto{min-width:105px;padding:10px 15px;border:0;border-radius:6px;color:#fff;background:#d50000;font-size:11px;font-weight:800;text-align:center;text-decoration:none;cursor:pointer}.login-recuperacion>p{margin:0;color:#555e6b;font-size:12px;line-height:1.55}.login-recuperacion>div{padding:13px;border-radius:8px;background:#fff5f5}.login-recuperacion strong{font-size:11px}.login-recuperacion ul{margin:8px 0 0;padding-left:18px;color:#626a76;font-size:10px;line-height:1.7}.login-recuperacion__contacto{display:block}.login-modal-open{overflow:hidden}

@media(max-width:520px){.login-modal{padding:10px}.login-modal__dialog{max-height:calc(100vh - 20px)}.login-modal__dialog>header{grid-template-columns:36px 1fr 28px;padding:14px}.login-modal__dialog>header>span{width:34px;height:34px}.login-modal__body{padding:14px}.login-modal__dialog>footer{padding:11px 14px}.login-modal__dialog>footer button,.login-recuperacion__contacto{width:100%}}

.login-submit {
    height: 42px;
    border: 0;
    border-radius: 6px;
    background: #e00000;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.login-submit:hover {
    background: #bd0000;
}

.login-footer {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #d9dce3;
    background: #f5f5f6;
    color: #9aa0aa;
    font-size: 11px;
    text-align: center;
}

/* SuperAdmin layout alineado al prototipo */
.superadmin-app {
    min-height: 100vh;
    display: flex;
    background: #f4f4f6;
}

.superadmin-sidebar {
    width: 230px;
    background: #050814;
    color: #ffffff;
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
}

.superadmin-brand {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    color: #ff1f1f;
    font-weight: 900;
}

.superadmin-brand__mark {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #e00000;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

.superadmin-nav {
    padding: 18px 14px;
    display: grid;
    gap: 8px;
}

.superadmin-link,
.superadmin-logout button {
    min-height: 40px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    color: #a7adbb;
    text-decoration: none;
    border: 0;
    background: transparent;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.superadmin-link--active,
.superadmin-link:hover,
.superadmin-logout button:hover {
    color: #ffffff;
    background: rgba(224, 0, 0, 0.18);
}

.superadmin-dot {
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
}

.superadmin-logout {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid #1d2230;
}

.superadmin-logout form {
    margin: 0;
}

.superadmin-main {
    margin-left: 230px;
    width: calc(100% - 230px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.superadmin-topbar {
    height: 58px;
    background: #f7f7f9;
    border-bottom: 1px solid #d9dce3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 34px;
}

.superadmin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #171923;
}

.superadmin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e7ddff;
    position: relative;
}

.superadmin-avatar::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16b364;
    border: 2px solid #ffffff;
}

.superadmin-content {
    width: min(920px, calc(100% - 64px));
    margin: 0 auto;
    padding: 34px 0 48px;
}

.superadmin-title h1 {
    margin: 0 0 8px;
    font-size: 30px;
    color: #171923;
}

.superadmin-title p {
    margin: 0;
    color: #8d929d;
    line-height: 1.5;
}

.superadmin-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 22px;
}

.superadmin-card,
.superadmin-table-card,
.superadmin-form-card {
    background: #ffffff;
    border: 1px solid #dfe2e8;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
}

.superadmin-card {
    min-height: 210px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.superadmin-card__icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #ffe1e4;
    color: #e00000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin-bottom: 20px;
}

.superadmin-card h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.superadmin-card p {
    margin: 0 0 22px;
    color: #8d929d;
}

.superadmin-card strong {
    display: block;
    margin-bottom: 12px;
    font-size: 34px;
}

.superadmin-table-card,
.superadmin-form-card {
    margin-top: 26px;
    padding: 24px;
}

.superadmin-table {
    width: 100%;
    border-collapse: collapse;
}

.superadmin-table th,
.superadmin-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    font-size: 13px;
}

.superadmin-table th {
    color: #727988;
    font-size: 12px;
    text-transform: uppercase;
}

.superadmin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.superadmin-footer {
    margin-top: auto;
    height: 38px;
    border-top: 1px solid #d9dce3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0aa;
    font-size: 11px;
}

@media (max-width: 920px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 360px;
        border-right: 0;
        border-bottom: 1px solid #d9dce3;
    }

    .login-panel {
        padding: 28px;
    }

    .superadmin-sidebar {
        width: 205px;
    }

    .superadmin-main {
        margin-left: 205px;
        width: calc(100% - 205px);
    }

    .superadmin-grid {
        grid-template-columns: 1fr;
    }
}

/* Login en teléfono: únicamente el formulario, sin ilustración institucional */
@media (max-width: 920px) {
    .login-visual { display: none; }
    .login-shell { display: flex; min-height: 0; }
    .login-panel { width: 100%; padding: 32px; }
    .login-card--prototype { max-width: 400px; padding: 30px 22px 24px; }
    .login-topbar { height: 54px; padding: 0 16px; }
    .login-brand { min-width: 0; font-size: 14px; }
    .login-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .login-footer { min-height: 42px; height: auto; padding: 10px 16px; text-align: center; }
    .login-options { align-items: flex-start; gap: 12px; flex-direction: column; }
    .login-forgot { align-self: flex-end; }
}

@media (max-width: 600px) {
    .login-panel { padding: 24px 16px; }
}

@media (max-width: 380px) {
    .login-brand strong { display: none; }
    .login-card--prototype { padding-inline: 18px; }
}
