/* Custom Styles for Bus Management System */

:root {
    --primary-color: #2c5ba1;
    --secondary-color: #f78d1e;
    --primary-light: #3a6cb3;
    --primary-dark: #1e4b8f;
    --secondary-light: #ff9e3d;
    --secondary-dark: #e67d0d;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

/* Global Styles */
body {
    font-family: 'Nunito', sans-serif;
    background-color: #f8f9fc;
}

/* Login Page Styles */
body {

    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    margin: auto;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

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

.logo-container img {
    max-width: 200px;
    height: auto;
}

.form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid #e3e6f0;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(247, 141, 30, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.btn {
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-2px);
}

/* Dashboard Styles */
.sidebar {
    background-color: #2c5ba1;
    min-height: 100vh;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 5px;
    margin: 0.2rem 0;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Card Styles */
.stat-card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .icon {
    font-size: 2rem;
    color: #2c5ba1;
}

/* Table Styles */
.table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.table thead th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(247, 141, 30, 0.1);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Profile Page Styles */
.profile-header {
    background-color: #2c5ba1;
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.profile-info {
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.profile-info label {
    font-weight: 600;
    color: #4e73df;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }

    .card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        border-radius: 15px;
        box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .form-control {
        margin-bottom: 1rem;
    }

    .profile-header {
        padding: 1.5rem;
    }

    .profile-info {
        padding: 1.5rem;
    }
}

/* Badge Styles */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-secondary {
    background-color: var(--secondary-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.alert-primary {
    background-color: rgba(44, 91, 161, 0.1);
    color: var(--primary-color);
}

.alert-secondary {
    background-color: rgba(247, 141, 30, 0.1);
    color: var(--secondary-color);
}

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

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .table {
        box-shadow: none;
    }
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }

.shadow-custom {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Custom Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.modal-header {
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 15px 15px 0 0;
    border: none;
}

.modal-footer {
    border-top: 1px solid #e3e6f0;
    border-radius: 0 0 15px 15px;
}

/* Custom Tooltip */
.tooltip-custom {
    position: relative;
    display: inline-block;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Template Layout Styles */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Styles */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--primary-color);
    color: #fff;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    z-index: 999;
    transform: translateX(0);
}

#sidebar.active {
    transform: translateX(-250px);
}

#sidebar .sidebar-header {
    padding: 20px;
    background: var(--primary-dark);
    text-align: center;
}

#sidebar .sidebar-header .logo {
    max-width: 120px;
    margin-bottom: 10px;
}

#sidebar .sidebar-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li {
    padding: 0;
    position: relative;
}

#sidebar ul li a {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

#sidebar ul li a:hover,
#sidebar ul li.active > a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#sidebar ul li.active > a {
    border-left: 4px solid var(--secondary-color);
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-details h6 {
    margin: 0;
    color: #fff;
    font-size: 0.9rem;
}

.user-details small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Content Styles */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    background: #f8f9fc;
}

#content.active {
    margin-left: 0;
}

/* Top Navigation */
.navbar {
    padding: 15px 30px;
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

#sidebarCollapse {
    background: transparent;
    border: none;
    color: var(--primary-color);
}

.search-box {
    position: relative;
    margin-right: 20px;
}

.search-box input {
    padding-right: 40px;
    border-radius: 20px;
    border: 1px solid #e3e6f0;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Notifications */
.notifications {
    position: relative;
}

.notifications .btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    position: relative;
}

.notifications .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.notification-item {
    display: flex;
    align-items: center;
    padding: 10px;
}

.notification-item i {
    font-size: 1.2rem;
    margin-right: 10px;
}

.notification-content p {
    margin: 0;
    font-size: 0.9rem;
}

.notification-content small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Main Content */
main {
    padding: 30px;
}

/* Footer */
.footer {
    padding: 20px 30px;
    background: #fff;
    border-top: 1px solid #e3e6f0;
}

.footer p {
    margin: 0;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        margin-left: 0;
    }
    #content.active {
        margin-left: 250px;
    }
    .search-box {
        display: none;
    }
}
