/* Font Definitions */
/* 
 * Bus Management System - Premium Design System
 * Modern, Clean, and Professional
 */

:root {
    /* Color Palette */
    --primary: #4e54c8;
    --primary-light: #8f94fb;
    --primary-gradient: linear-gradient(135deg, #4e54c8 0%, #8f94fb 100%);
    --secondary: #2c3e50;
    --accent: #ff9f43;
    --success: #10ac84;
    --danger: #ee5253;
    --info: #0abde3;
    --warning: #feca57;

    /* Neutral Colors */
    --text-main: #2d3436;
    --text-muted: #636e72;
    --bg-main: #f4f7f6;
    --bg-surface: #ffffff;
    --border-color: #dfe6e9;

    /* Shadows & Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;

    /* Fonts */
    --font-main: 'Hind Siliguri', 'Noto Sans Bengali', 'Inter', -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

/* Authentication Pages */
.auth-page {
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--bg-surface);
    width: 100%;
    max-width: 450px;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

/* Admin Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--secondary);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-header h2 i {
    color: var(--primary-light);
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 4px 15px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-nav a.active {
    background: var(--primary-gradient);
    box-shadow: 0 4px 10px rgba(78, 84, 200, 0.3);
}

.sidebar-nav i {
    width: 20px;
    font-size: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    margin-top: auto;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: var(--danger);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.logout-btn:hover {
    background: #d63031;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(238, 82, 83, 0.3);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.topbar {
    background: var(--bg-surface);
    height: 80px;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
}

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

.user-name {
    font-weight: 700;
    color: var(--secondary);
}

.user-role {
    background: var(--bg-main);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--primary-light);
}

/* Content Blocks */
.content {
    padding: 30px;
}

/* Cards & Containers */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.stat-card.buses::before {
    background: var(--info);
}

.stat-card.routes::before {
    background: var(--primary);
}

.stat-card.funds::before {
    background: var(--warning);
}

.stat-card.cash-in::before {
    background: var(--success);
}

.stat-card.cash-out::before {
    background: var(--danger);
}

.stat-card i {
    font-size: 40px;
    opacity: 0.2;
    position: absolute;
    right: 20px;
    bottom: 20px;
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tables - Premium Look */
.table-container {
    background: var(--bg-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table-header {
    padding: 20px 25px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #f8f9fb;
    padding: 15px 20px;
    text-align: left;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: #f9f9ff;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: #fdfdfd;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(78, 84, 200, 0.1);
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 14px;
}

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

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

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

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

.btn-info {
    background: var(--info);
    color: white;
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 6px 15px;
    font-size: 12px;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-info {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 25px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 30px 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 25px;
    background: var(--bg-main);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Alerts & Notifications */
.flash-message {
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.flash-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.flash-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}


.modal-header {
    padding: 20px;
    background: #3498db;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e1e1e1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 15px;
    }

    .topbar {
        padding: 10px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .font-selector {
        margin-right: 10px !important;
    }

    .user-info {
        gap: 5px;
    }

    .user-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }

    .auth-card {
        padding: 20px;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* Print Styles */
@media print {

    .sidebar,
    .topbar,
    .btn,
    .table-actions,
    .modal {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .content {
        padding: 0;
    }

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