/* ========================================
   Nebengers - Custom Styles
   ======================================== */

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #e8ecff;
    --secondary: #f72585;
    --accent: #7209b7;
    --success: #06d6a0;
    --warning: #ffd166;
    --danger: #ef476f;
    --dark: #1a1a2e;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-500: #adb5bd;
    --sidebar-width: 260px;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   General
   ======================================== */
body {
    font-family: var(--font-family);
    background-color: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    padding: 0.6rem 1rem;
    z-index: 1050;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%) !important;
}

.navbar-brand {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    padding: 0.5rem;
}

.navbar .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.navbar .dropdown-item:hover {
    background-color: var(--primary-light);
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - 60px);
    background: #fff;
    border-right: 1px solid var(--gray-200);
    flex-shrink: 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar-inner {
    padding: 0;
}

.sidebar-heading {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-500);
    letter-spacing: 1px;
    padding: 1rem 1.25rem 0.5rem;
    list-style: none;
}

.sidebar-nav .nav-link {
    color: #555;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}

.sidebar-nav .nav-link .badge {
    font-size: 0.7rem;
}

/* ========================================
   Avatar
   ======================================== */
.avatar-sm {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Cards
   ======================================== */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.card-stat {
    border-left: 4px solid var(--primary);
}

.card-stat.success { border-left-color: var(--success); }
.card-stat.warning { border-left-color: var(--warning); }
.card-stat.danger { border-left-color: var(--danger); }
.card-stat.info { border-left-color: #4cc9f0; }

.card-stat .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-stat .stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.card-stat .stat-icon.success { background: #e6faf3; color: var(--success); }
.card-stat .stat-icon.warning { background: #fff8e1; color: #f59e0b; }
.card-stat .stat-icon.danger { background: #fde8ec; color: var(--danger); }
.card-stat .stat-icon.info { background: #e8f7fb; color: #4cc9f0; }

/* ========================================
   Trip Card
   ======================================== */
.trip-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.trip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.trip-route {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trip-route .route-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    flex-shrink: 0;
}

.trip-route .route-dot.end {
    border-color: var(--secondary);
    background: var(--secondary);
}

.trip-route .route-line {
    width: 2px;
    height: 30px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    margin-left: 5px;
    flex-shrink: 0;
}

.trip-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.trip-info-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #666;
}

.trip-info-item i {
    color: var(--primary);
}

/* ========================================
   Form Styles
   ======================================== */
.form-control, .form-select {
    border-radius: 10px;
    padding: 0.65rem 1rem;
    border: 1.5px solid var(--gray-200);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 0.4rem;
}

.input-group-text {
    border-radius: 10px;
    background: var(--gray-100);
    border: 1.5px solid var(--gray-200);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    border: none;
}

.btn-secondary:hover {
    background: #d61f6f;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* ========================================
   Search Box
   ======================================== */
.search-box {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

/* ========================================
   Feature Section
   ======================================== */
.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.feature-icon.primary { background: var(--primary-light); color: var(--primary); }
.feature-icon.success { background: #e6faf3; color: var(--success); }
.feature-icon.warning { background: #fff8e1; color: #f59e0b; }
.feature-icon.danger { background: #fde8ec; color: var(--danger); }

/* ========================================
   Auth Pages
   ======================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8ecff 100%);
    padding: 2rem;
}

.auth-card {
    max-width: 460px;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 2rem;
    text-align: center;
    color: white;
}

.auth-body {
    padding: 2rem;
    background: white;
}

.otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    padding: 0.75rem;
}

/* ========================================
   Tables
   ======================================== */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background: var(--gray-100);
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    padding: 0.85rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-color: var(--gray-100);
}

/* ========================================
   Badges
   ======================================== */
.badge {
    font-weight: 600;
    padding: 0.45em 0.8em;
    border-radius: 8px;
    font-size: 0.75rem;
}

/* ========================================
   Alert
   ======================================== */
.alert {
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
}

/* ========================================
   Pagination
   ======================================== */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    padding: 0.5rem 0.85rem;
    color: var(--primary);
    border: 1px solid var(--gray-200);
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-200);
    margin-bottom: 1rem;
}

/* ========================================
   Loading
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-500);
    border-radius: 3px;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 991.98px) {
    .sidebar {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .search-box {
        margin-top: -2rem;
        padding: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        width: 100%;
    }
    
    .card {
        border-radius: 12px;
    }
}

/* ========================================
   Notification Item
   ======================================== */
.notif-item {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
}

.notif-item:hover {
    background: var(--primary-light);
}

.notif-item.unread {
    background: #f0f4ff;
    border-color: var(--primary);
}

.notif-item .notif-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ========================================
   Profile
   ======================================== */
.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
}

/* ========================================
   Step indicator
   ======================================== */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.step-indicator .step {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-200);
}

.step-indicator .step.active {
    background: var(--primary);
    width: 30px;
    border-radius: 5px;
}
