/* Custom CSS for Odessa Container Tracking Application */

/* General Styles */
body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.page-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Card Styles */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: var(--bs-card-cap-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

/* Form Styles */
.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Status Badge Colors */
.badge.bg-info {
    background-color: #38bdf8 !important;
}

.badge.bg-success {
    background-color: #22c55e !important;
}

.badge.bg-warning {
    background-color: #f59e0b !important;
}

.badge.bg-danger {
    background-color: #ef4444 !important;
}

.badge.bg-secondary {
    background-color: #64748b !important;
}

.badge.bg-primary {
    background-color: #3b82f6 !important;
}

/* Dashboard Widgets */
.widget-flat {
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.widget-icon {
    font-size: 1.75rem;
    color: rgba(59, 130, 246, 0.25);
}

/* Navigation */
.nav-link.active {
    color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Login/Register Pages */
.auth-page {
    background-color: #fff;
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.auth-logo {
    margin-bottom: 2rem;
    text-align: center;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

/* Top Navigation Bar Styles */
#topNavbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.5rem 0;
}

#topNavbar .navbar-brand img {
    transition: all 0.3s ease;
}

#topNavbar .nav-link {
    color: var(--bs-navbar-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

#topNavbar .nav-link:hover {
    color: var(--bs-navbar-hover-color);
    background-color: rgba(var(--bs-primary-rgb), 0.12);
}

#topNavbar .nav-link.active {
    color: var(--bs-navbar-active-color);
    background-color: rgba(var(--bs-primary-rgb), 0.12);
    font-weight: 600;
}

#topNavbar .nav-link i {
    font-size: 1rem;
}

/* User dropdown styles */
#topNavbar .dropdown-toggle::after {
    display: none;
}

#topNavbar .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
}

#topNavbar .dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#topNavbar .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* Main content adjustments */
.main-content {
    margin-left: 0;
    padding-top: 1rem;
}

/* Mobile responsive adjustments */
@media (max-width: 991.98px) {
    #topNavbar .navbar-brand img {
        max-height: 50px;
        max-width: 70px;
    }
    
    /* Center the toggler and improve tap target */
    #topNavbar .navbar-toggler {
        order: 2;
        margin-left: auto;
        margin-right: auto;
        padding: 0.5rem 0.75rem;
        border-radius: 0.5rem;
    }
    #topNavbar .navbar-toggler .navbar-toggler-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    /* Cleaner mobile menu overlay */
    #topNavbar .navbar-collapse.show {
        position: fixed;
        top: 64px; /* approximate navbar height on mobile */
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--bs-body-bg);
        padding: 1rem 1rem 2rem;
        overflow-y: auto;
        box-shadow: 0 -0.5rem 1rem rgba(0,0,0,0.08);
    }
    #topNavbar .mobile-menu-header {
        padding: 0.25rem 0.25rem;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 0.75rem !important;
    }
    
    /* Slim, easy-to-tap items without bulky spacings */
    #topNavbar .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        font-size: 1rem;
    }
    
    #topNavbar .navbar-nav.ms-auto {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #dee2e6;
    }
}

/* Remove old sidebar styles */
.left-side-menu,
.navbar-custom,
.content-page,
.sidebar-overlay {
    display: none !important;
}

/* Custom Animation for Notifications */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.alert {
    animation: fadeInUp 0.4s ease-out;
}