/* =================================================================
   OBETAuftrag – style.css (Teil 78)
   Theming-Fundament: alle Farben/Schrift über CSS-Variablen.
   Der Admin überschreibt diese Variablen in main.php aus den
   Einstellungen. Optisch behutsam aufgefrischt (Radien, Schatten, Luft).
   ================================================================= */

:root {
    /* Vom Admin überschreibbar (Theming) */
    --color-primary:      #005580;
    --color-accent:       #f39c12;
    --color-bg:           #f0f4f7;
    --font-main:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Abgeleitete / feste Werte */
    --color-primary-dark: #003d5c;
    --color-primary-soft: #e8f4fa;
    --color-surface:      #ffffff;
    --color-text:         #1a2535;
    --color-text-muted:   #6b7a8d;
    --color-border:       #dde3ea;

    --radius:    10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 10px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 28px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); line-height: 1.6; color: var(--color-text); background: var(--color-bg); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.site-header { background: var(--color-header, var(--color-primary)); color: #fff; padding: 15px 0; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.site-header .logo { color: #fff; font-size: 1.4rem; font-weight: bold; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.site-header .logo img { max-height: 34px; width: auto; display: block; }
.site-header nav a { color: #fff; margin-left: 20px; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
.nav-user { color: #aac; margin-left: 20px; font-size: 0.9rem; }
.nav-badge { display: inline-block; background: #e74c3c; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 0.75rem; font-weight: bold; margin-left: 3px; }

main.container { padding: 40px 20px 44px; min-height: 70vh; display: flow-root; }
main h1 { margin-top: 0; margin-bottom: 15px; }
main h2 { margin: 15px 0 10px; }
main p { margin-bottom: 10px; }

.alert { padding: 12px 16px; margin-bottom: 20px; border-radius: var(--radius-sm); }
.alert-success { background: #d4edda; color: #155724; }
.alert-error   { background: #f8d7da; color: #721c24; }

.site-footer { background: var(--color-footer, #222); color: #aaa; padding: 20px 0; margin-top: 40px; text-align: center; font-size: 0.9rem; }

/* ===== Auth-Formulare ===== */
.auth-box {
    max-width: 450px;
    margin: 30px auto;
    background: var(--color-surface);
    padding: 30px;
    border-radius: var(--radius);
    border: 0.5px solid var(--color-border); box-shadow: none;
}
.auth-box-wide { max-width: 700px; }
.auth-box h1 { margin-bottom: 20px; }
.auth-box h2 { margin: 25px 0 12px; font-size: 1.1rem; color: var(--color-primary); border-bottom: 0.5px solid var(--color-border); padding-bottom: 5px; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 0.95rem; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }
@media (max-width: 600px) { .form-row { flex-direction: column; gap: 0; } }

.form-check label { font-weight: normal; cursor: pointer; }
.form-check input { margin-right: 8px; }

.btn { display: inline-block; padding: 11px 22px; border: none; border-radius: var(--radius-sm); font-size: 1rem; cursor: pointer; text-decoration: none; transition: background 0.15s, transform 0.05s; background: var(--color-primary-soft); color: var(--color-primary); font-weight: 500; }
.btn:hover { background: #dde4ee; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: var(--color-surface); color: var(--color-primary); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-primary-soft); border-color: var(--color-primary); }
.btn-lg { padding: 12px 25px; font-size: 1.05rem; }

.auth-link { margin-top: 20px; text-align: center; font-size: 0.95rem; }
.muted { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 5px; }

/* ===== Anzeigen ===== */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.page-header h1 { margin: 0; }

.empty-state { text-align: center; padding: 40px; background: var(--color-surface); border-radius: var(--radius); }
.empty-state p { margin-bottom: 15px; color: var(--color-text-muted); }

.data-table { width: 100%; background: var(--color-surface); border-collapse: collapse; border-radius: var(--radius); overflow: hidden; border: 0.5px solid var(--color-border); box-shadow: none; }
.data-table th, .data-table td { padding: 11px 13px; text-align: left; border-bottom: 0.5px solid var(--color-border); }
.data-table th { background: var(--color-primary-soft); font-weight: 600; font-size: 0.9rem; color: var(--color-primary); }
.data-table tr:last-child td { border-bottom: none; }
.data-table .actions { white-space: nowrap; }
.data-table tr.unread { font-weight: 600; background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface)); }

.btn-sm { display: inline-block; padding: 5px 10px; font-size: 0.85rem; border: none; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a52b1f; }

.badge { display: inline-block; padding: 3px 8px; border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 500; }
.badge-auftrag    { background: #fff3cd; color: #856404; }
.badge-kapazitaet { background: #d1ecf1; color: #0c5460; }

.status { font-size: 0.85rem; }
.status-aktiv    { color: #28a745; }
.status-pausiert { color: #ffc107; }
.status-entwurf  { color: #6c757d; }
.status-geschlossen, .status-abgelaufen { color: #dc3545; }

.radio-group label, .checkbox-grid label { display: block; padding: 6px 0; font-weight: normal; cursor: pointer; }
.radio-group input, .checkbox-grid input { margin-right: 8px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 5px; }

/* Anzeige-Detail */
.ad-detail { background: var(--color-surface); padding: 30px; border-radius: var(--radius); border: 0.5px solid var(--color-border); box-shadow: none; }
.ad-detail-header h1 { margin: 10px 0 5px; }
.ad-categories { margin: 15px 0; }
.tag { display: inline-block; background: var(--color-primary-soft); color: var(--color-primary); padding: 3px 10px; border-radius: 12px; font-size: 0.85rem; margin-right: 5px; }
.ad-detail-body h2 { margin-top: 25px; font-size: 1.1rem; color: var(--color-primary); }
.data-list { display: grid; grid-template-columns: 200px 1fr; gap: 8px 20px; margin-top: 10px; }
.data-list dt { font-weight: 600; color: #555; }
.ad-actions { margin-top: 30px; padding-top: 20px; border-top: 0.5px solid var(--color-border); }
.ad-actions .btn { margin-right: 10px; }

textarea { resize: vertical; }

/* ===== Hero / Startseite ===== */
.hero { text-align: center; padding: 64px 20px; background: var(--color-surface); border-radius: var(--radius); margin-bottom: 36px; border: 0.5px solid var(--color-border); box-shadow: none; }
.hero h1 { font-size: 2.3rem; margin-bottom: 12px; color: var(--color-primary); letter-spacing: -0.5px; font-weight: 600; }
.hero-sub { font-size: 1.1rem; color: var(--color-text-muted); max-width: 620px; margin: 0 auto 28px; line-height: 1.6; }
.hero-actions .btn { margin: 0 5px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.stat-box { background: var(--color-surface); padding: 24px 18px; text-align: center; border-radius: var(--radius); border: 0.5px solid var(--color-border); box-shadow: none; transition: border-color 0.15s; }
.stat-num { font-size: 2rem; font-weight: 600; color: var(--color-primary); }
.stat-label { color: var(--color-text-muted); margin-top: 5px; font-size: 0.9rem; }
a.stat-box:hover { border-color: var(--color-primary); }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr; } }

/* Anzeigen-Grid */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.ad-card { display: block; background: var(--color-surface); padding: 18px; border-radius: var(--radius); text-decoration: none; color: inherit; border: 0.5px solid var(--color-border); box-shadow: none; transition: border-color 0.15s, transform 0.1s; }
.ad-card:hover { transform: translateY(-2px); border-color: var(--color-primary); }
.ad-card h3 { margin: 10px 0 8px; font-size: 1.05rem; color: var(--color-primary); font-weight: 600; }
.ad-card-desc { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 10px; line-height: 1.5; }
.ad-card-meta { font-size: 0.85rem; color: var(--color-text-muted); }

/* Suche Layout */
.search-layout { display: grid; grid-template-columns: 240px 1fr; gap: 25px; }
.search-filters { background: var(--color-surface); padding: 20px; border-radius: var(--radius); border: 0.5px solid var(--color-border); box-shadow: none; height: fit-content; }
.search-filters h3 { margin-bottom: 15px; font-size: 1rem; color: var(--color-primary); }
@media (max-width: 800px) { .search-layout { grid-template-columns: 1fr; } }

/* Paginierung */
.pagination { margin-top: 25px; text-align: center; }
.pagination a { display: inline-block; padding: 6px 12px; margin: 0 2px; background: var(--color-surface); color: var(--color-primary); border-radius: var(--radius-sm); text-decoration: none; border: 1px solid #ddd; }
.pagination a:hover { background: var(--color-primary-soft); }
.pagination a.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Anfragen */
.info-box { background: var(--color-primary-soft); padding: 12px 15px; border-left: 4px solid var(--color-primary); margin-bottom: 20px; border-radius: var(--radius-sm); }
.message-box { background: var(--color-primary-soft); padding: 15px; border-radius: var(--radius-sm); border: 0.5px solid var(--color-border); white-space: pre-wrap; }

/* ===== Logo / Bilder ===== */
.logo-edit { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; }
.logo-preview { flex: 0 0 auto; }
.logo-preview img {
    width: 120px; height: 120px; object-fit: contain;
    border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); padding: 6px;
}
.logo-placeholder {
    width: 120px; height: 120px; display: flex; align-items: center; justify-content: center;
    border: 1px dashed #ccc; border-radius: var(--radius-sm); color: #999; font-size: 0.85rem; background: #fafafa;
}
.logo-controls { flex: 1; min-width: 240px; }
.form-group input[type="file"] {
    width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: var(--radius-sm);
    font-size: 0.95rem; background: var(--color-surface);
}

.company-header { display: flex; gap: 20px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.company-logo img {
    width: 90px; height: 90px; object-fit: contain;
    border: 1px solid #eee; border-radius: var(--radius-sm); background: var(--color-surface); padding: 5px;
}
.company-header-text h1 { margin: 0 0 4px; }

.ad-header-row { display: flex; gap: 15px; align-items: center; margin-top: 8px; }
.ad-header-logo img {
    width: 60px; height: 60px; object-fit: contain;
    border: 1px solid #eee; border-radius: var(--radius-sm); background: var(--color-surface); padding: 4px;
}
.ad-header-row h1 { margin: 0 0 4px; font-size: 1.5rem; }

/* ===== Admin-Bereich ===== */
.nav-admin { background: #e74c3c; padding: 3px 10px; border-radius: var(--radius-sm); }
.nav-admin:hover { background: #c0392b; text-decoration: none !important; }

.admin-nav { display: flex; gap: 5px; margin-bottom: 25px; border-bottom: 2px solid var(--color-border); padding-bottom: 0; flex-wrap: wrap; }
.admin-nav a {
    padding: 10px 18px; text-decoration: none; color: #555;
    border-bottom: 2px solid transparent; margin-bottom: -2px; font-weight: 500;
}
.admin-nav a:hover { color: var(--color-primary); }
.admin-nav a.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.admin-cat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 25px; align-items: start; }
.admin-cat-form { background: var(--color-surface); padding: 20px; border-radius: var(--radius); border: 0.5px solid var(--color-border); box-shadow: none; }
.admin-cat-form h2 { margin-bottom: 15px; font-size: 1.05rem; color: var(--color-primary); }
@media (max-width: 800px) { .admin-cat-layout { grid-template-columns: 1fr; } }

.data-table .actions form { margin: 0 2px 2px 0; }
.data-table .actions { white-space: normal; min-width: 220px; }

/* ===== Merkliste / Favoriten ===== */
.nav-badge-fav { background: #f39c12; }

.fav-form { display: inline; }
.fav-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px; border: 1px solid #d8b400; background: #fff8e6;
    color: #8a6d00; border-radius: var(--radius-sm); font-size: 1rem; cursor: pointer;
    text-decoration: none; transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}
.fav-btn:hover { background: #fdeecb; }
.fav-btn.is-set { background: var(--color-accent); border-color: #d8860b; color: #fff; }
.fav-btn.is-set:hover { background: #e08e0b; }
.fav-icon { font-size: 1.1em; line-height: 1; }

.fav-btn-icon { padding: 6px 9px; font-size: 1.1rem; }

.ad-card-wrap { display: flex; flex-direction: column; }
.ad-card-fav { margin-top: 8px; }
.ad-card-fav .fav-btn { width: 100%; justify-content: center; }

.ad-card-inactive { opacity: 0.6; }

/* ===== Statistik / Diagramm ===== */
.chart-card {
    background: var(--color-surface); padding: 24px; border-radius: var(--radius);
    border: 0.5px solid var(--color-border); box-shadow: none; margin-top: 25px;
}
.chart-card h2 { font-size: 1.1rem; color: var(--color-primary); margin-bottom: 20px; }

.bar-chart {
    display: flex; align-items: flex-end; gap: 3px;
    height: 220px; padding-top: 20px;
    overflow-x: auto;
}
.bar-col {
    flex: 1 0 18px; min-width: 18px;
    display: flex; flex-direction: column; align-items: center;
    height: 100%; justify-content: flex-end;
}
.bar {
    width: 70%; min-height: 2px;
    background: linear-gradient(180deg, #2c6cb0 0%, var(--color-primary) 100%);
    border-radius: 3px 3px 0 0;
    position: relative;
    display: flex; justify-content: center;
    transition: background 0.15s;
}
.bar-col:hover .bar { background: var(--color-accent); }
.bar-val {
    position: absolute; top: -16px;
    font-size: 0.7rem; color: #555; white-space: nowrap;
}
.bar-label {
    margin-top: 6px; font-size: 0.65rem; color: #999;
    white-space: nowrap; transform: rotate(-45deg); transform-origin: center;
    height: 28px;
}
@media (max-width: 600px) {
    .bar-label { display: none; }
    .bar-chart { height: 160px; }
}

/* ===== Pakete / Abos (Admin) ===== */
.data-table details summary { display: inline-block; }
.data-table details summary::-webkit-details-marker { display: none; }
.data-table details[open] summary { margin-bottom: 6px; }
.data-table details .form-group { margin-bottom: 8px; }
.data-table details .form-group label { font-size: 0.8rem; }
.data-table details select,
.data-table details input { font-size: 0.9rem; padding: 6px 8px; }

/* ===== Pakete-Seite / Banner ===== */
.trial-banner {
    background: #fff4d6; border: 1px solid #f0d488; color: #7a5b00;
    padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.95rem;
}
.trial-banner a { color: var(--color-primary); font-weight: 600; }
.trial-banner-end { background: #fdecea; border-color: #f5c2bd; color: #8a2820; }

.plan-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px; align-items: stretch;
}
.plan-card {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
    padding: 26px 22px; display: flex; flex-direction: column;
    border: 0.5px solid var(--color-border); box-shadow: none;
}
.plan-card-highlight { border: 2px solid var(--color-primary); box-shadow: 0 4px 16px color-mix(in srgb, var(--color-primary) 14%, transparent); }
.plan-card h2 { font-size: 1.3rem; color: var(--color-primary); margin-bottom: 10px; }
.plan-price { font-size: 1.8rem; font-weight: bold; color: #222; margin-bottom: 4px; }
.plan-price-unit { font-size: 0.9rem; font-weight: normal; color: #888; }
.plan-trial { color: var(--color-accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 14px; }

.plan-features { list-style: none; padding: 0; margin: 16px 0; flex: 1; }
.plan-features li { padding: 6px 0 6px 26px; position: relative; font-size: 0.95rem; border-bottom: 1px solid #f2f2f4; }
.plan-features li.yes::before { content: "✓"; position: absolute; left: 0; color: #28a745; font-weight: bold; }
.plan-features li.no::before  { content: "✕"; position: absolute; left: 0; color: #ccc; }
.plan-features li.no { color: #aaa; }

.plan-desc { font-size: 0.88rem; color: var(--color-text-muted); margin-bottom: 16px; }

.feature-box { background: #fff8e6; border: 1px solid #f0d488; border-radius: var(--radius-sm); padding: 10px 14px; }

.ad-card-featured { border: 1px solid var(--color-accent); box-shadow: none; }
.featured-tag {
    display: inline-block; background: var(--color-accent); color: #fff; font-size: 0.72rem;
    padding: 2px 8px; border-radius: var(--radius-sm); font-weight: 600; margin-bottom: 6px;
}

/* ===== Statische Seiten / Footer-Links ===== */
.static-page {
    background: var(--color-surface); padding: 32px 36px; border-radius: var(--radius);
    border: 0.5px solid var(--color-border); box-shadow: none; max-width: 820px; margin: 0 auto;
}
.static-page h1 { margin-bottom: 20px; color: var(--color-primary); }
.static-page-content h2 { font-size: 1.2rem; color: var(--color-primary); margin: 24px 0 10px; }
.static-page-content h3 { font-size: 1.05rem; color: #333; margin: 18px 0 8px; }
.static-page-content p  { margin-bottom: 12px; line-height: 1.7; }
.static-page-content ul { margin: 0 0 12px 22px; }
.static-page-content li { margin-bottom: 6px; }

.footer-links { margin-bottom: 8px; }
.footer-links a { color: #ccc; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* ===== Cookie-Hinweis ===== */
.cookie-notice {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--color-primary);
    color: #fff;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.18);
}
.cookie-notice[hidden] { display: none; }
.cookie-notice-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.cookie-notice-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}
.cookie-notice-text a { color: #ffd87a; text-decoration: underline; }
.cookie-notice-text a:hover { color: #fff; }
.cookie-notice-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .cookie-notice-inner { flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
    .cookie-notice-btn { width: 100%; }
}

/* ===== Nachrichtenverlauf / Thread ===== */
.thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}
.thread-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    position: relative;
}
.thread-msg-other {
    align-self: flex-start;
    background: #f5f6f8;
    border-bottom-left-radius: 2px;
}
.thread-msg-mine {
    align-self: flex-end;
    background: #e8f0f8;
    border: 1px solid #cdddee;
    border-bottom-right-radius: 2px;
}
.thread-msg-head {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
}
.thread-msg-date {
    font-weight: normal;
    color: #999;
}
.thread-msg-body {
    line-height: 1.55;
    word-break: break-word;
}
@media (max-width: 600px) {
    .thread-msg { max-width: 92%; }
}

/* ===== Postfach "Neu"-Badge ===== */
.msg-badge {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
    vertical-align: middle;
    white-space: nowrap;
}
.data-table tr.unread {
    background: #fafbff;
}
.data-table tr.unread td:first-child {
    box-shadow: inset 3px 0 0 var(--color-primary);
}

/* ===== Bessere Suche ===== */
.budget-range {
    display: flex;
    align-items: center;
    gap: 8px;
}
.budget-range input {
    width: 100%;
    min-width: 0;
}
.budget-range span {
    color: #999;
}
.ad-card mark {
    background: #fff3b0;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* ===== Anzeigentyp-Auswahl ===== */
.type-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.type-choice {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.type-choice:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--color-primary) 12%, transparent);
    transform: translateY(-2px);
}
.type-choice-label {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-primary);
}
.type-choice-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ===== Startseite Bereichs-Sektionen ===== */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 0 14px;
}
.section-head h2 {
    margin: 0;
}
.stats {
    flex-wrap: wrap;
    gap: 12px;
}
.stats .stat-box {
    flex: 1 1 140px;
}

/* ===== Startseite: klickbare Statistik-Boxen ===== */
a.stat-box {
    text-decoration: none;
    color: inherit;
    transition: border-color .15s;
}
a.stat-box:hover {
    border-color: var(--color-primary);
}

/* ===== Anonyme Anzeigen ===== */
.anon-tag {
    display: inline-block;
    background: #444;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}
.anon-box {
    background: #f3f4f6;
    border: 1px solid #d9dce1;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}
.anon-box small {
    display: block;
    margin-top: 4px;
}

/* ===== Identitäts-Freigabe ===== */
.reveal-box {
    background: #f3f4f6;
    border: 1px solid #d9dce1;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 18px;
    font-size: 0.95rem;
}
.reveal-box .anon-tag {
    margin-right: 6px;
}

/* ===== Nachrichten ausblenden ===== */
.thread-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0;
}
.msg-hide-form {
    position: absolute;
    top: 6px;
    right: 8px;
    margin: 0;
}
.msg-hide-btn {
    background: transparent;
    border: none;
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
}
.msg-hide-btn:hover {
    color: #dc3545;
    background: rgba(220,53,69,0.08);
}

/* ===== Anzeigenfotos ===== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.photo-item {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-bg);
}
.photo-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}
.photo-del-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}
.photo-del-btn:hover {
    background: #dc3545;
}

/* ===== Galerie / Lightbox / Hauptbild ===== */
.ad-card-photo {
    width: calc(100% + 32px);
    margin: -16px -16px 12px;
    height: 160px;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: var(--radius) var(--radius) 0 0;
}
.ad-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ad-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}
.ad-gallery-thumb {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0;
    background: #f3f4f6;
    cursor: pointer;
    overflow: hidden;
    width: 130px;
    height: 130px;
}
.ad-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .15s;
}
.ad-gallery-thumb:hover img {
    transform: scale(1.05);
}
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 6px 40px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 54px;
    height: 64px;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.photo-item-main {
    outline: 3px solid var(--color-primary);
    outline-offset: -3px;
}
.photo-main-badge {
    display: block;
    text-align: center;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.75rem;
    padding: 3px 0;
}
.photo-main-form { margin: 0; }
.photo-main-btn {
    width: 100%;
    border: none;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.78rem;
    padding: 4px 0;
    cursor: pointer;
}
.photo-main-btn:hover { background: #dde6f0; }

@media (max-width: 600px) {
    .lightbox-nav { width: 40px; height: 52px; font-size: 1.5rem; }
    .ad-gallery-thumb { width: 96px; height: 96px; }
}

/* ===== Badge-Farben für alle Anzeigentypen ===== */
.badge-job     { background: #e2e3f3; color: #2d2f6b; }
.badge-verkauf { background: #d4edda; color: #155724; }
.badge-gesuch  { background: #fde2cf; color: #8a4b1c; }

/* ===== Pakete-Verwaltung ===== */
.plan-inactive { opacity: 0.55; }
.plan-inactive strong { color: #888; }

/* ===== Footer-Spalten ===== */
.footer-cols {
    display: grid;
    gap: 28px;
    text-align: left;
    padding-bottom: 22px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-cols-1 { grid-template-columns: 1fr; }
.footer-cols-2 { grid-template-columns: repeat(2, 1fr); }
.footer-cols-3 { grid-template-columns: repeat(3, 1fr); }
.footer-cols-4 { grid-template-columns: repeat(4, 1fr); }
.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 10px;
}
.footer-col-content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #bbb;
}
.footer-col-content a {
    color: #cdd8e6;
    text-decoration: none;
    display: block;
    padding: 1px 0;
}
.footer-col-content a:hover { text-decoration: underline; }
.footer-col-content img {
    max-width: 100%;
    height: auto;
    margin: 4px 0;
}
@media (max-width: 800px) {
    .footer-cols-3, .footer-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .footer-cols-2, .footer-cols-3, .footer-cols-4 { grid-template-columns: 1fr; }
}

/* ===== Merkmal-Filter in der Suche ===== */
.filter-attr-values {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    background: var(--color-surface);
}
.filter-attr-option {
    display: block;
    font-weight: normal;
    font-size: 0.9rem;
    padding: 2px 0;
    cursor: pointer;
}
.filter-attr-option input { margin-right: 7px; }

/* ===== Sprachumschalter ===== */
.nav-lang {
    margin-left: 16px;
    border-left: 1px solid rgba(255,255,255,0.25);
    padding-left: 12px;
}
.nav-lang a {
    margin-left: 6px !important;
    font-size: 0.82rem;
    opacity: 0.7;
}
.nav-lang a.active {
    opacity: 1;
    font-weight: bold;
    text-decoration: underline;
}
.lang-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== Sprach-Pills in der Admin-Seitenliste ===== */
.page-langs { white-space: nowrap; }
.lang-pill {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 3px 2px 0;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.6;
}
.lang-pill-ok {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #b7dfc2;
}
.lang-pill-ok:hover { background: #d4ecdb; }
.lang-pill-missing {
    background: #f3f3f5;
    color: #888;
    border: 1px dashed #c9c9d0;
}
.lang-pill-missing:hover {
    background: #ececef;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ===== Übersetzungs-Fortschritt im Sprach-Editor ===== */
.progress-track {
    background: #e9e9ef;
    border-radius: var(--radius-sm);
    height: 10px;
    width: 100%;
    overflow: hidden;
}
.progress-fill {
    background: var(--color-primary);
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
}

/* ===== Theme-Vorschau im Admin (Teil 78) ===== */
.theme-swatch {
    display: inline-block;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    vertical-align: middle;
    margin-right: 6px;
}
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] { width: 48px; height: 38px; padding: 2px; border: 1px solid #ccc; border-radius: var(--radius-sm); cursor: pointer; background: #fff; }

/* ============================================================
   Teil 79 – Dark Mode (Besucher-Umschalter)
   ============================================================ */

/* Umschalt-Button im Menü */
.theme-toggle {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    cursor: pointer;
    margin-left: 16px;
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    line-height: 1;
    vertical-align: middle;
}
.theme-toggle:hover { background: rgba(255,255,255,0.22); }
.theme-toggle-icon { display: none; }
/* Im Hell-Modus den Mond zeigen (= "zu dunkel wechseln"),
   im Dunkel-Modus die Sonne (= "zu hell wechseln"). */
.theme-icon-dark  { display: inline; }
.theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark  { display: none; }
html[data-theme="dark"] .theme-icon-light { display: inline; }

/* Dunkle Farb-Variablen: überschreiben die hellen (höhere Spezifität als :root) */
html[data-theme="dark"] {
    --color-bg:           #0f1923;
    --color-surface:      #1a2535;
    --color-text:         #e0eaf4;
    --color-text-muted:   #7a90a8;
    --color-border:       #263447;
    --color-primary-soft: #0d2035;
}

/* Feinheiten, die nicht über die Variablen laufen */
html[data-theme="dark"] body { background: var(--color-bg); color: var(--color-text); }

/* Flächen, die fest helle Werte hatten, im Dark Mode anpassen */
html[data-theme="dark"] .data-table th { background: #1f2d3d; color: var(--color-text); }
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .data-table td { border-bottom-color: var(--color-border); }
html[data-theme="dark"] .data-table tr.unread { background: #2c2f25; }

html[data-theme="dark"] .message-box,
html[data-theme="dark"] .thread-msg-other { background: #1f2d3d; border-color: var(--color-border); }
html[data-theme="dark"] .thread-msg-mine { background: #243140; border-color: #34506b; }

html[data-theme="dark"] .logo-placeholder { background: #1f2d3d; border-color: var(--color-border); color: #888; }
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .photo-item,
html[data-theme="dark"] .ad-card-photo,
html[data-theme="dark"] .ad-gallery-thumb { background: #1f2d3d; }

html[data-theme="dark"] .form-group input[type="text"],
html[data-theme="dark"] .form-group input[type="email"],
html[data-theme="dark"] .form-group input[type="password"],
html[data-theme="dark"] .form-group input[type="url"],
html[data-theme="dark"] .form-group input[type="number"],
html[data-theme="dark"] .form-group input[type="date"],
html[data-theme="dark"] .form-group textarea,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group input[type="file"] {
    background: #1f2d3d;
    color: var(--color-text);
    border-color: var(--color-border);
}

/* Helle Hinweisflächen abdunkeln */
html[data-theme="dark"] .anon-box,
html[data-theme="dark"] .reveal-box { background: #1f2d3d; border-color: var(--color-border); }
html[data-theme="dark"] .alert-success { background: #14331f; color: #b6e6c4; }
html[data-theme="dark"] .alert-error   { background: #3a1c1f; color: #f0b6bc; }

/* Statische Seiten / Boxen erben über die Variablen automatisch.
   Footer bleibt bewusst dunkel wie gehabt. */

/* ============================================
   Teil 80 – SVG-Symbole für den Dark-Mode-Umschalter
   AN style.css ANHÄNGEN (per SSH mit zwei >> !)
   (überschreibt das frühere Emoji-Styling aus Teil 79)
   ============================================ */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
}
.theme-toggle-icon {
    display: none;
    line-height: 0;
}
.theme-toggle-icon svg {
    display: block;
}
/* Hell aktiv -> Mond zeigen (Klick = dunkel werden) */
.theme-icon-dark  { display: inline-flex; }
.theme-icon-light { display: none; }
/* Dunkel aktiv -> Sonne zeigen (Klick = hell werden) */
html[data-theme="dark"] .theme-icon-dark  { display: none; }
html[data-theme="dark"] .theme-icon-light { display: inline-flex; }

/* ============================================
   Teil 81 – Dark Mode: Lesbarkeit verbessern
   AN style.css ANHÄNGEN (per SSH mit zwei >> !)
   Hebt im Dunkelmodus zu dunkle Texte an. Hellmodus bleibt unverändert.
   ============================================ */

/* Gedämpften Text deutlich heller machen */
html[data-theme="dark"] {
    --color-text-muted: #b9bfca;
}

/* Feste dunkle Textfarben (#555, #333, #222, #666) im Dunkelmodus aufhellen.
   Diese Klassen nutzten harte Werte statt der Variablen. */
html[data-theme="dark"] .hero-sub,
html[data-theme="dark"] .ad-card-desc,
html[data-theme="dark"] .data-list dt,
html[data-theme="dark"] .bar-val,
html[data-theme="dark"] .plan-price,
html[data-theme="dark"] .static-page-content h3,
html[data-theme="dark"] .thread-msg-body,
html[data-theme="dark"] .message-box,
html[data-theme="dark"] .reveal-box,
html[data-theme="dark"] .anon-box {
    color: #d4d8df;
}

/* .muted-Texte (Hinweise) etwas heller */
html[data-theme="dark"] .muted {
    color: #b9bfca;
}

/* Überschriften in dunklen Boxen: helle Primärtönung statt dunkelblau */
html[data-theme="dark"] .auth-box h2,
html[data-theme="dark"] .ad-detail-body h2,
html[data-theme="dark"] .static-page h1,
html[data-theme="dark"] .static-page-content h2,
html[data-theme="dark"] .ad-card h3,
html[data-theme="dark"] .search-filters h3,
html[data-theme="dark"] .chart-card h2,
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .stat-num,
html[data-theme="dark"] .plan-card h2 {
    color: #4db8ff;   /* helleres Blau, gut lesbar auf Dunkel */
}

/* Plan-Preis und kräftige Texte klar weiß */
html[data-theme="dark"] .plan-price,
html[data-theme="dark"] .static-page-content h3 {
    color: #e6e7ea;
}

/* Links im Fließtext heller */
html[data-theme="dark"] .static-page-content a,
html[data-theme="dark"] .auth-link a {
    color: #4db8ff;
}

/* Tabellen: Zelltext sicher hell */
html[data-theme="dark"] .data-table td {
    color: var(--color-text);
}

/* ============================================
   Teil 82 – Anzeigentyp-Symbole + Foto-Platzhalter
   AN style.css ANHÄNGEN (per SSH mit zwei >> !)
   ============================================ */

/* Foto-Platzhalter in Karten (Anzeigen ohne eigenes Foto):
   großes Typ-Symbol auf der Typ-Farbe. */
.ad-card-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-card-photo-icon {
    font-size: 3.4rem;
    line-height: 1;
    opacity: 0.92;
    filter: saturate(1.1);
}

/* Symbol in der Anzeigentyp-Auswahl (beim Inserieren) */
.type-choice-icon {
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 4px;
    display: block;
}

/* Im Dunkelmodus den Platzhalter etwas abdunkeln, damit das Emoji ruhig wirkt */
html[data-theme="dark"] .ad-card-photo-placeholder {
    filter: brightness(0.82);
}

/* ============================================
   Teil 83 – SVG-Icons für Anzeigentypen
   AN style.css ANHÄNGEN (per SSH mit zwei >> !)
   (ersetzt die Emoji-Darstellung aus Teil 82)
   ============================================ */

/* Icon-Auswahl im Admin (Raster aus anklickbaren Symbolen) */
.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.icon-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color .12s, background .12s;
    position: relative;
}
.icon-option:hover { border-color: var(--color-primary); }
.icon-option input { position: absolute; opacity: 0; pointer-events: none; }
.icon-option.is-selected,
.icon-option:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    box-shadow: inset 0 0 0 1px var(--color-primary);
}
.icon-option-none { font-size: 0.8rem; color: var(--color-text-muted); }

/* Symbol im Typ-Badge (kleines Icon vor dem Text) */
.badge-icon {
    display: inline-flex;
    vertical-align: -3px;
    margin-right: 2px;
}
.badge-icon svg { display: block; }

/* Großes Symbol im Foto-Platzhalter der Karten */
.ad-card-photo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}
.ad-card-photo-icon svg { display: block; width: 56px; height: 56px; }

/* Symbol in der Anzeigentyp-Auswahl (beim Inserieren) */
.type-choice-icon {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--color-primary);
}
.type-choice-icon svg { display: block; }

/* ============================================
   Teil 86 – Firmen-Verzeichnis
   AN style.css ANHÄNGEN (per SSH mit zwei >> !)
   ============================================ */

/* Filter-Leiste */
.company-filter {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 8px;
    border: 0.5px solid var(--color-border); box-shadow: none;
}
.company-filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}
.company-filter .form-group { margin-bottom: 0; }
.company-filter-submit { display: flex; }
.company-filter-submit .btn { width: 100%; white-space: nowrap; }
@media (max-width: 760px) {
    .company-filter-row { grid-template-columns: 1fr; }
}

/* Firmen-Raster */
.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}
.company-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: var(--color-surface);
    padding: 16px;
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    border: 0.5px solid var(--color-border); box-shadow: none;
    border: 1px solid var(--color-border);
    transition: transform 0.1s, box-shadow 0.1s;
}
.company-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.company-card-logo {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.company-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.company-card-initial {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}
.company-card-body { min-width: 0; }
.company-card-body h3 {
    margin: 0 0 3px;
    font-size: 1.05rem;
    color: var(--color-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.company-card-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.company-card-ads {
    font-size: 0.82rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-top: 4px;
}

/* Logo-Fläche im Dark Mode */
html[data-theme="dark"] .company-card-logo { background: #1f2d3d; }
html[data-theme="dark"] .company-card-logo img { background: #fff; }

/* ============================================
   Teil 87 – Firmen-Branchen
   AN style.css ANHÄNGEN (per SSH mit zwei >> !)
   ============================================ */

/* Branchen-Tags auf dem öffentlichen Firmenprofil */
.company-branches {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.company-branches .tag {
    text-decoration: none;
    transition: background 0.12s;
}
.company-branches .tag:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Branchen-Auswahl im Profil-Formular */
.branch-grid .branch-option {
    display: block;
    padding: 4px 0;
    font-weight: normal;
    cursor: pointer;
}
.branch-grid input:disabled + span,
.branch-grid input:disabled {
    opacity: 0.5;
}
.branch-grid .branch-option input { margin-right: 8px; }

/* ============================================
   Modernes Menü: Burger (mobil) + CTA-Button
   ============================================ */

/* "+ Neue Anzeige" als auffälliger Button */
.site-header nav a.nav-cta {
    background: var(--color-accent);
    color: #fff;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-left: 20px;
}
.site-header nav a.nav-cta:hover {
    background: color-mix(in srgb, var(--color-accent) 85%, #000);
    text-decoration: none;
}

/* Burger-Button – standardmäßig versteckt (nur mobil sichtbar) */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 38px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0 9px;
}
.nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile: Menü als aufklappbare Liste ---- */
@media (max-width: 900px) {
    .site-header .container { position: relative; }
    .nav-burger { display: flex; }

    .site-header nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin-top: 12px;
    }
    .site-header nav.nav-open { display: flex; }

    .site-header nav a {
        margin-left: 0;
        padding: 11px 8px;
        border-radius: var(--radius-sm);
    }
    .site-header nav a:hover { background: rgba(255,255,255,0.12); text-decoration: none; }

    .site-header nav a.nav-cta { margin-left: 0; text-align: center; margin-top: 4px; }
    .nav-user { margin-left: 0; padding: 8px; }
    .nav-lang { margin-left: 0; padding: 8px 0; }
}

/* ============================================
   Mobile-Optimierung (konsolidiert)
   ============================================ */
@media (max-width: 700px) {
    /* Statistik-Kacheln: 2 nebeneinander (kompakter als 1 lange Spalte) */
    .stats { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }

    /* Hero kompakter, Schrift etwas kleiner */
    .hero { padding: 36px 18px; }
    .hero h1 { font-size: 1.7rem; }
    .hero-sub { font-size: 1rem; }
    .hero-actions .btn { display: block; width: 100%; margin: 8px 0 0; }
    .hero-actions .btn:first-child { margin-top: 0; }

    /* Boxen am Handy mit weniger Innenabstand (mehr Platz für Inhalt) */
    main.container { padding: 24px 14px 32px; }
    .ad-detail, .auth-box, .static-page, .search-filters { padding: 20px 16px; }
    .auth-box { margin: 16px auto; }

    /* Anzeigen-Grid: eine Spalte, volle Breite */
    .ad-grid { grid-template-columns: 1fr; gap: 14px; }

    /* Tabellen: horizontal scrollbar statt überlaufend */
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

    /* Touch-Ziele: Buttons etwas größer/griffiger */
    .btn { padding: 12px 20px; }
    .btn-sm { padding: 8px 14px; }

    /* Überschriften nicht zu groß */
    main h1 { font-size: 1.6rem; }
}

@media (max-width: 420px) {
    /* Auf sehr schmalen Geräten Statistik einspaltig */
    .stats { grid-template-columns: 1fr !important; }
}

/* ============================================
   KI-Textverbesserung im Anzeigen-Formular
   ============================================ */
.ai-improve-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.ai-improve-btn {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 7px 13px;
    cursor: pointer;
    font-weight: 600;
}
.ai-improve-btn:hover { background: var(--color-primary); color: #fff; }
.ai-improve-btn:disabled { opacity: 0.6; cursor: default; }
.ai-improve-undo {
    background: var(--color-surface);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 7px 13px;
    cursor: pointer;
}
.ai-improve-undo:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ai-improve-hint { font-size: 0.85rem; color: var(--color-text-muted); }

/* ============================================
   FAQ-Seite (aufklappbar)
   ============================================ */
.faq-page .faq-cat {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin: 26px 0 10px;
    padding-bottom: 6px;
    border-bottom: 0.5px solid var(--color-border);
}
.faq-page .faq-cat:first-of-type { margin-top: 8px; }

.faq-item {
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: var(--color-surface);
    overflow: hidden;
}
.faq-item summary {
    padding: 13px 16px;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: "+";
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.faq-item[open] summary::before { content: "\2013"; }
.faq-item summary:hover { background: var(--color-primary-soft); }
.faq-answer {
    padding: 4px 16px 16px 42px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ============================================
   Pakete: Monatlich/Jährlich-Umschalter
   ============================================ */
.billing-toggle {
    display: flex;
    width: fit-content;
    margin: 0 auto 26px;
    border: 0.5px solid var(--color-border);
    border-radius: 999px;
    padding: 4px;
    background: var(--color-surface);
    gap: 4px;
}

.billing-opt {
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    padding: 8px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.15s, color 0.15s;
}
.billing-opt.is-active {
    background: var(--color-primary);
    color: #fff;
}

.plan-save-badge {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
}
.plan-permonth {
    display: block;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-top: 4px;
}

/* ============================================
   News-Bereich (RSS-Feed)
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 8px;
}
.news-card {
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, transform 0.1s;
}
.news-card:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.news-card-img {
    display: block;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-primary-soft);
}
.news-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.news-card-date { font-size: 0.8rem; color: var(--color-text-muted); }
.news-card-title { font-size: 1.05rem; margin: 0; line-height: 1.35; }
.news-card-title a { color: var(--color-text); text-decoration: none; }
.news-card-title a:hover { color: var(--color-primary); }
.news-card-excerpt { font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.55; margin: 0; }
.news-card-more {
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    padding-top: 4px;
}
.news-card-more:hover { text-decoration: underline; }
.news-source-note { margin-top: 24px; text-align: center; font-size: 0.85rem; }

@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

/* News: mehrere Quellen */
.news-source-heading {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin: 30px 0 12px;
    padding-bottom: 6px;
    border-bottom: 0.5px solid var(--color-border);
}
.news-source-heading:first-of-type { margin-top: 8px; }
.news-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.news-card-source {
    font-size: 0.72rem;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 600;
}

/* ============================================
   Sprachen-Seite breiter (mehr Platz für Eingabefelder)
   ============================================ */
/* Nur wenn der Container Sprach-Editor-Boxen enthält, darf er breiter werden */
main.container:has(.lang-box) {
    max-width: 1500px;
}
.lang-box {
    max-width: none;   /* statt 700px: volle Breite des (breiteren) Containers */
}
/* Übersetzungs-Tabellen: Spalten gleichmäßig, Eingabefelder breit */
.lang-box .data-table { table-layout: fixed; }
.lang-box .data-table th,
.lang-box .data-table td { vertical-align: top; }
.lang-box .text-cell textarea,
.lang-box .text-cell input[type="text"] { width: 100%; }

/* Auf schmalen Bildschirmen kein Zwang zur Riesenbreite */
@media (max-width: 1100px) {
    main.container:has(.lang-box) { max-width: 1100px; }
}

/* Design-Admin: Aktivieren-Schalter neben Leisten-Farbwähler */
.color-field .bar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--color-text);
    white-space: nowrap;
    margin: 0;
    font-weight: 400;
}
.color-field input[type="color"]:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================
   Admin-Navigation: gruppiert
   ============================================ */
.admin-nav-grouped {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px 14px;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 12px;
    margin-bottom: 25px;
}
.admin-nav-grouped .admin-nav-home {
    padding: 10px 16px;
    text-decoration: none;
    color: #fff;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    align-self: center;
}
.admin-nav-grouped .admin-nav-home:hover { background: var(--color-primary-dark); }

.admin-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 12px;
    border-left: 0.5px solid var(--color-border);
}
.admin-nav-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}
.admin-nav-group-links { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.admin-nav-group a {
    display: inline-block;
    padding: 3px 0;
    margin-right: 12px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.92rem;
}
.admin-nav-group a:last-child { margin-right: 0; }
.admin-nav-group a:hover { color: var(--color-primary); }
.admin-nav-group a.active { color: var(--color-primary); font-weight: 700; }

@media (max-width: 700px) {
    .admin-nav-grouped { gap: 6px 10px; }
    .admin-nav-group { border-left: none; border-top: 0.5px solid var(--color-border); padding: 8px 0 4px; width: 100%; }
    .admin-nav-group-links, .admin-nav-group { flex-direction: row; flex-wrap: wrap; align-items: baseline; }
    .admin-nav-label { width: 100%; }
}

/* Code-Eingabefelder (head-Code im Admin) */
textarea.code-area {
    font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre;
    overflow-x: auto;
    tab-size: 2;
}
