/* Custom CSS for IMASS System - Full Responsive Design */

/* Mobile-first responsive breakpoints */
/* Extra small devices (phones, 576px and down) */
/* Small devices (landscape phones, 576px and up) */
/* Medium devices (tablets, 768px and up) */
/* Large devices (desktops, 992px and up) */
/* Extra large devices (large desktops, 1200px and up) */

/* Root variables for consistency - GNP Corporate Colors */
:root {
    /* GNP Corporate Colors - Exact specifications from brand guidelines */
    --gnp-blue: #002E71;
    --gnp-orange: #FF6B35;
    --gnp-gradient: linear-gradient(135deg, var(--gnp-blue) 0%, var(--gnp-orange) 100%);
    --gnp-blue-light: #1A4A8A;
    --gnp-orange-light: #FF8A5B;
    
    /* Shadow specifications */
    --shadow-light: 0 2px 8px rgba(0, 46, 113, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 46, 113, 0.15);
    
    /* Override Bootstrap with GNP corporate colors */
    --bs-primary: #002E71;
    --bs-primary-rgb: 0, 46, 113;
    --bs-secondary: #FF6B35;
    --bs-secondary-rgb: 255, 107, 53;
    
    /* Neutral colors for support */
    --imass-danger: #dc3545;
    --imass-light: #f8f9fa;
    --imass-dark: #212529;
}

/* General improvements - Light Theme - Responsive */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #212529;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Responsive container adjustments */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* GNP Navbar branding - Header specifications - Responsive */
.navbar {
    background: linear-gradient(135deg, #002E71 0%, #FF6B35 100%) !important;
    min-height: 70px;
    padding: 0.5rem 1rem;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 46, 113, 0.2);
}

@media (max-width: 768px) {
    .navbar {
        min-height: 60px;
        padding: 0.25rem 0.75rem;
    }
}

@media (max-width: 576px) {
    .navbar {
        min-height: 56px;
        padding: 0.25rem 0.5rem;
    }
}

/* Responsive navbar brand */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.system-title {
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.brand-separator {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, white, transparent);
    margin: 0 10px;
    flex-shrink: 0;
}

.vida-total-logo {
    height: 45px;
    width: auto;
    margin-right: 10px;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Responsive navbar brand adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
        gap: 10px;
    }
    
    .system-title {
        font-size: 1.1rem;
    }
    
    .vida-total-logo {
        height: 38px;
        margin-right: 8px;
        padding: 6px 10px;
    }
    
    .brand-separator {
        height: 35px;
        margin: 0 8px;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
        gap: 8px;
    }
    
    .system-title {
        font-size: 1rem;
        display: none; /* Hide on very small screens to save space */
    }
    
    .vida-total-logo {
        height: 32px;
        margin-right: 5px;
        padding: 4px 8px;
    }
    
    .brand-separator {
        display: none; /* Hide separator on mobile */
    }
}

@media (max-width: 480px) {
    .system-title {
        display: none;
    }
}

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

/* Responsive navbar navigation */
.navbar-nav {
    flex-wrap: wrap;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    margin: 0.125rem;
    transition: all 0.2s ease;
}

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

@media (max-width: 992px) {
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0;
        border-radius: 0;
    }
    
    .navbar-collapse {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.navbar-brand img:hover {
    opacity: 0.9;
}

.imass-brand {
    color: white;
    font-weight: 600;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--imass-warning) !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Card enhancements - Light Theme */
.card {
    border: 1px solid rgba(0, 46, 113, 0.1);
    background-color: white;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 46, 113, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 46, 113, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 46, 113, 0.1);
    font-weight: 600;
    color: var(--gnp-blue);
}

/* Table improvements - GNP Brand Specifications Light Theme */
.table {
    margin-bottom: 0;
    background-color: white !important;
    color: #212529 !important;
}

.table tbody,
.table tbody tr,
.table tbody td {
    background-color: white !important;
    color: #212529 !important;
}

.table-header,
.table th {
    background: var(--gnp-blue) !important;
    color: white !important;
    font-weight: 600;
    border-top: none;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-row:nth-child(even),
.table tbody tr:nth-child(even) {
    background: rgba(255, 107, 53, 0.05) !important;
    color: #212529 !important;
}

.table-row:hover,
.table-hover tbody tr:hover {
    background: rgba(255, 107, 53, 0.1) !important;
    color: #212529 !important;
}

.table td {
    color: #212529 !important;
    border-color: rgba(0, 46, 113, 0.1);
    background-color: transparent !important;
}

/* Override Bootstrap dark theme table styles */
.table-dark {
    background-color: white !important;
    color: #212529 !important;
}

.table-dark th,
.table-dark td {
    background-color: white !important;
    color: #212529 !important;
    border-color: rgba(0, 46, 113, 0.1);
}

.table-dark thead th {
    background: var(--gnp-blue) !important;
    color: white !important;
}

/* DataTables customizations - Light Theme */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-bottom: 1rem;
    color: #212529 !important;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(0, 46, 113, 0.2);
    padding: 0.375rem 0.75rem;
    background-color: white !important;
    color: #212529 !important;
}

.dataTables_wrapper .dataTables_length select {
    background-color: white !important;
    color: #212529 !important;
    border: 1px solid rgba(0, 46, 113, 0.2);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--gnp-blue) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(255, 107, 53, 0.1) !important;
    color: var(--gnp-orange) !important;
}

/* Form enhancements - Light Theme */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gnp-blue);
}

.form-control,
.form-select {
    background-color: white;
    border-color: rgba(0, 46, 113, 0.2);
    color: #212529;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gnp-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 46, 113, 0.25);
    background-color: white;
}

.is-invalid {
    border-color: var(--bs-danger);
}

.invalid-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Button enhancements - GNP Brand Specifications */
.btn {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-width: 2px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Button Specific Styles from Technical Document - Light Theme Fixed */
.btn-cotizacion-prima {
    background: var(--gnp-blue) !important;
    border: 2px solid var(--gnp-blue) !important;
    color: white !important;
}

.btn-cotizacion-prima:hover,
.btn-cotizacion-prima:focus,
.btn-cotizacion-prima:active {
    background: white !important;
    color: var(--gnp-blue) !important;
    border-color: var(--gnp-blue) !important;
}

.btn-cotizacion-sa {
    background: var(--gnp-orange) !important;
    border: 2px solid var(--gnp-orange) !important;
    color: white !important;
}

.btn-cotizacion-sa:hover,
.btn-cotizacion-sa:focus,
.btn-cotizacion-sa:active {
    background: white !important;
    color: var(--gnp-orange) !important;
    border-color: var(--gnp-orange) !important;
}

.btn-admin-tarifas {
    background: var(--gnp-gradient) !important;
    color: white !important;
    border: 2px solid transparent !important;
}

.btn-admin-tarifas:hover,
.btn-admin-tarifas:focus,
.btn-admin-tarifas:active {
    background: var(--gnp-gradient) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-import-excel {
    background: linear-gradient(45deg, var(--gnp-blue) 0%, var(--gnp-orange) 100%) !important;
    color: white !important;
    border: 2px solid transparent !important;
}

.btn-import-excel:hover,
.btn-import-excel:focus,
.btn-import-excel:active {
    background: linear-gradient(45deg, var(--gnp-blue) 0%, var(--gnp-orange) 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Badge improvements - Light Theme */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
}

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

.badge.bg-secondary {
    background-color: var(--gnp-orange) !important;
}

/* Alert customizations - Light Theme */
.alert {
    border: 1px solid rgba(0, 46, 113, 0.1);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    color: #212529;
}

.alert-success {
    background-color: rgba(0, 46, 113, 0.05);
    border-color: var(--gnp-blue);
    color: var(--gnp-blue);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.05);
    border-color: #dc3545;
    color: #dc3545;
}

.alert-info {
    background-color: rgba(255, 107, 53, 0.05);
    border-color: var(--gnp-orange);
    color: var(--gnp-orange);
}

.alert-dismissible .btn-close {
    padding: 1rem 1rem;
}

/* Modal enhancements - Light Theme */
.modal-content {
    border: 1px solid rgba(0, 46, 113, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 1rem 3rem rgba(0, 46, 113, 0.175);
    background-color: white;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 46, 113, 0.1);
    padding: 1.5rem;
    background-color: #f8f9fa;
}

.modal-title {
    color: var(--gnp-blue);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
    color: #212529;
}

.modal-footer {
    border-top: 1px solid rgba(0, 46, 113, 0.1);
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
}

/* Progress bar customizations */
.progress {
    height: 1rem;
    border-radius: 0.5rem;
    background-color: var(--bs-light);
}

.progress-bar {
    border-radius: 0.5rem;
}

/* Dashboard Cards - GNP Brand Specifications */
.stats-card {
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.stats-card .card-body {
    padding: 1.5rem;
    position: relative;
}

.stats-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

/* GNP Diagonal Elements */
.gnp-diagonal::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, transparent 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

/* Card Color Specifications from Technical Document */
.card-tarifas-basicas {
    background: var(--gnp-blue) !important;
    color: white;
    box-shadow: var(--shadow-medium);
}

.card-tarifas-cobertura {
    background: var(--gnp-orange) !important;
    color: white;
    box-shadow: var(--shadow-medium);
}

.card-paquetes {
    background: linear-gradient(135deg, var(--gnp-orange) 0%, var(--gnp-orange-light) 100%) !important;
    color: white;
    box-shadow: var(--shadow-medium);
}

.card-coberturas {
    background: linear-gradient(135deg, var(--gnp-blue) 0%, var(--gnp-blue-light) 100%) !important;
    color: white;
    box-shadow: var(--shadow-medium);
}

/* Quotation form styles - Light Theme */
.quotation-form {
    background-color: white;
    border: 1px solid rgba(0, 46, 113, 0.1);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 46, 113, 0.075);
}

.quotation-results {
    background-color: white;
    border: 1px solid rgba(0, 46, 113, 0.1);
    border-radius: 0.5rem;
    padding: 2rem;
    color: #212529;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 46, 113, 0.075);
}

.coverage-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: white;
    border-radius: 0.375rem;
    border: 1px solid rgba(0, 46, 113, 0.1);
    border-left: 4px solid var(--gnp-blue);
    color: #212529;
}

/* Package constraints display - Light Theme */
.package-constraints {
    background-color: rgba(255, 107, 53, 0.05);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    color: #212529;
}

/* Loading states */
.loading-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0.5rem;
}

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

/* Responsive Design - GNP Brand Specifications */
/* Mobile */
@media (max-width: 768px) {
    .cards-grid { grid-template-columns: 1fr; }
    .navbar { padding: 0 16px; }
    .card-body {
        padding: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .stats-card h2 {
        font-size: 2rem;
    }
    
    .btn-lg {
        min-height: 100px !important;
        font-size: 1rem;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop */
@media (min-width: 1025px) {
    .cards-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Enhanced accessibility and contrast */
.btn:focus,
.btn:focus-visible {
    outline: 2px solid var(--gnp-orange);
    outline-offset: 2px;
}

/* High contrast for accessibility */
@media (prefers-contrast: high) {
    .stats-card {
        border: 2px solid white;
    }
    
    .gnp-diagonal::before {
        display: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .pagination,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_paginate {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .table {
        border-collapse: collapse;
    }
    
    .table th,
    .table td {
        border: 1px solid #000;
        padding: 0.5rem;
    }
}

/* Accessibility improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus styles for better accessibility - Light Theme */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--gnp-blue);
    outline-offset: 2px;
}

/* Additional button fixes */
.btn-light {
    background-color: #f8f9fa !important;
    border-color: rgba(0, 46, 113, 0.2) !important;
    color: var(--gnp-blue) !important;
}

.btn-light:hover,
.btn-light:focus,
.btn-light:active {
    background-color: #e9ecef !important;
    border-color: var(--gnp-blue) !important;
    color: var(--gnp-blue) !important;
}

.btn-dark {
    background-color: var(--gnp-blue) !important;
    border-color: var(--gnp-blue) !important;
    color: white !important;
}

.btn-dark:hover,
.btn-dark:focus,
.btn-dark:active {
    background-color: var(--gnp-blue-light) !important;
    border-color: var(--gnp-blue-light) !important;
    color: white !important;
}

/* GNP Button Styles - Light Theme Fixed */
.btn-primary {
    background-color: var(--gnp-blue) !important;
    border-color: var(--gnp-blue) !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--gnp-blue-light) !important;
    border-color: var(--gnp-blue-light) !important;
    color: white !important;
}

.btn-primary.focus {
    background-color: var(--gnp-blue-light) !important;
    border-color: var(--gnp-blue-light) !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 46, 113, 0.5);
}

.btn-secondary {
    background-color: var(--gnp-orange) !important;
    border-color: var(--gnp-orange) !important;
    color: white !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: var(--gnp-orange-light) !important;
    border-color: var(--gnp-orange-light) !important;
    color: white !important;
}

/* Generic button fixes for light theme */
.btn-outline-primary {
    color: var(--gnp-blue) !important;
    border-color: var(--gnp-blue) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--gnp-blue) !important;
    border-color: var(--gnp-blue) !important;
    color: white !important;
}

.btn-outline-secondary {
    color: var(--gnp-orange) !important;
    border-color: var(--gnp-orange) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background-color: var(--gnp-orange) !important;
    border-color: var(--gnp-orange) !important;
    color: white !important;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-light);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-dark);
}

/* 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-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    min-width: 300px;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

/* Error states */
.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bs-muted);
}

.error-state .error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bs-muted);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Success states */
.success-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--bs-success);
}

.success-state .success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

/* Package card styles */
.package-card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Audit log styles */
.audit-action-INSERT {
    color: var(--bs-success);
}

.audit-action-UPDATE {
    color: var(--bs-warning);
}

.audit-action-DELETE {
    color: var(--bs-danger);
}

/* Import progress styles */
.import-progress {
    margin: 2rem 0;
}

.import-progress .progress {
    height: 1.5rem;
}

.import-progress .progress-text {
    font-size: 0.875rem;
    color: var(--bs-muted);
}

/* Form section dividers */
.form-section {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bs-border-color);
}

.form-section h6 {
    color: var(--gnp-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Status indicators */
.status-active {
    color: var(--bs-success);
}

.status-inactive {
    color: var(--bs-secondary);
}

.status-pending {
    color: var(--bs-warning);
}

.status-error {
    color: var(--bs-danger);
}

/* Currency display */
.currency {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Quick action buttons */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.quick-action-btn {
    aspect-ratio: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    transform: translateY(-3px);
    text-decoration: none;
}

.quick-action-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ENHANCEMENTS ===== */

/* Responsive Cards and Components */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    /* Dashboard stats cards responsive */
    .stats-card h5 {
        font-size: 1rem;
    }
    
    .stats-card h2 {
        font-size: 1.5rem;
    }
    
    .stats-card .fa-3x {
        font-size: 2rem !important;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 0.75rem;
    }
    
    .card-header {
        padding: 0.5rem 0.75rem;
    }
    
    .stats-card .card-body {
        padding: 0.75rem;
    }
    
    .stats-card h5 {
        font-size: 0.9rem;
    }
    
    .stats-card h2 {
        font-size: 1.25rem;
    }
    
    .stats-card .fa-3x {
        font-size: 1.5rem !important;
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Responsive Forms */
@media (max-width: 576px) {
    .form-control,
    .form-select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
}

/* Responsive Buttons */
@media (max-width: 576px) {
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.375rem;
    }
    
    /* Horizontal scroll for tables on mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Responsive Modals */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
}

/* Responsive Navigation Headers */
@media (max-width: 576px) {
    .d-flex.align-items-center.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .text-end {
        text-align: left !important;
        align-self: stretch;
    }
}

/* Responsive Dashboard Grid */
@media (max-width: 768px) {
    .row .col-md-3 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .row .col-md-3,
    .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Responsive Footer */
@media (max-width: 768px) {
    footer .row {
        text-align: center;
    }
    
    footer .col-md-6:last-child {
        margin-top: 1rem;
    }
    
    footer .d-flex {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    footer {
        padding: 2rem 0 !important;
        margin-top: 2rem !important;
    }
    
    footer img {
        height: 25px !important;
        padding: 4px 6px;
        background: white;
        border-radius: 6px;
    }
    
    footer .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

/* Responsive Technical Details Modal */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
    }
    
    .formula-math {
        font-size: 0.8rem;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .calculation-step {
        margin-left: 0.5rem;
        padding-left: 0.75rem;
    }
}

@media (max-width: 576px) {
    .modal-xl {
        max-width: 100%;
        margin: 0;
    }
    
    .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }
    
    .step-title {
        font-size: 1rem;
    }
    
    .badge {
        font-size: 0.75rem;
    }
}

/* Responsive spacing utilities */
@media (max-width: 576px) {
    .py-4 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    .mb-4 {
        margin-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2.5rem !important;
    }
}

/* Responsive utility classes */
@media (max-width: 576px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-full {
        width: 100% !important;
    }
    
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-stack {
        flex-direction: column !important;
    }
}

/* ===== END RESPONSIVE DESIGN ===== */
