/* Bus Ticket Booking System - Custom CSS */

:root {
    --primary-color: #D4A017;
    --secondary-color: #b8860b;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0284c7;
    --page-bg-tint: rgba(212, 160, 23, 0.06);
    --page-bg-vignette: rgba(200, 200, 200, 0.18);
    --theme-bg: #f4f4f5;
    --theme-bg-soft: #ffffff;
    --theme-text: #18181b;
    --theme-text-muted: #71717a;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--theme-bg);
    color: var(--theme-text);
}

/* Global page background */
body.app-shell {
    min-height: 100vh;
    position: relative;
    background: var(--theme-bg);
}

body.app-shell::before,
body.app-shell::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body.app-shell::before {
    background:
        radial-gradient(circle at 18% 12%, rgba(212, 160, 23, 0.07) 0%, transparent 35%),
        radial-gradient(circle at 82% 20%, rgba(212, 160, 23, 0.04) 0%, transparent 40%);
    opacity: 1;
    z-index: -2;
}

body.app-shell::after {
    background:
        linear-gradient(180deg, rgba(244, 244, 245, 0.6) 0%, rgba(244, 244, 245, 0.4) 100%);
    z-index: -1;
}

nav,
main,
footer {
    position: relative;
    z-index: 1;
}

/* Keep components readable while letting the background stay visible */
.app-shell .bg-white {
    background-color: #ffffff !important;
    color: var(--theme-text) !important;
    border: 1px solid #e4e4e7 !important;
    backdrop-filter: none;
}

.app-shell .text-gray-800,
.app-shell .text-gray-700,
.app-shell .text-gray-600,
.app-shell .text-gray-500,
.app-shell .text-gray-400,
.app-shell .text-black {
    color: var(--theme-text) !important;
}

.app-shell .border-gray-100,
.app-shell .border-gray-200,
.app-shell .border-gray-300,
.app-shell .border-gray-700 {
    border-color: #d4d4d8 !important;
}

.app-shell .bg-gray-50,
.app-shell .bg-gray-100,
.app-shell .bg-gray-200,
.app-shell .bg-gray-700,
.app-shell .bg-gray-800 {
    background-color: #f4f4f5 !important;
    color: var(--theme-text) !important;
}

.app-shell .bg-blue-600,
.app-shell .bg-blue-700,
.app-shell .bg-blue-500,
.app-shell .bg-indigo-600,
.app-shell .bg-indigo-700,
.app-shell .bg-yellow-500,
.app-shell .bg-yellow-600 {
    background: #e4e4e7 !important;
    color: var(--theme-text) !important;
    border: 1px solid #d4d4d8 !important;
}

.app-shell .hover\:bg-blue-700:hover,
.app-shell .hover\:bg-blue-600:hover,
.app-shell .hover\:bg-indigo-700:hover,
.app-shell .hover\:bg-yellow-600:hover,
.app-shell .hover\:bg-gray-700:hover,
.app-shell .hover\:bg-gray-600:hover {
    background: #d4d4d8 !important;
    color: var(--theme-text) !important;
}

.app-shell .text-blue-600,
.app-shell .text-blue-700,
.app-shell .text-indigo-600,
.app-shell .text-indigo-700,
.app-shell .text-yellow-500,
.app-shell .text-yellow-600 {
    color: #3f3f46 !important;
}

.app-shell .hover\:text-blue-800:hover,
.app-shell .hover\:text-blue-700:hover,
.app-shell .hover\:text-white:hover {
    color: var(--theme-text) !important;
}

/* Dashboard-specific theme */
.dashboard-theme .bg-gradient-to-r {
    background: linear-gradient(135deg, #ffffff, #f4f4f5) !important;
    color: var(--theme-text) !important;
    border: 1px solid #e4e4e7;
}

.dashboard-theme .from-blue-600,
.dashboard-theme .to-blue-800,
.dashboard-theme .to-blue-700,
.dashboard-theme .from-indigo-600,
.dashboard-theme .text-blue-100,
.dashboard-theme .text-indigo-100 {
    color: var(--theme-text) !important;
}

.dashboard-theme h1,
.dashboard-theme h2,
.dashboard-theme h3,
.dashboard-theme p,
.dashboard-theme td,
.dashboard-theme th,
.dashboard-theme .text-gray-600,
.dashboard-theme .text-gray-700,
.dashboard-theme .text-gray-500,
.dashboard-theme .text-blue-600,
.dashboard-theme .text-blue-800,
.dashboard-theme .text-indigo-600,
.dashboard-theme .text-indigo-800,
.dashboard-theme .text-green-700,
.dashboard-theme .text-red-700,
.dashboard-theme .text-yellow-700,
.dashboard-theme .text-green-800,
.dashboard-theme .text-yellow-800,
.dashboard-theme .text-gray-800 {
    color: var(--theme-text) !important;
}

.dashboard-theme table thead,
.dashboard-theme table tbody tr:hover {
    background-color: #f4f4f5 !important;
}

.app-shell .text-green-700,
.app-shell .text-green-800,
.app-shell .text-red-700,
.app-shell .text-red-800,
.app-shell .text-yellow-700,
.app-shell .text-yellow-800,
.app-shell .text-purple-200,
.app-shell .text-blue-200,
.app-shell .text-green-200,
.app-shell .text-yellow-200 {
    color: var(--theme-text) !important;
}

.app-shell .bg-green-100,
.app-shell .bg-yellow-100,
.app-shell .bg-red-100,
.app-shell .bg-blue-100,
.app-shell .bg-indigo-100,
.app-shell .bg-purple-100 {
    background-color: #f4f4f5 !important;
    color: var(--theme-text) !important;
    border: 1px solid #d4d4d8 !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Form Styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d4d4d8;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: #ffffff;
    color: #18181b;
}

input::placeholder,
textarea::placeholder {
    color: #a1a1aa;
    opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
}

/* Button Styling */
button,
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Transitions */
a {
    transition: color 0.2s, background-color 0.2s;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    nav {
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    nav, footer, button, .btn, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.slide-down {
    animation: slideDown 0.3s ease-in;
}

/* Admin Panel - White Theme */
body.admin-panel,
body.admin-panel.app-shell {
    background: #f1f5f9 !important;
    color: #1e293b !important;
}

body.admin-panel::before,
body.admin-panel::after {
    display: none !important;
}

body.admin-panel .app-main {
    background: #f1f5f9;
}

body.admin-panel .dashboard-theme h1,
body.admin-panel .dashboard-theme h2,
body.admin-panel .dashboard-theme h3,
body.admin-panel .dashboard-theme h4 {
    color: #1e293b !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    animation: none !important;
}

body.admin-panel .dashboard-theme p,
body.admin-panel .dashboard-theme td,
body.admin-panel .dashboard-theme th,
body.admin-panel .dashboard-theme label,
body.admin-panel .dashboard-theme span,
body.admin-panel .dashboard-theme li {
    color: #374151 !important;
}

body.admin-panel .dashboard-theme .text-gray-600,
body.admin-panel .dashboard-theme .text-gray-500,
body.admin-panel .dashboard-theme .text-gray-400 {
    color: #6b7280 !important;
}

body.admin-panel .bg-white,
body.admin-panel .rounded-lg,
body.admin-panel .shadow {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
}

body.admin-panel .bg-gray-50,
body.admin-panel .bg-gray-100 {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

body.admin-panel input,
body.admin-panel select,
body.admin-panel textarea {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #1e293b !important;
}

body.admin-panel input::placeholder,
body.admin-panel textarea::placeholder {
    color: #9ca3af !important;
}

body.admin-panel table {
    background: #ffffff !important;
}

body.admin-panel table thead {
    background: #f8fafc !important;
}

body.admin-panel table thead th {
    color: #374151 !important;
}

body.admin-panel table tbody tr:hover {
    background: #f1f5f9 !important;
}

body.admin-panel .text-gray-800,
body.admin-panel .text-gray-700 {
    color: #1e293b !important;
}

/* Gold Accent Theme */
.app-shell {
    background: #f4f4f5 !important;
    color: #18181b !important;
}

.app-shell h1,
.app-shell h2,
.app-shell h3,
.app-shell h4,
.app-shell h5,
.app-shell h6 {
    color: #18181b;
}

.app-shell .app-navbar {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.app-shell .app-navbar-brand,
.app-shell .app-navbar-brand i {
    color: #b8860b !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    animation: none !important;
}

.app-shell .app-nav-link-register {
    background: #D4A017 !important;
    background-image: none !important;
    animation: none !important;
    color: #ffffff !important;
}

.app-shell .app-nav-link::after,
.app-shell .nav-link::after {
    background: #D4A017 !important;
    background-image: none !important;
    animation: none !important;
}

.app-shell .app-footer {
    background: linear-gradient(180deg, #3f3f46, #27272a) !important;
    border-top: 1px solid #52525b;
}

.app-shell .app-footer .text-gray-400,
.app-shell .app-footer p,
.app-shell .app-footer li,
.app-shell .app-footer a {
    color: rgba(228, 228, 231, 0.85) !important;
}

.app-shell .app-footer h3,
.app-shell .app-footer h4 {
    color: #f4f4f5 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    animation: none !important;
}
