/* ==========================================
   PFE Manager - Styles Responsive Mobile
   ========================================== */

/* Mobile Header */
.d-md-none.mobile-header {
    display: none;
}

@media (max-width: 767.98px) {
    .d-md-none.mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: #343a40;
        z-index: 1050;
        padding: 0 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    .mobile-header-btn {
        background: none;
        border: none;
        color: #fff;
        padding: 8px;
        cursor: pointer;
        line-height: 1;
    }
    .mobile-header-title {
        color: #fff;
        font-weight: 600;
        font-size: 1.1rem;
    }
    .mobile-header-spacer {
        width: 40px;
    }
    body {
        padding-top: 56px;
    }

    /* Sidebar overlay on mobile */
    .sidebar {
        position: fixed !important;
        top: 56px !important;
        left: -280px !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
        height: calc(100vh - 56px) !important;
        z-index: 1040 !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        min-height: auto !important;
    }
    .sidebar:hover {
        max-width: 280px !important;
    }
    .sidebar.open {
        left: 0 !important;
    }

    /* Sidebar backdrop */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1039;
    }
    .sidebar-backdrop.show {
        display: block;
    }

    /* Main content full width on mobile */
    .sidebar + .col-md-10,
    .sidebar + [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Disable sidebar hover transition on mobile */
    div.sidebar {
        transition: left 0.3s ease !important;
    }
    div.sidebar:not(:hover) {
        transition-delay: 0s !important;
    }
    div.sidebar:hover {
        max-width: 280px !important;
        transition-delay: 0s !important;
    }
}

/* ==========================================
   Table Improvements
   ========================================== */
@media (max-width: 767.98px) {
    .table {
        font-size: 0.875rem;
    }
    .table th,
    .table td {
        padding: 0.4rem 0.5rem;
        white-space: nowrap;
    }

    /* Card adjustments */
    .card-body {
        padding: 1rem;
    }
    .card-header {
        font-size: 0.95rem;
    }
    h2 {
        font-size: 1.5rem;
    }

    /* Form improvements */
    .form-control,
    .form-select {
        font-size: 16px;
    }
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    .stats-card .card-body {
        padding: 0.75rem;
    }
    .stats-card h2 {
        font-size: 1.5rem;
    }
    .stats-card h5 {
        font-size: 0.85rem;
    }

    /* Badges */
    .badge {
        font-size: 0.7rem;
    }

    /* Alert adjustments */
    .alert {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-body {
        padding: 1rem;
    }
}

/* ==========================================
   Login Page Mobile
   ========================================== */
@media (max-width: 767.98px) {
    .login-container {
        padding: 1rem;
    }
    .login-card {
        margin: 1rem 0;
        border-radius: 10px;
    }
}

/* ==========================================
   Landing Page Mobile Improvements
   ========================================== */
@media (max-width: 767.98px) {
    .hero {
        padding: 80px 0 40px !important;
    }
    .hero h1 {
        font-size: 1.8rem !important;
    }
    .hero p {
        font-size: 0.95rem !important;
    }
    .hero .btn-lg {
        padding: 10px 25px;
        font-size: 1rem;
    }
    .features {
        padding: 40px 0;
    }
    .feature-card {
        padding: 20px;
    }
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    .feature-icon i {
        font-size: 1.5rem;
    }
    .stats {
        padding: 40px 0;
    }
    .stat-number {
        font-size: 2rem;
    }
    .cta {
        padding: 50px 0;
    }
    .cta h2 {
        font-size: 1.8rem;
    }
    .footer {
        padding: 30px 0 15px;
    }
}

/* ==========================================
   Print improvements for mobile
   ========================================== */
@media print {
    .mobile-header,
    .sidebar-backdrop {
        display: none !important;
    }
    body {
        padding-top: 0 !important;
    }
}
