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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    overflow: hidden;
}

/* Notifications Button */
.notifications-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.notifications-btn:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Login Modal */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-modal {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.login-modal h2 {
    margin-bottom: 10px;
    color: #333;
}

.login-modal p {
    color: #666;
    margin-bottom: 30px;
}

.login-modal input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.login-modal input:focus {
    outline: none;
    border-color: #00D68F;
}

.login-modal button {
    width: 100%;
    padding: 15px;
    background: #00D68F;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-modal button:hover {
    background: #00b87a;
}

.login-modal button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-error {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 14px;
}

/* Header */
header {
    background: linear-gradient(135deg, #00D68F 0%, #00b87a 100%);
    color: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Container */
.container {
    display: flex;
    height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 350px;
    background: white;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.search-box {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: #00D68F;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.filter-tab {
    flex: 1;
    padding: 8px;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.filter-tab.active {
    background: #00D68F;
    color: white;
}

.drivers-list {
    padding: 10px;
}

.driver-item {
    background: white;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.driver-item:hover {
    border-color: #00D68F;
    transform: translateX(5px);
}

.driver-item.selected {
    border-color: #00D68F;
    background: #f0fdf9;
}

.driver-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.driver-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.driver-info h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 3px;
}

.driver-info p {
    font-size: 13px;
    color: #666;
}

.driver-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.driver-status.online {
    background: #d4edda;
    color: #155724;
}

.driver-status.busy {
    background: #cce5ff;
    color: #004085;
}

.driver-status.offline {
    background: #f8d7da;
    color: #721c24;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Info Panel */
.info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    display: none;
}

.info-panel.visible {
    display: block;
}

.info-panel h3 {
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-panel .close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.info-panel .close-btn:hover {
    color: #333;
}

.info-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.info-section:last-child {
    border-bottom: none;
}

.info-section h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-label {
    color: #666;
}

.info-value {
    color: #333;
    font-weight: 600;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00D68F;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ✅ Toast de Notificação */
.status-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
    border-left: 4px solid #00D68F;
}

.status-toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 24px;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* ✅ Card de Informações da Corrida */
.ride-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 12px;
}

.ride-route {
    margin-bottom: 8px;
}

.ride-point {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.ride-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.ride-address {
    color: #555;
    line-height: 1.4;
    flex: 1;
}

.ride-arrow {
    text-align: center;
    color: #999;
    font-size: 16px;
    margin: 2px 0;
    padding-left: 22px;
}

.ride-passenger {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
    color: #666;
}

/* Notification Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

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

.modal-menu {
    max-width: 500px;
}

.modal-content h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Notification Options */
.notification-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.notification-option-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.notification-option-btn:hover {
    border-color: #4CAF50;
    background: #f8fff9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.option-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.option-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.option-desc {
    font-size: 14px;
    color: #666;
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-group input[type="file"] {
    padding: 8px;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Status Messages */
.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
}

.status-loading {
    background: #e3f2fd;
    color: #1976d2;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.status-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.status-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 40vh;
    }
    
    .map-container {
        height: 60vh;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .header-stats {
        gap: 15px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .status-toast {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}
