@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --border: #e4e4e7;
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    
    --radius-card: 16px;
    --radius-input: 10px;
    --radius-button: 10px;
    
    --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.03);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Custom Base resets */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
}

/* Hide scrollbars for chrome/safari/opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
/* Hide scrollbars for ie/edge/firefox */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom styles for google maps container */
.map-container {
    height: 480px;
    width: 100%;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.map-container-large {
    height: calc(100vh - 160px);
    min-height: 520px;
}

/* Info window styling */
.bus-info-window {
    padding: 12px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    max-width: 260px;
}

.bus-info-window h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.bus-info-window p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Sidebar Custom Transitions */
#sidebar {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    #sidebar:not(.open) {
        transform: translateX(-100%);
    }
}

/* Buttons and Forms premium styles */
.input-premium {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    background-color: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-subtle);
}

.input-premium:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    background-color: #fff;
}

.input-premium::placeholder {
    color: var(--text-muted);
}

/* Custom stats cards */
.stat-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Premium Card Wrapper */
.premium-panel {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.3s ease;
}

/* Loader Animation */
.spinner {
    border: 3.5px solid rgba(37, 99, 235, 0.08);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border-left-color: var(--primary);
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

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

/* Toast animations */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Table styling overrides */
th {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

td {
    font-size: 13.5px;
    color: var(--text-primary);
}

/* Scanner Frame and Laser Animation */
.scanner-frame-container {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.scanner-laser {
    position: absolute;
    height: 3px;
    width: 85%;
    left: 7.5%;
    background: linear-gradient(to right, transparent, var(--success), transparent);
    box-shadow: 0 0 8px var(--success);
    animation: laserScan 2.5s infinite ease-in-out;
    pointer-events: none;
    z-index: 10;
}

@keyframes laserScan {
    0% { top: 10%; opacity: 0.3; }
    50% { top: 90%; opacity: 1; }
    100% { top: 10%; opacity: 0.3; }
}

.scanner-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--success);
    border-style: solid;
    pointer-events: none;
    z-index: 15;
}

.scanner-corner-tl { top: 16px; left: 16px; border-width: 3.5px 0 0 3.5px; border-radius: 6px 0 0 0; }
.scanner-corner-tr { top: 16px; right: 16px; border-width: 3.5px 3.5px 0 0; border-radius: 0 6px 0 0; }
.scanner-corner-bl { bottom: 16px; left: 16px; border-width: 0 0 3.5px 3.5px; border-radius: 0 0 0 6px; }
.scanner-corner-br { bottom: 16px; right: 16px; border-width: 0 3.5px 3.5px 0; border-radius: 0 0 6px 0; }

/* Premium Bus Pass Design */
.bus-pass-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: white;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-premium);
    border-radius: 20px;
}

.bus-pass-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.bus-pass-card::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.bus-pass-chip {
    width: 44px;
    height: 32px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 6px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 2px 4px rgba(0,0,0,0.15);
}

.bus-pass-chip::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

/* Custom interactive active states */
.sidebar-nav-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-nav-btn:active {
    transform: scale(0.98);
}

/* Floating animation for subtle element feedback */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}
