:root {
    --bg-body: #05070c;
    --bg-sidebar: #080b12;
    --bg-card: #0b121f;
    --bg-item: #111a2d;
    --border-color: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --primary-color: #0ea5e9;
    --success-color: #22c55e;
    --font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 50px;
    padding-left: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text strong {
    font-size: 18px;
    line-height: 1.2;
}

.logo-text span {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.sidebar-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    position: relative;
    scrollbar-color: rgba(56, 189, 248, 0.6) rgba(255, 255, 255, 0.06);
}
.sidebar-main::-webkit-scrollbar {
    width: 8px;
}
.sidebar-main::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}
.sidebar-main::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.45), rgba(14, 165, 233, 0.55));
    border-radius: 999px;
    border: 2px solid rgba(8, 11, 18, 0.6);
}
.sidebar-main:hover::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.7), rgba(14, 165, 233, 0.85));
    border-color: rgba(30, 41, 59, 0.7);
}
.sidebar-main:active::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.9), rgba(14, 165, 233, 0.95));
}
.sidebar-main::before,
.sidebar-main::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 16px;
    pointer-events: none;
    z-index: 1;
    display: none;
}
.sidebar-main.has-scroll::before,
.sidebar-main.has-scroll::after {
    display: block;
}
.sidebar-main::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(8, 11, 18, 0.9), rgba(8, 11, 18, 0));
}
.sidebar-main::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(8, 11, 18, 0.9), rgba(8, 11, 18, 0));
}
.sidebar-main.at-top::before {
    display: none;
}
.sidebar-main.at-bottom::after {
    display: none;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-footer form {
    margin: 0;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(248, 113, 113, 0.6);
    background: rgba(239, 68, 68, 0.08);
    color: #fecaca;
    text-decoration: none;
    transition: all 0.25s ease;
}

.logout-link i {
    font-size: 16px;
    width: auto;
}

.menu a i,
.logout-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.menu a:hover {
    color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.1);
    box-shadow: inset 4px 0 0 0 #38bdf8;
    transform: translateX(4px);
}

.menu a.active {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.05));
    color: #38bdf8;
    box-shadow: inset 4px 0 0 0 #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.1);
}

.logout-link:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.9);
    color: #fee2e2;
}

.version {
    background: #0f1623;
    padding: 15px;
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid #1e293b;
    text-align: center;
}

.version strong {
    color: white;
    font-size: 14px;
    display: block;
    margin-top: 4px;
}

/* MAIN CONTENT */
.main {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
}

header {
    margin-bottom: 35px;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

/* CLIENTS & VEHICLES LIST */
.search-bar {
    background: #0f1623;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    font-size: 15px;
    width: 100%;
    outline: none;
}

.client-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.client-card {
    background: #0f1623;
    border: 1px solid #1e293b;
    border-radius: 18px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.client-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.client-contact {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.client-contact i {
    margin-right: 6px;
    color: #475569;
}

.client-meta {
    font-size: 12px;
    color: #475569;
    font-weight: 500;
}

.client-vehicles-section {
    
}

.section-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    margin-bottom: 12px;
    font-weight: 600;
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.vehicle-card {
    background: #0b101b;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.vehicle-icon {
    width: 40px;
    height: 40px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.vehicle-details strong {
    display: block;
    color: #e2e8f0;
    font-size: 14px;
    margin-bottom: 2px;
}

.vehicle-sub {
    font-size: 12px;
    color: #64748b;
}

.btn-add-vehicle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px dashed #334155;
    border-radius: 12px;
    background: transparent;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 72px; /* Altura para alinhar com cards de veículo */
}

.btn-add-vehicle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(14, 165, 233, 0.05);
}

/* MODAL */
.modal-content {
    background-color: #0f1623;
    border: 1px solid #1e293b;
    color: var(--text-primary);
}

.modal-header, .modal-footer {
    border-color: #1e293b;
}

/* CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.card {
    border-radius: 20px;
    padding: 14px 18px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease, background 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
    border-color: rgba(56, 189, 248, 0.7);
}

.card-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.card h4 {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card .number {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.card .stat {
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat .up {
    color: #4ade80;
    font-weight: 600;
}

.stat .muted {
    color: rgba(255, 255, 255, 0.5);
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Card Variants */
.card.blue {
    background: radial-gradient(circle at top right, #1e3a8a20, transparent),
                linear-gradient(145deg, #0f172a, #0b101b);
}
.card.blue .icon-box {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

.card.orange {
    background: radial-gradient(circle at top right, #a07a4020, transparent),
                linear-gradient(145deg, #1a1208, #e4b246);
    border-color: rgba(233, 189, 113, 0.1);
}
.card.orange .icon-box {
    background: rgba(249, 115, 22, 0.3);
    color:hsl(38, 92%, 50%);
}

.card.dark {
    background: radial-gradient(circle at top right, #1e293b20, transparent),
                linear-gradient(145deg, #111827, #080b12);
}
.card.dark .icon-box {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
}

.card.green {
    background: radial-gradient(circle at top right, #064e3b20, transparent),
                linear-gradient(145deg, #062115, #020f09);
    border-color: rgba(34, 197, 94, 0.1);
}
.card.green .icon-box {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

/* GRID CONTENT */
.grid-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.box {
    background: #0f1623;
    border: 1px solid #1e293b;
    border-radius: 20px;
    padding: 25px;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    color: white;
}

.box-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.box-header i {
    color: var(--text-secondary);
}

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

.item {
    background: #162032;
    padding: 14px 16px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.item:hover {
    background: #1a253a;
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
    transform: translateY(-3px);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-info strong {
    color: white;
    font-size: 15px;
}

.item-info .sub-info {
    color: var(--text-secondary);
    font-size: 13px;
}

.item-info .service-type {
    color: #38bdf8;
    font-size: 13px;
    margin-top: 2px;
}

.item-actions {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.blue {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

.badge.green {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.price {
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.date-info {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.date-info span {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .main {
        margin-left: 0;
        padding: 20px;
    }
    
    .cards {
        grid-template-columns: 1fr;
    }
    
    .grid-content {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 800px) {
    .sidebar {
        padding: 20px 16px;
    }
    .logo {
        margin-bottom: 24px;
    }
    .menu {
        gap: 6px;
    }
    .menu a {
        padding: 10px 12px;
        font-size: 14px;
    }
    .version {
        padding: 10px;
        font-size: 12px;
    }
}

@media (max-height: 680px) {
    .logo-text span {
        display: none;
    }
    .version {
        display: none;
    }
}

@media (min-height: 900px) {
    .sidebar-main {
        scrollbar-width: none;
    }
    .sidebar-main::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
}
