* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6700;
    --primary-dark: #E55D00;
    --text-dark: #1a1a1a;
    --text-gray: #666;
    --text-light: #999;
    --bg-light: #f5f5f5;
    --bg-white: #fff;
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-white);
}

/* ==================== PAGE SYSTEM ==================== */
.page {
    display: none;
    padding-top: 64px;
}

.page.active {
    display: block;
}

/* ==================== NAVIGATION ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 16px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: var(--primary-dark);
}

.hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px 60px;
}

.hero-split {
    display: flex;
    gap: 0;
}

.hero-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 32px;
    position: relative;
}

.hero-half:first-child {
    border-right: 1px solid var(--border);
}

.hero-half .hero-content {
    text-align: center;
    padding-right: 0;
    margin-bottom: 32px;
}

.hero-half .hero-title {
    font-size: 42px;
    margin-bottom: 8px;
}

.hero-half .hero-subtitle {
    font-size: 16px;
    margin-bottom: 28px;
}

.hero-half .hero-stats {
    gap: 24px;
    margin-bottom: 28px;
    padding: 16px 0;
    justify-content: center;
}

.hero-half .stat-value {
    font-size: 28px;
}

.hero-half .hero-actions {
    justify-content: center;
}

.hero-half .hero-image {
    width: 100%;
    max-width: 400px;
}

.hero-half .hero-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-gray);
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 48px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-unit {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-gray);
    margin-left: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 103, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 1.5px solid var(--text-dark);
    padding: 14px 40px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--text-dark);
    color: white;
}

.btn-full {
    width: 100%;
    margin-top: 24px;
}

.hero-image {
    border-radius: 16px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.section-header {
    text-align: center;
    padding: 80px 40px 40px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-gray);
}

.version-selector {
    background: var(--bg-light);
    padding-bottom: 80px;
}

.version-cards {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.version-card {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    padding: 28px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.version-card:hover {
    border-color: var(--primary);
}

.version-card.selected {
    border-color: var(--primary);
    border-width: 2px;
    box-shadow: 0 0 0 1px var(--primary);
}

.version-card::after {
    content: "✓";
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
}

.version-card.selected::after {
    display: flex;
}

.version-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.tag-standard {
    background: #f2f2f2;
    color: #555;
}

.tag-pro {
    background: rgba(255, 103, 0, 0.08);
    color: var(--primary);
}

.tag-gt {
    background: #111;
    color: white;
}

.version-name {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.version-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.version-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 18px;
}

.version-highlights .highlight {
    text-align: left;
}

.version-highlights .value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 4px;
}

.version-highlights .value .unit {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    margin-left: 2px;
}

.version-highlights .label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.version-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    font-size: 14px;
    color: #444;
    line-height: 1.8;
    flex: 1;
}

.version-specs li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 2px;
}

.version-specs li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.version-price {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.2;
}

.version-price small {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.version-price-rmb {
    font-size: 14px;
    color: #999;
    font-weight: 400;
    margin-bottom: 8px;
}

.price-rmb-small {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

.version-delivery {
    font-size: 13px;
    color: #FF6700;
    font-weight: 500;
    margin-bottom: 18px;
}

.btn-configure {
    width: 100%;
    padding: 12px 24px;
    border-radius: 6px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.3px;
    margin-top: 6px;
}

.btn-configure:hover {
    background: var(--primary);
    color: white;
}

.version-card.selected .btn-configure {
    background: var(--primary);
    color: white;
}

.version-card.selected .btn-configure:hover {
    opacity: 0.9;
}

.configurator {
    min-height: 100vh;
    padding-top: 20px;
    background: white;
}

.config-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 40px 160px;
}

.config-header {
    background: white;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.config-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.back-btn:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.config-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.config-layout {
    display: flex;
    gap: 40px;
}

.config-main {
    flex: 1;
    min-width: 0;
}

.config-summary {
    width: 380px;
    flex-shrink: 0;
}

.car-preview {
    background: linear-gradient(180deg, #f8f8f8, #e8e8e8);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    text-align: center;
}

.car-preview img {
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.color-label {
    font-size: 14px;
    color: var(--text-gray);
    margin-top: 16px;
    font-weight: 500;
}

.preview-specs {
    margin-top: 20px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.preview-spec {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    border-right: 1px solid var(--border);
}

.preview-spec:last-child {
    border-right: none;
}

.preview-spec span:first-child {
    font-size: 11px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.preview-spec span:last-child {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 13px;
}

.option-group {
    margin-bottom: 36px;
}

.option-group-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.option-group-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.option-item {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
    text-align: center;
    position: relative;
    flex: 1 1 140px;
}

.option-item:hover {
    border-color: #333;
}

.option-item.selected {
    border-color: var(--primary);
    background: rgba(255, 103, 0, 0.03);
}

.option-item.selected::after {
    content: "✓";
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.option-item .color-swatch {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 8px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.option-item .option-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.option-item .option-price {
    font-size: 11px;
    color: var(--text-gray);
    margin-top: 4px;
    font-weight: 500;
}

.summary-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    position: sticky;
    top: 84px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.summary-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.summary-version {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.summary-version strong {
    color: var(--text-dark);
    font-weight: 700;
    display: block;
    font-size: 15px;
    margin-top: 4px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}

.summary-item:last-of-type {
    border-bottom: none;
}

.summary-item span:first-child {
    color: var(--text-gray);
}

.summary-item span:last-child {
    font-weight: 500;
    text-align: right;
    color: var(--text-dark);
}

.summary-item .price {
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

.summary-divider {
    border-top: 1px dashed var(--border);
    margin: 8px 0;
}

.verzollung-list {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
}

.verzollung-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.verzollung-item:last-child {
    border-bottom: none;
}

.verzollung-item .vz-label {
    color: #555;
}

.verzollung-item .vz-price {
    font-weight: 600;
    color: #FF6700;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 16px 0;
    border-top: 2px solid var(--border);
    margin-top: 16px;
}

.summary-total .label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.summary-total .price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.summary-net {
    font-size: 12px;
    color: var(--text-gray);
    padding: 2px 0;
}

.summary-net .price {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 400;
}

.summary-delivery {
    font-size: 12px;
    color: var(--text-gray);
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-order {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-order:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 103, 0, 0.25);
}

.btn-back {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dark);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-back:hover {
    border-color: #555;
    background: var(--bg-light);
}

.checkout {
    min-height: 100vh;
    padding-top: 64px;
    background: var(--bg-light);
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

.checkout-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.checkout-header h2 {
    font-size: 28px;
    font-weight: 600;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.order-summary {
    background: white;
    border-radius: 16px;
    padding: 32px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.order-details {
    margin-bottom: 24px;
}

.order-detail {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--bg-light);
}

.order-detail span:first-child {
    color: var(--text-gray);
}

.order-detail span:last-child {
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 600;
    border-top: 2px solid var(--border);
    margin-top: 16px;
}

.order-total.deposit {
    border-top: 1px dashed var(--border);
    padding-top: 12px;
    margin-top: 8px;
    font-size: 16px;
}

.order-total.deposit span:last-child {
    color: var(--primary);
}

.customer-info {
    background: white;
    border-radius: 16px;
    padding: 32px;
}

.customer-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-group {
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
}

.checkbox-label input {
    width: auto;
    margin-top: 2px;
}

.specs {
    background: var(--bg-white);
    padding: 40px 0 80px;
}

/* ========== Specs Tabs ========== */
.specs-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 40px;
}

.specs-tab {
    flex: 1;
    background: var(--bg-white);
    border: 2px solid var(--border);
    padding: 16px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 1px;
    text-align: center;
}

.specs-tab:first-child {
    border-radius: 12px 0 0 12px;
    border-right: none;
}

.specs-tab:last-child {
    border-radius: 0 12px 12px 0;
}

.specs-tab:hover {
    color: #ff6700;
    border-color: #ff6700;
    background: rgba(255, 103, 0, 0.04);
}

.specs-tab:hover + .specs-tab {
    border-left-color: #ff6700;
}

.specs-tab.active {
    color: #fff;
    background: #ff6700;
    border-color: #ff6700;
    box-shadow: 0 4px 14px rgba(255, 103, 0, 0.3);
    z-index: 1;
    position: relative;
}

.specs-tab-panel {
    display: none;
}

.specs-tab-panel.active {
    display: block;
}

.specs-table-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    overflow-x: auto;
}

.spec-columns-header {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    min-width: 700px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border-radius: 12px 12px 0 0;
}

.spec-col-label {
    display: table-cell;
    width: 220px;
    padding: 14px 16px 14px 20px;
    vertical-align: middle;
}

.spec-col-model {
    display: table-cell;
    text-align: center;
    padding: 14px 16px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    vertical-align: middle;
}

.specs-table-container .spec-category:first-of-type {
    border-radius: 0 0 16px 16px;
}

.spec-category {
    background: white;
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    overflow-x: auto;
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
    min-width: 700px;
}

.spec-table thead {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
}

.spec-table thead tr {
    border-bottom: none;
}

.spec-table thead th {
    padding: 14px 16px;
    text-align: center;
    font-weight: 600;
    color: white;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.spec-table thead th:first-child {
    text-align: left;
    width: 220px;
    padding-left: 20px;
}

.spec-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.spec-table tbody tr:hover {
    background: rgba(255, 107, 53, 0.05);
}

.spec-table tbody tr:last-child {
    border-bottom: none;
}

.spec-table tbody td {
    padding: 12px 16px;
    text-align: center;
    color: var(--text-gray);
}

.spec-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    padding-left: 20px;
    background: rgba(247, 247, 247, 0.3);
}

.spec-table tbody tr.price-row {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.1), transparent);
    font-size: 15px;
}

.spec-table tbody tr.price-row td {
    color: var(--accent);
    font-weight: 700;
}

.spec-table tbody tr.price-row td:first-child {
    color: var(--accent);
}

.specs-disclaimer {
    background: #fff8e1;
    border-left: 4px solid #ffb300;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 32px;
    font-size: 12px;
    color: #5d4037;
    line-height: 1.6;
}

.specs-disclaimer p {
    margin: 0;
}

.footer {
    background: var(--text-dark);
    color: white;
    padding: 0 40px;
}

.footer-divider {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px 0;
}

.footer-copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-content a {
    color: #808080;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-content a:hover {
    color: white;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    max-width: 400px;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
}

.modal-content h3 {
    font-size: 24px;
    margin-bottom: 12px;
    white-space: nowrap;
}

.modal-content p {
    color: var(--text-gray);
    margin-bottom: 8px;
}

.order-number {
    font-size: 14px;
    margin: 16px 0;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
}

.inventory {
    background: var(--bg-light);
    padding-bottom: 80px;
}

.inventory-cards {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.inventory-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    cursor: default;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.inventory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.15);
    border-color: var(--accent);
}

.inventory-badge {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.inventory-badge.premium {
    background: linear-gradient(135deg, var(--accent), #e64a19);
}

.inventory-image {
    position: relative;
    width: 100%;
    height: 320px;
    background: linear-gradient(180deg, #f5f5f5, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.inventory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.inventory-card:hover .inventory-image img {
    transform: scale(1.05);
}

.inventory-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.inventory-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.inventory-meta {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inventory-meta .inventory-notice {
    color: #dc2626;
    font-weight: 600;
}

.inventory-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
}

.inv-spec {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.inv-spec-label {
    color: var(--text-gray);
    font-size: 11px;
}

.inv-spec span:last-child {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 13px;
    margin-top: 2px;
}

.inventory-config {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-row {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border);
}

.config-label {
    color: var(--text-gray);
    font-weight: 500;
}

.config-value {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
    max-width: 70%;
}

.inventory-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.highlight-tag {
    background: rgba(255, 107, 53, 0.1);
    color: var(--accent);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.highlight-tag.extra-highlight {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.inventory-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 2px solid var(--border);
}

.inventory-price-box {
    display: flex;
    flex-direction: column;
}

.inventory-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.price-vat {
    font-size: 14px;
    font-weight: 400;
}

.inventory-price-note {
    font-size: 11px;
    color: var(--text-gray);
    margin-top: 4px;
}

.inventory-detail {
    background: var(--bg-white);
    padding-top: 80px;
}

.detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.detail-badge {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.detail-badge.premium {
    background: linear-gradient(135deg, var(--accent), #e64a19);
}

.detail-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

.detail-gallery {
    position: sticky;
    top: 100px;
    align-self: start;
}

.detail-main-image {
    width: 100%;
    height: 450px;
    background: linear-gradient(180deg, #f5f5f5, #e8e8e8);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.detail-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.detail-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.detail-thumbnails .thumb {
    width: 100%;
    height: 80px;
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.detail-thumbnails .thumb:hover {
    border-color: rgba(255, 107, 53, 0.3);
}

.detail-thumbnails .thumb.active {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.detail-thumbnails .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-image-actions {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px;
}

.detail-vin {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-vin-label {
    font-size: 11px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.detail-vin-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Courier New', monospace;
}

.detail-vin-notice {
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    text-align: center;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.detail-location {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-price-section {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(255, 107, 53, 0.02));
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-price {
    display: flex;
    flex-direction: column;
}

.detail-price-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.detail-delivery {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.detail-delivery-label {
    color: var(--text-gray);
    font-size: 12px;
}

.detail-delivery-value {
    font-weight: 600;
    color: var(--text-dark);
}

.detail-section {
    margin-bottom: 32px;
}

.detail-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.detail-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

.detail-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.detail-spec-label {
    color: var(--text-gray);
    font-weight: 500;
}

.detail-spec-value {
    color: var(--text-dark);
    font-weight: 700;
}

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

.detail-config-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
}

.detail-config-icon {
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    margin-top: 1px;
    flex-shrink: 0;
}

.detail-config-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-config-label {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.detail-config-value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.detail-highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.detail-highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 8px;
    font-size: 13px;
}

.detail-highlight-icon {
    color: #4caf50;
    font-weight: 700;
    flex-shrink: 0;
}

.detail-highlight-text {
    color: var(--text-dark);
    font-weight: 500;
}

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

.detail-service-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
}

.service-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.service-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-text h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.service-text p {
    font-size: 12px;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.4;
}

.detail-price-breakdown {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 16px;
}

.detail-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-gray);
}

.detail-price-row.total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid var(--border);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.detail-disclaimer {
    margin-top: 32px;
    padding: 16px;
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    border-radius: 8px;
    font-size: 12px;
    color: #5d4037;
    line-height: 1.6;
}

.detail-disclaimer p {
    margin: 0;
}

@media (max-width: 968px) {
    .hero {
        padding: 80px 20px 40px;
    }

    .hero-split {
        flex-direction: column;
    }

    .hero-half:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .hero-half .hero-title {
        font-size: 36px;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-title {
        font-size: 48px;
    }

    .nav-menu {
        display: none;
    }

    .config-content,
    .config-layout,
    .checkout-content {
        grid-template-columns: 1fr;
    }

    .config-layout {
        flex-direction: column;
    }

    .config-summary {
        width: 100%;
        flex-shrink: 0;
    }

    .summary-card {
        position: static;
    }

    .config-preview,
    .order-summary {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section-header {
        padding: 60px 20px 30px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .specs-tabs,
    .nav-container,
    .version-cards,
    .specs-table-container,
    .config-container,
    .checkout-container,
    .detail-container,
    .inventory-cards {
        padding-left: 20px;
        padding-right: 20px;
    }

    .inventory-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .detail-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .detail-gallery {
        position: relative;
        top: auto;
    }

    .detail-main-image {
        height: 350px;
    }

    .detail-specs-grid {
        grid-template-columns: 1fr;
    }

    .detail-service {
        grid-template-columns: 1fr;
    }

    .inventory-specs {
        grid-template-columns: 1fr;
    }


    .spec-category {
        padding: 16px;
    }

    .spec-table {
        font-size: 12px;
        min-width: 600px;
    }

    .spec-table thead th {
        padding: 10px 8px;
        font-size: 11px;
    }

    .spec-columns-header {
        min-width: 600px;
    }

    .spec-col-label {
        min-width: 140px;
    }

    .spec-col-model {
        font-size: 11px;
        padding: 10px 8px;
    }

    .spec-table tbody td {
        padding: 8px;
    }
}

@media (max-width: 640px) {
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .stat-divider {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions button {
        width: 100%;
    }

    .config-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .config-price-box {
        text-align: left;
    }

    .config-actions {
        flex-direction: column;
    }

    .config-actions button {
        width: 100%;
    }
}

/* ==================== NAV AUTH ==================== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.nav-btn-outline:hover {
    background: var(--primary);
    color: white;
}

.nav-user-menu {
    position: relative;
    cursor: pointer;
}

.nav-user-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg-light);
    cursor: pointer;
    transition: background 0.2s;
}

.nav-user-name::after {
    content: '\25BC';
    font-size: 10px;
    color: var(--text-gray);
}

.nav-user-name:hover {
    background: #e8e8e8;
}

.nav-user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    z-index: 1001;
}

/* Bridge the gap so hover doesn't break */
.nav-user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
}

.nav-user-menu:hover .nav-user-dropdown {
    display: block;
}

.nav-user-dropdown a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.nav-user-dropdown a:first-child {
    border-radius: 12px 12px 0 0;
}

.nav-user-dropdown a:last-child {
    border-radius: 0 0 12px 12px;
}

.nav-user-dropdown a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

/* ==================== AUTH MODAL ==================== */
.auth-modal-content {
    max-width: 440px;
    width: 90%;
    padding: 40px !important;
    text-align: left;
    position: relative;
}

.auth-modal-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.auth-modal-close:hover {
    color: var(--text-dark);
}

.auth-error {
    color: #e53935;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    min-height: 20px;
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-gray);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== MY ORDERS PAGE ==================== */
.my-orders-section {
    min-height: 80vh;
    background: var(--bg-light);
    padding-bottom: 80px;
}

.my-orders-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

.my-orders-empty {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.my-orders-empty .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.my-orders-empty h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.my-orders-empty p {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 24px;
}

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

.order-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.order-card:hover {
    box-shadow: var(--shadow-hover);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(135deg, #fafafa, #f0f0f0);
    border-bottom: 1px solid var(--border);
}

.order-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.order-card-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-confirmed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-processing {
    background: #fff3e0;
    color: #e65100;
}

.status-delivered {
    background: #e3f2fd;
    color: #1565c0;
}

.order-card-body {
    padding: 24px 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.order-card-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.order-info-row span:first-child {
    color: var(--text-gray);
}

.order-info-row span:last-child {
    font-weight: 500;
    color: var(--text-dark);
}

.order-info-row .order-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.order-card-config {
    border-left: 1px solid var(--border-light);
    padding-left: 24px;
}

.order-card-config h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-config-item {
    font-size: 13px;
    color: var(--text-dark);
    padding: 4px 0;
    position: relative;
    padding-left: 16px;
}

.order-config-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

@media (max-width: 768px) {
    .order-card-body {
        grid-template-columns: 1fr;
    }

    .order-card-config {
        border-left: none;
        border-top: 1px solid var(--border-light);
        padding-left: 0;
        padding-top: 16px;
    }
}

/* ==================== ADMIN PANEL ==================== */

.admin-section {
    padding: 80px 24px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-card {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.admin-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.admin-card-body {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.inventory-price-admin {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inventory-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inventory-price-row label {
    flex: 0 0 160px;
    font-size: 14px;
    font-weight: 500;
}

.inventory-price-row input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    max-width: 200px;
}

.admin-price-status {
    font-size: 13px;
    margin-left: 8px;
}

/* ==================== Lagerfahrzeuge Inline-Editor (Detailseite) ==================== */

.detail-admin-edit {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.detail-admin-edit-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.detail-admin-edit-hint {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 16px;
}

.inv-section {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--white);
}

.inv-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding: 10px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.inv-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 16px;
}

.inv-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inv-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.inv-field input,
.inv-field select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--white);
}

.inv-field input:focus,
.inv-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.inv-kv-list,
.inv-pkg-list {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inv-kv-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    gap: 8px;
    align-items: center;
}

.inv-kv-key,
.inv-kv-val,
.inv-pkg-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--white);
}

.inv-kv-key:focus,
.inv-kv-val:focus,
.inv-pkg-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.inv-pkg-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.inv-del-btn {
    padding: 4px 8px !important;
    font-size: 14px;
    line-height: 1;
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.inv-del-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.inv-add-btn {
    margin: 0 16px 12px;
    width: fit-content;
}

.inv-save-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
}

.inv-save-status {
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .inv-fields-grid {
        grid-template-columns: 1fr;
    }
    .inv-kv-row {
        grid-template-columns: 1fr;
    }
}

.admin-json {
    margin: 0;
    padding: 16px 20px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

.admin-editor {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.admin-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.admin-editor-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.admin-editor-textarea {
    width: 100%;
    min-height: 500px;
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.5;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    border: none;
    outline: none;
    resize: vertical;
    color: var(--text-primary);
    background: var(--white);
    tab-size: 2;
}

.admin-editor-msg {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
}

/* === Globale Bilderverwaltung === */
.global-image-section {
    margin-top: 24px;
}

.global-tab-content {
    padding: 0;
}

.global-site-info {
    padding: 12px 20px;
    background: #f0f9ff;
    color: #075985;
    font-size: 13px;
    border-bottom: 1px solid #bae6fd;
}

.global-site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 16px;
}

.global-site-item {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    display: flex;
    flex-direction: column;
}

.global-site-preview {
    position: relative;
    width: 100%;
    height: 90px;
    background: var(--bg-light);
    overflow: hidden;
}

.global-site-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.global-site-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 8px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.global-site-badge.custom {
    background: #ea580c;
}

.global-site-info-text {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.global-site-info-text strong {
    font-size: 13px;
    color: var(--text-primary);
}

.global-site-category {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.global-site-actions {
    padding: 10px 12px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}

.global-site-actions input[type="file"] {
    font-size: 12px;
}

.global-site-actions button {
    width: 100%;
}

/* Dateimanager */
.global-files-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.global-files-upload {
    display: flex;
    gap: 8px;
    align-items: center;
}

.global-files-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.global-select-all {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.global-select-all input {
    cursor: pointer;
}

.global-files-stats {
    display: flex;
    gap: 16px;
    padding: 10px 20px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    font-size: 13px;
    color: #92400e;
}

.global-files-stats .stat-item strong {
    color: #78350f;
    font-size: 15px;
}

.global-files-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 14px;
}

/* === Bildbibliothek v2 === */
.lib-item {
    border: 2px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.2s;
}

.lib-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lib-item.orphaned {
    border-color: #fde68a;
}

.lib-item.in-use {
    border-color: #86efac;
}

.lib-item-preview {
    position: relative;
    width: 100%;
    height: 120px;
    background: var(--bg-light);
    overflow: hidden;
}

.lib-item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lib-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    color: #fff;
}

.lib-badge.used {
    background: #16a34a;
}

.lib-badge.unused {
    background: #d97706;
}

.lib-item-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.lib-item-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lib-item-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.lib-usages {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.lib-usage-tag {
    font-size: 10px;
    padding: 1px 6px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 3px;
    white-space: nowrap;
}

.lib-item-actions {
    display: flex;
    gap: 4px;
    padding: 6px 10px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-light);
}

.lib-item-actions .btn-icon {
    flex: 1;
    padding: 6px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: background 0.2s;
}

.lib-item-actions .btn-icon:hover {
    background: #f0f0f0;
}

.lib-item-actions .btn-icon-danger:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

/* === SMTP-Konfiguration (Admin) === */

/* === Profil-Seite === */
.profile-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.profile-loading,
.profile-error {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.profile-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: #fafafa;
}

.profile-card-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.profile-form {
    padding: 20px;
}

.profile-form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.profile-form-row label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-form-row input {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.profile-form-row input:focus {
    outline: none;
    border-color: var(--accent-color, #FF6700);
}

.profile-form-row input:disabled {
    background: #f5f5f5;
    color: #999;
}

.profile-form-row-2col {
    flex-direction: row;
    gap: 12px;
}

.profile-form-row-2col > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

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

.profile-info-list {
    padding: 20px;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-row span {
    color: var(--text-secondary);
}

.profile-info-row strong {
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .profile-form-row-2col {
        flex-direction: column;
    }
}

/* Haupt-Tabs im Admin-Bereich */
.admin-main-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-main-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
    margin-bottom: -2px;
}

.admin-main-tab:hover {
    color: var(--accent-color, #FF6700);
    background: rgba(255, 103, 0, 0.05);
}

.admin-main-tab.active {
    color: var(--accent-color, #FF6700);
    border-bottom-color: var(--accent-color, #FF6700);
}

.admin-tab-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.smtp-section {
    margin-top: 0;
}

.smtp-form {
    padding: 20px;
}

.smtp-form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.smtp-form-row label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.smtp-form-row input {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.smtp-form-row input:focus {
    outline: none;
    border-color: var(--accent-color, #FF6700);
}

.smtp-hint {
    font-size: 11px;
    color: var(--text-secondary);
}

.smtp-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

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

.smtp-info {
    margin-top: 16px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

.global-file-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid var(--border-light);
}

.global-file-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-file-meta {
    font-size: 10px;
    color: var(--text-secondary);
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.gallery-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #c00;
    font-size: 14px;
}

.admin-editor-msg.success {
    color: #16a34a;
    background: #f0fdf4;
}

.admin-editor-msg.error {
    color: #dc2626;
    background: #fef2f2;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-weight: 500;
    transition: all 0.2s;
}

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

.btn-primary.btn-sm:hover {
    background: #e05500;
}

.btn-secondary.btn-sm {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-secondary.btn-sm:hover {
    background: var(--border-light);
}

.btn-danger.btn-sm {
    background: #dc2626;
    color: #fff;
    border: 1px solid #b91c1c;
}

.btn-danger.btn-sm:hover {
    background: #b91c1c;
}

/* Lagerfahrzeug-Bilder-Verwaltung im Admin-Panel */
.inv-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.inv-img-item {
    position: relative;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-light);
}

.inv-img-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.inv-img-item .btn-danger.btn-sm {
    width: 100%;
    border-radius: 0;
    border: none;
    border-top: 1px solid #b91c1c;
    padding: 6px 8px;
    font-size: 12px;
}

/* === Konfigurations-Speicher (Floating Icon + Slide-Out Panel) === */

.config-vault-btn {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary, #FF6700);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.config-vault-btn:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 103, 0, 0.4);
    background: #ff7d1f;
}

.config-vault-icon {
    font-size: 26px;
    line-height: 1;
    display: inline-block;
    transform: rotate(0deg);
    transition: transform 0.4s;
}

.config-vault-btn:hover .config-vault-icon {
    transform: rotate(60deg);
}

.config-vault-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-sizing: content-box;
}

.config-vault-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    z-index: 1001;
}

.config-vault-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === Bild-Lightbox === */
.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 24px;
}

.image-lightbox.open {
    display: flex;
}

.image-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    z-index: 1101;
}

.config-vault-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 92vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    font-family: inherit;
}

.config-vault-panel.active {
    transform: translateX(0);
}

.config-vault-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    background: var(--primary, #FF6700);
    color: #fff;
}

.config-vault-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.config-vault-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: background 0.2s;
}

.config-vault-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.config-vault-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.config-vault-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: color 0.2s, border-color 0.2s;
}

.config-vault-tab:hover {
    color: var(--primary, #FF6700);
}

.config-vault-tab.active {
    color: var(--primary, #FF6700);
    border-bottom-color: var(--primary, #FF6700);
}

.config-vault-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.config-vault-tab-panel {
    display: none;
}

.config-vault-tab-panel.active {
    display: block;
}

.config-vault-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.config-vault-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* Aktuelle Konfiguration */
.cv-current-section {
    margin-bottom: 18px;
}

.cv-current-section h4 {
    font-size: 13px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.cv-current-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid #eee;
}

.cv-current-card.yu7 {
    border-left: 4px solid #FF6700;
}

.cv-current-card.su7 {
    border-left: 4px solid #1976d2;
}

.cv-current-card.inventory {
    border-left: 4px solid #16a34a;
}

.cv-current-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cv-current-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #e5e7eb;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
}

.cv-current-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #444;
}

.cv-current-list li {
    padding: 4px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.cv-current-list li:last-child {
    border-bottom: none;
}

.cv-current-list .cv-label {
    color: #888;
    flex-shrink: 0;
}

.cv-current-list .cv-value {
    color: #222;
    text-align: right;
    font-weight: 500;
}

.cv-current-price {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary, #FF6700);
}

.cv-current-price-sub {
    margin-top: 2px;
    font-size: 11px;
    color: #999;
    text-align: right;
}

.cv-current-actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
}

.cv-current-actions button {
    flex: 1;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.cv-current-actions button:hover {
    background: #f5f5f5;
}

.cv-current-actions .btn-primary {
    background: var(--primary, #FF6700);
    color: #fff;
    border-color: var(--primary, #FF6700);
}

.cv-current-actions .btn-primary:hover {
    background: #ff7d1f;
}

/* Gespeicherte Konfigurationen */
.cv-saved-item {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    position: relative;
}

.cv-saved-item.yu7 { border-left: 4px solid #FF6700; }
.cv-saved-item.su7 { border-left: 4px solid #1976d2; }
.cv-saved-item.inventory { border-left: 4px solid #16a34a; }

.cv-saved-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cv-saved-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.cv-saved-date {
    font-size: 11px;
    color: #999;
}

.cv-saved-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #555;
}

.cv-saved-list li {
    padding: 2px 0;
}

.cv-saved-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary, #FF6700);
    margin-bottom: 8px;
}

.cv-saved-actions {
    display: flex;
    gap: 6px;
}

.cv-saved-actions button {
    flex: 1;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.cv-saved-actions button:hover {
    background: #f5f5f5;
}

.cv-saved-actions .btn-load {
    background: var(--primary, #FF6700);
    color: #fff;
    border-color: var(--primary, #FF6700);
}

.cv-saved-actions .btn-load:hover {
    background: #ff7d1f;
}

.cv-saved-actions .btn-delete {
    color: #dc2626;
    border-color: #fecaca;
}

.cv-saved-actions .btn-delete:hover {
    background: #fee2e2;
}

.config-vault-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #fafafa;
    display: flex;
    gap: 8px;
}

.config-vault-footer button {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: background 0.2s;
}

.config-vault-footer .btn-primary {
    background: var(--primary, #FF6700);
    color: #fff;
    border-color: var(--primary, #FF6700);
}

.config-vault-footer .btn-primary:hover {
    background: #ff7d1f;
}

.config-vault-footer .btn-secondary {
    background: #fff;
    color: #dc2626;
    border-color: #fecaca;
}

.config-vault-footer .btn-secondary:hover {
    background: #fee2e2;
}

/* Toast-Hinweis für Auto-Save */
.cv-toast {
    position: fixed;
    bottom: 24px;
    right: 90px;
    background: #222;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1003;
    pointer-events: none;
}

.cv-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile-Anpassung */
@media (max-width: 600px) {
    .config-vault-btn {
        right: 16px;
        width: 48px;
        height: 48px;
    }
    .config-vault-icon {
        font-size: 22px;
    }
    .config-vault-panel {
        width: 100vw;
    }
    .cv-toast {
        right: 70px;
    }
}

/* Admin-Bilderverwaltung auf der Lagerfahrzeug-Detailseite */
.detail-admin-images {
    margin-top: 16px;
    padding: 16px;
    background: #fff7ed;
    border: 1px dashed #f59e0b;
    border-radius: 8px;
}

.detail-admin-images-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #92400e;
}

.detail-admin-upload {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.detail-admin-upload input[type="file"] {
    font-size: 13px;
}

.detail-img-status {
    font-size: 13px;
    color: #666;
}

.detail-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.detail-img-item {
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.detail-img-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.detail-img-item .btn-danger.btn-sm {
    width: 100%;
    border-radius: 0;
    border: none;
    border-top: 1px solid #b91c1c;
    padding: 5px 6px;
    font-size: 12px;
}

/* === Bildergalerie-Verwaltung (Admin Panel) === */
.gallery-section {
    margin-top: 24px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.gallery-section-header {
    padding: 16px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.gallery-section-header h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.gallery-section-header p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.gallery-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 20px 0 20px;
    border-bottom: 1px solid var(--border-light);
}

.gallery-tab {
    padding: 8px 18px;
    border: 1px solid var(--border-light);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    top: 1px;
}

.gallery-tab:hover {
    background: var(--white);
    color: var(--text-primary);
}

.gallery-tab.active {
    background: var(--white);
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}

.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.gallery-upload {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.gallery-upload input[type="file"] {
    font-size: 13px;
}

.gallery-actions {
    display: flex;
    gap: 8px;
}

.gallery-status {
    font-size: 13px;
    color: var(--text-secondary);
}

.gallery-hint {
    padding: 10px 20px;
    background: #fff7ed;
    color: #92400e;
    font-size: 12px;
    border-bottom: 1px solid #fde68a;
}

/* Kartenbild (Listenansicht) Verwaltung */
.gallery-card-image {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    background: #f0f9ff;
    border-bottom: 1px solid #bae6fd;
}

.gallery-card-image-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gallery-card-image-header strong {
    font-size: 14px;
    color: #075985;
}

.gallery-card-image-hint {
    font-size: 12px;
    color: #0369a1;
}

.gallery-card-image-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.gallery-card-image-preview {
    flex: 0 0 200px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
}

.gallery-card-image-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.gallery-card-image-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    flex: 1;
    min-width: 220px;
}

.gallery-card-image-actions input[type="file"] {
    font-size: 13px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    padding: 20px;
    min-height: 120px;
}

.gallery-loading,
.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.gallery-item {
    position: relative;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    cursor: grab;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.gallery-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gallery-item:active {
    cursor: grabbing;
}

.gallery-item.dragging {
    opacity: 0.4;
    border-style: dashed;
}

.gallery-item.drag-over {
    border-color: var(--primary);
    border-style: dashed;
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.gallery-item-handle {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    cursor: grab;
    z-index: 2;
}

.gallery-item-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
    z-index: 2;
}

.gallery-item-actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
}

.btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
    padding: 0;
}

.btn-icon:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-icon-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

@media (max-width: 640px) {
    .gallery-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .gallery-actions {
        justify-content: flex-end;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 14px;
    }
}

/* === Bildauswahl-Modal (Bibliothek) === */
.image-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}
.image-picker-dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 92%;
    max-width: 1000px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.image-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
}
.image-picker-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1a1a1a;
}
.image-picker-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}
.image-picker-close:hover { color: #333; }
.image-picker-toolbar {
    display: flex;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.image-picker-toolbar input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.image-picker-toolbar input[type="text"]:focus {
    outline: none;
    border-color: #FF6700;
}
.image-picker-upload-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #FF6700;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.image-picker-upload-btn:hover { background: #e55b00; }
.image-picker-grid {
    flex: 1;
    overflow-y: auto;
    padding: 18px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    align-content: start;
}
.image-picker-loading,
.image-picker-error,
.image-picker-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}
.image-picker-error { color: #c00; }
.image-picker-item {
    cursor: pointer;
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    background: #fafafa;
}
.image-picker-item:hover {
    border-color: #FF6700;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.image-picker-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    overflow: hidden;
}
.image-picker-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-picker-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}
.image-picker-name {
    padding: 6px 8px 2px;
    font-size: 11px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.image-picker-meta {
    padding: 0 8px 8px;
    font-size: 10px;
    color: #999;
}
.image-picker-footer {
    padding: 12px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.image-picker-hint {
    font-size: 12px;
    color: #888;
}
@media (max-width: 600px) {
    .image-picker-dialog { width: 96%; max-height: 92vh; }
    .image-picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
        padding: 12px;
    }
    .image-picker-toolbar { padding: 10px 12px; flex-wrap: wrap; }
    .image-picker-header { padding: 14px 16px; }
}

/* ============================================================
   === Statistik-Panel ===
   ============================================================ */
.stats-section {
    padding: 0;
}
.stats-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}
.stats-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.stats-filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}
.stats-filter-group select,
.stats-filter-group input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}
.stats-autorefresh {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    user-select: none;
}
.stats-autorefresh input { cursor: pointer; }

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    padding: 16px;
}
.stats-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: box-shadow .2s, transform .2s;
}
.stats-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.stats-card-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}
.stats-card-value {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
}
.stats-card-sub {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 16px 16px;
}
.stats-chart-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.stats-chart-wide {
    grid-column: 1 / -1;
}
.stats-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.stats-chart-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}
.stats-export-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.stats-chart-wrap {
    position: relative;
    height: 280px;
    width: 100%;
}
.stats-pages-wrap {
    height: auto;
    max-height: 320px;
    overflow-y: auto;
}

.stats-pages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.stats-page-row {
    display: grid;
    grid-template-columns: 1fr 100px 80px;
    gap: 10px;
    align-items: center;
    font-size: 12px;
}
.stats-page-path {
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.stats-page-bar {
    background: #f3f4f6;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}
.stats-page-bar-fill {
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    height: 100%;
    border-radius: 4px;
}
.stats-page-count {
    text-align: right;
    color: #111827;
    font-weight: 600;
}
.stats-page-uv {
    color: #9ca3af;
    font-weight: 400;
    font-size: 11px;
}

.stats-ip-table-wrap {
    overflow-x: auto;
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 6px;
}
.stats-ip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.stats-ip-table thead {
    position: sticky;
    top: 0;
    background: #f9fafb;
    z-index: 1;
}
.stats-ip-table th,
.stats-ip-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.stats-ip-table th {
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.stats-ip-table tbody tr:hover {
    background: #f9fafb;
}
.stats-ip-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #2563eb;
}
.stats-time-cell {
    color: #6b7280;
    font-size: 12px;
}
.stats-loading {
    text-align: center;
    color: #9ca3af;
    padding: 24px !important;
}

.stats-footer-note {
    padding: 12px 16px 16px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

/* Responsive Anpassungen */
@media (max-width: 900px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    .stats-chart-wide {
        grid-column: auto;
    }
}
@media (max-width: 600px) {
    .stats-toolbar {
        gap: 10px;
        padding: 12px;
    }
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
    }
    .stats-card-value { font-size: 20px; }
    .stats-chart-wrap { height: 220px; }
    .stats-page-row {
        grid-template-columns: 1fr 70px;
    }
    .stats-page-bar { display: none; }
}
