:root {
    --bg-color: #f0f2f5;
    --text-color: #1f2937;
    --primary-color: #000000;
    --secondary-color: #4b5563;
    --accent-color: #2563eb;
    --danger-color: #dc2626;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding-top: 70px; /* Header height + spacing */
    padding-bottom: 90px; /* Bottom nav height + spacing */
    line-height: 1.5;
    font-size: 16px;
}

/* Typography */
h1, h2, h3 { margin: 0; font-weight: 700; }
a { text-decoration: none; color: inherit; }

/* Utilities */
.hidden { display: none !important; }

/* Top Header */
.top-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.header-left {
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
}

.back-btn {
    color: var(--white);
    font-size: 1.5rem;
    display: none; /* Hidden on dashboard by default */
    align-items: center;
    text-decoration: none;
}

.back-btn.active {
    display: flex;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logout-btn {
    position: absolute;
    right: 1rem;
    color: var(--white);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 400px;
    height: 70px;
    background: #000;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 2000;
    padding: 0 10px;
}

.bottom-nav ul {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.bottom-nav li {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.bottom-nav a {
    color: #666;
    font-size: 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.bottom-nav a i {
    transition: transform 0.3s ease;
    pointer-events: none;
}

.bottom-nav a.active {
    color: #fff;
}

.bottom-nav a.active i {
    transform: scale(1.2);
}

.bottom-nav .spotLight {
    background-color: #fff;
    width: 45px;
    height: 4px;
    border-radius: 4px;
    position: absolute;
    top: 0;
    left: 20px;
    transition: left 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1;
    pointer-events: none;
}

.bottom-nav .ligthRay {
    position: absolute;
    left: -50%;
    top: 4px;
    width: 200%;
    height: 60px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0) 80%
    );
    clip-path: polygon(15% 100%, 40% 0px, 60% 0px, 85% 100%);
    pointer-events: none;
}

/* Navbar (Legacy support for other pages) */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    margin-bottom: 1rem;
}
.nav-brand { font-weight: bold; color: white; }
.nav-menu a { color: white; margin-left: 1rem; font-size: 0.9rem; }


/* SPA Page Sections */
.page-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Body adjustments */
body {
    padding-top: 0;
}

.main-content {
    min-height: calc(100vh - 150px);
    padding: 0 1rem;
}

/* Small adjustments */
.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
    background: #000;
    color: #fff;
}

.log-details-box {
    margin-top: 5px;
    font-size: 0.85rem;
    border-left: 3px solid #000;
    padding-left: 10px;
}

/* Filter buttons */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    padding: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-btn {
    padding: 0.6rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}
.filter-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
}

.stat-card span {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-card strong {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 800;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.car-plate {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-color);
}

.car-model {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.car-price-info {
    text-align: right;
}

.car-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

.car-time {
    display: block;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.car-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.service-tag {
    background: #f3f4f6;
    color: var(--text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.car-note {
    background: #fffbeb;
    color: #92400e;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid #fcd34d;
}

.card-actions {
    text-align: right;
}

/* Forms */
.form-group { margin-bottom: 1rem; }

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--white);
    color: var(--text-color);
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

/* Action Buttons */
.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-icon-edit {
    background: #eff6ff;
    color: #2563eb;
}

.btn-icon-delete {
    background: #fef2f2;
    color: #dc2626;
}

.btn-icon-success {
    background: #f0fdf4;
    color: #16a34a;
}

.btn-icon:active {
    transform: scale(0.9);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    width: 100%;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h3 {
    margin-bottom: 0.5rem;
    color: #111827;
}

.modal-content p {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.modal-buttons .btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 600;
}

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

/* FAB */
.fab {
    position: fixed;
    bottom: 90px; /* Above bottom nav */
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 900;
    transition: transform 0.2s;
}

.fab:active { transform: scale(0.9); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--secondary-color);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    font-weight: 600;
}

/* Other Pages Specifics */
.user-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Service Labels in Forms */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.service-checkbox { display: none; }

.service-label {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    background: var(--white);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.service-checkbox:checked + .service-label {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

/* Price Input */
.price-container {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.currency-symbol {
    background: #f9fafb;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    font-weight: bold;
    border-left: 1px solid var(--border-color);
}

.price-input-group {
    display: flex;
    flex: 1;
}

.price-input-group input {
    flex: 1;
    border: none;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.btn-step {
    border: none;
    background: #fff;
    width: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}
.btn-step:first-child { border-right: 1px solid var(--border-color); }
.btn-step:last-child { border-left: 1px solid var(--border-color); }
.btn-step:active { background: #f3f4f6; }

/* Login Page */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    background: #000;
}

.login-card {
    background: #fff;
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.login-card h2 {
    font-size: 1.5rem;
    letter-spacing: 2px;
}
