/* =============================================================
   SLR Manager — responsive.css
   Mobile-first breakpoints and adjustments
   ============================================================= */

/* ---- Tablet (≤960px) ---- */
@media (max-width: 960px) {
    .two-col {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-content {
        padding: 1.25rem;
    }

    .prisma-row {
        flex-direction: column;
        align-items: center;
    }

    .prisma-h-line {
        display: none;
    }

    .prisma-box {
        max-width: 280px;
        width: 100%;
    }
}

/* ---- Mobile (≤768px) ---- */
@media (max-width: 768px) {
    :root {
        --header-h: 56px;
    }

    /* Sidebar collapses off-canvas */
    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-w)));
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Main content takes full width */
    .main-wrapper {
        margin-left: 0;
    }

    /* Show hamburger */
    .hamburger {
        display: flex;
    }

    /* Header */
    .top-header {
        padding: 0 1rem;
    }

    .progress-mini {
        width: 80px;
    }

    /* Page content */
    .page-content {
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 1.375rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Section card */
    .section-card {
        padding: 1rem;
    }

    .section-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Tables */
    .data-table {
        font-size: 0.8125rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.625rem 0.75rem;
    }

    .td-title {
        max-width: 200px;
    }

    /* Filter bar */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-control {
        max-width: 100%;
    }

    /* Modal */
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal {
        max-width: 100%;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
        max-height: 85vh;
    }

    /* PRISMA */
    .prisma-container {
        padding: 1rem 0.5rem;
    }

    .prisma-box {
        min-width: 140px;
    }

    /* Two col → single */
    .two-col {
        grid-template-columns: 1fr;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Verdict buttons */
    .verdict-btns {
        flex-direction: column;
    }

    .verdict-btn {
        text-align: center;
    }
}

/* ---- Small mobile (≤480px) ---- */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: 0.875rem 1rem;
    }

    .btn {
        font-size: 0.8125rem;
        padding: 0.4375rem 0.875rem;
    }

    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
    }

    .tab-btn {
        flex-shrink: 0;
    }

    .toast-container {
        right: 0.75rem;
        left: 0.75rem;
        bottom: 0.75rem;
    }

    .toast {
        max-width: 100%;
    }

    .filter-chip {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
    }
}

/* ---- Large screen (≥1280px) ---- */
@media (min-width: 1280px) {
    .page-content {
        padding: 2rem 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ---- Print styles ---- */
@media print {

    .sidebar,
    .top-header,
    .filter-bar,
    .btn,
    .toast-container {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .page-content {
        padding: 0;
        max-width: 100%;
    }

    .prisma-box {
        page-break-inside: avoid;
    }
}