/* --- mobile.css - FINAL PURE VERSION (NO !IMPORTANT, STANDARD SELECTORS) --- */
@media only screen and (max-width: 1100px) {

    /* === 1. GLOBALNE === */
    html, body { overflow-x: hidden; width: 100%; max-width: 100vw; overscroll-behavior-y: none; position: relative; }
    .admin-main { width: 100%; padding: 15px 10px; margin: 0; display: flex; flex-direction: column; align-items: stretch; padding-bottom: 80px; overflow-x: hidden; }
    .sidebar { width: 280px; transform: translateX(-100%); z-index: 99999; box-shadow: 5px 0 20px rgba(0,0,0,0.8); transition: transform 0.3s ease; position: fixed; top: 0; left: 0; height: 100%; }
    .sidebar.mobile-active { transform: translateX(0); }
    .mobile-menu-toggle { display: block; font-size: 28px; color: var(--neon); padding: 10px; cursor: pointer; z-index: 1000; }
    .header-search.hide-on-mobile, .year-select, .live-clock span:first-child { display: none; }
    .admin-header { padding-bottom: 15px; border-bottom: 1px solid #333; margin-bottom: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; position: relative; z-index: 90; }
    input, select, textarea { font-size: 16px; width: 100%; box-sizing: border-box; max-width: 100%; }

    /* === 2. USTAWIENIA === */
    .settings-modal, .modal-wide { position: fixed; top: 0; left: 0; width: 100%; height: 100%; max-height: 100vh; margin: 0; border-radius: 0; display: flex; flex-direction: column; background: #0a0a0c; z-index: 100000; transform: none; overflow: hidden; }
    .settings-header { flex: 0 0 auto; padding: 15px; border-bottom: 1px solid #333; display: flex; align-items: center; justify-content: space-between; background: #0a0a0c; z-index: 100002; }
    .settings-close { position: static; font-size: 32px; padding: 10px; line-height: 1; }
    .settings-main-layout { display: flex; flex-direction: column; flex: 1; height: 100%; overflow: hidden; width: 100%; }
    .settings-sidebar { flex: 0 0 auto; width: 100%; height: auto; min-height: 60px; display: flex; flex-direction: row; align-items: center; overflow-x: auto; border-right: none; border-bottom: 1px solid #333; background: #111; white-space: nowrap; padding: 0 5px; gap: 0; }
    .settings-sidebar > *:not(.settings-tab-btn) { display: none; }
    .settings-tab-btn { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; height: 100%; padding: 10px 5px; font-size: 9px; text-align: center; border: none; background: transparent; color: #888; }
    .settings-tab-btn i { font-size: 22px; margin-bottom: 2px; display: block; }
    .settings-tab-btn.active { color: var(--neon); border-bottom: 2px solid var(--neon); background: rgba(255,255,255,0.05); }
    .settings-content { flex: 1; overflow-y: auto; padding: 20px; padding-bottom: 100px; width: 100%; overflow-x: hidden; }
    .setting-row { display: flex; flex-direction: column; margin-bottom: 20px; width: 100%; }
    .settings-footer { position: absolute; bottom: 0; left: 0; width: 100%; padding: 15px; background: #0a0a0c; border-top: 1px solid #333; z-index: 100002; display: flex; gap: 10px; }

    /* === 3. ELEMENTY USTAWIEŃ === */
    .theme-btn, .color-swatch, .theme-option { width: 45px; height: 45px; min-width: 45px; min-height: 45px; border-radius: 50%; aspect-ratio: 1/1; margin: 5px; display: inline-flex; align-items: center; justify-content: center; }
    .delete-account-section, .danger-zone { width: 100%; padding: 15px; text-align: center; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; align-items: center; }
    .delete-account-btns, .danger-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: center; margin-top: 20px; }
    .delete-account-btns button, .danger-actions button { width: auto; min-width: 140px; max-width: 200px; padding: 10px 20px; font-size: 11px; margin: 0 auto; }

    /* === 4. KALENDARZ === */
    .nav-cal-header-bar { flex-direction: column; gap: 15px; padding: 15px; }
    .nav-cal-controls { width: 100%; justify-content: space-between; }
    .nav-cal-summary { display: flex; width: 100%; justify-content: space-around; margin-top: 15px; padding: 15px; border-top: 1px solid #333; background: #1a1a1a; border-radius: 10px; flex-wrap: wrap; gap: 10px; }
    .nav-cal-sum-item { font-size: 14px; display: flex; flex-direction: column; align-items: center; font-weight: bold; }
    .nav-cal-weekdays div { font-size: 10px; padding: 5px 0; }
    .nav-cal-day { min-height: 70px; padding: 2px; overflow: hidden; position: relative; }
    .nav-cal-event-chip { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 4px 6px; font-size: 9px; margin-bottom: 2px; border-radius: 3px; box-sizing: border-box; }
    #nav-cal-ev-notes, textarea { min-height: 120px; height: auto; }

    /* === 5. DASHBOARD === */
    .main-dashboard-grid { display: flex; flex-direction: column; gap: 20px; margin-top: 0; width: 100%; }
    .stats-grid-7 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; width: 100%; }
    .stat-card-small { padding: 15px 5px; min-height: 80px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; width: 100%; }
    .stat-val { font-size: 15px; margin-top: 5px; word-break: break-word; }
    .chart-widget-box { min-height: 350px; padding: 10px; pointer-events: auto; width: 100%; overflow: hidden; }
    .chart-bars-container { min-height: 250px; width: 100%; overflow-x: auto; pointer-events: auto; touch-action: pan-x; }
    .widget-add-btn { width: 45px; height: 45px; min-width: 45px; border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; aspect-ratio: 1/1; font-size: 20px; margin-left: auto; }
    .widget-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; flex-wrap: wrap; }
    
    /* === 6. POZOSTAŁE === */
    .dashboard-widget .widget-title { flex-direction: row; flex-wrap: wrap; }
    .btn-sys, .btn-gold-small, .btn-gold { width: 100%; justify-content: center; margin: 5px 0; max-width: none; height: auto; min-height: 50px; white-space: normal; padding: 10px; line-height: 1.3; }
    .games-selector { display: flex; flex-direction: column; gap: 15px; width: 100%; }
    .paper-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 10px; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
    .paper-tab-btn { flex: 0 0 auto; font-size: 12px; padding: 12px 15px; white-space: nowrap; height: auto; }
    .doc-section-header { flex-direction: column; align-items: flex-start; gap: 15px; width: 100%; }
    .doc-section-header button { width: 100%; white-space: normal; text-align: center; height: auto; padding: 15px; }
    .paper-input-group { width: 100%; margin-bottom: 15px; }
    .paper-input-group input, .paper-input-group select { width: 100%; }
    .nav-mag-item-card, .nav-mag-items-category-grid { touch-action: pan-y; -webkit-user-drag: none; user-select: none; }
    .sortable-handle { display: none; } 
    .nav-mag-item-card { margin-bottom: 10px; width: 100%; display: flex; flex-direction: row; }
    .nav-mag-header-bar { overflow-x: auto; white-space: nowrap; padding-bottom: 5px; }
    .mag-controls-row { flex-direction: column; gap: 10px; }
    .modal-close-red, .modal-close-fix { position: absolute; top: 10px; right: 10px; padding: 10px; z-index: 10002; font-size: 28px; background: rgba(0,0,0,0.5); border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
    .event-item, .history-row, .checklist-card, .pay-table tr, .gear-app-table tr { display: flex; flex-direction: column; width: 100%; height: auto; padding: 15px; gap: 10px; align-items: flex-start; }
    .event-item > div, .history-row > div { width: 100%; }
    .event-actions, .history-actions { justify-content: space-between; width: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px solid #222; display: flex; }
    .form-grid-2-col, .form-grid-2-col-tight, .data-grid-2 { grid-template-columns: 1fr; gap: 15px; display: grid; }
    .message-bubble textarea { min-height: 200px; }
    .opinia-grid { display: flex; flex-direction: column; gap: 20px; }
    .social-actions-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .docs-grid-cards, .press-files-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
    .pay-table td { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #222; }
    .pay-table td:last-child { border-bottom: none; }
    .checklist-banner { flex-direction: column; gap: 15px; text-align: center; }

}