/**
 * ລະບົບຈັດເກັບໃບບິນ - Modern Mobile UI
 * Main Stylesheet 2.0
 */

/* ນຳເຂົ້າຟອນ Lao */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@300;400;500;600;700&display=swap');

/* ຕັ້ງຄ່າ Variable ໃໝ່ - Elegant Palette */
:root {
    /* Primary Colors */
    --primary-color: #4F46E5;
    /* Indigo 600 */
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --accent-color: #F472B6;
    /* Pink 400 */

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --surface-gradient: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);

    /* Functional Colors */
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;

    /* Neutrals */
    --dark-text: #1E293B;
    --body-text: #475569;
    --light-text: #94A3B8;
    --background: #F1F5F9;
    --white: #FFFFFF;

    /* UI Elements */
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 12px;
    --box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
    --bottom-nav-height: 80px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans Lao', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--body-text);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    /* Space for bottom nav */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark-text);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Bar (Desktop & Top Mobile) */
.navbar {
    background: var(--primary-gradient);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.15);
    color: #ffffff !important;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    margin-right: 20px;
}

/* Desktop Navigation Links */
.navbar-link {
    color: #ffffff !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

.navbar-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    /* Red hover for logout */
    border-color: rgba(239, 68, 68, 0.9);
}

/* Mobile Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: var(--bottom-nav-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.02);
    z-index: 1000;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--light-text);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 12px;
    min-width: 60px;
    flex: 1;
    max-width: 100px;
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.nav-label {
    font-size: 0.7rem;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
}

/* Center FAB (Floating Action Button) styling for 'Add' */
.nav-item.center-fab {
    background: var(--primary-gradient);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-top: -30px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--background);
    flex: 0 0 56px;
}

.nav-item.center-fab .nav-icon {
    margin-bottom: 0;
    font-size: 1.8rem;
    color: white;
}

.nav-item.center-fab .nav-label {
    display: none;
}

/* Card Styling */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-hover);
}

.card-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns on mobile */
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-md);
    padding: 20px;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
}

.stat-card h3 {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-text);
    line-height: 1;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-secondary {
    background: #E2E8F0;
    color: var(--dark-text);
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--dark-text);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    background: #F8FAFC;
    transition: all 0.3s;
    color: var(--dark-text);
}

.form-control:focus {
    background: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

input[type="date"],
input[type="datetime-local"] {
    appearance: none;
    -webkit-appearance: none;
    min-height: 58px;
    /* Touch target size */
}

/* Tables */
.table-responsive {
    border-radius: var(--border-radius-md);
    box-shadow: none;
    border: 1px solid #E2E8F0;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #F8FAFC;
    color: var(--body-text);
    font-weight: 600;
    padding: 16px;
    font-size: 0.9rem;
    border-bottom: 2px solid #E2E8F0;
}

td {
    padding: 16px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

/* Image Grid */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.image-preview {
    border-radius: 16px;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Login Page refinement */
.login-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background Decorations */
.login-decor-circle-1,
.login-decor-circle-2 {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    z-index: 0;
    animation: float 6s ease-in-out infinite;
}

.login-decor-circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.login-decor-circle-2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -80px;
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    border-radius: 28px;
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.35);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(79, 70, 229, 0.2));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.login-header h1 {
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--light-text);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Alert Messages */
.alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

/* Floating Labels */
.form-group.floating-label {
    position: relative;
    margin-bottom: 28px;
}

.form-group.floating-label .form-control {
    height: 58px;
    padding: 22px 18px 8px;
    border: 2px solid #E2E8F0;
    background: #F8FAFC;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group.floating-label .form-control:hover {
    border-color: #CBD5E1;
    background: white;
}

.form-group.floating-label label {
    position: absolute;
    top: 18px;
    left: 18px;
    color: #94A3B8;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-weight: 500;
}

.form-group.floating-label .form-control:focus,
.form-group.floating-label .form-control:not(:placeholder-shown) {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.form-group.floating-label .form-control:focus~label,
.form-group.floating-label .form-control:not(:placeholder-shown)~label {
    top: 8px;
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 28px;
    padding: 4px 0;
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #CBD5E1;
    border-radius: 7px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.custom-checkbox:hover .checkmark {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.custom-checkbox input:checked~.checkmark {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.label-text {
    font-size: 0.95rem;
    color: var(--body-text);
    font-weight: 500;
}

/* Button Glow */
.btn-glow {
    background: var(--primary-gradient);
    box-shadow: 0 4px 16px 0 rgba(79, 70, 229, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    padding: 16px 32px;
}

.btn-glow:hover {
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
    transform: translateY(-2px);
}

.btn-glow:active {
    transform: translateY(0px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PWA Install Button */
.btn-secondary {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    color: var(--body-text);
    border: 2px solid #CBD5E1;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
    border-color: #94A3B8;
    transform: translateY(-1px);
}

/* Grid System for Dashboard */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-4,
.col-6,
.col-12 {
    padding: 0 10px;
    margin-bottom: 20px;
}

.col-4 {
    width: 33.333%;
}

.col-12 {
    width: 100%;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.d-block {
    display: block;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {

    /* ===== Container & Layout ===== */
    .container {
        padding: 16px;
        max-width: 100%;
    }

    body {
        padding-bottom: calc(var(--bottom-nav-height) + 10px);
    }

    /* ===== Login Page ===== */
    .login-container {
        padding: 0;
        align-items: flex-start;
    }

    .login-card {
        border-radius: 0 0 28px 28px;
        min-height: auto;
        padding: 32px 20px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    .login-card:hover {
        transform: none;
    }

    .login-decor-circle-1 {
        width: 180px;
        height: 180px;
        top: -50px;
        right: -50px;
    }

    .login-decor-circle-2 {
        width: 130px;
        height: 130px;
        bottom: -40px;
        left: -40px;
    }

    .logo-icon {
        font-size: 3rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    /* ===== Navigation Bar - Minimalist & Clean ===== */
    .navbar {
        padding: 12px 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .navbar-content {
        justify-content: center;
    }

    .navbar-brand {
        font-size: 1.1rem;
        font-weight: 600;
    }

    /* ===== Mobile Bottom Navigation ===== */
    .mobile-nav,
    .bottom-nav {
        padding: 8px 0;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
        border-radius: 20px 20px 0 0;
        height: 70px;
    }

    .mobile-nav a,
    .bottom-nav .nav-item {
        padding: 6px 4px;
        font-size: 0.65rem;
        border-radius: 12px;
        transition: all 0.2s ease;
    }

    .nav-icon {
        font-size: 1.3rem;
        margin-bottom: 2px;
    }

    .nav-label {
        font-size: 0.65rem;
    }

    .mobile-nav a:hover,
    .mobile-nav a.active,
    .bottom-nav .nav-item:hover,
    .bottom-nav .nav-item.active {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
        transform: translateY(-2px);
    }

    /* ===== Buttons - Mobile Optimized ===== */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        border-radius: 12px;
        font-weight: 500;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: all 0.2s ease;
        width: 100%;
        display: block;
        margin-bottom: 10px;
        text-align: center;
    }

    .btn:active {
        transform: scale(0.98);
    }

    .btn-sm {
        padding: 8px 14px;
        font-size: 0.85rem;
        border-radius: 10px;
        width: auto;
        display: inline-block;
        margin: 4px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 1.05rem;
        border-radius: 14px;
    }

    .btn-block {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    /* Button Groups - Stack Vertically */
    .btn-group,
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    /* Inline buttons in tables */
    td .btn,
    td .btn-sm {
        width: auto;
        min-width: 70px;
        margin: 2px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* ===== Cards - Elegant Spacing ===== */
    .card {
        margin: 12px 0;
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        padding: 0;
    }

    .card-header {
        padding: 16px;
        font-size: 1.05rem;
        border-radius: 16px 16px 0 0;
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
    }

    .card-body {
        padding: 16px;
    }

    /* ===== Dashboard Mobile Fixes ===== */
    .col-4,
    .col-6,
    .col-3 {
        width: 100%;
        padding: 0;
        margin-bottom: 12px;
    }

    .row {
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .stat-card {
        padding: 18px;
        border-radius: 14px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        margin-bottom: 12px;
    }

    .stat-card h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .stat-value {
        font-size: 2rem;
        font-weight: 700;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0;
    }

    /* ===== Forms - Better Touch Targets ===== */
    .form-group {
        margin-bottom: 18px;
    }

    .form-label {
        font-size: 0.95rem;
        margin-bottom: 8px;
        font-weight: 600;
        color: var(--dark-text);
    }

    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="number"],
    select,
    textarea {
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 12px;
        border: 2px solid #e2e8f0;
        width: 100%;
        background: white;
        transition: all 0.2s ease;
    }

    .form-control:focus,
    input:focus,
    select:focus,
    textarea:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        outline: none;
    }

    /* ===== Tables - Card-Based Mobile View ===== */
    .table-responsive {
        border-radius: 0;
        overflow: visible;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide table header on mobile */
    table thead {
        display: none;
    }

    /* Make table body block-level */
    table,
    table tbody {
        display: block;
        width: 100%;
    }

    /* Convert each row to a card */
    table tbody tr {
        display: block;
        background: white;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        border: 1px solid #e2e8f0;
    }

    table tbody tr:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
        transition: all 0.2s ease;
    }

    /* Display table cells as flex rows */
    table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.9rem;
        text-align: right;
    }

    table tbody td:last-child {
        border-bottom: none;
        padding-top: 12px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Add labels before data using data-label attribute */
    table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--dark-text);
        margin-right: 10px;
        text-align: left;
        flex: 0 0 100px;
    }

    table tbody td:last-child:before {
        content: "";
        display: none;
    }

    /* ===== Typography ===== */
    h1 {
        margin-top: 12px;
        margin-bottom: 20px;
        font-size: 1.5rem;
        font-weight: 700;
        text-align: center;
    }

    h2 {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }

    h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    /* ===== Image Previews ===== */
    .image-preview-container {
        gap: 10px;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .image-preview {
        border-radius: 12px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        aspect-ratio: 1;
    }

    .image-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .image-preview-remove {
        width: 32px;
        height: 32px;
        font-size: 20px;
        border-radius: 50%;
        top: 8px;
        right: 8px;
    }

    /* ===== Alerts ===== */
    .alert {
        padding: 14px 16px;
        font-size: 0.95rem;
        border-radius: 12px;
        margin: 12px 0;
    }

    /* ===== Spacing Utilities ===== */
    .mb-3 {
        margin-bottom: 16px;
    }

    .mt-3 {
        margin-top: 16px;
    }

    .text-center {
        text-align: center;
    }

    .text-right {
        text-align: center;
    }

    /* ===== Lightbox Mobile ===== */
    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 32px;
    }

    .lightbox-content {
        max-width: 96%;
        max-height: 85vh;
        border-radius: 12px;
        transition: opacity 0.15s ease;
    }

    .lightbox-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        font-size: 24px;
        z-index: 10001;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .lightbox-nav:hover {
        background: rgba(255, 255, 255, 0.4);
    }

    .lightbox-nav.prev {
        left: 20px;
    }

    .lightbox-nav.next {
        right: 20px;
    }

    .lightbox-counter {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        color: white;
        background: rgba(0, 0, 0, 0.5);
        padding: 6px 16px;
        border-radius: 20px;
        font-size: 0.9rem;
    }

    /* Mobile adjustments for navigation */
    @media (max-width: 768px) {
        .lightbox-nav {
            width: 40px;
            height: 40px;
            font-size: 20px;
            background: rgba(0, 0, 0, 0.3);
        }

        .lightbox-nav.prev {
            left: 10px;
        }

        .lightbox-nav.next {
            right: 10px;
        }
    }

    /* ===== Filter Forms ===== */
    .filter-form .row {
        flex-direction: column;
    }

    .filter-form .col-3,
    .filter-form .col-4 {
        width: 100%;
        margin-bottom: 12px;
    }

    /* ===== Action Button Rows ===== */
    .action-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 16px 0;
    }

    /* ===== User Info Badge ===== */
    .user-info {
        display: none;
    }

    .badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    /* ===== Responsive Images ===== */
    img {
        max-width: 100%;
        height: auto;
    }

    /* ===== Loading Spinner ===== */
    #loader {
        backdrop-filter: blur(5px);
    }

    .spinner {
        width: 50px;
        height: 50px;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.3s;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}