/* ===== CORPORATE THEME VARIABLES ===== */
:root {
    /* Green-based palette from provided colors */
    --primary-color: #00a65a;      /* Main green */
    --primary-dark: #008d4c;       /* Darker green for titles */
    --secondary-color: #6fb069;    /* Medium green */
    --success-color: #22c55e;      /* Success green */
    --warning-color: #d4c441;      /* Yellow-green for warnings */
    --danger-color: #dc2626;       /* Keep red for danger */
    --info-color: #2dd4bf;         /* Teal for info */
    --light-color: #f0fff4;        /* Very light green */
    --dark-color: #1e463b;         /* Dark green */
    
    /* Green-toned grays and neutrals */
    --gray-100: #f0fdf4;           /* Very light green tint */
    --gray-200: #dcfce7;           /* Light green tint */
    --gray-300: #bbf7d0;           /* Soft green tint */
    --gray-400: #86efac;           /* Light green */
    --gray-500: #4ade80;           /* Medium green */
    --gray-600: #22c55e;           /* Bright green */
    --gray-700: #16a34a;           /* Strong green */
    --gray-800: #15803d;           /* Dark green */
    --gray-900: #14532d;           /* Very dark green */
    
    /* Corporate spacing */
    --section-spacing: 2rem;
    --card-spacing: 1.5rem;
    --element-spacing: 1rem;
    
    /* Corporate shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Corporate borders */
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-width: 1px;
}

/* ===== GLOBAL STYLES ===== */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-100);
}

/* ===== CORPORATE TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
}

.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 600;
    color: var(--gray-800);
}

/* Executive heading styles */
.executive-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.executive-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    font-weight: 400;
}

/* Green-themed titles */
.text-primary {
    color: var(--primary-dark) !important;
}

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

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

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

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

.text-success {
    color: var(--success-color) !important;
}

.border-success {
    border-color: var(--success-color) !important;
}

/* ===== NAVIGATION ENHANCEMENTS ===== */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-brand img {
    transition: all 0.2s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
}

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

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-lg);
    margin-top: 0.5rem;
}

.dropdown-item {
    font-weight: 500;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ===== CARD ENHANCEMENTS ===== */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background-color: white;
}

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

.card-header {
    background-color: white;
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* Executive dashboard cards */
.executive-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.executive-card:hover {
    border-left-width: 6px;
    box-shadow: var(--shadow-lg);
}

/* Status cards with green palette */
.status-card-success {
    border-left: 4px solid var(--success-color);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(34, 197, 94, 0.02) 100%);
}

.status-card-warning {
    border-left: 4px solid var(--warning-color);
    background: linear-gradient(135deg, rgba(212, 196, 65, 0.05) 0%, rgba(212, 196, 65, 0.02) 100%);
}

.status-card-danger {
    border-left: 4px solid var(--danger-color);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(220, 38, 38, 0.02) 100%);
}

.status-card-info {
    border-left: 4px solid var(--info-color);
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.05) 0%, rgba(45, 212, 191, 0.02) 100%);
}

/* ===== BUTTON ENHANCEMENTS ===== */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    border-width: 2px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
    border-color: var(--primary-dark);
}

.btn-executive {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: #6366f1;
    color: white;
    font-weight: 700;
    padding: 0.75rem 2rem;
}

.btn-executive:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    border-color: #4f46e5;
    color: white;
}

/* ===== FORM ENHANCEMENTS ===== */
.form-control {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-weight: 500;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* ===== TABLE ENHANCEMENTS ===== */
.table {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th {
    background-color: var(--gray-100);
    color: var(--gray-700);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-300);
    padding: 1rem 0.75rem;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.02);
}

/* Executive table style */
.table-executive {
    background: white;
}

.table-executive th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

/* ===== BADGE ENHANCEMENTS ===== */
.badge {
    font-weight: 600;
    padding: 0.5em 0.75em;
    border-radius: var(--border-radius);
    font-size: 0.8em;
}

.badge-corporate {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.badge-status-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #047857 100%);
    color: white;
}

.badge-status-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #b45309 100%);
    color: white;
}

.badge-status-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #b91c1c 100%);
    color: white;
}

/* ===== PROGRESS BAR ENHANCEMENTS ===== */
.progress {
    height: 0.75rem;
    background-color: var(--gray-200);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
    border-radius: var(--border-radius);
}

/* Corporate progress bars */
.progress-corporate .progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--info-color) 100%);
}

.progress-success .progress-bar {
    background: linear-gradient(90deg, var(--success-color) 0%, #10b981 100%);
}

.progress-warning .progress-bar {
    background: linear-gradient(90deg, var(--warning-color) 0%, #f59e0b 100%);
}

.progress-danger .progress-bar {
    background: linear-gradient(90deg, var(--danger-color) 0%, #ef4444 100%);
}

/* ===== ALERT ENHANCEMENTS ===== */
.alert {
    border: none;
    border-radius: var(--border-radius-lg);
    border-left: 4px solid;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.alert-primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-left-color: var(--primary-color);
    color: var(--primary-dark);
}

.alert-success {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border-left-color: var(--success-color);
    color: #047857;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
    border-left-color: var(--warning-color);
    color: #b45309;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-left-color: var(--danger-color);
    color: #b91c1c;
}

/* ===== TIMELINE STYLES ===== */
.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 3rem;
    bottom: -1rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--gray-300));
}

.timeline-marker {
    position: absolute;
    left: -2.25rem;
    top: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.timeline-content {
    margin-left: 1rem;
}

/* ===== DASHBOARD SPECIFIC STYLES ===== */
.dashboard-metric {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.dashboard-metric:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.dashboard-metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.dashboard-metric-label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== CHART CONTAINERS ===== */
.chart-container {
    position: relative;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.chart-title {
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

/* ===== MODAL ENHANCEMENTS ===== */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 2px solid var(--gray-200);
    padding: 1.5rem 2rem;
}

/* ===== SIGNATURE STYLES ===== */
.signature-pad {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    background: var(--gray-100);
    transition: all 0.3s ease;
}

.signature-pad:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.02);
}

.signature-confirmation {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 2px solid var(--success-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
}

/* ===== UTILITY CLASSES ===== */
.text-corporate {
    color: var(--primary-color) !important;
}

.bg-corporate {
    background-color: var(--primary-color) !important;
    color: white;
}

.border-corporate {
    border-color: var(--primary-color) !important;
}

.shadow-corporate {
    box-shadow: var(--shadow-lg) !important;
}

.rounded-corporate {
    border-radius: var(--border-radius-lg) !important;
}

/* Executive spacing utilities */
.executive-spacing {
    margin-bottom: var(--section-spacing);
}

.executive-padding {
    padding: var(--section-spacing);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .dashboard-metric-value {
        font-size: 2rem;
    }
    
    .executive-title {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .timeline-container {
        padding-left: 1rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
        width: 2rem;
        height: 2rem;
    }
    
    .timeline-item:not(:last-child)::before {
        left: -1.25rem;
    }
}

@media (max-width: 576px) {
    .btn-executive {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .dashboard-metric {
        padding: 1rem;
    }
    
    .dashboard-metric-value {
        font-size: 1.75rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .btn {
        display: none;
    }
    
    .badge {
        border: 1px solid #ccc;
        -webkit-print-color-adjust: exact;
    }
    
    .table {
        border-collapse: collapse;
    }
    
    .table th,
    .table td {
        border: 1px solid #ccc !important;
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--gray-800);
    }
    
    .btn {
        border-width: 3px;
    }
    
    .alert {
        border-left-width: 6px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== LOADING STATES ===== */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===== CUSTOM SCROLLBARS ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ===== ANIMATION CLASSES ===== */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
