:root {
    --primary: #f37021; /* BrasPress Official Orange */
    --primary-hover: #d9621c;
    --secondary: #0033a0; /* BrasPress Official Blue */
    --bg-color: #ffffff; /* White background for the site */
    --surface: #ffffff;
    --surface-border: #e0e0e0;
    --text: #333333;
    --text-muted: #666666;
    --error: #e53935;
    --success: #43a047;
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.brand-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.auth-logo {
    height: 50px;
    margin: 0 auto 10px auto;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent; /* Remove click highlight on mobile */
}

body {
    background-color: var(--bg-color);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* Background Effects - Removed for light theme as Braspress site is clean */
.background-elements {
    display: none;
}
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.orange-blob {
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    width: 300px;
    height: 300px;
    top: -50px;
    left: -50px;
}

.blue-blob {
    background: radial-gradient(circle, #0055ff 0%, transparent 70%);
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: -50px;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Layout Utilities */
.glass-panel {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Softer shadow for light theme */
}

.row {
    display: flex;
    flex-direction: column; /* Mobile first: stack columns */
    gap: 0;
}

.mt-4 { margin-top: 1.5rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 24px; /* Larger touch targets */
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    width: 100%; /* Full width on mobile */
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ff8533);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}
.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(255, 102, 0, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    width: auto;
}

.btn-sm {
    padding: 12px 16px;
    font-size: 0.95rem;
}

/* Forms & Inputs */
.input-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    margin-left: 5px;
}

.input-group input {
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 16px; 
    color: var(--text);
    font-size: 1.05rem;
    transition: var(--transition);
    width: 100%;
}

.input-group input:focus {
    outline: none;
    border-color: var(--secondary);
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 51, 160, 0.2);
}

.error-msg, .success-msg {
    font-size: 0.9rem;
    margin-top: 15px;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
}
.error-msg {
    background: rgba(255, 77, 77, 0.1);
    color: var(--error);
}
.success-msg {
    background: rgba(0, 204, 102, 0.1);
    color: var(--success);
}

/* Auth Page (Mobile Optimized) */
.auth-page {
    display: flex;
    align-items: flex-start; /* Better for mobile keyboards */
    justify-content: center;
    padding: 20px 15px;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 100%;
    z-index: 10;
    margin-top: 5vh;
}

.brand-section {
    text-align: center;
    margin-bottom: 25px;
}

.brand-logo {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -1px;
}

.brand-logo span {
    color: var(--primary);
}

.brand-tagline {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 5px;
}

.auth-box {
    padding: 25px 20px;
    border-radius: 24px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--secondary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tab-btn::after { display: none; } /* Remove old underline style */

.auth-form {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.auth-form.active-form {
    display: block;
}

.form-scroll-area {
    /* Let mobile native scroll handle it instead of small boxes */
    max-height: none; 
    overflow: visible;
}

.section-title {
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 15px;
    color: var(--secondary);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-weight: 700;
}

/* App Specific Layout */
.app-page {
    padding-bottom: 70px; /* Space for bottom nav */
}

.app-container {
    padding: 20px 15px;
    width: 100%;
}

.app-header {
    margin-bottom: 25px;
    text-align: center;
}

.app-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 800;
    color: var(--secondary);
}

.app-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
}

.bnav-icon {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.bnav-item.active {
    color: var(--primary);
}

/* Dashboard Summaries */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.summary-card {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
}

.summary-card h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.summary-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }

.summary-link {
    display: block;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-radius: 0 0 24px 24px;
    border: none;
    border-bottom: 1px solid var(--surface-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--secondary);
}
.nav-brand span {
    color: var(--primary);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
#user-greeting {
    display: none; /* Hide greeting on mobile to save space */
}

.panel {
    padding: 20px 15px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #eee;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.btn-icon {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: var(--secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}
.btn-icon:active {
    background: var(--primary);
    color: #fff;
    transform: rotate(90deg) scale(0.9);
}

.route-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.route-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px;
    transition: var(--transition);
}

.route-card:active {
    transform: scale(0.98);
    background: #f9f9f9;
}

.route-locations {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.loc {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--secondary);
}

.arrow {
    color: var(--primary);
    font-size: 1.2rem;
}

.route-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    background: #f5f5f5;
    padding: 10px 12px;
    border-radius: 8px;
}

.price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--success);
}

.route-actions {
    margin-top: 15px;
}

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

/* Responsive Desktop Styles */
@media (min-width: 768px) {
    /* Form rows side by side */
    .row {
        flex-direction: row;
        gap: 20px;
    }
    .row .input-group {
        flex: 1;
        margin-bottom: 0;
    }
    
    /* Adjust margin for input groups that are directly inside form (not in row) */
    form > .input-group {
        margin-bottom: 1.2rem;
    }
    
    /* Center and constrain auth form */
    .auth-container {
        max-width: 800px;
        margin: 5vh auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .auth-box {
        width: 100%;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        padding: 40px;
    }
    
    /* Ensure the auth-page background elements are positioned correctly */
    .auth-page {
        align-items: center;
    }
    
    /* Center and constrain app content */
    .app-container {
        max-width: 1000px;
        margin: 0 auto;
        padding: 30px 20px;
    }
    
    /* Bottom nav for desktop - constrain it */
    .bottom-nav {
        max-width: 1000px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
        padding: 15px 0;
    }
    
    /* More columns for summary */
    .summary-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Route list grid on desktop */
    .route-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 20px;
    }
    
    /* Navbar constraint */
    .navbar {
        max-width: 1000px;
        margin: 0 auto;
        border-radius: 0 0 24px 24px;
    }
    
    #user-greeting {
        display: inline;
        font-weight: 600;
        color: var(--secondary);
    }
}
