/* responsive.css – Responsive layouts for tablet and mobile */

/* Tablet */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    .kanban-board {
        overflow-x: auto;
    }
    .kanban-column {
        min-width: 280px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .app-shell.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    /* Tapping outside the open drawer closes it */
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 90;
        animation: backdrop-fade 0.2s ease;
    }
    @keyframes backdrop-fade {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    .main-wrapper {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
    .content {
        padding: 1rem;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .filter-bar {
        flex-wrap: wrap;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .project-grid, .team-grid {
        grid-template-columns: 1fr !important;
    }
    .form-row {
        grid-template-columns: 1fr !important;
    }
    .task-detail-grid {
        grid-template-columns: 1fr !important;
    }
    .task-detail-grid-2 {
        grid-template-columns: 1fr !important;
    }
    .admin-two-col {
        grid-template-columns: 1fr !important;
    }
    .settings-grid {
        grid-template-columns: 1fr !important;
    }
    .profile-name {
        display: none;
    }
    .modal {
        width: 95%;
        margin: 0.5rem;
    }
    .calendar-toolbar {
        flex-wrap: wrap;
    }
    /* Fixed cell height → the month grid keeps a stable rhythm on small screens */
    .calendar-cell {
        height: 160px;
    }
    .calendar-task-summary {
        font-size: 0.65rem;
    }
    .event-chip {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    /* Day Details panel is full-width below 1024px (see components.css) */
    .day-panel-body {
        padding: 0.85rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .header-search {
        display: none;
    }
    .project-stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    /* Tighter chrome so all header controls fit at 320px */
    .header {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    .header-actions {
        gap: 0.5rem;
    }
    .page-header {
        gap: 0.5rem;
    }
    .page-header h1 {
        font-size: 1.35rem;
    }
    .content {
        padding: 0.75rem;
    }
    .panel-card,
    .chart-card {
        padding: 1rem;
    }
    .modal {
        padding: 1rem;
    }
}
