/* ===== ADMIN PANEL RESPONSIVE CSS ===== */
/* تحسين التجاوب للوحة التحكم */

/* تحسينات ألوان النصوص */
.card {
    color: #2c3e50 !important;
}

.card-header {
    color: #2c3e50 !important;
}

.card-body {
    color: #2c3e50 !important;
}

.table {
    color: #2c3e50 !important;
}

.table th {
    color: white !important;
}

.table td {
    color: #2c3e50 !important;
}

.badge {
    color: white !important;
}

.btn {
    color: inherit !important;
}

.btn-primary {
    color: white !important;
}

.btn-secondary {
    color: white !important;
}

.btn-success {
    color: white !important;
}

.btn-danger {
    color: white !important;
}

.btn-warning {
    color: #000 !important;
}

.btn-info {
    color: white !important;
}

.alert {
    color: inherit !important;
}

.alert-success {
    color: #155724 !important;
}

.alert-danger {
    color: #721c24 !important;
}

.alert-warning {
    color: #856404 !important;
}

.alert-info {
    color: #0c5460 !important;
}

/* تحسينات للقوائم */
.nav-link {
    color: rgba(255,255,255,0.8) !important;
}

.nav-link:hover {
    color: white !important;
}

.nav-link.active {
    color: white !important;
}

/* تحسينات للنماذج */
.form-control {
    color: #2c3e50 !important;
}

.form-select {
    color: #2c3e50 !important;
}

/* إصلاح زر إضافة المدن */
a[href*="cities/create"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
    background: linear-gradient(45deg, #D4A574, #8B4513) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

a[href*="cities/create"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(212, 165, 116, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
}

/* تحسين عرض الجداول على الهاتف */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 8px !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .table {
        font-size: 0.85rem !important;
        min-width: 800px !important;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem !important;
        white-space: nowrap !important;
        text-align: center !important;
    }
    
    .btn-group .btn {
        min-width: 32px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
        margin: 0 2px !important;
        border-radius: 6px !important;
        transition: all 0.2s ease !important;
    }
    
    .btn-group .btn:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    }
    
    .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .city-name {
        font-weight: 600 !important;
        color: #2c3e50 !important;
        text-align: right !important;
    }
    
    .city-description {
        font-size: 0.8rem !important;
        color: #6c757d !important;
        text-align: right !important;
    }
    
    /* تحسين عرض الأزرار */
    .btn-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
    }
    
    /* تحسين الـ sidebar على الهاتف */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        z-index: 1000 !important;
        transition: right 0.3s ease !important;
        width: 280px !important;
        height: 100vh !important;
        overflow-y: auto !important;
    }
    
    .sidebar.show {
        right: 0 !important;
    }
    
    .main-content {
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    /* Sidebar Overlay */
    .sidebar-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 999 !important;
        display: none !important;
    }
    
    .sidebar-overlay.show {
        display: block !important;
    }
    
    /* Sidebar Close Button */
    #sidebarClose {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 1001 !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: white !important;
        width: 35px !important;
        height: 35px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s ease !important;
    }
    
    #sidebarClose:hover {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: scale(1.1) !important;
    }
    
    /* Mobile Navigation */
    .nav-link {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    .nav-link i {
        width: 25px !important;
        margin-left: 0.75rem !important;
    }
}
}

.form-label {
    color: #2c3e50 !important;
}

.form-text {
    color: #6c757d !important;
}

/* تحسينات للعناوين */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50 !important;
}

.page-title {
    color: #2c3e50 !important;
}

/* تحسينات للروابط */
a {
    color: #D4A574 !important;
}

a:hover {
    color: #8B4513 !important;
}

/* تحسينات للقوائم المنسدلة */
.dropdown-menu {
    color: #2c3e50 !important;
}

.dropdown-item {
    color: #2c3e50 !important;
}

.dropdown-item:hover {
    color: #2c3e50 !important;
    background-color: #f8f9fa !important;
}

/* ===== MOBILE (320px - 767px) ===== */
@media (max-width: 767px) {
    /* Sidebar Overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* Sidebar Close Button */
    .sidebar-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 1060;
    }
    
    .sidebar-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
    }
    
    /* Sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        z-index: 1050;
        transition: right 0.3s ease;
        width: 280px;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.3) transparent;
    }
    
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }
    
    .sidebar::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.3);
        border-radius: 3px;
    }
    
    .sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.5);
    }
    
    .sidebar.show {
        right: 0;
        box-shadow: -2px 0 20px rgba(0,0,0,0.3);
    }
    
    /* Sidebar Content */
    .sidebar-nav {
        padding: 0.5rem 0;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2rem; /* مساحة إضافية في الأسفل */
    }
    
    /* Sidebar Navigation Groups */
    .nav-group {
        margin-bottom: 1rem;
    }
    
    .nav-group-title {
        color: rgba(255,255,255,0.6);
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        padding: 0.5rem 1.5rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .sidebar-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: linear-gradient(135deg, var(--admin-dark), var(--admin-secondary));
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Main Content */
    .main-content {
        margin-right: 0 !important;
        padding: 1rem;
        width: 100%;
    }
    
    /* Sidebar Navigation Items */
    .nav-item {
        margin: 0.125rem 0;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 0;
        transition: all 0.3s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: pointer;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .nav-link:hover {
        background: rgba(255,255,255,0.1);
        transform: translateX(-5px);
        color: white !important;
    }
    
    .nav-link.active {
        background: rgba(255,255,255,0.2);
        border-right: 3px solid var(--admin-primary);
        color: white !important;
    }
    
    .nav-link:active {
        background: rgba(255,255,255,0.3);
        transform: scale(0.98);
    }
    
    /* Sidebar Icons */
    .nav-link i {
        width: 20px;
        text-align: center;
        margin-left: 0.5rem;
    }
    
    /* Sidebar Badges */
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Top Navbar */
    .top-navbar {
        padding: 0.5rem 1rem;
        position: sticky;
        top: 0;
        z-index: 1040;
        background: var(--dark-bg);
    }
    
    .top-navbar .navbar-brand {
        font-size: 1.2rem;
    }
    
    /* Hamburger Menu */
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    /* Sidebar Overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* Close Button for Sidebar */
    .sidebar-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: rgba(255,255,255,0.2);
        border: none;
        color: white;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .sidebar-close:hover {
        background: rgba(255,255,255,0.3);
        transform: scale(1.1);
    }
    
    /* Page Titles */
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    .card-header {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.8rem;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        vertical-align: middle;
        white-space: nowrap;
    }
    
    .table th {
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    /* Button Groups */
    .btn-group {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-group .btn {
        width: 100%;
        margin: 0;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        font-weight: 600;
    }
    
    .form-text {
        font-size: 0.8rem;
    }
    
    /* Stats Cards */
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .stats-card .card-body {
        padding: 1rem;
        text-align: center;
    }
    
    .stats-card h4 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .stats-card i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .stats-card p {
        font-size: 0.9rem;
        margin: 0;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Alerts */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    /* Pagination */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Grid System */
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .col, [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Spacing */
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mt-4 {
        margin-top: 1.5rem !important;
    }
    
    /* Reports Specific */
    .reports-filter .row {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    .reports-filter .col-md-3 {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        margin-bottom: 1rem;
    }
    
    .reports-filter .form-label {
        font-size: 0.8rem;
    }
    
    .reports-filter .form-control,
    .reports-filter .form-select {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Charts */
    .chart-container {
        height: 250px;
        margin-bottom: 1rem;
    }
    
    /* Customer Selection */
    .customer-selection {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .customer-selection .form-check {
        margin-bottom: 0.5rem;
    }
    
    .customer-selection .form-check-label {
        font-size: 0.8rem;
    }
    
    /* Image Preview */
    .image-preview {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    .current-image {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .current-image img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        border: 2px solid #dee2e6;
    }
    
    /* Status Badges */
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Action Buttons */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Search and Filter */
    .search-filter {
        margin-bottom: 1rem;
    }
    
    .search-filter .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-filter .input-group-text {
        border-radius: 8px 8px 0 0;
    }
    
    .search-filter .form-control {
        border-radius: 0 0 8px 8px;
    }
    
    /* Dropdown Menus */
    .dropdown-menu {
        font-size: 0.9rem;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .dropdown-item {
        padding: 0.5rem 1rem;
    }
    
    /* Tooltips */
    .tooltip {
        font-size: 0.8rem;
    }
    
    /* Loading States */
    .loading-spinner {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 2rem;
    }
    
    /* Empty States */
    .empty-state {
        text-align: center;
        padding: 2rem 1rem;
        color: #6c757d;
    }
    
    .empty-state i {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.5;
    }
    
    .empty-state h5 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .empty-state p {
        font-size: 0.9rem;
        margin: 0;
    }
}

/* ===== TABLET (768px - 1023px) ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Sidebar */
    .sidebar {
        width: 250px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.3) transparent;
    }
    
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }
    
    .sidebar::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.3);
        border-radius: 3px;
    }
    
    .sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.5);
    }
    
    .sidebar-nav {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .main-content {
        margin-right: 250px;
    }
    
    /* Page Titles */
    .page-title {
        font-size: 1.75rem;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Button Groups */
    .btn-group {
        flex-direction: row;
        gap: 0.25rem;
    }
    
    .btn-group .btn {
        width: auto;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 0.95rem;
        padding: 0.6rem 0.875rem;
    }
    
    /* Stats Cards */
    .stats-card h4 {
        font-size: 1.75rem;
    }
    
    .stats-card i {
        font-size: 2.5rem;
    }
    
    /* Grid Adjustments */
    .col-md-6 {
        margin-bottom: 1.5rem;
    }
    
    /* Reports Filter */
    .reports-filter .col-md-3 {
        margin-bottom: 0.5rem;
    }
    
    /* Charts */
    .chart-container {
        height: 300px;
    }
    
    /* Action Buttons */
    .action-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .action-buttons .btn {
        width: auto;
    }
    
    /* Search and Filter */
    .search-filter .input-group {
        flex-direction: row;
        gap: 0;
    }
    
    .search-filter .input-group-text {
        border-radius: 8px 0 0 8px;
    }
    
    .search-filter .form-control {
        border-radius: 0 8px 8px 0;
    }
}

/* ===== DESKTOP (1024px+) ===== */
@media (min-width: 1024px) {
    /* Sidebar */
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-right: 280px;
    }
    
    /* Page Titles */
    .page-title {
        font-size: 2rem;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 1rem 0.75rem;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    /* Stats Cards */
    .stats-card h4 {
        font-size: 2rem;
    }
    
    .stats-card i {
        font-size: 3rem;
    }
    
    /* Charts */
    .chart-container {
        height: 350px;
    }
    
    /* Modals */
    .modal-dialog {
        max-width: 600px;
    }
    
    .modal-footer {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: auto;
    }
}

/* ===== LARGE DESKTOP (1200px+) ===== */
@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1140px;
        margin: 0 auto;
    }
    
    .stats-card h4 {
        font-size: 2.25rem;
    }
    
    .chart-container {
        height: 400px;
    }
}

/* ===== EXTRA LARGE DESKTOP (1400px+) ===== */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1320px;
    }
    
    .stats-card h4 {
        font-size: 2.5rem;
    }
    
    .chart-container {
        height: 450px;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Remove hover effects */
    .btn:hover,
    .card:hover,
    .nav-link:hover {
        transform: none !important;
    }
    
    /* Improve scrolling */
    .table-responsive,
    .sidebar,
    .customer-selection {
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .image-preview img,
    .current-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .modal,
    .dropdown-menu {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        border: 1px solid #000 !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    /* This will be handled by the existing dark mode CSS variables */
}

/* ===== UTILITY CLASSES ===== */
.d-none-mobile {
    display: none;
}

@media (min-width: 768px) {
    .d-none-mobile {
        display: block;
    }
    
    .d-none-desktop {
        display: none;
    }
}

.text-center-mobile {
    text-align: center;
}

@media (min-width: 768px) {
    .text-center-mobile {
        text-align: left;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 767px) {
    /* Reduce animations on mobile for better performance */
    .card,
    .btn,
    .nav-link {
        transition: none;
    }
    
    /* Optimize images for mobile */
    .image-preview img,
    .current-image img {
        image-rendering: optimizeSpeed;
    }
}

/* ===== SAFE AREA SUPPORT (iOS) ===== */
@supports (padding: max(0px)) {
    .container-fluid {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .top-navbar {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .sidebar {
        padding-top: max(0, env(safe-area-inset-top));
        padding-bottom: max(0, env(safe-area-inset-bottom));
    }
}

