:root {
    --cor-bg: #111418;
    --cor-card: #1e242b;
    --cor-primaria: #e84118;
    --cor-verde: #4cd137;
    --cor-texto: #f5f6fa;
    --cor-cinza: #7f8fa6;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--cor-bg);
    color: var(--cor-texto);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior-y: none;
}

#tela-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #111418 0%, #1e242b 100%);
}

.logo-login {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.logo-login span {
    color: var(--cor-primaria);
}

.input-login {
    width: 100%;
    max-width: 320px;
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #2f3640;
    background: #111418;
    color: white;
    font-size: 18px;
    margin-bottom: 25px;
    text-align: center;
    outline: none;
    transition: 0.3s;
    box-sizing: border-box;
}

.input-login:focus {
    border-color: var(--cor-primaria);
}

.btn-login {
    width: 100%;
    max-width: 320px;
    background: var(--cor-primaria);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(232, 65, 24, 0.4);
    box-sizing: border-box;
}

.btn-login:active {
    transform: scale(0.96);
}

#tela-app {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.header {
    background: var(--cor-card);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2f3640;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    flex-shrink: 0;
}

.header-info h2 {
    margin: 0;
    font-size: 20px;
    color: white;
}

.header-info p {
    margin: 0;
    font-size: 13px;
    color: var(--cor-verde);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot-online {
    width: 10px;
    height: 10px;
    background-color: var(--cor-verde);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--cor-verde);
    animation: piscar 2s infinite;
}

@keyframes piscar {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
    }
}

.btn-sair {
    background: none;
    border: 2px solid #ff4757;
    color: #ff4757;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

#lista-pedidos {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: 40px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

#lista-pedidos::-webkit-scrollbar {
    display: none;
}

.estado-vazio {
    text-align: center;
    color: var(--cor-cinza);
    margin-top: 30%;
    font-size: 16px;
    font-weight: 500;
}

.estado-vazio span {
    font-size: 50px;
    display: block;
    margin-bottom: 15px;
}

.pedido-card {
    background: var(--cor-card);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-left: 6px solid var(--cor-amarelo);
}

.card-rota {
    border-left-color: var(--cor-verde);
}

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #2f3640;
    padding-bottom: 12px;
}

.pedido-id {
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.distancia-badge {
    background: #2f3640;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #a4b0be;
    display: flex;
    align-items: center;
    gap: 6px;
}

.distancia-badge span {
    color: var(--cor-primaria);
}

.cliente-nome {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: white;
}

.cliente-endereco {
    font-size: 15px;
    color: #ced6e0;
    line-height: 1.5;
    margin-bottom: 15px;
}

.info-pagamento {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    font-size: 15px;
    color: #ced6e0;
    margin-bottom: 20px;
    border: 1px solid #2f3640;
}

.info-pagamento strong {
    color: white;
    font-size: 16px;
}

.badge-troco {
    display: inline-block;
    background: #f1c40f;
    color: #111418;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    margin-top: 8px;
}

.botoes-acao {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-whatsapp,
.btn-gps {
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.btn-whatsapp {
    background: #25D366;
}

.btn-whatsapp:active {
    background: #128C7E;
}

.btn-gps {
    background: #3498db;
}

.btn-gps:active {
    background: #2980b9;
}

.btn-iniciar,
.btn-entregar,
.btn-cancelar-rota,
.btn-rotas-multiplas {
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 18px;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    width: 100%;
}

.btn-iniciar {
    background: var(--cor-primaria);
    color: white;
    box-shadow: 0 4px 15px rgba(232, 65, 24, 0.4);
}

.btn-entregar {
    background: var(--cor-verde);
    color: #111418;
    box-shadow: 0 4px 15px rgba(76, 209, 55, 0.4);
}

.btn-cancelar-rota {
    background: #ff4757;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    font-size: 16px;
    padding: 14px;
}

.btn-rotas-multiplas {
    background: #9b59b6;
    color: white;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    font-size: 16px;
    padding: 14px;
    margin-bottom: 12px;
}

#alerta-notificacao {
    background: var(--cor-amarelo);
    color: #111418;
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    display: none;
    flex-shrink: 0;
}

#tela-cancelamento {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(192, 57, 43, 0.98);
    z-index: 99999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

#tela-cancelamento h1 {
    font-size: 60px;
    margin: 0 0 10px 0;
}

#tela-cancelamento h2 {
    color: white;
    font-size: 30px;
    margin: 0 0 15px 0;
    font-weight: 800;
}

#tela-cancelamento p {
    color: white;
    font-size: 18px;
    margin-bottom: 40px;
    line-height: 1.5;
}

#tela-cancelamento button {
    background: white;
    color: #c0392b;
    border: none;
    padding: 20px 30px;
    font-size: 20px;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
}

#modal-aviso {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99998;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

#modal-aviso .icone {
    font-size: 80px;
    margin-bottom: 20px;
}

#modal-aviso h2 {
    color: white;
    font-size: 26px;
    margin: 0 0 20px 0;
    font-weight: 700;
}

#modal-aviso p {
    color: #ced6e0;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

#modal-aviso button {
    background: var(--cor-primaria);
    color: white;
    border: none;
    padding: 18px 30px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
    text-transform: uppercase;
}

#modal-confirmacao {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99997;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

#modal-confirmacao .icone {
    font-size: 80px;
    margin-bottom: 20px;
}

#modal-confirmacao h2 {
    color: white;
    font-size: 26px;
    margin: 0 0 20px 0;
    font-weight: 700;
}

#modal-confirmacao p {
    color: #ced6e0;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.botoes-confirmacao {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 320px;
}

.botoes-confirmacao button {
    flex: 1;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
}

.btn-cancelar {
    background: #57606f;
    color: white;
}

.btn-confirmar {
    background: var(--cor-primaria);
    color: white;
}

#modal-foto {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99996;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-foto-content {
    background: var(--cor-card);
    border-radius: 16px;
    padding: 25px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-foto-content h2 {
    color: white;
    font-size: 22px;
    margin: 0 0 20px 0;
    text-align: center;
}

.modal-foto-content p {
    color: #ced6e0;
    font-size: 14px;
    margin-bottom: 10px;
}

.modal-foto-content p strong {
    color: white;
}

.foto-input-container {
    margin: 20px 0;
}

.btn-foto {
    display: block;
    background: #3498db;
    color: white;
    padding: 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.aviso-foto {
    background: rgba(255, 71, 87, 0.2);
    border: 2px solid #ff4757;
    color: #ff4757;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}
