/**
 * ========================================================================
 * PROJECTA ENHANCED MANAGEMENT MODALS - CONSOLIDATED CSS
 * ========================================================================
 *
 * Comprehensive modal styling with responsive sizing and minimum dimensions
 * This file consolidates ALL modal-related styles to prevent CSS conflicts
 * and maintain consistency across the portal system.
 *
 * FEATURES:
 * ✅ Minimum size constraints (400px x 300px minimum)
 * ✅ Content-aware auto-sizing for different modal types
 * ✅ Responsive design for all screen sizes (mobile to desktop)
 * ✅ Enhanced accessibility and keyboard navigation
 * ✅ Smooth animations and transitions
 * ✅ Print-friendly styles
 * ✅ Scroll behavior optimization
 *
 * MODAL SIZE VARIANTS:
 * - small: 350px+ width for simple confirmations
 * - medium: 500px+ width for forms and moderate content (DEFAULT)
 * - large: 700px+ width for data tables and complex content
 * - extra-large: 900px+ width for management interfaces
 *
 * CONTENT-AWARE SIZING:
 * - Table containers: Auto-sized for data display
 * - Form containers: Optimized for input fields
 * - Document grids: Sized for file listings
 * - Billing summaries: Appropriate for financial data
 * - Vermittler management: Large size for complex interfaces
 *
 * RESPONSIVE BREAKPOINTS:
 * - Desktop (1200px+): Full size variants available
 * - Tablet (768px-1199px): Constrained but usable sizing
 * - Mobile (480px-767px): Stack layout, 95% width
 * - Small mobile (<480px): 98% width, simplified layout
 *
 * INTEGRATION:
 * - Used by: portal-dashboard.js, management-modals-fixes.js
 * - Applied to: .portal-modal, .modal-content classes
 * - Compatible with: Bootstrap modal structure
 *
 * VERSION: 3.0.0 - Consolidated Modal System
 * ========================================================================
 */

/* ===== MODAL BASE SIZING CONSTRAINTS ===== */
.portal-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    z-index: 10000 !important;
    display: none;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 20px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.portal-modal.modal-active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: modalFadeIn 0.3s ease-out !important;
}

/* Vermittlerportal Modal-Container Visibility Fix */
#vermittler-content-panels.active {
    display: flex !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
    justify-content: center;
    align-items: flex-start;
    animation: modalFadeIn 0.3s ease-out !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(2px);
    }
}

/* ===== MINIMUM SIZE CONSTRAINTS ===== */
.portal-modal .portal-modal-content,
.portal-modal .modal-content {
    /* CRITICAL: Minimum dimensions to prevent too-small modals */
    min-width: 400px !important;
    min-height: 300px !important;

    /* Default sizing */
    width: 90% !important;
    max-width: 600px !important;
    max-height: 90vh !important;

    /* Ensure proper overflow handling */
    overflow-y: auto !important;
    margin: auto !important;

    /* Enhanced animation */
    animation: modalSlideIn 0.3s ease-out !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== SIZE VARIANTS ===== */
.portal-modal-content.small {
    min-width: 350px !important;
    min-height: 250px !important;
    width: 80% !important;
    max-width: 450px !important;
}

.portal-modal-content.medium {
    min-width: 500px !important;
    min-height: 400px !important;
    width: 85% !important;
    max-width: 700px !important;
}

.portal-modal-content.large {
    min-width: 700px !important;
    min-height: 500px !important;
    width: 90% !important;
    max-width: 900px !important;
}

.portal-modal-content.extra-large {
    min-width: 900px !important;
    min-height: 600px !important;
    width: 95% !important;
    max-width: 1200px !important;
}

/* ===== CONTENT-AWARE SIZING ===== */
.portal-modal-content:has(.table-container) {
    min-width: 800px !important;
    min-height: 500px !important;
}

.portal-modal-content:has(.form-container) {
    min-width: 500px !important;
    min-height: 400px !important;
}

.portal-modal-content:has(.documents-grid) {
    min-width: 700px !important;
    min-height: 500px !important;
}

.portal-modal-content:has(.billing-summary) {
    min-width: 600px !important;
    min-height: 450px !important;
}

.portal-modal-content:has(.vermittler-management) {
    min-width: 750px !important;
    min-height: 550px !important;
}

/* ===== MODAL CONSISTENCY FIXES ===== */
.portal-modal .portal-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
}

/* Enhanced size variants that work with base sizing */
.portal-modal .portal-modal-content.enhanced-large {
    /* Additional styling for enhanced large modals */
    box-shadow:
        0 25px 35px -5px rgba(0, 0, 0, 0.15),
        0 15px 15px -5px rgba(0, 0, 0, 0.06);
}

.portal-modal .portal-modal-content.enhanced-extra-large {
    /* Additional styling for enhanced extra-large modals */
    box-shadow:
        0 30px 40px -5px rgba(0, 0, 0, 0.2),
        0 20px 20px -5px rgba(0, 0, 0, 0.08);
}

/* Enhanced Modal Headers */
.portal-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.portal-modal-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #74b72a 0%, #558b2f 100%);
}

.portal-modal-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.portal-modal-header h3 svg {
    width: 24px;
    height: 24px;
    color: #74b72a;
}

.portal-modal-close {
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.portal-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
    transform: scale(1.05);
}

/* Premium Modal Styles */
.premium-modal .portal-modal-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.premium-modal .portal-modal-header::before {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.premium-modal .modal-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.premium-modal .modal-icon {
    background: rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-modal .modal-icon svg {
    width: 28px;
    height: 28px;
    color: #10b981;
}

.premium-modal .modal-title-text h3 {
    color: #92400e;
    margin-bottom: 0.25rem;
}

.premium-modal .modal-title-text p {
    color: #059669;
    font-size: 0.875rem;
    margin: 0;
}

/* ===== ENHANCED MODAL BODY ===== */
.portal-modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    min-height: 200px !important;
    position: relative;
}

.portal-modal-body:empty {
    min-height: 100px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.portal-modal-body:empty::before {
    content: "Inhalt wird geladen..." !important;
    color: #6b7280 !important;
    font-style: italic !important;
}

/* ===== MODAL FOOTER ENHANCEMENTS ===== */
.portal-modal-footer {
    padding: 1.5rem 2rem !important;
    border-top: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    border-radius: 0 0 12px 12px !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 1rem !important;
    flex-shrink: 0 !important;
    min-height: 70px !important;
    align-items: center !important;
}

.modal-intro {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.modal-intro p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== FORM AND TABLE RESPONSIVE HANDLING ===== */
.portal-modal .table-container {
    overflow-x: auto !important;
    margin: -1rem !important;
    padding: 1rem !important;
}

.portal-modal table {
    width: 100% !important;
    min-width: 600px !important;
}

.portal-modal table td,
.portal-modal table th {
    padding: 0.75rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 200px !important;
}

.portal-modal .form-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
}

.portal-modal .form-group {
    flex: 1 !important;
    min-width: 200px !important;
}

.portal-modal .form-group label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

.portal-modal .form-group input,
.portal-modal .form-group select,
.portal-modal .form-group textarea {
    width: 100% !important;
    padding: 0.75rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
}

/* Enhanced Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #74b72a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: #6b7280;
    margin: 0;
    font-size: 0.95rem;
}

.error-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.95rem;
}

.no-items,
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

/* Enhanced Vermittler Management */
.vermittler-management-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
    gap: 0;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.tab-button:hover {
    color: #374151;
    background: #f9fafb;
}

.tab-button.active {
    color: #74b72a;
    border-bottom-color: #74b72a;
    background: #f0fdf4;
}

.vermittler-search {
    margin-bottom: 1.5rem;
}

.vermittler-search input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.vermittler-search input:focus {
    outline: none;
    border-color: #74b72a;
    box-shadow: 0 0 0 3px rgba(116, 183, 42, 0.1);
}

.vermittler-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    position: relative;
}

.vermittler-item:hover {
    border-color: #74b72a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.vermittler-item.status-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #10b981;
    border-radius: 4px 0 0 4px;
}

.vermittler-item.status-recent::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #10b981;
    border-radius: 4px 0 0 4px;
}

.vermittler-item.status-inactive::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ef4444;
    border-radius: 4px 0 0 4px;
}

.vermittler-info {
    flex: 1;
    padding-left: 1rem;
}

.vermittler-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.vermittler-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.vermittler-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-view {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit:hover {
    background: #74b72a;
    color: white;
    border-color: #74b72a;
}

.btn-view:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Enhanced Billing Overview */
.billing-summary-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.summary-card.incoming::before {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.summary-card.outgoing::before {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.summary-card.profit.positive::before {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.summary-card.profit.negative::before {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.summary-card h4 {
    margin: 0 0 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.summary-card .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.billing-items {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.billing-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.billing-item:hover {
    border-color: #74b72a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.billing-item.incoming {
    border-left: 4px solid #10b981;
}

.billing-item.outgoing {
    border-left: 4px solid #ef4444;
}

.billing-item .item-info {
    flex: 1;
}

.billing-item .project-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.billing-item .description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.billing-item .date {
    color: #9ca3af;
    font-size: 0.8125rem;
}

.billing-item .amount {
    font-weight: 700;
    font-size: 1.125rem;
}

.billing-item .amount.incoming {
    color: #059669;
}

.billing-item .amount.outgoing {
    color: #dc2626;
}

/* Enhanced Documents/Invoices Grid */
.documents-grid,
.invoices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

/* Enhanced Responsive Design - Complements responsive-modals.css */
@media (max-width: 768px) {
    /* Enhanced mobile-specific styling */
    .portal-modal-header {
        background: linear-gradient(135deg, #f0fdf4 0%, #e6fffa 100%);
    }

    .portal-modal-header h3 {
        font-size: 1.1rem;
    }

    .vermittler-management-tabs {
        flex-direction: column;
        background: #f8fafc;
        border-radius: 8px;
        padding: 0.5rem;
    }

    .tab-button {
        border-bottom: none;
        border-left: 3px solid transparent;
        border-radius: 6px;
        margin-bottom: 0.25rem;
    }

    .tab-button.active {
        border-left-color: #74b72a;
        border-bottom-color: transparent;
        background: white;
    }

    .vermittler-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .vermittler-details {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .billing-summary-enhanced {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .billing-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1.25rem;
    }

    .documents-grid,
    .invoices-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Compact Filter Styles */
.compact-filters {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.compact-select {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
    /* Ensure proper sizing within modal constraints */
    max-width: 100%;
}

.compact-select:focus {
    outline: none;
    border-color: #74b72a;
    box-shadow: 0 0 0 3px rgba(116, 183, 42, 0.1);
}

.compact-select:hover {
    border-color: #9ca3af;
}

.btn-compact {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.btn-compact:hover {
    background: #e5e7eb;
    color: #374151;
    border-color: #9ca3af;
}

.btn-compact.btn-refresh:hover {
    background: #74b72a;
    color: white;
    border-color: #74b72a;
    transform: rotate(45deg);
}

.btn-compact svg {
    width: 16px;
    height: 16px;
}

/* Enhanced Responsive Compact Filters */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
        background: #f9fafb;
        border-radius: 8px;
    }

    .compact-select {
        width: 100%;
        min-width: auto;
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .btn-compact {
        width: 100%;
        height: 44px;
        font-size: 0.9rem;
    }
}

/* ===== COMPREHENSIVE RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 1200px) {
    .portal-modal-content.extra-large {
        min-width: 90% !important;
        width: 90% !important;
        max-width: 90% !important;
    }
}

@media (max-width: 992px) {
    .portal-modal-content.large {
        min-width: 85% !important;
        width: 85% !important;
        max-width: 85% !important;
    }

    .portal-modal-content:has(.table-container) {
        min-width: 85% !important;
    }

    .portal-modal-content:has(.vermittler-management) {
        min-width: 85% !important;
    }
}

@media (max-width: 768px) {
    .portal-modal {
        padding: 10px !important;
    }

    .portal-modal-content,
    .modal-content,
    .portal-modal .portal-modal-content {
        min-width: 95% !important;
        width: 95% !important;
        max-width: 95% !important;
        min-height: 250px !important;
        max-height: 85vh !important;
    }

    .portal-modal-content.small,
    .portal-modal-content.medium,
    .portal-modal-content.large,
    .portal-modal-content.extra-large {
        min-width: 95% !important;
        width: 95% !important;
        max-width: 95% !important;
    }

    .portal-modal-header {
        padding: 1rem 1.5rem !important;
        min-height: 60px !important;
    }

    .portal-modal-body {
        padding: 1.5rem !important;
        min-height: 150px !important;
    }

    .portal-modal-footer {
        padding: 1rem 1.5rem !important;
        min-height: 60px !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .portal-modal-footer .btn {
        width: 100% !important;
    }

    .portal-modal .form-row {
        flex-direction: column !important;
    }

    .portal-modal .form-group {
        min-width: 100% !important;
    }

    .portal-modal table {
        min-width: 100% !important;
    }

    .portal-modal table td,
    .portal-modal table th {
        max-width: 150px !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .portal-modal {
        padding: 5px !important;
    }

    .portal-modal-content,
    .modal-content,
    .portal-modal .portal-modal-content {
        min-width: 98% !important;
        width: 98% !important;
        max-width: 98% !important;
        min-height: 200px !important;
        max-height: 90vh !important;
    }

    .portal-modal-header {
        padding: 0.75rem 1rem !important;
        min-height: 50px !important;
    }

    .portal-modal-header h3,
    .portal-modal-header .modal-title {
        font-size: 1.1rem !important;
    }

    .portal-modal-body {
        padding: 1rem !important;
        min-height: 100px !important;
    }

    .portal-modal-footer {
        padding: 0.75rem 1rem !important;
        min-height: 50px !important;
    }

    .portal-modal-close,
    .modal-close {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
    }
}

/* ===== ACCESSIBILITY AND UX ENHANCEMENTS ===== */
.portal-modal[aria-hidden="true"] {
    display: none !important;
}

.portal-modal:focus-within {
    outline: none !important;
}

.portal-modal-content:focus {
    outline: 2px solid #74b72a !important;
    outline-offset: 2px !important;
}

/* ===== SCROLL BEHAVIOR ===== */
.portal-modal-body {
    scrollbar-width: thin !important;
    scrollbar-color: #ccc #f1f1f1 !important;
}

.portal-modal-body::-webkit-scrollbar {
    width: 8px !important;
}

.portal-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
}

.portal-modal-body::-webkit-scrollbar-thumb {
    background: #ccc !important;
    border-radius: 4px !important;
}

.portal-modal-body::-webkit-scrollbar-thumb:hover {
    background: #aaa !important;
}

/* ===== PREVENT BODY SCROLL WHEN MODAL IS OPEN ===== */
body.modal-open {
    overflow: hidden !important;
}

/* ===== ENHANCED BUTTON STYLES ===== */
.portal-modal .btn {
    min-width: 100px !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.portal-modal .btn-primary {
    background: #74b72a !important;
    color: white !important;
    border: 1px solid #74b72a !important;
}

.portal-modal .btn-secondary {
    background: #6b7280 !important;
    color: white !important;
    border: 1px solid #6b7280 !important;
}

.portal-modal .btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

/* ===== PRINT STYLES ===== */
@media print {
    .portal-modal {
        position: static !important;
        background: none !important;
        padding: 0 !important;
    }

    .portal-modal-content {
        box-shadow: none !important;
        border: 1px solid #000 !important;
        min-height: auto !important;
        max-height: none !important;
    }

    .portal-modal-close {
        display: none !important;
    }
}
