/* ===== Responsive Styles ===== */

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .kpi-bar {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .campaign-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 12px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-center {
        display: none;
    }

    .header-center.mobile-open {
        display: flex;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--primary);
        z-index: 99;
        padding: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

    .header-center.mobile-open .main-nav {
        flex-direction: column;
        width: 100%;
    }

    .header-center.mobile-open .nav-link {
        padding: 12px 16px;
        font-size: 15px;
    }

    .logo {
        font-size: 12px;
    }

    .user-name {
        display: none;
    }

    .filters-bar {
        padding: 8px 12px;
        gap: 8px;
    }

    .filter-group {
        flex: 1;
        min-width: 0;
    }

    .filter-select {
        width: 100%;
        min-width: 0;
    }

    .tab-content {
        padding: 12px;
    }

    .kpi-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .kpi-card {
        padding: 12px;
    }

    .kpi-value {
        font-size: 22px;
    }

    .candidates-toolbar {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    .toolbar-filters {
        width: 100%;
    }

    .toolbar-filters select {
        flex: 1;
    }

    /* Make table horizontally scrollable on mobile */
    .table-container {
        margin: 0 -12px;
        border-radius: 0;
    }

    .candidates-table th,
    .candidates-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* Hide less important columns on mobile */
    .candidates-table th:nth-child(5),
    .candidates-table td:nth-child(5),
    .candidates-table th:nth-child(7),
    .candidates-table td:nth-child(7),
    .candidates-table th:nth-child(8),
    .candidates-table td:nth-child(8),
    .candidates-table th:nth-child(10),
    .candidates-table td:nth-child(10),
    .candidates-table th:nth-child(11),
    .candidates-table td:nth-child(11) {
        display: none;
    }

    .modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .modal-body {
        padding: 16px;
    }

    .funnel-container {
        padding: 16px;
    }

    .funnel-bar {
        height: 40px;
        font-size: 12px;
    }

    .funnel-dropoff {
        width: 80px;
        font-size: 11px;
    }

    .alert-panel {
        width: 100%;
    }

    .table-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .kpi-bar {
        grid-template-columns: 1fr 1fr;
    }

    .kpi-value {
        font-size: 20px;
    }

    .header-right {
        gap: 4px;
    }

    .alert-btn, .refresh-btn, .dark-mode-toggle {
        padding: 6px;
    }

    .login-card {
        padding: 24px;
    }
}
