/* =====================================================================
   Sistema de Amigos · Estilos personalizados (Mobile First)
   Trabaja sobre Bootstrap 5.3
   ===================================================================== */

:root {
    --brand-primary:   #2c5282;
    --brand-secondary: #4299e1;
    --brand-accent:    #ed8936;
    --brand-dark:      #1a365d;
    --bg-soft:         #f5f7fb;
}

/* ----- Base ---------------------------------------------------------- */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
    background-color: var(--bg-soft);
    color: #2d3748;
}

/* ----- Login --------------------------------------------------------- */
.login-body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(26, 54, 93, .92) 0%, rgba(66, 153, 225, .85) 100%),
        url('https://images.unsplash.com/photo-1438032005730-c779502df39b?auto=format&fit=crop&w=1600&q=60');
    background-size: cover;
    background-position: center;
}

.login-wrapper {
    min-height: 100vh;
}

.login-card {
    max-width: 420px;
    border-radius: 1rem;
}

.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    font-size: 1.75rem;
    box-shadow: 0 8px 20px rgba(44, 82, 130, .35);
}

.login-card .form-control,
.login-card .input-group-text {
    padding: .65rem .9rem;
}

.login-card .btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border: none;
}
.login-card .btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary));
}

/* ----- Navbar -------------------------------------------------------- */
.app-navbar {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
}

.app-navbar .nav-link {
    color: rgba(255, 255, 255, .85);
    font-weight: 500;
    border-radius: .5rem;
    padding: .5rem .9rem !important;
    margin: .15rem .1rem;
    transition: all .2s ease;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
    background-color: rgba(255, 255, 255, .15);
    color: #fff;
}

.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-accent);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
}

/* ----- Cards de estadísticas ---------------------------------------- */
.stat-card {
    border-radius: .85rem;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .08) !important;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    font-weight: 600;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: #1f2937;
}

.stat-primary .stat-icon { background: linear-gradient(135deg, #4299e1, #2c5282); }
.stat-info    .stat-icon { background: linear-gradient(135deg, #38b2ac, #2c7a7b); }
.stat-success .stat-icon { background: linear-gradient(135deg, #48bb78, #2f855a); }
.stat-warning .stat-icon { background: linear-gradient(135deg, #ed8936, #c05621); }

/* ----- Cards generales ---------------------------------------------- */
.card {
    border-radius: .85rem;
}

.card-header {
    border-bottom: 1px solid #edf2f7;
    border-top-left-radius: .85rem !important;
    border-top-right-radius: .85rem !important;
}

/* ----- Tablas ------------------------------------------------------- */
.table > :not(caption) > * > * {
    padding: .85rem 1rem;
}

.table thead th {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #4a5568;
}

/* ----- Botones de acción tabla -------------------------------------- */
.btn-action {
    padding: .25rem .5rem;
    font-size: .85rem;
    line-height: 1;
}

/* ----- Tarjetas REFAM ----------------------------------------------- */
.refam-card {
    border-radius: .85rem;
    transition: transform .15s ease, box-shadow .15s ease;
}
.refam-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .08) !important;
}

/* ----- Footer ------------------------------------------------------- */
.app-footer {
    border-top: 1px solid #e2e8f0;
    background-color: #fff;
}

/* ----- Responsive tweaks (Mobile first) ----------------------------- */
@media (max-width: 575.98px) {
    .stat-icon  { width: 44px; height: 44px; font-size: 1.15rem; }
    .stat-value { font-size: 1.35rem; }
    .stat-label { font-size: .7rem; }
}
