/* Common: base typography + form controls */
body {
    background-color: #f0f2f5;
    color: #555;
    font-size: 12px;
    line-height: 1.4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

select,
input,
textarea {
    font-size: 11px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}


/* Common: utility helpers */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Common: navigation */
.nav-link {
    align-items: center;
    border-bottom: 2px solid transparent;
    color: #374151;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    height: 100%;
    padding: 0 16px;
    text-transform: uppercase;
    transition: all 0.2s;
}
.nav-link:hover {
    background: #f9fafb;
    border-bottom-color: #e74c3c;
    color: #e74c3c;
}
.nav-link.is-active {
    background: #f9fafb;
    border-bottom-color: #e74c3c;
    color: #e74c3c;
}

.mobile-link {
    border-radius: 6px;
    color: #374151;
    display: block;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 16px;
    transition: all 0.2s;
}
.mobile-link:hover {
    background: #f9fafb;
    color: #e74c3c;
}

/* Common: selects */
.search-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.2rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    padding-right: 1.5rem !important;
    -webkit-appearance: none;
    appearance: none;
}

/* Tom Select overrides for compact site styling */
.ts-wrapper.single .ts-control {
    font-size: 11px !important;
    padding: 4px 10px !important;
    min-height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    background: #fff;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
}
.ts-wrapper .ts-control input {
    font-size: 11px !important;
}
.ts-dropdown {
    font-size: 11px !important;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
    z-index: 1000;
}
.ts-dropdown .option {
    padding: 5px 10px;
}
.ts-dropdown .option.active {
    background: #e74c3c;
    color: #fff;
}
.ts-wrapper.single .ts-control::after {
    border-color: #6b7280 transparent transparent;
}
/* Inside the red search bar, remove border */
.bg-motor-red .ts-wrapper.single .ts-control {
    border: 0;
}

/* Common: cards, grids, tabs */
.car-card {
    transition: all 0.2s;
}
.car-card:hover {
    border-color: #e74c3c;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    z-index: 10;
}

.tab-btn {
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    color: #777;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    text-transform: uppercase;
}
.tab-btn.active {
    background: #ffffff;
    border-bottom: 1px solid #ffffff;
    color: #333;
}

.tab-panel,
.dash-panel {
    display: none;
}
.tab-panel.active,
.dash-panel.active {
    display: block;
}

.dense-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
    .dense-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .dense-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Search tabs: index + search page */
.search-tab {
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    margin-right: 2px;
    padding: 8px 20px;
    text-transform: uppercase;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    transition: all 0.2s;
}
.search-tab.active {
    background-color: #e74c3c;
    color: #ffffff;
}
.search-tab.inactive {
    background-color: #e5e7eb;
    color: #4b5563;
}
.search-tab.inactive:hover {
    background-color: #d1d5db;
    color: #1f2937;
}
.search-panel,
.create-panel {
    display: none;
}
.search-panel.active,
.create-panel.active {
    display: block;
}

.premium-badge {
    background: linear-gradient(45deg, #f1c40f, #f39c12);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.text-shadow-strong {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Common: upload area */
.upload-box {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 4px;
    padding: 12px;
}

/* Dashboard page */
.dash-nav-btn {
    border-left: 3px solid transparent;
    color: #4b5563;
    display: flex;
    font-size: 11px;
    font-weight: 700;
    gap: 8px;
    padding: 10px 12px;
    text-transform: uppercase;
    transition: all 0.2s;
    width: 100%;
}
.dash-nav-btn:hover {
    background: #f9fafb;
    color: #e74c3c;
}
.dash-nav-btn.active {
    background: #ffffff;
    border-left-color: #e74c3c;
    color: #1f2937;
}

.page-content {
    flex: 1;
}

.site-footer {
    margin-top: auto;
}
