/* ============================================================
   Bosren Trips - Main Stylesheet
   ============================================================ */

:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --secondary: #6c757d;
    --secondary-green: #4CAF50;
    --light-green: #E8F5E9;
    --accent-gold: #FFB300;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --dark: #212529;

    --bs-primary: #2E7D32;
    --bs-primary-rgb: 46, 125, 50;
    --bs-link-color: #2E7D32;
    --bs-link-hover-color: #1B5E20;
    --bs-nav-link-color: #2E7D32;
    --bs-nav-link-hover-color: #1B5E20;

    --hero-transition: 800ms cubic-bezier(0.65, 0, 0.35, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

[data-bs-theme="dark"] body {
    background-color: #1a1d21;
    color: #e1e1e1;
}

[data-bs-theme="dark"] .card {
    background-color: #2c3034;
    border-color: #373b3e;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
    background-color: #2c3034;
    border-color: #373b3e;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #1a1d21 !important;
}

[data-bs-theme="dark"] .table {
    color: #e1e1e1;
}

[data-bs-theme="dark"] .text-muted {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #2c3034;
    border-color: #373b3e;
    color: #e1e1e1;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #2c3034;
    border-color: #373b3e;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1a1d21;
    border-color: #373b3e;
    color: #e1e1e1;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #1a1d21;
    color: #e1e1e1;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* ============================================================
   Hero Section — Premium Cinematic Slider
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    height: 80vh;
    height: 80dvh;
    min-height: 500px;
    overflow: hidden;
    background: #111;
}

.hero-slider {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: -10%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transform: scale(1);
    transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide.active .hero-bg {
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0,0,0,0.75) 0%,
        rgba(0,0,0,0.4) 40%,
        rgba(0,0,0,0.2) 70%,
        rgba(0,0,0,0.6) 100%
    );
    z-index: 2;
}

.hero-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    animation: heroParticleFloat linear infinite;
}

@keyframes heroParticleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.hero-content {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 120px 20px 100px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 24px;
    animation: heroFadeUp 0.8s ease forwards;
    opacity: 0;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    animation: heroFadeUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.7);
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.6;
    animation: heroFadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: heroFadeUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
    min-height: 54px;
}

.hero-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: #fff;
    box-shadow: 0 4px 20px rgba(46,125,50,0.4);
}

.hero-btn-primary:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 30px rgba(46,125,50,0.5);
    color: #fff;
}

.hero-btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.hero-btn-secondary {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    color: #fff;
}

.hero-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: heroRipple 0.6s ease-out;
    pointer-events: none;
}

@keyframes heroRipple {
    to { transform: scale(4); opacity: 0; }
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 48px;
    animation: heroFadeUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.hero-stat {
    text-align: center;
    padding: 0 32px;
}

.hero-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.hero-stat-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.15);
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Shapes */
.hero-floating-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #2E7D32, transparent);
    top: -200px;
    right: -200px;
    animation: heroShapeFloat 20s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #4CAF50, transparent);
    bottom: -100px;
    left: -100px;
    animation: heroShapeFloat 25s ease-in-out infinite reverse;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #FFB300, transparent);
    top: 50%;
    left: 50%;
    animation: heroShapeFloat 30s ease-in-out infinite 5s;
}

@keyframes heroShapeFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.9); }
    75% { transform: translate(40px, 20px) scale(1.05); }
}

/* Navigation Arrows */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    padding: 0;
}

.hero:hover .hero-nav {
    opacity: 1;
}

.hero-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.hero-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.hero-nav-prev { left: 24px; }
.hero-nav-next { right: 24px; }

/* Pagination Dots */
.hero-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(255,255,255,0.4);
}

.hero-dot:hover {
    background: rgba(255,255,255,0.6);
}

/* Progress Bar */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.1);
    z-index: 10;
}

.hero-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2E7D32, #4CAF50);
    width: 0%;
    transition: width 100ms linear;
}

/* Search Toggle & Overlay */
.hero-search-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-search-toggle:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.hero-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 20px;
    transform: translateY(-120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-search-overlay.open {
    transform: translateY(0);
}

.hero-search-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.search-group {
    flex: 1;
    position: relative;
}

.search-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: 12px;
    border: none;
    background: rgba(255,255,255,0.95);
    font-size: 1rem;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(46,125,50,0.3);
}

.search-submit {
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(46,125,50,0.4);
}

/* Parallax scroll effect */
.hero.parallax .hero-slide.active .hero-bg {
    transform: scale(1.1) translateY(var(--parallax-offset, 0));
}

/* ============================================================
   Hero Responsive
   ============================================================ */
@media (max-width: 768px) {
    .hero {
        height: 85vh;
        height: 85dvh;
        min-height: 480px;
    }

    .hero-content {
        padding: 100px 16px 80px;
    }

    .hero-title {
        font-size: clamp(1.6rem, 7vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        min-height: 50px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
        margin-top: 32px;
    }

    .hero-stat-divider {
        width: 40px;
        height: 1px;
    }

    .hero-stat {
        padding: 0;
    }

    .hero-nav {
        display: none;
    }

    .hero-dots {
        bottom: 24px;
    }

    .hero-dot {
        width: 8px;
        height: 8px;
    }

    .hero-search-toggle {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .hero-search-form {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .hero {
        min-height: 400px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 4px 14px;
    }

    .hero-stat-number {
        font-size: 1.4rem;
    }

    .hero-stat-label {
        font-size: 0.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-slide.active .hero-bg {
        transform: none !important;
    }

    .hero-title,
    .hero-subtitle,
    .hero-actions,
    .hero-stats,
    .hero-badge {
        animation: none !important;
        opacity: 1 !important;
    }

    .hero-particles {
        display: none;
    }

    .hero.parallax .hero-slide.active .hero-bg {
        transform: none !important;
    }
}

/* Touch devices - show arrows always on tablet */
@media (hover: none) {
    .hero-nav {
        opacity: 0.6;
    }

    .hero-nav-prev { left: 12px; }
    .hero-nav-next { right: 12px; }

    .hero-btn:hover {
        transform: none;
    }
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.category-card:hover i {
    transform: scale(1.2);
}

.category-card i {
    transition: transform 0.3s ease;
}

/* Trip Cards */
.trip-card {
    transition: all 0.3s ease;
}

.trip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.trip-card .card-img-top {
    transition: transform 0.3s ease;
}

.trip-card:hover .card-img-top {
    transform: scale(1.05);
}

.trip-card .position-relative {
    overflow: hidden;
}

/* Destination Cards */
.destination-card {
    transition: all 0.3s ease;
}

.destination-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}

/* Step Icons */
.step-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    cursor: pointer;
    font-size: 24px;
    color: #ddd;
    transition: color 0.2s;
}

.rating-stars input:checked ~ label,
.rating-stars label:hover,
.rating-stars label:hover ~ label {
    color: #ffc107;
}

/* Sticky Sidebar */
.sticky-top {
    position: -webkit-sticky;
    position: sticky;
}

/* Avatar Circle */
.avatar-circle {
    font-weight: bold;
}

/* Table Styles */
.table > thead > tr > th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

[data-bs-theme="dark"] .table > thead > tr > th {
    border-bottom-color: #373b3e;
}

/* Card Styles */
.card {
    border-radius: 10px;
}

.card-header {
    border-radius: 10px 10px 0 0;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-lg {
    border-radius: 10px;
}

.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
    --bs-btn-color: #2E7D32;
    --bs-btn-border-color: #2E7D32;
    --bs-btn-hover-bg: #2E7D32;
    --bs-btn-hover-border-color: #2E7D32;
    --bs-btn-active-bg: #1B5E20;
    --bs-btn-active-border-color: #1B5E20;
}

.btn-warning {
    color: #1a1a1a;
}

.btn-link {
    color: #2E7D32;
}

.btn-link:hover {
    color: #1B5E20;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.6rem 1rem;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

a {
    transition: color 0.2s ease;
}

a.text-primary:hover,
a.text-primary:focus {
    color: #1B5E20 !important;
}

.text-primary {
    color: #2E7D32 !important;
}

.bg-primary {
    background-color: #2E7D32 !important;
}

.border-primary {
    border-color: #2E7D32 !important;
}

.list-group-item-primary {
    background-color: #E8F5E9 !important;
    border-color: #2E7D32 !important;
    color: #1B5E20 !important;
}

.accordion-button:not(.collapsed) {
    background-color: #E8F5E9;
    color: #1B5E20;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.125);
}

.accordion-button:focus {
    border-color: #2E7D32;
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.25);
}

.page-link {
    color: #2E7D32;
}

.page-link:hover {
    color: #1B5E20;
}

.page-item.active .page-link {
    background-color: #2E7D32;
    border-color: #2E7D32;
}

.progress-bar {
    background-color: #2E7D32;
}

.spinner-border.text-primary {
    color: #2E7D32 !important;
}

.form-check-input:checked {
    background-color: #2E7D32;
    border-color: #2E7D32;
}

.form-check-input:focus {
    border-color: #2E7D32;
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.25);
}

.form-select:focus {
    border-color: #2E7D32;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Sidebar Navigation */
.nav-link {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 2px;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: rgba(46, 125, 50, 0.1);
}

.nav-link.active {
    background-color: var(--primary);
    color: white !important;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 3px solid #2E7D32;
}

footer,
footer .text-muted,
footer small,
footer p,
footer ul,
footer li,
footer a,
footer h5,
footer h6 {
    color: #4CAF50 !important;
}

footer a:hover {
    color: white !important;
}

/* Print Styles for Tickets */
@media print {
    .navbar, footer, .btn, .breadcrumb, .no-print {
        display: none !important;
    }
    .card {
        box-shadow: none !important;
        border: 2px solid #000 !important;
    }
    body {
        background: white !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Toast / SweetAlert Customizations */
.swal2-popup {
    border-radius: 12px !important;
}

/* Wishlist Button */
.wishlist-btn .bi-heart-fill {
    color: #dc3545;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
}

/* Select2 Customization */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
    border-radius: 8px;
}

/* Flatpickr Customization */
.flatpickr-input {
    background-color: #fff;
}

[data-bs-theme="dark"] .flatpickr-calendar {
    background-color: #2c3034;
    border-color: #373b3e;
}

[data-bs-theme="dark"] .flatpickr-months .flatpickr-month,
[data-bs-theme="dark"] span.flatpickr-weekday {
    background-color: #2c3034;
    color: #e1e1e1;
}

[data-bs-theme="dark"] .flatpickr-day {
    color: #e1e1e1;
}

[data-bs-theme="dark"] .flatpickr-day.today {
    border-color: var(--primary);
}

[data-bs-theme="dark"] .flatpickr-day.selected {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ============================================================
   PWA Install Banner
   ============================================================ */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1050;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 3px solid var(--primary);
}

.pwa-install-banner.show {
    transform: translateY(0);
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    max-width: 600px;
    margin: 0 auto;
}

.pwa-install-icon {
    flex-shrink: 0;
}

.pwa-install-text {
    flex: 1;
    min-width: 0;
}

.pwa-install-text strong {
    display: block;
    font-size: 0.9rem;
    color: #333;
}

.pwa-install-text span {
    display: block;
    font-size: 0.8rem;
    color: #666;
}

.pwa-install-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

.pwa-update-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    z-index: 1060;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.pwa-update-toast.show {
    transform: translateX(-50%) translateY(0);
}

.pwa-update-content {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

html.pwa-mode .navbar {
    padding-top: env(safe-area-inset-top, 0);
}

html.pwa-mode {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (min-width: 768px) {
    .pwa-install-banner {
        bottom: 20px;
        left: 20px;
        right: auto;
        max-width: 400px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    }

    .pwa-install-content {
        padding: 16px 20px;
    }
}

/* ============================================================
   File Uploader Component
   ============================================================ */
.file-uploader-container {
    width: 100%;
}

.upload-dropzone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
}

.upload-dropzone:hover,
.upload-dropzone-active {
    border-color: var(--primary);
    background: #E8F5E9;
}

.upload-dropzone-icon {
    font-size: 48px;
    color: var(--primary);
    display: block;
    margin-bottom: 12px;
}

.upload-dropzone-text {
    color: #555;
    font-size: 1rem;
    margin-bottom: 4px;
}

.upload-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.upload-dropzone-hint {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.upload-input {
    display: none;
}

.upload-preview-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.upload-preview-item.upload-preview-exists {
    border-left: 3px solid var(--primary);
}

.upload-preview-thumb {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
}

.upload-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-file-icon {
    font-size: 24px;
    color: var(--primary);
}

.upload-preview-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.upload-preview-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-preview-size {
    font-size: 0.8rem;
    color: #999;
}

.upload-success-badge {
    color: #198754;
    font-size: 1.1rem;
}

.upload-preview-remove {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.upload-preview-remove:hover {
    color: #dc3545;
}

.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #eee;
}

.upload-progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

[data-bs-theme="dark"] .upload-dropzone {
    border-color: #444;
    background: #2c3034;
}

[data-bs-theme="dark"] .upload-dropzone:hover,
[data-bs-theme="dark"] .upload-dropzone-active {
    border-color: var(--primary);
    background: #1a3a1e;
}

[data-bs-theme="dark"] .upload-dropzone-text {
    color: #ccc;
}

[data-bs-theme="dark"] .upload-preview-item {
    background: #2c3034;
    border-color: #373b3e;
}

[data-bs-theme="dark"] .upload-preview-name {
    color: #e1e1e1;
}

[data-bs-theme="dark"] .pwa-install-banner {
    background: #2c3034;
    border-top-color: var(--primary);
}

[data-bs-theme="dark"] .pwa-install-text strong {
    color: #e1e1e1;
}

[data-bs-theme="dark"] .pwa-install-text span {
    color: #9ca3af;
}

/* ============================================================
   File Manager
   ============================================================ */
#filesTable .file-name {
    font-weight: 500;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

#filesTable .btn-group .btn {
    padding: 0.25rem 0.4rem;
}

/* ============================================================
   Touch-friendly minimum sizes
   ============================================================ */
.navbar-toggler,
.btn,
.dropdown-item,
.nav-link {
    min-height: 44px;
}

.btn-sm {
    min-height: auto;
}

@media (max-width: 576px) {
    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-group {
        width: 100%;
    }

    .btn-group .btn {
        width: auto;
        flex: 1;
    }

    .table-responsive {
        font-size: 0.85rem;
    }

    .upload-dropzone {
        padding: 24px 16px;
    }

    .upload-dropzone-icon {
        font-size: 36px;
    }

    .upload-dropzone-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    #filesTable .file-name {
        max-width: 120px;
    }
}
