/* assets/css/responsive.css */

/* Global Responsive Styles */

/* Mobile Devices (< 768px) */
@media (max-width: 768px) {

    /* Typography */
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    /* Layout Containers */
    .dashboard-container {
        flex-direction: column;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem !important;
        padding-top: 4rem !important;
    }

    /* Sidebar */
    .sidebar {
        left: -250px;
        width: 250px;
        height: 100vh;
        position: fixed;
        z-index: 10000;
        transition: left 0.3s ease-in-out;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .sidebar.open {
        left: 0;
    }

    /* Menu Toggle */
    .menu-toggle {
        display: block !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.5);
        color: white;
        padding: 8px 12px;
        border-radius: 5px;
        cursor: pointer;
    }

    /* Header */
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        text-align: left;
    }

    .header .date-display {
        text-align: left;
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 0.5rem;
    }

    /* Grids */
    .stats-grid,
    .quick-actions-grid,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* ===== MOBILE-FRIENDLY TABLES ===== */
    /* Hide traditional table view on mobile */
    .glass-table,
    .data-table {
        display: none !important;
    }

    /* Show mobile card view instead */
    .mobile-table-cards {
        display: block !important;
    }

    /* Mobile Table Card Styles */
    .mobile-card {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .mobile-card-title {
        font-weight: 600;
        font-size: 1.1rem;
        color: var(--text-primary);
    }

    .mobile-card-badge {
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 500;
    }

    .mobile-card-body {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        padding: 0.4rem 0;
    }

    .mobile-card-label {
        font-weight: 500;
        color: var(--text-secondary);
        font-size: 0.9rem;
    }

    .mobile-card-value {
        color: var(--text-primary);
        font-weight: 600;
        text-align: right;
    }

    .mobile-card-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--glass-border);
        flex-wrap: wrap;
    }

    .mobile-card-actions .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* Badge Colors */
    .badge-success {
        background: rgba(34, 197, 94, 0.2);
        color: #22c55e;
        border: 1px solid rgba(34, 197, 94, 0.3);
    }

    .badge-warning {
        background: rgba(251, 191, 36, 0.2);
        color: #fbbf24;
        border: 1px solid rgba(251, 191, 36, 0.3);
    }

    .badge-danger {
        background: rgba(239, 68, 68, 0.2);
        color: #ef4444;
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

    .badge-info {
        background: rgba(59, 130, 246, 0.2);
        color: #3b82f6;
        border: 1px solid rgba(59, 130, 246, 0.3);
    }

    .badge-secondary {
        background: rgba(156, 163, 175, 0.2);
        color: #9ca3af;
        border: 1px solid rgba(156, 163, 175, 0.3);
    }

    /* Forms */
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Reset button width for card actions */
    .mobile-card-actions .btn {
        width: auto;
    }

    /* Modals */
    .modal-content {
        width: 95% !important;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Login/Signup Pages */
    .glass-container {
        width: 90% !important;
        padding: 1.5rem !important;
        margin: 2rem auto;
    }

    /* Page Actions (buttons at top) */
    .page-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .page-actions .btn {
        width: 100%;
    }

    /* Search and Filter */
    .filter-group,
    .search-group {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .filter-group > *,
    .search-group > * {
        width: 100% !important;
    }
}

/* Tablet Devices (768px - 992px) */
@media (min-width: 768px) and (max-width: 992px) {
    .sidebar {
        left: -250px;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Desktop - Show tables, hide mobile cards */
@media (min-width: 769px) {
    .mobile-table-cards {
        display: none !important;
    }
}