/* Esqueleto Base - Estilos CSS Genéricos */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --accent-color: #2c3e50;
    --gradient-primary: linear-gradient(135deg, #0d6efd 0%, #000000 100%);
    --gradient-secondary: linear-gradient(135deg, #0061f2 0%, #00ba94 100%);
    --border-radius: 15px;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* === HERO SECTION === */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 100px 0;
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: white;
    clip-path: polygon(0 100%, 100% 0%, 100% 100%);
}

/* === CARDS Y FEATURES === */
.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.1);
    transition: var(--transition);
}

.feature-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

/* === PRICING CARDS === */
.pricing-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg);
}

.pricing-header {
    background-color: var(--light-color);
    border-bottom: none;
    padding: 2rem;
    text-align: center;
}

.pricing-featured {
    border: 3px solid var(--primary-color);
    transform: scale(1.05);
}

.pricing-featured .pricing-header {
    background: var(--primary-color);
    color: white;
}

/* === AUTHENTICATION PAGES === */
.auth-body {
    background: linear-gradient(45deg, var(--light-color), #e9ecef);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow-lg);
    max-width: 500px;
    width: 100%;
}

.auth-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-body-content {
    padding: 2rem;
}

/* === NAVIGATION === */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* === BUTTONS === */
.btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: #0b5ed7;
    border-color: #0a53be;
    transform: translateY(-2px);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* === FORMS === */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* === ALERTS === */
.alert {
    border: none;
    border-radius: 10px;
    font-weight: 500;
}

/* === BADGES Y STEPS === */
.step-circle {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 auto 1rem auto;
    box-shadow: var(--box-shadow);
}

.legal-badge {
    background-color: var(--light-color);
    border-left: 5px solid var(--success-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

/* === DASHBOARD SPECIFIC === */
.dashboard-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.stat-card {
    background: var(--gradient-secondary);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .btn {
        padding: 0.5rem 1.5rem;
    }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* === UTILITIES === */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.02'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Perfil y Historial tweaks */
.profile-header-actions a {
    margin-left: 0.5rem;
}

.saldo-card .display-6 {
    font-size: 2.25rem;
    color: var(--primary-color);
}

.list-group-item i.fa-history {
    color: var(--primary-color);
}

.card.border-danger .card-header {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

/* Perfil specific styles */
.btn-save-changes {
    background: linear-gradient(90deg, #0d6efd, #0b5ed7);
    border: none;
    box-shadow: 0 6px 18px rgba(13,110,253,0.18);
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
}
.card .card-header {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card .card-header i {
    color: var(--primary-color);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.card-body .form-control {
    background: #fff;
}
.btn-outline-secondary.w-100 {
    border-radius: 10px;
    padding: 0.75rem 1rem;
}
.btn-success.btn-lg.w-100 {
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-weight: 700;
}
.text-success a, .btn-link.text-success { color: #198754 !important; }

/* Estilos para tarjeta de saldo disponible */
.saldo-card {
    background: linear-gradient(180deg, #eaf6ff 0%, #ffffff 100%);
    border: 1px solid rgba(13,110,253,0.18);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(13,110,253,0.06);
}
.saldo-card .card-body {
    padding: 1.5rem 1rem;
}
.saldo-card h6 {
    color: #0b5ed7;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.saldo-card .display-6 {
    font-size: 2.25rem;
    color: #0d6efd;
    margin-bottom: 0.25rem;
}
.saldo-card p {
    color: #6c757d;
}

/* For greater specificity to override bootstrap defaults if needed */
.card.saldo-card {
    background: linear-gradient(180deg, #eaf6ff 0%, #ffffff 100%) !important;
    border: 1px solid rgba(13,110,253,0.18) !important;
    box-shadow: 0 6px 18px rgba(13,110,253,0.06) !important;
}

/* Page hero / header bar for profile */
.page-hero {
    background: #1f2933; /* dark slate */
    color: #ffffff;
    padding: 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.page-hero .hero-inner {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
}
.page-hero .hero-left {
    display:flex;
    align-items:center;
    gap:0.75rem;
}
.page-hero a.hero-back {
    color: #fff;
    text-decoration:none;
    font-weight:600;
    display:inline-flex;
    align-items:center;
    gap:0.5rem;
}
.page-hero a.hero-back i { font-size:1.1rem; }
.page-hero .hero-right { color: rgba(255,255,255,0.9); font-weight:500; }

.page-hero .hero-center {
    text-align:left;
    flex:1 1 auto;
}
.page-hero .hero-title {
    margin:0;
    font-size:28px;
    font-weight:700;
    color:#ffffff;
}
.page-hero .hero-subtitle {
    margin:0;
    font-size:14px;
    color:rgba(255,255,255,0.8);
}

/* Oval back button */
.btn-oval {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    transition: all 0.15s ease;
}
.btn-oval:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

/* Hero logo */
.hero-logo {
    width:48px;
    height:48px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid rgba(255,255,255,0.12);
}
.hero-logo-initials {
    width:48px;
    height:48px;
    border-radius:50%;
    background:#0d6efd;
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:16px;
    border:2px solid rgba(255,255,255,0.08);
}
.hero-logo, .hero-logo-initials { cursor: pointer; }
.hero-logo:hover { transform: scale(1.06); transition: transform 0.12s ease; }

/* small responsive tweak */
@media (max-width: 768px) {
    .page-hero { padding: 0.5rem; }
    .page-hero .hero-right { display:none; }
}