/* 
   GPS Fretado Pro - Visual Corporativo & Mobile-First
   Desenvolvido por: Autodidatas
*/

:root {
    --primary-color: #0f4c81;
    --primary-dark: #0a355c;
    --secondary-color: #2b5c8f;
    --accent-color: #007bff;
    --success-color: #198754;
    --warning-color: #ff9800;
    --danger-color: #dc3545;
    --bg-light: #f8f9fa;
    --card-bg: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 24px;
    color: #ffffff;
}

.app-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
}

.brand-signature {
    font-size: 11px;
    opacity: 0.85;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-idle { background-color: rgba(255, 255, 255, 0.2); color: #fff; }
.status-recording { background-color: var(--danger-color); color: #fff; animation: pulse 1.5s infinite; }
.status-navigating { background-color: var(--success-color); color: #fff; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.btn-menu {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    padding: 6px;
    cursor: pointer;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 12px;
    width: 260px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 1001;
}

.dropdown-menu.active {
    display: block;
}

.menu-list {
    list-style: none;
}

.menu-list li {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.menu-list li:last-child {
    border-bottom: none;
}

.menu-list li:active {
    background-color: #f1f5f9;
}

.menu-list li i {
    width: 20px;
    color: var(--primary-color);
    font-size: 16px;
}

.menu-divider {
    height: 1px;
    background-color: var(--border-color);
    padding: 0 !important;
}

/* Banner de Navegação Guiada */
.nav-banner {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    background: var(--primary-dark);
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.nav-banner.hidden { display: none; }

.nav-icon-box {
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.nav-info {
    flex: 1;
}

.nav-instruction {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.nav-subinfo {
    font-size: 13px;
    opacity: 0.85;
}

.btn-voice {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

/* Mapa Leaflet - Ajuste de Altura Full Screen */
#map {
    width: 100%;
    height: calc(100vh - 60px);
    margin-top: 60px;
    z-index: 1;
}

/* Painel de Controles Inferior */
.app-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    padding: 16px;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    border-top: 1px solid var(--border-color);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-group.hidden { display: none; }

.recording-stats, .nav-stats {
    display: flex;
    justify-content: space-around;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
}

.action-row {
    display: flex;
    gap: 10px;
}

.action-row .btn {
    flex: 1;
}

/* Botões */
.btn {
    border: none;
    border-radius: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

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

.btn-lg {
    padding: 14px 20px;
    font-size: 16px;
}

.btn-xl {
    padding: 18px 20px;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.btn-md {
    padding: 12px 14px;
    font-size: 14px;
}

.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-secondary { background-color: var(--secondary-color); color: #fff; }
.btn-success { background-color: var(--success-color); color: #fff; }
.btn-warning { background-color: var(--warning-color); color: #fff; }
.btn-danger { background-color: var(--danger-color); color: #fff; }
.btn-light { background-color: #e2e8f0; color: var(--text-dark); }

/* Modais */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.modal-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 18px;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 18px;
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

/* Lista de Rotas */
.route-item {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.route-item-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
}

.route-item-details {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 8px 0;
}

.route-actions {
    display: flex;
    gap: 8px;
}

.about-box {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    margin-top: 14px;
    text-align: left;
    font-size: 13px;
}

.brand-badge-large {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 12px auto;
}
