/* ── Variables ── */
:root {
    --primary: #4a6cf7;
    --primary-dark: #3a5ce5;
    --success: #2ecc71;
    --danger: #e74c3c;
    --gray-light: #f8f9fa;
    --gray: #6c757d;
}

/* ── General ── */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f0f2f5;
}

/* ── Navbar ── */
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

/* ── Cards ── */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.card-header {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.5rem;
}

/* ── Botones ── */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
}

/* ── Hábitos ── */
.habito-card {
    border-radius: 12px;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.habito-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.habito-completado {
    border-left: 4px solid var(--success) !important;
    opacity: 0.8;
}

.habito-pendiente {
    border-left: 4px solid var(--primary) !important;
}

.racha-badge {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ── Login ── */
.nav-tabs .nav-link {
    color: var(--gray);
    border: none;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    background: none;
}

/* ── Inputs ── */
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.6rem 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
}

/* ── Estadísticas ── */
.stat-card {
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 4px;
}