/* responsive.css — All @media query blocks for responsive breakpoints */

@media (max-width: 768px) {
    /* Core layout unlock */
    body {
        height: auto !important;
        min-height: 100vh;
        overflow: visible !important;
        flex-direction: column;
    }
    .main {
        width: 100%;
        overflow: visible !important;
        min-height: calc(100vh - 56px);
    }
    .content {
        padding: 12px;
        overflow: visible !important;
    }

    /* Sidebar drawer */
    .sidebar {
        position: fixed !important;
        left: 0; top: 0;
        height: 100vh !important;
        z-index: 200;
        transform: translateX(-260px);
        transition: transform .25s ease;
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    }
    .sidebar-overlay.show { display: block }
    .sidebar-close {
        display: flex !important;
        align-items: center; justify-content: flex-end;
        padding: 14px 16px 4px; cursor: pointer;
        font-size: 22px; color: var(--text3);
    }

    /* Topbar */
    .topbar { padding: 0 12px; height: 52px; }
    .topbar-title { font-size: 15px }
    .hamburger { display: flex }
    .topbar-right img { display: none }
    .topbar-right > button.topbar-btn { display: none }
    .topbar-right > .avatar-wrap { display: flex }

    /* FAB */
    .fab { display: flex }

    /* Stats grids */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px }
    .stat-card { padding: 12px }
    .stat-value { font-size: 20px }
    .stat-change { font-size: 10px }

    /* Two-col stacks */
    .two-col { grid-template-columns: 1fr !important; gap: 10px }

    /* Cards */
    .card { padding: 12px 12px; border-radius: 10px }
    .card-header { flex-wrap: wrap; gap: 6px }
    .card-title { font-size: 13px }

    /* Tables: horizontal scroll */
    .card { overflow-x: auto; -webkit-overflow-scrolling: touch }
    table.table { min-width: 480px; font-size: 11px }

    /* Filter bars */
    .filter-bar { flex-wrap: wrap; gap: 5px; overflow-x: visible; margin-bottom: 10px }
    .fc { font-size: 11px; padding: 5px 9px }

    /* Post items */
    .post-item { flex-wrap: wrap; gap: 8px; padding: 10px 0; align-items: flex-start }
    .post-text { font-size: 12px; line-height: 1.5 }
    .post-meta { font-size: 10px }

    /* Calendar */
    .cal-grid { font-size: 11px }
    .cal-day { min-height: 48px; padding: 3px }
    .cal-day-num { font-size: 10px }
    .cal-detail { border-radius: 10px }

    /* Modal: full-width */
    .modal-overlay { padding: 10px }
    .modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 90vh !important;
        border-radius: 14px;
    }
    .modal-header, .modal-body, .modal-footer { padding: 14px }

    /* Pagination */
    .pagination { flex-direction: column; gap: 8px; align-items: flex-start }
    .pg-info { font-size: 11px }

    /* Quick actions */
    .quick-actions { grid-template-columns: 1fr 1fr !important }

    /* Charts */
    .chart-wrap { height: 170px }

    /* Lead rows */
    .lead-co { display: none }

    /* Export buttons wrap */
    div[style*="justify-content:flex-end"][style*="gap:6px"],
    div[style*="justify-content:flex-end"][style*="gap:8px"] { flex-wrap: wrap }

    /* Visual thumbnails */
    .post-item > div[style*="width:72px"] { width: 54px !important; height: 40px !important }
    .post-item > div[style*="width:160px"] { width: 120px !important; height: 60px !important }

    /* Settings export row */
    .topbar-right > div[style*="display:flex"] button { font-size: 10px; padding: 4px 8px }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px }
    .stat-card { padding: 10px }
    .stat-value { font-size: 18px }
    .topbar-title { font-size: 13px }
    .content { padding: 8px }
    .card { padding: 10px; border-radius: 8px }
    table.table { min-width: 420px; font-size: 10px }
    .cal-day { min-height: 36px; padding: 2px }
    .chart-wrap { height: 150px }
    .post-item > div[style*="width:72px"] { width: 44px !important; height: 32px !important }
    .post-item > div[style*="width:160px"] { width: 100px !important; height: 50px !important }
    .badge { font-size: 9px; padding: 2px 5px }
    .ch { font-size: 9px; padding: 1px 5px }
}

@media (max-width: 360px) {
    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 5px }
    .stat-value { font-size: 16px }
    .content { padding: 6px }
    table.table { min-width: 380px; font-size: 9px }
}

@media(max-width:900px) {
    .scraper-item { flex-wrap: wrap; }
    .scraper-meta { width: 100%; margin-top: 8px; }
}

@media(max-width:600px) {
    .scraper-meta { gap: 12px; }
    .scraper-actions { width: 100%; justify-content: flex-end; margin-top: 8px; }
    .enrichment-bar { gap: 12px; font-size: 12px; }
    .enrichment-bar .eb-divider { display: none; }
    .cw-autonomy-group { flex-direction: column; }
    .cw-summary-grid { grid-template-columns: 1fr; }
    .ob-title { font-size: 22px; }
    .proto-panel { width: 280px; }
    .sf-timing-row { flex-direction: column; }
    .cf-container { padding-top: 10px; }
    .cf-title { font-size: 20px; }
    .cf-hook-name { min-width: 100px; }
}

@media(max-width:768px) {
    .ob-plan-grid { flex-direction: column; }
    .ob-container.ob-wide { max-width: 480px; }
}

@media(max-width:1200px) {
    body.proto-open .main { margin-right: 0; }
    body.proto-open .topbar { right: 0; }
    body.proto-open .onboarding-overlay { right: 0; }
}
