﻿/* ===== BRAND COLORS - BASED ON LOGO ===== */
:root {
    --brand-primary: #f90;      /* Naranja principal */
    --brand-secondary: #23292f; /* Negro secundario */
    --brand-white: #fff;        /* Blanco */
    --brand-orange-light: #ffb366;
    --brand-orange-dark: #e67e00;
    --brand-gray-light: #f8f9fa;
    --brand-gray-medium: #6c757d;
    --brand-gray-dark: #495057;
    --sidebar-width-desktop: 240px;
    --sidebar-width-mobile: min(320px, 82vw);
    --content-padding: clamp(1.25rem, 1.8vw, 2rem);
    --navbar-height: 64px;
    --surface-bg: #e9ecef;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== BRAND UTILITY CLASSES ===== */
.bg-brand-primary { background-color: var(--brand-primary) !important; }
.bg-brand-secondary { background-color: var(--brand-secondary) !important; }
.text-brand-primary { color: var(--brand-primary) !important; }
.text-brand-secondary { color: var(--brand-secondary) !important; }
.border-brand-primary { border-color: var(--brand-primary) !important; }
.border-brand-secondary { border-color: var(--brand-secondary) !important; }

/* ===== OVERRIDE BOOTSTRAP COLORS WITH BRAND COLORS ===== */
.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-orange-dark) !important;
    border-color: var(--brand-orange-dark) !important;
}

.navbar-dark.bg-primary {
    background-color: var(--brand-secondary) !important;
}

.navbar.bg-dark {
    background-color: var(--brand-secondary) !important;
}

.navbar.bg-dark,
.navbar-dark.bg-primary {
    margin: 0;
    border: none;
    box-shadow: none;
}

body.has-sidebar.dashboard-shell .dashboard-navbar {
    position: sticky !important;
    top: 0;
    z-index: 1050;
    width: 100%;
    margin-top: 0 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    background-color: #23292f;
    border-bottom: 0;
}

body.has-sidebar.dashboard-shell .dashboard-navbar + .main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    background: var(--brand-secondary) !important;
    min-height: 100vh;
    color: #fff;
    width: var(--sidebar-width-desktop);
    flex: 0 0 var(--sidebar-width-desktop);
    max-width: var(--sidebar-width-desktop);
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.08);
}

.sidebar .sidebar-header {
    font-size: 1.5rem;
    font-weight: bold;
    /* Reducir alto del header para ganar espacio */
    padding: 1rem 1rem;
    letter-spacing: 1px;
    background: var(--brand-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar nav {
    padding: 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar .nav-item {
    display: block;
}

.sidebar .nav-link {
    color: #f8f9fa !important;
    opacity: 1 !important;
    font-weight: 500;
    /* Botones más finos por defecto */
    padding: 0.55rem 1.25rem;
    border-radius: 0.5rem;
    margin: 0.125rem 0.5rem;
    min-height: 38px;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar .nav-link.active, 
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--brand-white) !important;
    border-left: 3px solid var(--brand-primary);
}

.sidebar .nav-icon {
    margin-right: 0.65rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    color: #bfc9d4;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0; /* nunca se colapsa en layouts pequeños */
}

.sidebar-footer .btn {
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.sidebar.collapse {
    display: flex !important;
    flex-direction: column;
    height: 100vh;
}

.sidebar.collapsing {
    height: 100vh !important;
    transition: none;
}

/* ===== MAIN CONTENT WITH SIDEBAR ===== */
.main-content {
    margin-left: var(--sidebar-width-desktop);
    padding: 0 var(--content-padding) var(--content-padding);
    min-height: 100vh;
    background: var(--surface-bg) !important;
    transition: margin-left 0.3s ease;
}

.page-alerts {
    padding-top: var(--content-padding);
    margin-bottom: var(--content-padding);
}

.main-content > .py-4:first-child,
.main-content > .py-4:first-of-type,
.main-content > .container.py-4:first-child,
.main-content > .container.py-4:first-of-type,
.main-content > .container-fluid.py-4:first-child,
.main-content > .container-fluid.py-4:first-of-type,
.page-root > .py-4:first-child,
.page-root > .py-4:first-of-type,
.page-root > .container.py-4:first-child,
.page-root > .container.py-4:first-of-type,
.page-root > .container-fluid.py-4:first-child,
.page-root > .container-fluid.py-4:first-of-type,
.page-root > *:first-child,
.page-root > *:first-of-type {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.page-root > .py-4:first-child,
.page-root > .container.py-4:first-child,
.page-root > .container-fluid.py-4:first-child {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.has-sidebar:not(.dashboard-shell) > .main-content,
body.has-sidebar:not(.dashboard-shell) .main-content {
    margin-left: var(--sidebar-width-desktop) !important;
    width: calc(100% - var(--sidebar-width-desktop)) !important;
    max-width: calc(100% - var(--sidebar-width-desktop)) !important;
}

.dashboard-shell .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

body:not(.has-sidebar) > .main-content,
body:not(.has-sidebar) .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* ===== RESPONSIVE SIDEBAR ===== */
@media (max-width: 991.98px) {
    body.has-sidebar {
        padding-top: var(--safe-area-top);
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--sidebar-width-mobile);
        flex: 0 0 var(--sidebar-width-mobile);
        max-width: var(--sidebar-width-mobile);
        max-width: 90vw;
        min-height: 100vh;
        height: 100vh;
        overflow-y: auto;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
        transform: translateX(-105%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.2s ease, visibility 0.2s;
        padding-bottom: calc(var(--safe-area-bottom) + 1rem);
        background: var(--brand-secondary) !important;
    }
    
    .sidebar.show {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    .sidebar.collapse {
        height: 100vh !important;
    }
    
    .sidebar.collapse:not(.show) {
        display: block !important;
    }
    
    .sidebar .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.125rem 0.5rem;
        font-size: 0.95rem;
    }
    
    .sidebar .nav-icon {
        margin-right: 0.75rem;
        font-size: 1.1rem;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0 1rem 1rem;
        width: 100%;
    }
    
    .navbar {
        min-height: var(--navbar-height);
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .navbar .navbar-brand img {
        max-height: 28px;
    }
}
/* ===== SIDEBAR ANIMATIONS ===== */
.sidebar .nav-link {
    position: relative;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-left-color: var(--brand-primary);
}

/* ===== SIDEBAR TOGGLE FOR MOBILE ===== */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: var(--brand-secondary);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
}

@media (max-width: 991.98px) {
    .sidebar-toggle {
        display: block;
    }
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 18, 27, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 992px) {
    .sidebar-overlay {
        display: none;
    }
}

body.sidebar-open {
    overflow: hidden;
    touch-action: none;
}

/* ===== SIDEBAR SCROLL ===== */
.sidebar nav {
    /* Hacer scroll interno del menú y permitir que flex lo contraiga */
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.sidebar nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.sidebar nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* ===== SIDEBAR LOGO ANIMATION ===== */
.sidebar-header img {
    transition: transform 0.3s ease;
}

.sidebar-header:hover img {
    transform: scale(1.05);
}

/* ===== SIDEBAR FOOTER USER INFO ===== */
.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.sidebar-footer .user-info i {
    margin-right: 0.5rem;
    color: var(--brand-primary);
}

/* ===== SIDEBAR ACTIVE INDICATOR ===== */
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--brand-white) !important;
    border-left-color: var(--brand-primary);
}

/* ===== SIDEBAR HOVER EFFECTS ===== */
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-left-color: var(--brand-primary);
}

/* ===== SIDEBAR RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
    }
    
    .sidebar .nav-link {
        padding: 0.55rem 1.25rem; /* más compacto en móviles */
        margin: 0.125rem 0.5rem;
        font-size: 0.95rem;
    }
    
    .sidebar .nav-icon {
        font-size: 1.15rem;
        margin-right: 0.75rem;
    }
    
    .sidebar-footer {
        padding: 0.9rem 1rem;
    }
}

/* ===== COMPACT MODE WHEN HEIGHT IS SMALL ===== */
@media (max-height: 800px) {
    .sidebar .sidebar-header {
        padding: 1rem;
    }
    .sidebar .nav-link {
        padding: 0.45rem 1rem;
        margin: 0.1rem 0.5rem;
    }
    .sidebar .nav-icon {
        font-size: 1.05rem;
        margin-right: 0.6rem;
    }
    .sidebar-footer {
        padding: 0.75rem 1rem;
    }
}

/* Custom styles for the application */

/* Body styles */
html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

main {
    flex: 1;
}

/* Card hover effect */
.card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Custom button styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

/* Form styles */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Table styles */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Alert styles */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Modal styles */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Navbar styles */
.navbar-brand {
    font-weight: 600;
}

.nav-link {
    font-weight: 500;
}

/* Footer styles */
footer {
    margin-top: auto;
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Better mobile spacing */
    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mt-4 {
        margin-top: 1rem !important;
    }
    
    /* Mobile-optimized cards */
    .card {
        margin-bottom: 1rem;
        border-radius: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Mobile-optimized tables */
    .table-responsive {
        font-size: 0.875rem;
        border-radius: 0.5rem;
        overflow: hidden;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        vertical-align: middle;
    }
    
    /* Mobile-optimized buttons */
    .btn {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Mobile-optimized forms */
    .form-control,
    .form-select {
        font-size: 1rem;
        padding: 0.75rem;
        border-radius: 0.5rem;
    }
    
    /* Mobile-optimized modals */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.75rem;
    }
    
    /* Mobile-optimized dropdowns */
    .dropdown-menu {
        border-radius: 0.5rem;
        border: none;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Typography adjustments */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    h4 { font-size: 1.125rem !important; }
    h5 { font-size: 1rem !important; }
    h6 { font-size: 0.875rem !important; }
    
    /* Compact spacing */
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    /* Compact tables */
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    /* Compact buttons */
    .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        min-height: 40px;
    }
    
    /* Compact forms */
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    /* Compact navbar */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Compact dropdowns */
    .dropdown-menu {
        font-size: 0.85rem;
    }
    
    .dropdown-item {
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Touch-friendly buttons */
    .btn,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Better touch targets */
    .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    /* Responsive tables */
    .table-responsive {
        font-size: 0.85rem;
    }
}

@media (max-width: 991.98px) {
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Tablet optimizations */
    .py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}

@media (min-width: 992px) {
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .btn,
    .nav-link,
    .dropdown-item {
        min-height: 48px;
        padding: 0.75rem 1rem;
    }
    
    .btn {
        font-size: 1rem;
    }
    
    .form-control,
    .form-select {
        font-size: 1rem;
        padding: 0.875rem;
    }
}

@media (prefers-color-scheme: dark) {
    /* Dark mode support */
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }
}

@media print {
    .navbar,
    .sidebar,
    .footer,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
    }
    
    .form-control,
    .form-select {
        border-width: 2px;
    }
}

/* ===== COMPACT FILTERS ===== */
.compact-filters {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.compact-filters .form-control-sm,
.compact-filters .form-select-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

.compact-filters .btn-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

.compact-filters .card-header {
    background: transparent;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.compact-filters .card-body {
    padding: 1rem;
}

.compact-filters .row.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

.compact-filters .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #495057;
}

/* ===== FILTERS CONTENT ===== */
.filters-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.filters-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* ===== FILTER BADGE ===== */
.filter-badge {
    display: inline-flex;
    align-items: center;
    background: var(--brand-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.125rem;
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (max-width: 768px) {
    .compact-filters .row.g-2 {
        --bs-gutter-x: 0.25rem;
        --bs-gutter-y: 0.25rem;
    }
    
    .compact-filters .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .compact-filters .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .compact-filters .form-control-sm,
    .compact-filters .form-select-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .compact-filters .card-body {
        padding: 0.75rem;
    }
    
    .compact-filters .d-flex.gap-2 {
        gap: 0.25rem !important;
    }
    
    .compact-filters .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ===== COMPACT STATS ===== */
.stats-compact {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-compact .d-flex {
    padding: 0.75rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.stats-compact .d-flex:hover {
    background-color: #f8f9fa;
}

.stats-compact .fw-bold {
    color: var(--brand-secondary);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.stats-compact small {
    color: var(--brand-gray-medium);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .stats-compact .d-flex {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .stats-compact .fw-bold {
        font-size: 1.1rem;
    }
    
    .stats-compact small {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .stats-compact .d-flex {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stats-compact .fw-bold {
        font-size: 1rem;
    }
    
    .stats-compact small {
        font-size: 0.75rem;
    }
}

/* ===== MODAL STYLES ===== */
.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: var(--brand-secondary);
    color: var(--brand-white);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

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

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
    background: #f8f9fa;
    color: var(--brand-secondary);
}

.modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 1rem 1.5rem;
}

.modal .btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-white);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.modal .btn-primary:hover {
    background: var(--brand-orange-dark);
    border-color: var(--brand-orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255,153,0,0.3);
}

.modal .btn-secondary {
    background: var(--brand-gray-medium);
    border-color: var(--brand-gray-medium);
    color: var(--brand-white);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.modal .btn-secondary:hover {
    background: var(--brand-gray-dark);
    border-color: var(--brand-gray-dark);
    transform: translateY(-1px);
}

.modal .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: var(--brand-white);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.modal .btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220,53,69,0.3);
}

.modal-backdrop {
    background-color: rgba(0,0,0,0.5);
}

.modal.fade .modal-dialog {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

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