:root {
    --rosa-principal: #d96c8f;
    --rosa-profundo: #c4557b;
    --rosa-suave: #f7dce5;
    --rosa-fondo: #fff7fa;
    --rosa-panel: #fff0f5;
    --blanco: #ffffff;
    --gris-texto: #2f2a2c;
    --gris-secundario: #7a6f74;
    --gris-borde: #f0d9e2;
    --sombra: 0 10px 30px rgba(180, 95, 130, 0.10);
    --sombra-suave: 0 6px 18px rgba(180, 95, 130, 0.08);
    --radio: 18px;
    --radio-sm: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fff9fb 0%, #fff4f7 100%);
    color: var(--gris-texto);
}

.sidebar {
    width: 270px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, #ffffff 0%, #fff6f9 100%);
    border-right: 1px solid var(--gris-borde);
    padding: 28px 20px;
    box-shadow: var(--sombra-suave);
    display: flex;
    flex-direction: column;
}

.marca {
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--gris-borde);
}

.marca .marca-superior {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.logo-circulo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rosa-principal), #ef9ab6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sombra-suave);
    font-size: 20px;
}

.marca h2 {
    margin: 0;
    font-size: 20px;
    color: var(--gris-texto);
    font-weight: 700;
}

.marca p {
    margin: 0;
    color: var(--gris-secundario);
    font-size: 13px;
    line-height: 1.5;
}

.menu-titulo {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #a58b95;
    text-transform: uppercase;
    margin: 6px 0 12px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #5d4f56;
    padding: 13px 14px;
    border-radius: 14px;
    transition: all 0.25s ease;
    font-weight: 600;
}

.sidebar a .icono {
    width: 18px;
    text-align: center;
    font-size: 16px;
}

.sidebar a:hover {
    background: var(--rosa-panel);
    color: var(--rosa-profundo);
    transform: translateX(2px);
}

.sidebar a.activo {
    background: linear-gradient(135deg, #fce7ef 0%, #f8d6e3 100%);
    color: var(--rosa-profundo);
    box-shadow: inset 0 0 0 1px #f1c7d6;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--gris-borde);
    color: var(--gris-secundario);
    font-size: 12px;
    line-height: 1.5;
}

.contenido {
    margin-left: 270px;
    padding: 32px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    gap: 20px;
}

.topbar h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--gris-texto);
}

.topbar p {
    margin: 6px 0 0;
    color: var(--gris-secundario);
    font-size: 14px;
}

.usuario-box {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--gris-borde);
    box-shadow: var(--sombra-suave);
    border-radius: 16px;
    padding: 12px 16px;
    min-width: 220px;
}

.usuario-box .label {
    display: block;
    font-size: 12px;
    color: var(--gris-secundario);
    margin-bottom: 4px;
}

.usuario-box .valor {
    font-size: 14px;
    font-weight: 700;
    color: var(--gris-texto);
}

.card {
    background: var(--blanco);
    border-radius: var(--radio);
    padding: 22px;
    box-shadow: var(--sombra);
    border: 1px solid #f8e7ee;
    margin-bottom: 22px;
}

.card h2,
.card h3 {
    margin-top: 0;
    color: var(--gris-texto);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 145px;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(217, 108, 143, 0.08);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fce3eb 0%, #f8d2df 100%);
    color: var(--rosa-profundo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-title {
    font-size: 14px;
    color: var(--gris-secundario);
    font-weight: 600;
}

.stat-value {
    font-size: 38px;
    font-weight: 700;
    color: var(--gris-texto);
    margin: 0 0 8px;
}

.stat-footer {
    font-size: 13px;
    color: var(--gris-secundario);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.acciones-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.accion-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #ffffff 0%, #fff8fb 100%);
    border: 1px solid #f3dce5;
    border-radius: 16px;
    padding: 18px;
    transition: all 0.25s ease;
    box-shadow: var(--sombra-suave);
}

.accion-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra);
    border-color: #ebc5d3;
}

.accion-icono {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fde8ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--rosa-profundo);
    margin-bottom: 14px;
}

.accion-card h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.accion-card p {
    margin: 0;
    color: var(--gris-secundario);
    font-size: 13px;
    line-height: 1.5;
}

.panel-resumen ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.panel-resumen li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f7e4eb;
    font-size: 14px;
}

.panel-resumen li:last-child {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fde7ef;
    color: var(--rosa-profundo);
    font-size: 12px;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 18px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #5e5257;
}

input, textarea, select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #ecd9e1;
    background: #fffdfd;
    font-size: 14px;
    color: var(--gris-texto);
    transition: all 0.25s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #df9cb5;
    box-shadow: 0 0 0 4px rgba(217, 108, 143, 0.10);
}

textarea {
    resize: vertical;
    min-height: 110px;
}

button,
.btn-link,
.btn-secundario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.25s ease;
}

button,
.btn-link {
    background: linear-gradient(135deg, var(--rosa-principal), var(--rosa-profundo));
    color: white;
    box-shadow: var(--sombra-suave);
}

button:hover,
.btn-link:hover {
    transform: translateY(-1px);
    filter: brightness(0.98);
}

.btn-secundario {
    background: #fff5f8;
    color: var(--rosa-profundo);
    border: 1px solid #efcfdb;
}

.btn-secundario:hover {
    background: #fdeef4;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    overflow: hidden;
    border-radius: 14px;
}

th {
    background: #fff1f6;
    color: #775e67;
    font-size: 13px;
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #f2dbe4;
}

td {
    padding: 13px 12px;
    border-bottom: 1px solid #f8e8ee;
    font-size: 14px;
    vertical-align: top;
}

tr:hover td {
    background: #fffafc;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert.success {
    background: #edf9f0;
    color: #226c38;
    border-color: #ccebd4;
}

.alert.danger {
    background: #fff0f0;
    color: #b64545;
    border-color: #f2c6c6;
}

.alert.warning {
    background: #fff9ea;
    color: #9f7400;
    border-color: #f1e0a5;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.login-side {
    background: linear-gradient(135deg, #fff7fa 0%, #fdebf2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-brand {
    max-width: 540px;
}

.login-brand .marca-chip {
    display: inline-block;
    background: #fde4ec;
    color: var(--rosa-profundo);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 18px;
}

.login-brand h1 {
    font-size: 44px;
    line-height: 1.1;
    margin: 0 0 16px;
    color: var(--gris-texto);
}

.login-brand p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--gris-secundario);
    margin: 0;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fffdfd;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 34px;
    border-radius: 24px;
    box-shadow: var(--sombra);
    border: 1px solid #f5e3ea;
}

.login-box h2 {
    margin: 0 0 8px;
    font-size: 28px;
    color: var(--gris-texto);
}

.login-box .subtitulo {
    margin: 0 0 24px;
    color: var(--gris-secundario);
    font-size: 14px;
}

.login-box a {
    color: var(--rosa-profundo);
    text-decoration: none;
    font-weight: 600;
}

.encabezado-seccion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.encabezado-seccion h2,
.encabezado-seccion h1 {
    margin: 0;
}

.texto-muted {
    color: var(--gris-secundario);
    font-size: 14px;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .acciones-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .contenido {
        margin-left: 0;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}