/* ============================================
   DORADCA.PRO 2.0 — Poprawki Mobile
   Plik: web/css/mobile-fix.css
   
   WDROZENIE — 3 kroki:
   
   1. Skopiuj ten plik do web/css/mobile-fix.css
   
   2. W baseLogged.html.twig (w <head>) dodaj:
      <link rel="stylesheet" href="/css/mobile-fix.css?t={{ date().timestamp }}">
   
   3. W baseLogged.html.twig (przed </body>) dodaj:
      <button class="dc-mob-hamburger" id="mobMenuBtn" 
        onclick="document.getElementById('sidebar').classList.toggle('dc-mob-open');
                 document.getElementById('mobOverlay').classList.toggle('dc-mob-show')">☰</button>
      <div class="dc-mob-overlay" id="mobOverlay" 
        onclick="document.getElementById('sidebar').classList.remove('dc-mob-open');
                 this.classList.remove('dc-mob-show')"></div>
   ============================================ */

@media (max-width: 767px) {

    /* === SIDEBAR: chowaj na mobile === */
    .sidebar.app-aside,
    #sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        z-index: 1050 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100% !important;
    }
    .sidebar.app-aside.dc-mob-open,
    #sidebar.dc-mob-open {
        transform: translateX(0) !important;
    }

    /* === CONTENT: pelna szerokosc === */
    #app .app-content,
    .app-sidebar-fixed .app-content,
    .app-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    #app .wrap-content {
        /* gora: miejsce na przycisk menu (10+40 px); dol: miejsce na plywajacy przycisk Zglos uwage */
        padding: 60px 10px 84px !important;
    }

    /* === HAMBURGER === */
    .dc-mob-hamburger {
        display: flex !important;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1040;
        width: 40px;
        height: 40px;
        background: #003366;
        color: #fff;
        border: none;
        border-radius: 10px;
        font-size: 20px;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 12px rgba(0,51,102,0.35);
    }

    /* === OVERLAY === */
    .dc-mob-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.45);
        z-index: 1045;
    }
    .dc-mob-overlay.dc-mob-show {
        display: block;
    }

    /* === DASHBOARD === */
    .dc-header {
        flex-direction: column !important;
        gap: 10px !important;
        padding-top: 50px !important;
    }
    .dc-title { font-size: 20px !important; }
    .dc-portfolio-select {
        width: 100% !important;
        font-size: 12px !important;
        margin-top: 6px !important;
    }
    .dc-btn-primary {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 20px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
    }
    .dc-view-switch { width: 100% !important; }
    .dc-view-switch a {
        flex: 1 !important;
        text-align: center !important;
        padding: 8px 10px !important;
        font-size: 11px !important;
    }
    .dc-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .dc-kpi-card { padding: 12px 14px !important; }
    .dc-kpi-value { font-size: 22px !important; }
    .dc-kpi-label { font-size: 8px !important; }
    .dc-pipeline { flex-wrap: wrap !important; }
    .dc-pipe-stage { flex: 0 0 calc(50% - 2px) !important; }
    .dc-pipe-count { font-size: 18px !important; }
    .dc-card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
    .dc-table { min-width: 650px; }
    .dc-toolbar { flex-direction: column !important; gap: 6px !important; }
    .dc-search-box { flex: 1 1 100% !important; width: 100% !important; }
    .dc-rank-avatar { width: 24px !important; height: 24px !important; font-size: 9px !important; }
    .dc-jp-formula { display: none !important; }
    .dc-action-btn { padding: 4px 7px !important; font-size: 10px !important; margin-left: 2px !important; }
    .dc-table-footer { flex-direction: column !important; gap: 8px !important; text-align: center !important; }
    .dc-section-title { font-size: 12px !important; }
    .dc-card-header { flex-direction: column !important; gap: 6px !important; padding: 12px 14px !important; }
}

@media (max-width: 400px) {
    .dc-kpi-grid { grid-template-columns: 1fr !important; }
    .dc-pipe-stage { flex: 0 0 100% !important; }
    .dc-kpi-value { font-size: 20px !important; }
}

@media (min-width: 768px) {
    .dc-mob-hamburger { display: none !important; }
    .dc-mob-overlay { display: none !important; }
}
