* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Primary Blue Palette - WCAG AA Compliant */
    --primary-color: #2196F3; /* Contrast ratio with white: 3.1:1 (use for large text or with white text on blue bg) */
    --primary-light: #64B5F6;
    --primary-dark: #1976D2; /* Contrast ratio with white: 4.6:1 (WCAG AA compliant) */
    --primary-darker: #0D47A1; /* Contrast ratio with white: 8.6:1 (WCAG AAA compliant) */
    
    /* Secondary Colors */
    --secondary-color: #1565C0;
    --accent-color: #03A9F4;
    
    /* Semantic Colors */
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --warning-color: #FF9800;
    --info-color: #00BCD4;
    
    /* Neutral Colors */
    --text-color: #212121;
    --text-secondary: #757575;
    --bg-color: #F5F7FA;
    --white: #FFFFFF;
    --border-color: #5b5b5b;
    
    /* Shadows with Blue Tint */
    --shadow-sm: 0 1px 3px rgba(33, 150, 243, 0.12);
    --shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
    --shadow-lg: 0 4px 16px rgba(33, 150, 243, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Responsive Video/Iframe */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Mobile-First */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 0.75rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo a {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 0.5rem;
}

.notificacoes-menu {
    position: relative;
}

.badge {
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    position: absolute;
    top: -4px;
    right: -4px;
    display: none;
    min-width: 18px;
    text-align: center;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    min-height: 44px;
    min-width: 44px;
    color: var(--text-color);
    transition: color 0.2s;
}

.menu-toggle:active {
    color: var(--primary-color);
}

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: calc(100vh - 60px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem 1rem;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        gap: 0;
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        width: 100%;
    }
    
    .nav-menu a.active {
        color: var(--primary-color);
        background: #E3F2FD;
    }
}

/* Buttons Mobile-First */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    touch-action: manipulation;
    user-select: none;
    min-height: 44px;
    min-width: 44px;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-primary:active {
    background: var(--primary-darker);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 14px;
}

.btn-block {
    width: 100%;
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: 85px;
    right: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    cursor: pointer;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.fab:active {
    transform: scale(0.9);
}

@media (min-width: 769px) {
    .fab {
        bottom: 2rem;
        right: 2rem;
        width: 64px;
        height: 64px;
    }
    
    .fab:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features */
.features, .vehicle-types {
    padding: 4rem 0;
}

.features h3, .vehicle-types h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Vehicles */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.vehicle-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vehicle-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.price {
    display: block;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Dashboard Mobile-First */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
    padding-bottom: 70px; /* Espaço para bottom nav */
}

.sidebar {
    display: none; /* Esconder sidebar no mobile */
}

.dashboard-main {
    flex: 1;
    padding: 1rem;
    max-width: 100%;
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 999;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 0.75rem;
    padding: 0.5rem;
    transition: color 0.2s;
    flex: 1;
    max-width: 80px;
    min-height: 56px;
}

.bottom-nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.bottom-nav-item.active .icon {
    color: var(--primary-color);
}

.bottom-nav-item:active {
    background: rgba(33, 150, 243, 0.1);
    border-radius: 8px;
}

.bottom-nav-item .icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Desktop Sidebar */
@media (min-width: 769px) {
    .dashboard-container {
        flex-direction: row;
        padding-bottom: 0;
    }
    
    .sidebar {
        display: block;
        width: 250px;
        background: white;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05);
        position: sticky;
        top: 60px;
        height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .sidebar-nav {
        padding: 1rem 0;
    }
    
    .sidebar-link {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.5rem;
        color: var(--text-color);
        text-decoration: none;
        transition: all 0.2s;
        border-left: 3px solid transparent;
    }
    
    .sidebar-link.active {
        background: #E3F2FD;
        border-left-color: var(--primary-color);
        color: var(--primary-color);
    }
    
    .sidebar-link .icon {
        font-size: 1.5rem;
    }
    
    .dashboard-main {
        padding: 2rem;
    }
    
    .bottom-nav {
        display: none;
    }
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.stat-card {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.quick-actions {
    margin-bottom: 1.5rem;
}

.section {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

@media (min-width: 769px) {
    .dashboard-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .dashboard-header h2 {
        font-size: 2rem;
    }
    
    .user-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .section h3 {
        font-size: 1.25rem;
    }
}

/* Pedidos Mobile-First */
.pedidos-lista {
    display: grid;
    gap: 0.75rem;
}

.pedido-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pedido-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
}

.pedido-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow);
}

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.pedido-codigo {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color);
}

.pedido-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Status colors with good contrast */
.pedido-status.pendente {
    background: var(--warning-color);
}

.pedido-status.em-andamento {
    background: var(--primary-color);
}

.pedido-status.concluido {
    background: var(--success-color);
}

.pedido-status.cancelado {
    background: var(--danger-color);
}

.pedido-info {
    margin-bottom: 0.75rem;
}

.pedido-endereco {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.pedido-endereco strong {
    color: var(--text-color);
    min-width: 30px;
}

.pedido-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.pedido-valor {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.pedido-data {
    font-size: 0.75rem;
    color: #999;
}

@media (min-width: 769px) {
    .pedidos-lista {
        gap: 1rem;
    }
    
    .pedido-card {
        padding: 1.5rem;
    }
    
    .pedido-codigo {
        font-size: 1.1rem;
    }
    
    .pedido-status {
        font-size: 0.85rem;
    }
    
    .pedido-endereco {
        font-size: 0.95rem;
    }
    
    .pedido-valor {
        font-size: 1.3rem;
    }
    
    .pedido-data {
        font-size: 0.85rem;
    }
}

/* Notificações */
.notificacoes-lista {
    display: grid;
    gap: 0.5rem;
}

.notificacao-item {
    padding: 1rem;
    border-left: 3px solid var(--border-color);
    background: #f9f9f9;
    cursor: pointer;
    transition: background 0.3s;
}

.notificacao-item.nao-lida {
    border-left-color: var(--primary-color);
    background: #E3F2FD;
}

.notificacao-titulo {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.notificacao-mensagem {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.notificacao-data {
    font-size: 0.8rem;
    color: #666;
}

/* Pedido Form Mobile-First */
.pedido-form {
    background: transparent;
    padding: 0;
}

.form-section {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.form-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.vehicle-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.vehicle-option {
    position: relative;
}

.vehicle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.vehicle-card-small {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vehicle-option input[type="radio"]:checked + .vehicle-card-small {
    border-color: var(--primary-color);
    background: #E3F2FD;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.vehicle-card-small .vehicle-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.vehicle-card-small span:last-child {
    font-size: 0.875rem;
    font-weight: 600;
}

@media (min-width: 769px) {
    .pedido-form {
        background: white;
        padding: 2rem;
        border-radius: 12px;
        box-shadow: var(--shadow);
    }
    
    .form-section {
        padding: 0;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: none;
    }
    
    .form-section:last-child {
        border-bottom: none;
    }
    
    .form-section h3 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .vehicle-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .vehicle-card-small {
        padding: 1.5rem;
    }
    
    .vehicle-card-small .vehicle-icon {
        font-size: 2.5rem;
    }
}

.valor-calculado {
    background: #f0f8ff;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--primary-light);
    margin-bottom: 2rem;
}

.valor-detalhes {
    display: grid;
    gap: 0.5rem;
}

.valor-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.valor-item.total {
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Pedido Detalhes */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-weight: bold;
}

.status-badge.pendente {
    background: var(--warning-color);
}

.status-badge.em-andamento {
    background: var(--primary-color);
}

.status-badge.concluido {
    background: var(--success-color);
}

.status-badge.cancelado {
    background: var(--danger-color);
}

.pedido-detalhes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pedido-info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pedido-info-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.pedido-info-card p {
    margin-bottom: 0.5rem;
}

.valor-total {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.rastreamento-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.pedido-acoes {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Utilities */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

/* Pull to Refresh Indicator */
.pull-to-refresh {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: none;
    z-index: 999;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Swipe Actions */
.swipe-actions {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    transform: translateX(100%);
    transition: transform 0.3s;
}

.swipe-action {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    color: white;
    cursor: pointer;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Typography adjustments for mobile */
    body {
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h2 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .form-actions {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 1rem;
        margin: 0 -1rem;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        display: flex;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        flex: 1;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .dashboard-main {
        padding: 1.5rem;
    }
    
    /* Grid adjustments for tablet */
    .pedidos-lista {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vehicles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pedido-detalhes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .user-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .vehicle-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    /* Typography adjustments for desktop */
    body {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Grid optimizations for desktop */
    .pedidos-lista {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .vehicles-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .pedido-detalhes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sidebar {
        width: 250px;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .pedidos-lista {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* PWA Install Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 85px;
    left: 1rem;
    right: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 998;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-install-prompt h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.pwa-install-prompt p {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.pwa-install-buttons {
    display: flex;
    gap: 0.5rem;
}

.pwa-install-buttons button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.pwa-install-buttons .install-btn {
    background: var(--primary-color);
    color: white;
}

.pwa-install-buttons .dismiss-btn {
    background: var(--bg-color);
    color: var(--text-color);
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #f44336;
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
    z-index: 1001;
    display: none;
}

.offline-indicator.show {
    display: block;
}

/* Touch Feedback */
.touch-feedback {
    position: relative;
    overflow: hidden;
}

.touch-feedback::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.touch-feedback:active::after {
    width: 300px;
    height: 300px;
}

/* Safe Area for Notch Devices */
@supports (padding: max(0px)) {
    body {
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
    
    header {
        padding-top: max(0px, env(safe-area-inset-top));
    }
    
    .bottom-nav {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
.btn:focus,
.bottom-nav-item:focus,
.sidebar-link:focus,
.pedido-card:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Focus visible for keyboard navigation only */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Prevent Text Selection on Buttons */
button, .btn, .pedido-card {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* iOS Style Momentum Scrolling */
.pedidos-lista,
.quick-filters,
.dashboard-main {
    -webkit-overflow-scrolling: touch;
}

/* Hover Effects (Desktop Only) */
@media (hover: hover) {
    .nav-menu a:hover {
        color: var(--primary-color);
    }
    
    .btn-primary:hover {
        background: var(--primary-dark);
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    }
    
    .btn-secondary:hover {
        background: var(--primary-darker);
        box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
    }
    
    .btn-outline:hover {
        background: var(--primary-color);
        color: white;
    }
    
    .pedido-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }
    
    .notificacao-item:hover {
        background: #f0f0f0;
    }
    
    .sidebar-link:hover {
        background: #E3F2FD;
        border-left-color: var(--primary-color);
        color: var(--primary-color);
    }
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-property: all !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --bg-color: #121212;
        --white: #1e1e1e;
        --border-color: #333;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .pedido-card,
    .section,
    .stat-card,
    header {
        background: var(--white);
        border-color: var(--border-color);
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .dashboard-header {
        margin-bottom: 1rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .bottom-nav {
        padding: 0.25rem 0;
    }
    
    .bottom-nav-item {
        font-size: 0.7rem;
    }
    
    .bottom-nav-item .icon {
        font-size: 1.25rem;
    }
}
