/* Provider Panel - Clean & Maintainable Styles */

    /* ========================================
       CSS VARIABLES
       ======================================== */
    :root {
        --primary-color: #667eea;
        --primary-dark: #5568d3;
        --primary-light: #7c8ff0;
        --secondary-color: #764ba2;
        --success-color: #28a745;
        --danger-color: #dc3545;
        --warning-color: #ffc107;
        --info-color: #17a2b8;
        --dark-color: #2d3748;
        --light-color: #f8f9fa;
        --border-color: #dee2e6;
        --text-primary: #333;
        --text-secondary: #666;
        --text-muted: #999;
        
        /* Shadows */
        --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
        --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
        
        /* Layout */
        --border-radius: 12px;
        --transition: all 0.3s ease;
        
        /* Z-index hierarchy - Simplified */
        --z-header: 1000;
        --z-backdrop: 998;
        --z-mobile-menu: 999;
        --z-mobile-toggle: 1000;
        --z-bottom-nav: 997;
    }

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Utility class for mobile bottom nav spacing */
.has-bottom-nav {
    padding-bottom: 70px;
}

.has-bottom-nav .main-content,
.has-bottom-nav .messages-container,
.has-bottom-nav .requests-container,
.has-bottom-nav .quotes-container,
.has-bottom-nav .credits-container,
.has-bottom-nav .notifications-container,
.has-bottom-nav main {
    padding-bottom: 80px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 50px;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.logo i {
    color: #ffd43b;
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 1;
    justify-content: flex-end;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-menu li {
    white-space: nowrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    position: relative;
    white-space: nowrap;
    min-height: 36px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu a:hover::after {
    width: 70%;
}

.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-menu a.active::after {
    width: 70%;
}

.nav-menu a.logout-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.3rem 0.6rem;
    margin-left: 0.25rem;
}

.nav-menu a.logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.nav-menu a.logout-btn::after {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:focus {
    outline: none;
}

.mobile-menu-toggle.menu-open {
    transform: rotate(90deg);
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: var(--z-backdrop);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Body overflow control */
body.menu-open {
    overflow: hidden;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

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

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

.btn-secondary:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-link {
    background: transparent;
    color: var(--primary-color);
    padding: 0;
    text-decoration: underline;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 0;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:disabled {
    background: var(--light-color);
    cursor: not-allowed;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-error.show {
    display: block;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info-color);
}

/* ========================================
   LOADING & SPINNER
   ======================================== */
.spinner {
    border: 3px solid var(--light-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}

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

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* ========================================
   MODAL
   ======================================== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

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

/* ========================================
   TABLE
   ======================================== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--light-color);
}

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

.table tbody tr:hover {
    background: var(--light-color);
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.my-4 { margin-top: 2rem; margin-bottom: 2rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ========================================
   GRID SYSTEM
   ======================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col-md-4,
.col-md-6,
.col-md-12 {
    padding: 0 0.5rem;
    width: 100%;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: center;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: white;
    transform: translateY(-2px);
}

/* ========================================
   BOTTOM NAVIGATION (Mobile)
   ======================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: var(--z-bottom-nav);
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    min-height: 48px;
    gap: 0.25rem;
}

.bottom-nav-link i {
    font-size: 1.25rem;
    transition: var(--transition);
}

.bottom-nav-link span {
    font-size: 0.7rem;
    font-weight: 500;
}

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

.bottom-nav-link.active i {
    transform: scale(1.1);
}

.bottom-nav-link:active {
    transform: scale(0.95);
}

.bottom-nav-badge {
    position: absolute;
    top: 0.25rem;
    right: 50%;
    transform: translateX(12px);
    background: var(--danger-color);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* ========================================
   PULL TO REFRESH
   ======================================== */
.pull-to-refresh {
    position: relative;
    overflow: hidden;
}

.pull-to-refresh-indicator {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.pull-to-refresh-indicator i {
    color: var(--primary-color);
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.pull-to-refresh.pulling .pull-to-refresh-indicator {
    top: 10px;
}

.pull-to-refresh.pulling .pull-to-refresh-indicator i {
    transform: rotate(180deg);
}

.pull-to-refresh.refreshing .pull-to-refresh-indicator {
    top: 10px;
}

.pull-to-refresh.refreshing .pull-to-refresh-indicator i {
    animation: spin 0.8s linear infinite;
}

/* ========================================
   SWIPE GESTURES
   ======================================== */
.swipeable-item {
    position: relative;
    transition: transform 0.3s ease;
    touch-action: pan-y;
    background: white;
    z-index: 1;
}

.swipeable-item.swiping {
    transition: none;
}

.swipe-actions {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    padding: 0;
    background: var(--danger-color);
    width: 100px;
    z-index: 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.swipe-action-btn {
    background: transparent;
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.swipe-action-btn:active {
    transform: scale(0.9);
}

/* ========================================
   RESPONSIVE - DESKTOP
   ======================================== */
@media (min-width: 769px) {
    .col-md-4 { width: 33.333%; }
    .col-md-6 { width: 50%; }
    .col-md-12 { width: 100%; }
}

@media (max-width: 1400px) {
    .nav-menu a {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
        gap: 0.2rem;
    }
    
    .nav-menu a.logout-btn {
        padding: 0.3rem 0.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 0.5rem 0;
    }
    
    .navbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        min-height: 50px;
    }
    
    .logo {
        font-size: 1.2rem;
        gap: 6px;
    }
    
    /* Mobile Hamburger Toggle */
    .mobile-menu-toggle {
        display: flex;
        z-index: var(--z-mobile-toggle);
    }
    
    /* Mobile Side Menu - Modern Drawer */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100dvh;
        background: white;
        flex-direction: column;
        z-index: var(--z-mobile-menu);
        transition: left 0.3s ease;
        padding: 0;
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    /* Menu Items Container */
    .nav-menu li {
        width: 100%;
        margin: 0;
        padding: 0 0.875rem;
        list-style: none;
    }
    
    .nav-menu li:first-child {
        padding-top: 0.875rem;
    }
    
    .nav-menu li:last-child {
        padding-bottom: 0.875rem;
    }
    
    /* Menu Buttons */
    .nav-menu a {
        display: flex;
        align-items: center;
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
        font-weight: 500;
        color: #2d3748;
        text-decoration: none;
        background: #f8f9fa;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        min-height: 48px;
        gap: 0.75rem;
        transition: all 0.2s ease;
    }
    
    .nav-menu a i {
        width: 20px;
        text-align: center;
        color: var(--primary-color);
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .nav-menu a:active {
        transform: scale(0.98);
    }
    
    .nav-menu a.active {
        background: var(--primary-color);
        color: white;
    }
    
    .nav-menu a.active i {
        color: white;
    }
    
    .nav-menu a.logout-btn {
        background: #fff5f5;
        color: var(--danger-color);
        border: 1px solid #fed7d7;
        margin-top: 0.5rem;
    }
    
    .nav-menu a.logout-btn i {
        color: var(--danger-color);
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    /* Mobile Cards */
    .card {
        border-radius: 8px;
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    /* Mobile Touch Targets */
    button, 
    .btn, 
    .bottom-nav-link, 
    .nav-menu a, 
    .expertise-category-header, 
    .filter-btn, 
    .clickable-header {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-sm {
        min-height: 36px;
    }
    
    /* Mobile Forms */
    .form-control, 
    select {
        min-height: 48px;
        font-size: 16px;
    }
    
    .form-check-label {
        padding-top: 8px;
        padding-bottom: 8px;
        display: inline-block;
        min-height: 44px;
        line-height: 28px;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
        margin-top: 12px;
    }
    
    /* Mobile Tables */
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    /* Mobile Modals */
    .modal {
        width: 95%;
        padding: 1.5rem;
    }
    
    /* Show bottom nav on mobile */
    .bottom-nav {
        display: block;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .bottom-nav {
        padding: 0.25rem 0;
    }
    
    .bottom-nav-link {
        min-height: 40px;
        padding: 0.25rem;
    }
    
    .bottom-nav-link i {
        font-size: 1.1rem;
    }
    
    .bottom-nav-link span {
        font-size: 0.65rem;
    }
}

/* Extra Small Devices */
@media (max-width: 375px) {
    .bottom-nav-link span {
        font-size: 0.65rem;
    }
    
    .bottom-nav-link i {
        font-size: 1.1rem;
    }
}
