
/* ==========================================
   MD CREATIVE - PANEL ADMINISTRATIVO BLANCO ELEGANTE
========================================== */

:root {
    --adm-bg: #f6f8fc;
    --adm-sidebar: #ffffff;
    --adm-card: #ffffff;
    --adm-primary: #2563eb;
    --adm-text: #1b2b45;
    --adm-muted: #64748b;
    --adm-border: #e1e8f2;
    --adm-shadow: 0 12px 34px rgba(28, 54, 95, .07);
    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--adm-bg);
    color: var(--adm-text);
    font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
    touch-action: manipulation;
}

input {
    font-size: 16px;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--adm-primary);
    outline-offset: 3px;
}

/* ==========================================
   LOGIN
========================================== */

.adm-login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 16px;
    background:
        radial-gradient(
            circle at 50% 10%,
            #e3edfc,
            transparent 50%
        ),
        var(--adm-bg);
}

.adm-login-container {
    width: 100%;
    max-width: 440px;
}

.adm-login-card {
    padding: 42px 36px;
    border: 1px solid var(--adm-border);
    border-radius: 24px;
    background: var(--adm-sidebar);
    box-shadow: 0 25px 75px rgba(36, 60, 100, .12);
}

.adm-login-brand {
    text-align: center;
    margin-bottom: 34px;
}

.adm-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border: 2px solid var(--adm-primary);
    border-radius: 22px;
    background: #eaf2ff;
    color: var(--adm-primary);
    font-size: 30px;
    font-weight: 900;
}

.adm-login-brand h1 {
    margin: 0;
    font-size: 28px;
}

.adm-login-brand h1 span {
    color: var(--adm-primary);
}

.adm-login-brand p,
.adm-login-heading p {
    color: var(--adm-muted);
    font-size: 14px;
}

.adm-login-heading {
    margin-bottom: 28px;
}

.adm-login-heading h2 {
    font-size: 24px;
    margin: 0;
}

.adm-login-heading p {
    margin: 6px 0 0;
}

.adm-form-group {
    margin-bottom: 20px;
}

.adm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.adm-form-group input {
    width: 100%;
    min-height: 50px;
    padding: 12px 15px;
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    color: var(--adm-text);
}

.adm-form-group input:focus {
    border-color: var(--adm-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}

.adm-error {
    margin: 8px 0 0;
    color: #b42335;
    font-size: 13px;
}

.adm-btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    padding: 12px 22px;
    border: 0;
    border-radius: 12px;
    background: var(--adm-primary);
    color: #ffffff;
    font-weight: 800;
}

.adm-btn-primary:hover {
    background: #1d4ed8;
}

.adm-full {
    width: 100%;
}

.adm-login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--adm-muted);
}

.adm-login-footer a:hover {
    color: var(--adm-primary);
}

.adm-copyright {
    margin-top: 22px;
    text-align: center;
    color: var(--adm-muted);
    font-size: 12px;
}

/* ==========================================
   ESTRUCTURA DEL DASHBOARD
========================================== */

.adm-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

/* SIDEBAR */

.adm-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 28px 18px;
    background: var(--adm-sidebar);
    border-right: 1px solid var(--adm-border);
    box-shadow: 3px 0 22px rgba(27, 51, 87, .03);
}

.adm-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 8px;
    font-size: 18px;
    font-weight: 800;
}

.adm-sidebar-brand small {
    display: block;
    color: var(--adm-muted);
    font-size: 12px;
    font-weight: normal;
}

.adm-logo-small {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #e9f1ff;
    color: var(--adm-primary);
    font-weight: 900;
}

.adm-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.adm-nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--adm-muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.adm-nav-link span {
    font-size: 22px;
}

.adm-nav-link:hover,
.adm-nav-link.active {
    background: #eaf2ff;
    color: var(--adm-primary);
}

.adm-logout {
    margin-top: auto;
}

.adm-logout button {
    width: 100%;
    min-height: 46px;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    background: #fff1f2;
    color: #b42335;
    font-weight: 700;
}

.adm-logout button:hover {
    background: #ffe4e8;
}

/* CONTENIDO */

.adm-content {
    min-width: 0;
    padding: 32px;
}

.adm-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
}

.adm-eyebrow {
    color: var(--adm-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.adm-topbar h1 {
    margin: 3px 0 0;
    font-size: 30px;
}

.adm-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.adm-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e8f0ff;
    color: var(--adm-primary);
    font-weight: 800;
}

.adm-user strong {
    display: block;
    font-size: 14px;
}

.adm-user small {
    display: block;
    color: var(--adm-muted);
    font-size: 12px;
}

/* BIENVENIDA */

.adm-welcome {
    padding: 35px;
    border: 1px solid #d5e3f7;
    border-radius: 20px;
    background: linear-gradient(
        120deg,
        #ffffff,
        #eef5ff
    );
}

.adm-welcome h2 {
    margin: 8px 0;
    font-size: 27px;
}

.adm-welcome p {
    max-width: 650px;
    margin-bottom: 0;
    color: #53647b;
}

/* SECCIONES */

.adm-section {
    margin-top: 35px;
}

.adm-section-heading {
    margin-bottom: 20px;
}

.adm-section-heading h2 {
    margin: 0;
    font-size: 22px;
}

.adm-section-heading p {
    margin: 5px 0 0;
    color: var(--adm-muted);
    font-size: 14px;
}

/* ESTADISTICAS */

.adm-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.adm-stat-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--adm-border);
    border-radius: 18px;
    background: var(--adm-card);
    box-shadow: var(--adm-shadow);
}

.adm-stat-card span {
    display: block;
    color: var(--adm-muted);
    font-size: 13px;
}

.adm-stat-card strong {
    display: block;
    margin: 12px 0;
    color: var(--adm-primary);
    font-size: 38px;
    line-height: 1;
}

.adm-stat-card small {
    color: var(--adm-muted);
    font-size: 12px;
}

/* MODULOS */

.adm-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.adm-module-card {
    min-width: 0;
    padding: 25px;
    border: 1px solid var(--adm-border);
    border-radius: 18px;
    background: var(--adm-card);
    box-shadow: var(--adm-shadow);
}

.adm-module-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #eaf2ff;
    color: var(--adm-primary);
    font-size: 25px;
}

.adm-module-card h3 {
    margin: 16px 0 8px;
}

.adm-module-card p {
    color: var(--adm-muted);
    font-size: 14px;
}

.adm-module-card small {
    color: var(--adm-primary);
    font-size: 12px;
}

.adm-footer {
    padding-top: 40px;
    color: var(--adm-muted);
    font-size: 12px;
    text-align: center;
}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 1100px) {
    .adm-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .adm-modules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .adm-layout {
        display: block;
    }

    .adm-sidebar {
        position: relative;
        padding: 18px 15px;
        gap: 18px;
        border-right: none;
        border-bottom: 1px solid var(--adm-border);
    }

    .adm-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .adm-nav-link {
        flex-shrink: 0;
    }

    .adm-logout {
        margin: 0;
    }

    .adm-logout button {
        width: auto;
        padding: 10px 20px;
    }

    .adm-content {
        padding: 22px 15px;
    }

    .adm-welcome {
        padding: 24px;
    }

    .adm-welcome h2 {
        font-size: 23px;
    }

    .adm-user {
        max-width: 100%;
    }

    .adm-user strong {
        overflow-wrap: anywhere;
    }

    .adm-modules {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .adm-login-card {
        padding: 32px 22px;
    }

    .adm-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .adm-topbar {
        align-items: flex-start;
    }

    .adm-stat-card {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ==========================================
   ACABADOS - DISEÑO BLANCO ELEGANTE
   Mantiene compatibilidad con las vistas actuales.
========================================== */

.adm-login-page {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 50% 0%, rgba(37,99,235,.10), transparent 50%),
        linear-gradient(145deg, #f7faff, #edf3fb);
}

.adm-login-card {
    color: var(--adm-text);
    box-shadow: 0 25px 75px rgba(36, 60, 100, .12);
}

.adm-login-brand h1,
.adm-login-heading h2 {
    color: var(--adm-text);
}

/* Corrige el color del nombre dinamico
   del login definido en su vista Blade. */

.adm-login-page .adm-login-brand .adm-login-site-name {
    color: var(--adm-text);
}

.adm-login-page .adm-login-brand .adm-login-logo-image {
    padding: 8px;
    border-radius: 16px;
    background: #f5f8ff;
}

.adm-form-group input {
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.adm-form-group input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.adm-form-group input:hover {
    border-color: #b8c8dc;
}

.adm-form-group input:focus-visible {
    outline: none;
    border-color: var(--adm-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.13);
}

.adm-btn-primary {
    box-shadow: 0 6px 16px rgba(37,99,235,.17);
    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.adm-btn-primary:hover {
    box-shadow: 0 8px 20px rgba(37,99,235,.22);
}

.adm-btn-primary:active {
    transform: translateY(1px);
}

.adm-error {
    color: #b42335;
}

.adm-login-footer a {
    color: #36598b;
    font-weight: 600;
}

.adm-login-footer a:hover {
    color: var(--adm-primary);
}

.adm-login-page .adm-copyright {
    color: #64748b;
}

.adm-stat-card,
.adm-module-card {
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.adm-stat-card:hover,
.adm-module-card:hover {
    transform: translateY(-3px);
    border-color: #bfd1ea;
    box-shadow: 0 14px 30px rgba(28,54,95,.09);
}

.adm-nav-link:hover,
.adm-nav-link.active {
    background: #eaf2ff;
    color: var(--adm-primary);
}

.adm-welcome {
    box-shadow: 0 12px 32px rgba(37,99,235,.05);
}

@media (max-width: 480px) {
    .adm-login-page {
        padding: 20px 12px;
    }

    .adm-login-card {
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .adm-btn-primary,
    .adm-stat-card,
    .adm-module-card,
    .adm-form-group input {
        transition: none;
    }
}
