:root {
    --navy: #1E3A5F;
    --navy-dark: #0d1b2a;
    --navy-light: #2a5082;
    --gold: #D4AF37;
    --gold-hover: #e8c547;
    --gold-light: rgba(212, 175, 55, 0.15);
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-600: #6c757d;
    --text: #2c3e50;
    --success: #28a745;
    --danger: #dc3545;
    --shadow: 0 4px 20px rgba(30, 58, 95, 0.12);
    --radius: 12px;
    --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--gray-100);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

a { color: var(--navy-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

/* Navbar */
.lb-navbar {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    padding: 0.75rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.lb-navbar .navbar-brand {
    padding: 0;
}

.lb-navbar .lb-brand-logo {
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.lb-navbar .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all var(--transition);
}

.lb-navbar .nav-link:hover, .lb-navbar .nav-link.active {
    background: var(--gold-light);
    color: var(--gold) !important;
}

.lb-search {
    border: 2px solid var(--gold-light);
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 0.4rem 1rem;
    width: 220px;
}

.lb-search::placeholder { color: rgba(255,255,255,0.6); }
.lb-search:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,0.15); }

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #b8962e);
    color: var(--navy-dark);
    border: none;
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(212,175,55,0.3);
}

.btn-gold:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 28px rgba(212,175,55,0.5);
    color: var(--navy-dark);
}

.btn-gold:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.12s;
}

.btn-navy {
    background: var(--navy);
    color: white;
    border: 2px solid var(--gold);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all var(--transition);
}

.btn-navy:hover {
    background: var(--navy-light);
    color: var(--gold);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn-navy:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.12s;
}

/* Hero */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes heroBgKenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.08) translate(-1.5%, -1%);
    }
}

@keyframes cardFloatIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sectionReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section {
    position: relative;
    min-height: 520px;
    color: white;
    padding: 4rem 0 5rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: transparent;
}

.hero-bg {
    position: absolute;
    inset: -8%;
    background: url('../img/bikelogo.jpeg') center center / cover no-repeat;
    will-change: transform;
    animation: heroBgKenBurns 22s var(--ease-smooth) infinite alternate;
    z-index: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(13, 27, 42, 0.62) 0%, rgba(30, 58, 95, 0.38) 42%, rgba(30, 58, 95, 0.22) 100%),
        radial-gradient(circle at 78% 35%, rgba(212, 175, 55, 0.14) 0%, transparent 50%),
        radial-gradient(circle at 15% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 45%);
    pointer-events: none;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.04) 20%,
        transparent 45%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-content > * {
    opacity: 0;
    animation: heroFadeUp 1s var(--ease-out-soft) forwards;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75), 0 0 40px rgba(0, 0, 0, 0.35);
    animation-delay: 0.1s;
}

.hero-title .hero-highlight {
    color: white;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0;
    margin-bottom: 2rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 0, 0, 0.35);
    animation-delay: 0.28s;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    animation-delay: 0.46s;
}

.hero-actions .btn {
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth), background 0.35s ease, color 0.35s ease;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    color: white;
    opacity: 0;
    transition:
        transform 0.45s var(--ease-smooth),
        background 0.45s var(--ease-smooth),
        border-color 0.45s var(--ease-smooth),
        box-shadow 0.45s var(--ease-smooth),
        color 0.35s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: cardFloatIn 0.9s var(--ease-out-soft) forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.62s; }
.feature-card:nth-child(2) { animation-delay: 0.78s; }
.feature-card:nth-child(3) { animation-delay: 0.94s; }

.feature-card:hover {
    background: rgba(212, 175, 55, 0.22);
    transform: translateY(-10px) scale(1.02);
    color: white;
    border-color: var(--gold);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 16px 40px rgba(0, 0, 0, 0.32),
        0 0 24px rgba(212, 175, 55, 0.2);
}

.feature-card i {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
    display: block;
    transition: transform 0.45s var(--ease-smooth);
}

.feature-card:hover i {
    transform: scale(1.12) translateY(-2px);
}

/* Bike Cards */
.bike-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.bike-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition:
        transform 0.45s var(--ease-smooth),
        box-shadow 0.45s var(--ease-smooth),
        border-color 0.35s ease;
    border: 1px solid transparent;
    animation: sectionReveal 0.8s var(--ease-out-soft) backwards;
}

.bike-grid .bike-card:nth-child(1) { animation-delay: 0.05s; }
.bike-grid .bike-card:nth-child(2) { animation-delay: 0.12s; }
.bike-grid .bike-card:nth-child(3) { animation-delay: 0.19s; }
.bike-grid .bike-card:nth-child(4) { animation-delay: 0.26s; }
.bike-grid .bike-card:nth-child(5) { animation-delay: 0.33s; }
.bike-grid .bike-card:nth-child(6) { animation-delay: 0.4s; }
.bike-grid .bike-card:nth-child(n+7) { animation-delay: 0.47s; }

.bike-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 44px rgba(30, 58, 95, 0.2);
    border-color: var(--gold-light);
}

.bike-card-img {
    height: 200px;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-100));
    overflow: hidden;
    position: relative;
}

.bike-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-smooth);
}

.bike-card:hover .bike-card-img img { transform: scale(1.08); }

.bike-card-body { padding: 1.25rem; }

.bike-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
}

.bike-price small { font-size: 0.85rem; color: var(--gray-600); font-weight: 400; }

.bike-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }

.badge-lb {
    background: var(--gold-light);
    color: var(--navy);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Section */
.container.py-5 > .section-title,
.container.py-5 > .section-sub {
    animation: sectionReveal 0.9s var(--ease-out-soft) backwards;
}

.container.py-5 > .section-sub {
    animation-delay: 0.12s;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gold);
    margin-top: 0.5rem;
    border-radius: 2px;
}

.section-sub {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Forms */
.lb-form-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--gold);
}

.form-label { font-weight: 600; color: var(--navy); font-size: 0.9rem; }

.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    transition: border-color var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-light);
}

/* Footer */
.lb-footer {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: rgba(255,255,255,0.85);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.lb-footer h5 { color: var(--gold); font-weight: 700; margin-bottom: 1rem; }

.lb-footer a { color: rgba(255,255,255,0.8); }
.lb-footer a:hover { color: var(--gold); }

.lb-footer-bottom {
    border-top: 1px solid rgba(212,175,55,0.2);
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Admin */
.admin-sidebar {
    background: linear-gradient(180deg, var(--navy-dark), var(--navy));
    min-height: calc(100vh - 60px);
    padding: 1.5rem 0;
}

.admin-sidebar a {
    display: block;
    color: rgba(255,255,255,0.85);
    padding: 0.75rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all var(--transition);
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    background: var(--gold-light);
    color: var(--gold);
    border-left-color: var(--gold);
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gold);
}

.stat-card h3 { font-size: 2rem; font-weight: 800; color: var(--navy); margin: 0; }

.stat-card p { color: var(--gray-600); margin: 0; font-size: 0.9rem; }

.table-lb thead { background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: white; }
.table-lb thead th { border: none; font-weight: 600; padding: 0.85rem; }

.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-width: 100%;
}

.admin-table-wrap .table {
    margin-bottom: 0;
    width: 100%;
    min-width: max-content;
}

.admin-table-wrap .table th,
.admin-table-wrap .table td {
    vertical-align: middle;
}

@media (max-width: 768px) {
    .admin-table-wrap {
        border-radius: var(--radius);
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        border-bottom: 2px solid rgba(212, 175, 55, 0.35);
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs .nav-item {
        flex-shrink: 0;
    }

    .page-header-bar .container {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

.status-chip {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-0 { background: #fff3cd; color: #856404; }
.status-1 { background: #cce5ff; color: #004085; }
.status-2 { background: #d4edda; color: #155724; }
.status-3 { background: #f8d7da; color: #721c24; }

/* Page header */
.page-header-bar {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header-bar h1 { font-weight: 800; margin: 0; }
.page-header-bar p { opacity: 0.85; margin: 0.5rem 0 0; }

.nav-tabs .nav-link { color: var(--navy); font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--navy); border-color: var(--gold) var(--gold) #fff; background: #fff; }
.nav-tabs { border-bottom: 2px solid rgba(212,175,55,0.35); }

@media (prefers-reduced-motion: reduce) {
    .hero-bg,
    .hero-content > *,
    .feature-card,
    .bike-card,
    .container.py-5 > .section-title,
    .container.py-5 > .section-sub {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-bg {
        inset: 0;
        transform: none !important;
    }
}

@media (max-width: 768px) {
    .lb-search { width: 100%; margin: 0.5rem 0; }
    .hero-section { padding: 2.5rem 0 3rem; }
    .hero-actions .btn { width: 100%; margin-right: 0 !important; }
}
