/* BMW Inventory Application - Modern Design System */

/* CSS Variables for consistent theming */
:root {
    --primary-blue: #0066cc;
    --primary-blue-hover: #0052a3;
    --secondary-blue: #e6f2ff;
    --danger-red: #dc3545;
    --danger-red-hover: #c82333;
    --success-green: #28a745;
    --warning-orange: #fd7e14;

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-dark: #343a40;

    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #868e96;
    --text-light: #ffffff;

    --border-color: #dee2e6;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas,
        "Courier New", monospace;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
}

p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
}

/* Navigation */
nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4rem;
    height: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    line-height: 1.05;
}

.nav-logo {
    height: 2rem;
    width: auto;
    flex-shrink: 0;
    /* Keep original BMW colors - blue and white with gray outline */
    filter: none;
}

.nav-brand-text {
    display: inline-block;
    line-height: 1.05;
    letter-spacing: -0.01em;
    /* When the brand wraps to two lines, keep them tightly stacked */
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.nav-link.active {
    color: var(--primary-blue);
    position: relative;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
}

/* Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Tables */
.table-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tr:hover {
    background: var(--bg-secondary);
}

tr[onclick] {
    cursor: pointer;
}

/* Forms */
.form-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

input,
textarea,
select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--primary-blue-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger-red);
    color: var(--text-light);
}

.btn-danger:hover {
    background: var(--danger-red-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.badge-primary {
    background: var(--secondary-blue);
    color: var(--primary-blue);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-red);
    border: none;
    cursor: pointer;
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-green);
}

.badge-warning {
    background: rgba(253, 126, 20, 0.1);
    color: var(--warning-orange);
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Detail Views */
.detail-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.detail-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.detail-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem 2rem;
    align-items: start;
}

.detail-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.detail-value {
    color: var(--text-secondary);
    font-size: 0.875rem;
    word-break: break-word;
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Links */
.link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link:hover {
    color: var(--primary-blue-hover);
    text-decoration: underline;
}

/* Utility Classes */
.mono {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}
.mb-1 {
    margin-bottom: 0.5rem;
}
.mb-2 {
    margin-bottom: 1rem;
}
.mb-3 {
    margin-bottom: 1.5rem;
}
.mb-4 {
    margin-bottom: 2rem;
}

.mt-0 {
    margin-top: 0;
}
.mt-1 {
    margin-top: 0.5rem;
}
.mt-2 {
    margin-top: 1rem;
}
.mt-3 {
    margin-top: 1.5rem;
}
.mt-4 {
    margin-top: 2rem;
}

.p-0 {
    padding: 0;
}
.p-1 {
    padding: 0.5rem;
}
.p-2 {
    padding: 1rem;
}
.p-3 {
    padding: 1.5rem;
}
.p-4 {
    padding: 2rem;
}

/* Status Indicators */
.status-low-stock {
    color: var(--danger-red);
    font-weight: 600;
}

.status-in-stock {
    color: var(--success-green);
    font-weight: 600;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container,
    .container-narrow {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .detail-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    table {
        font-size: 0.875rem;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }

    th {
        background: var(--bg-tertiary);
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .container,
    .container-narrow {
        padding: 0.5rem;
    }

    .detail-section,
    .form-container {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    table {
        font-size: 0.75rem;
        min-width: 600px; /* Ensure table doesn't get too narrow */
    }

    th,
    td {
        padding: 0.5rem 0.25rem;
    }

    th {
        background: var(--bg-tertiary);
        white-space: nowrap;
    }
}

/* Print Styles */
@media print {
    .nav-actions,
    .detail-actions,
    .card-actions {
        display: none;
    }

    .card,
    .detail-section {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}
/* Homepage Styles */
.hero-section {
    padding: 0;
    margin-bottom: 4rem;
    background-image: url("/p-l-Z95a_WN3cLY-unsplash.jpg");
    background-size: cover;
    background-position: 75% center;
    background-repeat: no-repeat;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: stretch;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
    position: relative;
    z-index: 2;
    min-height: 500px;
    width: 100%;
}

.hero-text {
    text-align: left;
    max-width: 500px;
    width: 60%;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 2rem 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 3rem 0;
    line-height: 1.5;
    max-width: 350px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 1rem 2rem;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.hero-btn-primary:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #e8851a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.hero-btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
}

.hero-credit {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    z-index: 3;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.hero-credit a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.hero-credit a:hover {
    color: white;
    text-decoration: underline;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.module-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.module-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.module-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.module-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Alert System */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: inherit;
}

.alert-list {
    margin: 0;
    padding-left: 1.25rem;
}

.alert-list li {
    margin-bottom: 0.25rem;
}

/* Enhanced Navigation */
.nav-user {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    background: var(--secondary-blue);
    border: 1px solid #b3d7ff;
    border-radius: 999px;
    font-size: 0.875rem;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.25;
    max-width: none;
}

.nav-link button {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link button:hover {
    color: var(--primary-blue);
}

/* Form Enhancements */
.form-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group input:invalid {
    border-color: var(--danger-red);
}

.form-group input:invalid:focus {
    border-color: var(--danger-red);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Checkbox styling */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    transform: scale(1.1);
}

.form-group label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
}

/* Form validation feedback */
.form-group.has-error input {
    border-color: var(--danger-red);
    background-color: #fff5f5;
}

.form-group.has-success input {
    border-color: var(--success-green);
    background-color: #f0fff4;
}

.form-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-feedback.error {
    color: var(--danger-red);
}

.form-feedback.success {
    color: var(--success-green);
}

/* Full width form elements */
.form-group.full-width {
    grid-column: 1 / -1;
}

/* Responsive form grid */
@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid.single-column {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Enhanced buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--text-light);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-blue-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger-red);
    color: var(--text-light);
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger-red-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
    transform: translateY(-1px);
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: var(--text-light);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced responsive navigation */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem;
    }

    .nav-links {
        width: 100%;
        margin-top: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-user {
        font-size: 0.8125rem;
        padding: 0.35rem 0.7rem;
        white-space: nowrap;
    }

    /* Hero responsive styles */
    .hero-section {
        background-position: center;
        min-height: 400px;
    }

    .hero-section::before {
        width: 100%;
        background: linear-gradient(
            135deg,
            rgba(26, 26, 46, 0.9) 0%,
            rgba(22, 33, 62, 0.85) 50%,
            rgba(15, 52, 96, 0.8) 100%
        );
    }

    .hero-content {
        padding: 4rem 2rem;
        justify-content: center;
        text-align: center;
    }

    .hero-text {
        text-align: left;
        width: 100%;
        max-width: none;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
        max-width: none;
    }

    .hero-buttons {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .hero-logo {
        max-width: 300px;
    }
}

/* Success messages */
.success-message {
    background: var(--success-green);
    color: var(--text-light);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.success-message::before {
    content: "✓";
    font-weight: bold;
    font-size: 1.25rem;
}

/* --- Enhanced Nav 3-Column Layout --- */
.nav-3col {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

.nav-left {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    min-width: 0;
}

.nav-center {
    flex: 2 1 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.nav-right {
    flex: 1 1 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links-auth {
    gap: 1rem;
    flex-wrap: nowrap;
}

.nav-links-auth li {
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .nav-brand {
        font-size: 1.2rem;
    }

    .nav-brand-text {
        line-height: 1.05;
        max-width: 5.75rem; /* prefer BMW / Inventory as two tight lines in the narrow left column */
    }
}

@media (max-width: 900px) {
    .nav-3col {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .nav-left,
    .nav-center,
    .nav-right {
        justify-content: center;
        width: 100%;
    }
    .nav-center {
        margin: 0.5rem 0;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .nav-links-auth {
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-brand {
        font-size: 1.35rem;
        justify-content: center;
    }

    .nav-brand-text {
        max-width: none;
        white-space: nowrap; /* full-width brand row: keep on one line */
        line-height: 1.2;
    }
}

@media (max-width: 600px) {
    .nav-3col {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }
    .nav-left,
    .nav-center,
    .nav-right {
        justify-content: center;
        width: 100%;
    }
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .nav-links-auth {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
}

/* Entity images */
.thumb-cell {
    width: 56px;
    padding-right: 0.5rem;
}

.entity-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg-tertiary);
    display: block;
}

.entity-hero {
    margin: 0 0 1.5rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-tertiary);
    max-height: 320px;
}

.entity-hero img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}
