/* Responsive Layout Styles */

/* Sidebar base styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, #1e3a5f 0%, #0d1f33 100%);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.main-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Mobile menu toggle button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: #1e3a5f;
    border: none;
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.menu-toggle:hover {
    background: #2a4a6f;
}

.menu-toggle i {
    font-size: 1.25rem;
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

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

/* Topbar adjustments */
.topbar {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile styles */
@media (max-width: 991.98px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

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

    .topbar {
        padding-left: 60px;
    }

    .topbar h4 {
        font-size: 1.1rem;
    }
}

/* Tablet styles */
@media (max-width: 767.98px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding-left: 60px;
    }

    .topbar .d-flex {
        width: 100%;
        justify-content: flex-start;
    }

    /* Cards responsive */
    .card {
        margin-bottom: 1rem;
    }

    /* Tables responsive */
    .table-responsive {
        font-size: 0.875rem;
    }

    /* Form controls */
    .form-control-lg {
        font-size: 1rem;
    }

    /* Buttons */
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Small mobile styles */
@media (max-width: 575.98px) {
    .topbar {
        padding: 0.75rem 1rem;
        padding-left: 55px;
    }

    .topbar h4 {
        font-size: 1rem;
    }

    .main-content {
        padding: 0.5rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.85rem;
    }

    /* Cards */
    .card-body {
        padding: 1rem;
    }

    /* Stats cards */
    .card h2 {
        font-size: 1.5rem;
    }

    /* User avatar in sidebar */
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination .page-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.85rem;
    }

    /* Photo gallery */
    .foto-thumbnail {
        width: 80px;
        height: 80px;
    }

    /* Filters */
    .filters-row .col-md-2,
    .filters-row .col-md-3 {
        margin-bottom: 0.5rem;
    }
}

/* Captura detail responsive */
@media (max-width: 991.98px) {
    .captura-sidebar {
        margin-top: 1rem;
    }

    .foto-carousel {
        height: 300px;
    }
}

/* Dashboard cards responsive */
@media (max-width: 767.98px) {
    .dashboard-stats .col-md-3 {
        margin-bottom: 1rem;
    }

    .dashboard-chart {
        height: 250px !important;
    }
}

/* Loading overlay responsive */
@media (max-width: 575.98px) {
    .loading-content {
        padding: 1rem;
        max-width: 90%;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
    }

    .loading-steps {
        font-size: 0.85rem;
    }
}

/* Historial table responsive */
@media (max-width: 767.98px) {
    .historial-table th,
    .historial-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .historial-table .badge {
        font-size: 0.7rem;
    }

    /* Hide less important columns on mobile */
    .historial-table .hide-mobile {
        display: none;
    }
}

/* Nueva captura form responsive */
@media (max-width: 575.98px) {
    .nueva-captura-form .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nueva-captura-form .btn {
        width: 100%;
    }
}

/* Sidebar nav items touch-friendly */
@media (max-width: 991.98px) {
    .sidebar .nav-link {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .sidebar .nav-link i {
        font-size: 1.1rem;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .menu-toggle,
    .topbar,
    .sidebar-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }
}
