/* ===================================
   Pension D'A - Custom Styles
   =================================== */

:root {
    --primary-color: #41614d;
    --primary-dark: #2f4838;
    --secondary-color: #b3c1b0;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* General */
body {
    background-color: var(--light-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Navbar Enhanced */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Dashboard Styles */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Stats Cards */
.stats-card {
    background: white;
    border: none;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.stats-card .card-icon {
    font-size: 3rem;
    opacity: 0.2;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.stats-card h5 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.stats-card .btn {
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

/* Scenario Banners */
.scenario-banner {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border-left: 5px solid;
    position: relative;
    overflow: hidden;
}

.scenario-banner::after {
    content: '';
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    opacity: 0.05;
}

.scenario-banner.excel {
    border-left-color: var(--secondary-color);
}

.scenario-banner.excel::after {
    background-color: var(--secondary-color);
}

.scenario-banner.form {
    border-left-color: var(--primary-color);
}

.scenario-banner.form::after {
    background-color: var(--primary-color);
}

.scenario-banner:hover {
    transform: translateX(5px);
    box-shadow: var(--card-hover-shadow);
}

.scenario-banner .scenario-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.scenario-banner h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.scenario-banner .scenario-steps {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.scenario-banner .scenario-steps li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.scenario-banner .scenario-steps li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.scenario-banner .btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.scenario-banner .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Cards Enhancement */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-hover-shadow);
}

.card-header {
    border-radius: 1rem 1rem 0 0 !important;
    font-weight: 600;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

/* Buttons Enhancement */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

/* Table Enhancement */
.table {
    background: white;
    border-radius: 1rem;
}

.table thead th {
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #64748b;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.01);
}

/* Search Bar */
.search-bar {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.search-bar .input-group {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-bar .form-control {
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.search-bar .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    border-left: 4px solid;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-left-color: var(--secondary-color);
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border-left-color: var(--primary-color);
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-left-color: var(--accent-color);
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: var(--danger-color);
}

/* Footer */
.footer {
    background: white;
    border-top: 2px solid #e2e8f0;
    margin-top: 4rem;
    padding: 2rem 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 2rem;
    }

    .stats-card .stats-number {
        font-size: 2rem;
    }

    .scenario-banner {
        margin-bottom: 1.5rem;
    }
}

/* Loading Spinner */
.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    border-color: var(--primary-color);
    border-right-color: transparent;
}

/* Page Title */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    color: var(--primary-color);
}

/* ===================================
   Login Page Styles
   =================================== */

.login-container {
    background: linear-gradient(135deg, #41614d 0%, #2f4838 100%);
    min-height: 100vh;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.login-logo img {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.login-logo i {
    font-size: 2.5rem;
    color: white;
}

.login-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-body {
    padding: 2.5rem 2rem;
}

.login-form .form-label {
    font-size: 0.95rem;
    color: #334155;
    margin-bottom: 0.5rem;
}

.login-form .input-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    overflow: hidden;
}

.login-form .input-group-text {
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.login-form .form-control {
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.login-form .btn-primary {
    padding: 0.875rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
}

.login-footer {
    background-color: #f8fafc;
    padding: 1.25rem 2rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

/* Login Animation */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-card.fade-in-up {
    animation: fadeInScale 0.6s ease-out;
}

/* Responsive Login */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }

    .login-header {
        padding: 2rem 1.5rem;
    }

    .login-logo {
        width: 60px;
        height: 60px;
    }

    .login-logo i {
        font-size: 2rem;
    }

    .login-body {
        padding: 2rem 1.5rem;
    }
}

/* ===================================
   Client Detail Page Styles
   =================================== */

.client-detail-header {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.client-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.client-detail-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Detail Cards */
.detail-card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.detail-card:hover {
    box-shadow: var(--card-hover-shadow);
}

.detail-card-header {
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

/* Color Variants for Detail Card Headers */
.detail-card-header.primary {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
}

.detail-card-header.info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

.detail-card-header.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.detail-card-header.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.detail-card-header.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.detail-card-header.secondary {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
}

.detail-card-header.dark {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
}

.detail-card-header.light {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: #1e293b;
}

/* Detail Card Tables */
.detail-card .table {
    margin-bottom: 0;
}

.detail-card .table th {
    font-weight: 600;
    color: #64748b;
    border-top: none;
    padding: 0.75rem 0.5rem;
}

.detail-card .table td {
    border-top: 1px solid #f1f5f9;
    padding: 0.75rem 0.5rem;
}

.detail-card .table tr:first-child th,
.detail-card .table tr:first-child td {
    border-top: none;
}

/* Responsive Detail Page */
@media (max-width: 768px) {
    .client-avatar-large {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }

    .client-detail-header h1 {
        font-size: 1.5rem;
    }

    .client-detail-header .d-flex.gap-2 {
        flex-direction: column;
        width: 100%;
    }

    .client-detail-header .btn {
        width: 100%;
    }
}

/* ===================================
   Settings Page Styles
   =================================== */

.settings-header {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.settings-tabs {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: var(--card-shadow);
}

.settings-tabs .nav-link {
    color: #64748b;
    font-weight: 500;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.settings-tabs .nav-link:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
}

.settings-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.settings-tabs .nav-link i {
    margin-right: 0.5rem;
}

/* Integration Cards in Settings */
.detail-card .card-footer {
    border-top: 2px solid #f1f5f9;
    background-color: #f8fafc;
}

/* Responsive Settings */
@media (max-width: 768px) {
    .settings-tabs {
        padding: 0.5rem;
    }

    .settings-tabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===================================
   Admin Pages Styles
   =================================== */

.admin-header {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-header h1 {
        font-size: 1.5rem;
    }
}
