/* Variables de colores y estilos */
:root {
    --primary: #FF7F00;
    --primary-light: #FFEDD9;
    --success: #34A853;
    --success-light: #E6F4EA;
    --danger: #EA4335;
    --danger-light: #FADBD8;
    --warning: #FBBC05;
    --warning-light: #FEF9E7;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --font-family: 'San Francisco', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* General Styles */
body {
    font-family: var(--font-family);
    background-color: #F7F8FA;
    color: var(--gray-800);
    line-height: 1.6;
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    border: none;
}

/* Login Section */
#loginSection .card {
    margin-top: 2rem;
    border-radius: var(--border-radius);
}

/* Dashboard Section */
.navbar {
    background-color: white;
    box-shadow: var(--box-shadow);
    border-radius: 8px;
}

.nav-link {
    color: var(--gray-700);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: var(--primary);
    border-radius: 2px;
}

/* Ensure nav links don't stay active when not selected */
.nav-link:not(.active) {
    color: var(--gray-700);
}

/* Fix for navigation menu to not stay on Mis Pólizas */
.navbar-nav .nav-link {
    position: relative;
}

.navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: var(--primary);
    border-radius: 2px;
}

/* User Dropdown */
.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--gray-100);
    padding: 8px 12px;
    border-radius: 50px;
    transition: background-color 0.2s;
}

.dropdown-toggle:hover {
    background-color: var(--gray-200);
}

.dropdown-toggle .avatar {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.dropdown-toggle .email {
    font-size: 14px;
    color: var(--gray-700);
}

/* Fix for user menu to match guia.html */
#userDropdown {
    background-color: var(--gray-100);
    border-radius: 50px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    border: none;
}

#userDropdown:hover {
    background-color: var(--gray-200);
}

#userDropdown .bi-person-circle {
    display: none;
}

#userDropdown::before {
    content: 'C';
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 4px;
}

#userEmail {
    font-size: 14px;
    color: var(--gray-700);
}

.dropdown-menu {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: var(--gray-100);
}

.dropdown-item i {
    margin-right: 0.5rem;
}

/* Content Area */
#contentArea {
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-height: 400px;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stats-card {
    position: relative;
    overflow: hidden;
}

.stats-card.active {
    border-top: 4px solid var(--success);
}

.stats-card.overdue {
    border-top: 4px solid var(--danger);
}

.stats-card.upcoming {
    border-top: 4px solid var(--warning);
}

.stats-card h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    color: var(--gray-600);
}

.stats-card .number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stats-card .value {
    font-size: 18px;
    color: var(--gray-700);
}

.stats-card .badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge.active {
    background-color: var(--success-light);
    color: var(--success);
}

.badge.overdue {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge.upcoming {
    background-color: var(--warning-light);
    color: var(--warning);
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: #E67300;
    border-color: #E67300;
}

.btn-action {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-action:hover {
    background-color: #E67300;
    color: white;
    text-decoration: none;
}

.actions {
    display: flex;
    gap: 8px;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

/* Form Controls */
.form-control {
    border-radius: 5px;
    border: 1px solid var(--gray-300);
    padding: 10px 12px;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 127, 0, 0.25);
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: #E67300;
    text-decoration: underline;
}

/* Tables and Activity Section */
.activity-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: 600;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 16px;
    border-bottom: 2px solid var(--gray-200);
    color: var(--gray-600);
    font-weight: 600;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: var(--gray-100);
}

.table-responsive {
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    background-color: white;
}

.table-responsive .table {
    margin-bottom: 0;
}

/* Policy Icon */
.policy-icon {
    width: 36px;
    height: 36px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Apply policy icon style to table icons */
.table i.bi {
    width: 36px;
    height: 36px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style table headers and cells to match guia.html */
.table th {
    text-align: left;
    padding: 16px;
    border-bottom: 2px solid var(--gray-200);
    color: var(--gray-600);
    font-weight: 600;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Style for polizas and cuotas tables to match activity table */
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--gray-100);
}

.table-striped > tbody > tr:hover {
    background-color: var(--gray-200);
}

/* Add card style to table containers */
.table-responsive {
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    background-color: white;
    margin-bottom: 24px;
}

.table-responsive .table {
    margin-bottom: 0;
}

/* Style for mobile view cards */
#polizasMobileView .card,
#cuotasMobileView .card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: none;
    margin-bottom: 16px;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.status-badge.overdue {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* Style badges in tables to match guia.html */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.bg-danger {
    background-color: var(--danger-light) !important;
    color: var(--danger) !important;
}

.bg-warning {
    background-color: var(--warning-light) !important;
    color: var(--warning) !important;
}

/* Actions Buttons */
.actions {
    display: flex;
    gap: 8px;
}

/* User Avatar */
.avatar {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Estilos para la Splash Screen */
#splashScreen {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    transition: opacity 0.5s ease-in-out;
}

.splash-content {
    max-width: 500px;
    margin: 0 auto;
}

.splash-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    transition: all 0.3s ease;
}

.splash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.logo-container {
    margin-bottom: 2rem;
}

.splash-logo {
    max-width: 220px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.splash-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
}

.splash-text {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.spinner-container {
    margin-top: 1.5rem;
}

.spinner-grow {
    width: 3rem;
    height: 3rem;
}

/* Animación de entrada */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.splash-card {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Yool Dashboard Styles */
.yool-dashboard .page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2D3748;
}

.yool-dashboard .pill-tabs .btn-group {
    background-color: #F7FAFC;
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.yool-dashboard .pill-tabs .btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.yool-dashboard .pill-tabs .btn.active {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.yool-dashboard .card {
    transition: transform 0.2s ease-in-out;
}

.yool-dashboard .card:hover {
    transform: translateY(-2px);
}

.yool-dashboard .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    font-weight: 600;
}

.yool-dashboard .display-4 {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.yool-dashboard .progress {
    background-color: #EDF2F7;
    border-radius: 1rem;
    overflow: hidden;
}

.yool-dashboard .progress-bar {
    border-radius: 1rem;
    transition: width 0.6s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .yool-dashboard .display-4 {
        font-size: 2rem;
    }
    
    .yool-dashboard .page-title {
        font-size: 1.75rem;
    }
}

/* Quick access buttons */
.yool-dashboard .btn {
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.yool-dashboard .btn i {
    font-size: 1.25rem;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--gray-600);
    margin-bottom: 32px;
}

.activity-card {
    overflow: hidden;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
}

.activity-table th {
    text-align: left;
    padding: 16px;
    border-bottom: 2px solid var(--gray-200);
    color: var(--gray-600);
    font-weight: 600;
}

.activity-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.activity-table tr:last-child td {
    border-bottom: none;
}

.activity-table tr:hover {
    background-color: var(--gray-100);
}