/* cor base tipo iOS */
:root {
    --accent: #0af;
    background: rgb(20 20 20);
    --min-width: 368px;
    --max-width: 420px;
}

/* ===== BASE ===== */
body {
    overscroll-behavior: none;
    padding-bottom: env(safe-area-inset-bottom);
    min-width: var(--min-width);
    max-width: var(--max-width);
    margin: 0 auto;
    background: #000;
    color: #fff;
    font-family: sans-serif;
    text-align: center;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 400px;
    margin: auto;
}

.card {
    background: #111;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
    background: rgba(20,20,20,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* border: 1px solid rgba(255,255,255,0.05);*/
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* ===== BUTTONS ===== */
button,.btn {
    cursor: pointer;
    border: none;
    border-radius: 10px;
}

.btn {
    width: 100%;
    padding: 15px;
    background: #222;
    color: #fff;
    font-size: 16px;
}

.btn.disabled {
    pointer-events: none;
    opacity: 0.4;
}

button {
    background: #0af;
    padding: 8px 15px;
    color: #000;
    font-weight: bold;
}

/* efeito ação */
.btn.active-action {
    background: #0af !important;
    box-shadow: 0 0 15px #0af, 0 0 30px #0af;
    transition: all 0.2s ease;
}

/* ===== GRID ===== */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ===== WHEEL ===== */
.wheel {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    margin: 40px auto;
    cursor: pointer;
    position: relative;
}

.wheel.disabled {
    cursor: not-allowed;
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(1);
}

.center {
    position: absolute;
    width: 120px;
    height: 120px;
    background: #000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.active-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
    transition: all 0.2s ease;
}

/* ===== LEVELS ===== */
.levels {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.levels button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    background: #222;
    color: #fff;
    margin: 2px;
}

.levels .active {
    background: #0af;
    box-shadow: 0 0 10px #0af;
}

/* ===== LOG ===== */
.log {
    font-size: 11px;
    background: #000;
    padding: 10px;
    height: 120px;
    overflow: auto;
    text-align: left;
    color: #0f0;
}

.log span {
    display: block;
    margin-bottom: 2px;
    animation: fadeIn 0.2s ease;
}

.log .cmd { color: #0af; }
.log .ok { color: #0f0; }
.log .err { color: #f33; }
.log .info { color: #ff0; }

/* ===== TABLE ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

td, th {
    padding: 10px;
    border-bottom: 1px solid #222;
}

th {
    color: #0af;
}

tr:hover {
    background: #111;
}

.new {
    background: #033;
    transition: 0.5s;
}

.lock {
    color: #f55;
}

/* ===== TEXT ===== */
h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.counter {
    font-size: 12px;
    opacity: 0.6;
}

/* ===== INPUT ===== */
input {
    padding: 8px;
    margin: 5px;
}

/* ===== ANIMATION ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TOPBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    min-width: var(--min-width);
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px;
}

.blur{
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    z-index: 100;
    min-width: var(--min-width);
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 16px 26px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title {
    font-weight: bold;
}

.nav-btn {
    background: #0af;
    color: #000;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

.nav-item {
    color: #fff;
    text-decoration: none;
    font-size: 22px;
    opacity: 0.7;
    transition: 0.2s;
}

.nav-item:hover {
    opacity: 1;
}

.container {
    padding-bottom: 80px;
}

.dot {
    display:inline-block;
    flex-shrink: 0;
    width:10px;
    height:10px;
    border-radius:50%;
    margin-right:6px;
    transition: all 0.3s ease;
}

.dot-badge{
    position: absolute;
    right: 16px;
    top: 42%;
}

.green {
    background:#0f0;
    box-shadow:0 0 10px #0f0;
}

.red {
    background:#f00;
    box-shadow:0 0 10px #f00;
}

.orange {
    background:#fa0;
    box-shadow:0 0 10px #fa0;
}

.none {
    background:transparent;
    box-shadow:0 0 10px transparent;
}

.blue {
    background:rgb(0, 132, 255);
    box-shadow:0 0 10px #0084ff;
}

.grid-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* botão com icon */
.btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 80px;
    font-size: 13px;
    font-weight: 500;
    background: linear-gradient(145deg, #1a1a1a, #222);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.icon svg {
    width: 36px;
    height: 36px;
    transition: 0.2s;
    color: white;
    stroke: white;
    transition: transform 0.2s ease;
}

.small svg {
    width: 24px !important;
    height: 24px !important;
}

.btn.active-action .icon svg {
    color: #fff;
    stroke: #0af;
    filter: drop-shadow(0 0 6px #0af);
}

.btn.disabled .icon svg {
    opacity: 0.3;
}

.grid-actions .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.15s ease;
}

.grid-actions .btn:active {
    background: linear-gradient(180deg, #0af, #0088cc);
    box-shadow: 
        0 0 12px rgba(153, 163, 168, 0.6),
        inset 0 0 10px rgba(255,255,255,0.1);
}

.grid-actions .btn.active-touch {
    background: linear-gradient(180deg, #0af, #0088cc);
    box-shadow: 
        0 0 15px rgba(0,170,255,0.7),
        0 0 30px rgba(0,170,255,0.3);
    color: #202020;
}

.grid-actions .btn.active-touch .icon svg {
    stroke: rgb(157, 222, 255);
    filter: drop-shadow(0 0 6px #0af);

}

.grid-actions .btn.active-touch .icon svg path{
    fill:#202020;

}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 16px;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 45px;

    display: none;
    flex-direction: column;

    min-width: 150px;

    background: rgba(20,20,20,0.8);
    backdrop-filter: blur(20px);

    border-radius: 12px;
    overflow: hidden;

    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.dropdown-menu a {
    padding: 12px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.dropdown.open .dropdown-menu {
    display: flex;
}

.icon {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.icons-loaded .icon {
    opacity: 1;
}

.Jumbotron {
    position: relative;
    width: 100%;
    aspect-ratio: 1000 / 888;
    background-image: url(../img/clastatus400.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    box-shadow: inset 0 0 50px 20px rgba(0, 0, 0, 0.9);
    margin: -101px 0 10px 0px;
}

.doors-windows {
    display: flex;
}

.doors-locked {
    position: relative;
    width: 183px;
    height: 180px; 
    background-image: url(../img/fechado.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.doors-unlocked {
    position: relative;
    width: 183px;
    height: 180px; 
    background-image: url(../img/aberto.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.mirrors-open {
    position: relative;
    width: 183px;
    height: 180px; 
    background-image: url(../img/mirrror_open.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.mirrors-closed {
    position: relative;
    width: 183px;
    height: 180px; 
    background-image: url(../img/mirrror_closed.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.side-view {
    position: relative;
    width: 190px;
    height: 223px;
    background-image: url(../img/side_view.png);
    background-size: contain;
    background-repeat: no-repeat;
}



#fl-windows{
    display:flex ;
    

}

#diesel-icon svg {
    width: 18px !important;
    height: 18px !important;
}

.status {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 2px 0;
    box-sizing: border-box;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    pointer-events: none;
}

.status-head {
    margin-top: 90px;
    background-color: transparent;
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-foot {
    margin-bottom: 0;
    background-color: transparent;
    display: flex;
    gap: 20px;
}

.status-foot svg {
    width: 22px !important;
    height: 22px !important;
}

.status-foot #doors_unlock svg {
    width: 20px !important;
    height: 20px !important;
}

#km, #diesel-percentage {
    font-size: 24px;
    font-weight: bold;
}

#diesel-div {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.flip-horizontal {
    transform: scaleX(-1);
}

.control-group {
    display: flex;
    align-items: center;
    background: #1a1a1a; /* Cor de fundo aproximada */
    padding: 15px;
    border-radius: 12px;
    justify-content: space-around;
}

.action-arrows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.arrow-btn {
    background: transparent;
    border: 1px solid #444;
    color: white;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
}

.arrow-btn:hover {
    stroke: rgb(157, 222, 255);
    filter: drop-shadow(0 0 6px #0af);
}

.status-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.status-info .icon {
    font-size: 2rem;
    margin-bottom: 5px;
}


.car-container {
    position: relative;
    width: 190px;
    height: 223px;
    display: inline-block;
}

.base-car {
    width: 100%;
    display: block;
}

.window {
    position: absolute;
    display: none;
    pointer-events: none;
}

.window.open {
    display: block;
}

#front-left { top: 120px;left: 68px; width: 35px;}
#front-right { top: 43px; left: 88px; width: 35px; }
#rear-left { top: 119.5px; left: 106px; width: 24px; }
#rear-right { top: 42.5px; left: 60px; width: 24px; }
