/* --- mobile.css - FINAL DIAMOND VERSION (ONLY ICONS, ROUND BUTTONS, NO SCROLL) --- */
@media (max-width: 1100px) {

    /* === 1. GLOBALNE I BLOKADA PRZESUWANIA === */
    html, body { overflow-x: hidden !important; width: 100% !important; max-width: 100vw !important; overscroll-behavior-y: none; position: relative !important; }
    .admin-main { width: 100% !important; padding: 15px 10px !important; margin: 0 !important; display: flex; flex-direction: column; align-items: stretch; padding-bottom: 80px !important; overflow-x: hidden !important; }
    .sidebar { width: 280px !important; transform: translateX(-100%); z-index: 99999; box-shadow: 5px 0 20px rgba(0,0,0,0.8); transition: transform 0.3s ease !important; position: fixed; top: 0; left: 0; height: 100%; }
    .sidebar.mobile-active { transform: translateX(0) !important; }
    .mobile-menu-toggle { display: block !important; 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 !important; }
    .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 !important; width: 100% !important; box-sizing: border-box !important; max-width: 100%; }

    /* === 2. USTAWIENIA - NOWA KONSTRUKCJA (TYLKO IKONY) === */
    .settings-modal, .modal-wide { position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; max-height: 100vh !important; margin: 0 !important; border-radius: 0 !important; display: flex !important; flex-direction: column !important; background: #0a0a0c !important; z-index: 100000 !important; transform: none !important; overflow: hidden !important; }
    .settings-header { flex: 0 0 auto !important; padding: 15px !important; border-bottom: 1px solid #333; display: flex; align-items: center; justify-content: space-between; background: #0a0a0c; z-index: 100002; }
    .settings-close { position: static !important; font-size: 32px !important; padding: 10px !important; line-height: 1; }
    .settings-main-layout { display: flex !important; flex-direction: column !important; flex: 1 !important; height: 100% !important; overflow: hidden !important; width: 100% !important; }
    /* Pasek sidebar na górze - poziomy */
    .settings-sidebar { flex: 0 0 auto !important; width: 100% !important; height: auto !important; min-height: 60px !important; display: flex !important; flex-direction: row !important; align-items: center !important; overflow-x: auto !important; border-right: none !important; border-bottom: 1px solid #333 !important; background: #111 !important; white-space: nowrap !important; padding: 0 5px !important; gap: 0 !important; }
    /* UKRYWANIE NAPISÓW (Konto, System itp.) - Zostają tylko przyciski */
    .settings-sidebar > *:not(.settings-tab-btn) { display: none !important; }
    /* Stylizacja samych przycisków w menu */
    .settings-tab-btn { flex: 0 0 auto !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; width: 60px !important; height: 100% !important; padding: 10px 5px !important; font-size: 9px !important; text-align: center !important; border: none !important; background: transparent !important; color: #888 !important; }
    .settings-tab-btn i { font-size: 22px !important; margin-bottom: 2px !important; display: block !important; }
    .settings-tab-btn.active { color: var(--neon) !important; border-bottom: 2px solid var(--neon) !important; background: rgba(255,255,255,0.05) !important; }
    /* Treść ustawień */
    .settings-content { flex: 1 !important; overflow-y: auto !important; padding: 20px !important; padding-bottom: 100px !important; width: 100% !important; overflow-x: hidden !important; }
    .setting-row { display: flex !important; flex-direction: column !important; margin-bottom: 20px !important; width: 100% !important; }
    .settings-footer { position: absolute !important; bottom: 0 !important; left: 0 !important; width: 100% !important; padding: 15px !important; background: #0a0a0c !important; border-top: 1px solid #333 !important; z-index: 100002 !important; display: flex !important; gap: 10px !important; }

    /* === 3. MOTYW SYSTEMU & USUWANIE KONTA === */
    /* Idealne kółka */
    .theme-btn, .color-swatch, .theme-option { width: 45px !important; height: 45px !important; min-width: 45px !important; min-height: 45px !important; border-radius: 50% !important; aspect-ratio: 1/1 !important; margin: 5px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
    /* Naprawa sekcji usuwania konta */
    .delete-account-section, .danger-zone { width: 100% !important; padding: 15px !important; text-align: center !important; box-sizing: border-box !important; overflow: hidden !important; display: flex !important; flex-direction: column !important; align-items: center !important; }
    .delete-account-btns, .danger-actions { display: flex !important; flex-direction: column !important; gap: 10px !important; width: 100% !important; align-items: center !important; margin-top: 20px !important; }
    .delete-account-btns button, .danger-actions button { width: auto !important; min-width: 140px !important; max-width: 200px !important; padding: 10px 20px !important; font-size: 11px !important; margin: 0 auto !important; }

    /* === 4. KALENDARZ (FIX) === */
    .nav-cal-header-bar { flex-direction: column !important; gap: 15px !important; padding: 15px !important; }
    .nav-cal-controls { width: 100% !important; justify-content: space-between !important; }
    .nav-cal-summary { display: flex !important; width: 100% !important; justify-content: space-around !important; margin-top: 15px !important; padding: 15px !important; border-top: 1px solid #333; background: #1a1a1a !important; border-radius: 10px; flex-wrap: wrap; gap: 10px; }
    .nav-cal-sum-item { font-size: 14px !important; display: flex; flex-direction: column; align-items: center; font-weight: bold; }
    .nav-cal-weekdays div { font-size: 10px !important; padding: 5px 0; }
    .nav-cal-day { min-height: 70px !important; padding: 2px !important; overflow: hidden !important; position: relative !important; }
    /* Fix: Tekst imprezy nie wychodzi poza kratkę */
    .nav-cal-event-chip { display: block !important; max-width: 100% !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; padding: 4px 6px !important; font-size: 9px !important; margin-bottom: 2px !important; border-radius: 3px !important; box-sizing: border-box !important; }
    #nav-cal-ev-notes, textarea { min-height: 120px !important; height: auto !important; }

    /* === 5. DASHBOARD === */
    .main-dashboard-grid { display: flex !important; flex-direction: column !important; gap: 20px; margin-top: 0 !important; width: 100% !important; }
    .stats-grid-7 { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; margin-top: 15px; width: 100% !important; }
    .stat-card-small { padding: 15px 5px !important; min-height: 80px !important; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; width: 100% !important; }
    .stat-val { font-size: 15px !important; margin-top: 5px; word-break: break-word; }
    .chart-widget-box { min-height: 350px !important; padding: 10px !important; pointer-events: auto !important; width: 100% !important; overflow: hidden; }
    .chart-bars-container { min-height: 250px !important; width: 100% !important; overflow-x: auto; pointer-events: auto !important; touch-action: pan-x; }
    /* Fix: Okrągły przycisk dodawania */
    .widget-add-btn { width: 45px !important; height: 45px !important; min-width: 45px !important; border-radius: 50% !important; padding: 0 !important; display: flex !important; align-items: center; justify-content: center !important; aspect-ratio: 1/1 !important; font-size: 20px !important; margin-left: auto; }
    .widget-title { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; flex-wrap: wrap; }
    
    /* === 6. POZOSTAŁE ELEMENTY (MAGAZYN, DOKUMENTY) === */
    .dashboard-widget .widget-title { flex-direction: row !important; flex-wrap: wrap !important; }
    .btn-sys, .btn-gold-small, .btn-gold { width: 100% !important; justify-content: center !important; margin: 5px 0 !important; max-width: none !important; height: auto !important; min-height: 50px !important; white-space: normal !important; padding: 10px !important; line-height: 1.3; }
    .games-selector { display: flex; flex-direction: column; gap: 15px; width: 100%; }
    .paper-tabs { flex-wrap: nowrap !important; overflow-x: auto !important; justify-content: flex-start !important; gap: 10px !important; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
    .paper-tab-btn { flex: 0 0 auto !important; font-size: 12px !important; padding: 12px 15px !important; white-space: nowrap !important; height: auto !important; }
    .doc-section-header { flex-direction: column !important; align-items: flex-start !important; gap: 15px; width: 100%; }
    .doc-section-header button { width: 100% !important; white-space: normal !important; text-align: center !important; height: auto !important; padding: 15px !important; }
    .paper-input-group { width: 100% !important; margin-bottom: 15px; }
    .paper-input-group input, .paper-input-group select { width: 100% !important; }
    .nav-mag-item-card, .nav-mag-items-category-grid { touch-action: pan-y !important; -webkit-user-drag: none; user-select: none; }
    .sortable-handle { display: none !important; } 
    .nav-mag-item-card { margin-bottom: 10px !important; width: 100% !important; display: flex; flex-direction: row; }
    .nav-mag-header-bar { overflow-x: auto; white-space: nowrap; padding-bottom: 5px; }
    .mag-controls-row { flex-direction: column !important; gap: 10px; }
    .modal-close-red, .modal-close-fix { position: absolute; top: 10px !important; right: 10px !important; padding: 10px !important; z-index: 10002; font-size: 28px !important; 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 !important; flex-direction: column !important; width: 100% !important; height: auto !important; padding: 15px !important; gap: 10px !important; align-items: flex-start !important; }
    .event-item > div, .history-row > div { width: 100% !important; }
    .event-actions, .history-actions { justify-content: space-between !important; width: 100% !important; 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 !important; gap: 15px !important; display: grid !important; }
    .message-bubble textarea { min-height: 200px !important; }
    .opinia-grid { display: flex !important; flex-direction: column !important; gap: 20px; }
    .social-actions-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 10px; }
    .docs-grid-cards, .press-files-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 15px !important; }
    .pay-table td { display: flex !important; justify-content: space-between !important; padding: 8px 0 !important; border-bottom: 1px solid #222; }
    .pay-table td:last-child { border-bottom: none; }
    .checklist-banner { flex-direction: column !important; gap: 15px; text-align: center; }

}