/* ===========================
   Estilos base
   =========================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f3f4f6;
    color: #111827;
}

/* ===========================
   LOGIN
   =========================== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #2563eb22, #0f172a);
    color: #f9fafb;
}

.login-container {
    background: #0b1120;
    padding: 2.5rem 2.75rem;
    border-radius: 1rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.login-container h1 {
    margin: 0 0 0.5rem;
    font-size: 1.8rem;
}

.login-subtitle {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    color: #9ca3af;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert.info {
    background: #1d4ed833;
    color: #dbeafe;
    border: 1px solid #1d4ed8;
}

.alert.error {
    background: #b91c1c33;
    color: #fee2e2;
    border: 1px solid #b91c1c;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #e5e7eb;
}

.form-group input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid #4b5563;
    background: #020617;
    color: #f9fafb;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb55;
}

/* Botones */
.btn-primary,
button[type="submit"] {
    display: inline-block;
    border: none;
    background: #2563eb;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary:hover,
button[type="submit"]:hover {
    background: #1d4ed8;
}

/* ===========================
   DASHBOARD
   =========================== */
.dash-body {
    background-color: #f3f4f6;
}

.dash-header {
    background: #111827;
    color: #f9fafb;
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-header-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.dash-logo {
    font-size: 1.8rem;
}

.dash-header h1 {
    margin: 0;
    font-size: 1.4rem;
}

.dash-header p {
    margin: 0.1rem 0 0;
    font-size: 0.85rem;
    color: #9ca3af;
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    text-align: right;
    font-size: 0.8rem;
}

.user-name {
    display: block;
    font-weight: 600;
}

.user-role {
    display: block;
    color: #9ca3af;
}

.btn-secondary {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #6b7280;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.8rem;
}

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

.btn-small {
    font-size: 0.78rem;
}

/* Layout */
.dash-main {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 64px);
}

.dash-sidebar {
    background: #111827;
    color: #d1d5db;
    padding-top: 1rem;
}

.dash-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dash-sidebar li a {
    display: block;
    padding: 0.7rem 1.25rem;
    color: inherit;
    text-decoration: none;
    font-size: 0.9rem;
}

.dash-sidebar li.active a,
.dash-sidebar li a:hover {
    background: #1f2937;
    color: #f9fafb;
}

.dash-content {
    padding: 1.5rem 1.75rem 2rem;
}

.dash-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Tarjetas */
.dash-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    background: white;
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}

.card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 0 0 0.35rem;
}

.card-value {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
}

.card-note {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Bloques */
.dash-block {
    background: white;
    border-radius: 0.9rem;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}

.dash-block h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.next-steps {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.next-steps li + li {
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 900px) {
    .dash-main {
        grid-template-columns: 1fr;
    }

    .dash-sidebar {
        display: none;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .dash-header-right {
        align-self: stretch;
        justify-content: space-between;
    }
}
