/* Anzeigenmarkt — Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    --am-primary: #0c4a5c;
    --am-primary-dark: #083540;
    --am-primary-light: #15697f;
    --am-accent: #e85d3a;
    --am-accent-hover: #cf4f2f;
    --am-surface: #ffffff;
    --am-surface-alt: #f4f7f8;
    --am-border: #e2e8ec;
    --am-text: #1a2b33;
    --am-text-muted: #5c6f7a;
    --am-shadow-sm: 0 2px 8px rgba(12, 74, 92, 0.08);
    --am-shadow-md: 0 8px 30px rgba(12, 74, 92, 0.12);
    --am-shadow-lg: 0 20px 50px rgba(12, 74, 92, 0.15);
    --am-radius: 12px;
    --am-radius-lg: 20px;
    --am-font: 'DM Sans', system-ui, -apple-system, sans-serif;
    --am-header-h: 72px;
    --am-header-control-h: 42px;
    --am-content-max: min(1400px, 78vw);
    --am-content-pad: 1rem;
}

[data-theme="dark"] {
    --am-surface: #0a1216;
    --am-surface-alt: #0d161b;
    --am-border: #1e2e36;
    --am-text: #dce8ed;
    --am-text-muted: #7a939f;
    --am-primary-dark: #051a20;
    --am-primary: #0a3540;
    --am-primary-light: #0f4a58;
}

[data-theme="dark"] .am-search__input,
[data-theme="dark"] .am-search__select,
[data-theme="dark"] .am-live-search__query,
[data-theme="dark"] .am-input,
[data-theme="dark"] .am-form-control,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #121c22;
    color: var(--am-text);
    border: 1px solid var(--am-border);
}

[data-theme="dark"] .am-search__input::placeholder,
[data-theme="dark"] .am-input::placeholder,
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #6b8490;
    opacity: 1;
}

[data-theme="dark"] .am-search__select option {
    background: #121c22;
    color: var(--am-text);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--am-font);
    color: var(--am-text);
    background: var(--am-surface-alt);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.am-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--am-surface);
    border-bottom: 1px solid var(--am-border);
    box-shadow: var(--am-shadow-sm);
    height: var(--am-header-h);
}

.am-header__inner {
    width: var(--am-content-max);
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--am-content-pad);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.am-header__logo img {
    height: 48px;
    width: auto;
    display: block;
}

.am-header__nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.am-header__icon-btn,
.am-header__menu-btn,
.am-header__nav .am-header__cta {
    height: var(--am-header-control-h);
    min-height: var(--am-header-control-h);
    box-sizing: border-box;
}

.am-header__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--am-header-control-h);
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--am-border);
    border-radius: 10px;
    background: var(--am-surface-alt);
    color: var(--am-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.am-header__icon-btn:hover {
    border-color: var(--am-primary-light);
    background: var(--am-surface);
    color: var(--am-primary);
}

.am-header__menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.85rem;
    border: 1px solid var(--am-border);
    border-radius: 10px;
    background: var(--am-surface-alt);
    color: var(--am-text);
    font-family: var(--am-font);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.am-header__menu-btn:hover,
.am-header__menu-btn:focus,
.am-header__menu-btn.show {
    border-color: var(--am-primary-light);
    background: var(--am-surface);
    color: var(--am-primary);
}

.am-header__menu-btn--account {
    border-color: rgba(12, 74, 92, 0.25);
    background: rgba(12, 74, 92, 0.06);
}

.am-header__menu-btn::after {
    margin-left: 0.15rem;
    font-size: 0.7rem;
}

.am-header__dropdown-menu {
    border: 1px solid var(--am-border);
    border-radius: 12px;
    box-shadow: var(--am-shadow-md);
    padding: 0.4rem;
    min-width: 220px;
}

.am-header__dropdown-menu .dropdown-item {
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.am-header__dropdown-menu .dropdown-item.active {
    background: rgba(12, 74, 92, 0.08);
    color: var(--am-primary);
}

.am-header__dropdown-login {
    color: var(--am-primary);
    font-weight: 700;
}

.am-header__lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 4px;
    background: var(--am-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
}

.am-header__cta {
    white-space: nowrap;
    padding: 0 1rem;
    font-size: 0.85rem;
}

.am-header__cta--create {
    gap: 0.35rem;
    margin-left: 0.15rem;
}

.am-header__cta--create i {
    font-size: 0.75rem;
}

.am-header__dropdown-item--create {
    font-weight: 600;
    color: var(--am-primary) !important;
}

.am-header__dropdown-item--create:hover {
    background: var(--am-surface-alt);
    color: var(--am-primary-dark) !important;
}

.am-header__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.35rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--am-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.am-toast-msg {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 1100;
    padding: 0.75rem 1rem;
    background: var(--am-primary);
    color: #fff;
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow-md);
    font-size: 0.875rem;
    font-weight: 600;
}

.am-toast-stack {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: min(440px, calc(100vw - 2rem));
    pointer-events: none;
}

.am-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem 1rem 1rem;
    border-radius: 14px;
    font-size: 0.875rem;
    color: #0f172a;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: auto;
    overflow: hidden;
}

.am-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.am-toast__accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.am-toast__icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.am-toast__content {
    flex: 1;
    min-width: 0;
    padding-top: 0.1rem;
}

.am-toast__title {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
    color: #0f172a;
}

.am-toast__message {
    font-weight: 500;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #475569;
}

.am-toast__close {
    border: 0;
    background: transparent;
    color: #94a3b8;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    margin: -0.15rem -0.25rem 0 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.am-toast__close:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #64748b;
}

.am-toast--success .am-toast__accent { background: linear-gradient(180deg, #16a34a, #059669); }
.am-toast--success .am-toast__icon {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.14), rgba(5, 150, 105, 0.08));
    color: #15803d;
}

.am-toast--error .am-toast__accent { background: linear-gradient(180deg, #dc2626, #b91c1c); }
.am-toast--error .am-toast__icon {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.14), rgba(185, 28, 28, 0.08));
    color: #b91c1c;
}

.am-toast--info .am-toast__accent { background: linear-gradient(180deg, var(--am-primary, #0c4a5c), #138da6); }
.am-toast--info .am-toast__icon {
    background: linear-gradient(135deg, rgba(12, 74, 92, 0.14), rgba(19, 141, 166, 0.08));
    color: var(--am-primary, #0c4a5c);
}

.am-toast--warning .am-toast__accent { background: linear-gradient(180deg, #d97706, #b45309); }
.am-toast--warning .am-toast__icon {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.14), rgba(180, 83, 9, 0.08));
    color: #b45309;
}

/* Legacy single-color toasts (fallback) */
.am-toast:not(.am-toast--premium) {
    padding: 0.85rem 1.1rem;
    font-weight: 600;
    color: #fff;
}

.am-toast:not(.am-toast--premium).is-visible {
    transform: translateY(0);
}

.am-toast--error:not(.am-toast--premium) { background: #b91c1c; }
.am-toast--info:not(.am-toast--premium) { background: var(--am-primary); }
.am-toast--success:not(.am-toast--premium) { background: #16a34a; }

.am-header__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--am-border);
    flex-shrink: 0;
}

.am-header__notify-btn {
    position: relative;
}

.am-header__notify-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--am-accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
}

.am-notify-panel {
    width: min(360px, calc(100vw - 2rem));
    padding: 0;
    overflow: hidden;
}

.am-notify-panel__head,
.am-notify-panel__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--am-surface-alt);
}

.am-notify-panel__foot {
    border-top: 1px solid var(--am-border);
    font-size: 0.82rem;
}

.am-notify-panel__foot a {
    color: var(--am-primary);
    text-decoration: none;
    font-weight: 600;
}

.am-notify-panel__count {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--am-accent);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.am-notify-panel__list {
    max-height: 320px;
    overflow-y: auto;
}

.am-notify-panel__empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--am-text-muted);
}

.am-notify-panel__empty i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.am-notify-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--am-border);
}

.am-notify-item:hover {
    background: var(--am-surface-alt);
}

.am-notify-item__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--am-surface-alt);
    color: var(--am-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.am-notify-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.am-notify-item__body strong {
    font-size: 0.84rem;
}

.am-notify-item__body span {
    font-size: 0.8rem;
    color: var(--am-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .am-header__menu-btn span:not(.am-header__lang-flag) { display: none; }
}

@media (max-width: 576px) {
    .am-header__cta { display: none; }
}

/* ── Buttons ── */
.am-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    font-family: var(--am-font);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.am-btn:hover { transform: translateY(-1px); }

.am-btn--primary {
    background: linear-gradient(135deg, var(--am-primary) 0%, var(--am-primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(12, 74, 92, 0.35);
}

.am-btn--primary:hover {
    background: linear-gradient(135deg, var(--am-primary-dark) 0%, var(--am-primary) 100%);
    color: #fff;
    box-shadow: var(--am-shadow-md);
}

.am-btn--accent {
    background: var(--am-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(232, 93, 58, 0.35);
}

.am-btn--accent:hover {
    background: var(--am-accent-hover);
    color: #fff;
}

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

.am-btn--outline:hover {
    border-color: var(--am-primary);
    background: var(--am-surface-alt);
    color: var(--am-primary);
}

.am-btn--ghost {
    background: var(--am-surface-alt);
    color: var(--am-text);
    border: 1px solid var(--am-border);
}

.am-btn--lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--am-radius);
}

.am-btn--block { width: 100%; }

/* ── Main ── */
.am-main {
    width: var(--am-content-max);
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem var(--am-content-pad) 3rem;
}

.am-main--panel {
    --am-content-max: min(1280px, 96vw);
    width: 100%;
    max-width: var(--am-content-max);
}

.am-main--wide {
    --am-content-max: min(1400px, 92vw);
    width: 100%;
    max-width: var(--am-content-max);
}

/* ── Hero Search ── */
.am-hero {
    background: linear-gradient(135deg, #041418 0%, var(--am-primary-dark) 50%, #0a2d36 100%);
    border-radius: var(--am-radius-lg);
    padding: 1.25rem 1.75rem 1.35rem;
    margin-bottom: 2rem;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    position: relative;
    overflow: hidden;
}

.am-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(232, 93, 58, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.am-hero__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.am-hero__title {
    color: #fff;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    margin: 0;
    position: relative;
    flex: 0 1 auto;
}

.am-hero__subtitle {
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.35;
    text-align: right;
    max-width: min(340px, 48%);
    position: relative;
    flex: 0 1 auto;
}

@media (max-width: 640px) {
    .am-hero__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        margin-bottom: 0.85rem;
    }

    .am-hero__subtitle {
        text-align: left;
        max-width: none;
        font-size: 0.88rem;
    }
}

.am-search {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 0.75rem;
    position: relative;
}

@media (max-width: 992px) {
    .am-search { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
    .am-search { grid-template-columns: 1fr; }
}

.am-search__input,
.am-search__select {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: none;
    border-radius: var(--am-radius);
    font-family: var(--am-font);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.97);
    color: var(--am-text);
    box-shadow: var(--am-shadow-sm);
    outline: none;
    transition: box-shadow 0.2s;
}

.am-search__input:focus,
.am-search__select:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), var(--am-shadow-md);
}

.am-search__btn {
    padding: 0.85rem 1.75rem;
    background: var(--am-accent);
    color: #fff;
    border: none;
    border-radius: var(--am-radius);
    font-family: var(--am-font);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.am-search__btn:hover {
    background: var(--am-accent-hover);
    transform: translateY(-1px);
}

/* ── Search tabs (hero) ── */
.am-search-tabs {
    display: inline-flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: calc(var(--am-radius) + 4px);
    position: relative;
}

.am-search-tabs__btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--am-font);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: var(--am-radius);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.am-search-tabs__btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.am-search-tabs__btn.is-active {
    background: rgba(255, 255, 255, 0.97);
    color: var(--am-text);
    box-shadow: var(--am-shadow-sm);
}

[data-theme="dark"] .am-search-tabs {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--am-border);
}

[data-theme="dark"] .am-search-tabs__btn {
    color: rgba(255, 255, 255, 0.92);
}

[data-theme="dark"] .am-search-tabs__btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-theme="dark"] .am-search-tabs__btn.is-active {
    background: #e8f1f4;
    color: #0a3540;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.am-search-panels {
    position: relative;
}

.am-search-panel:not(.is-active) {
    display: none;
}

.am-city-field {
    position: relative;
}

.am-city-dropdown__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow-md);
}

.am-city-dropdown__menu .droplink {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    color: var(--am-text);
    text-decoration: none;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

.am-city-dropdown__menu .droplink:hover {
    background: rgba(0, 0, 0, 0.04);
}

.am-city-dropdown__menu .droplink:last-child {
    border-bottom: none;
}

.am-live-search {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.75rem;
    position: relative;
}

@media (max-width: 992px) {
    .am-live-search { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
    .am-live-search { grid-template-columns: 1fr; }
}

.am-live-search__panel {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow-md);
    max-height: 360px;
    overflow-y: auto;
    text-align: left;
}

.am-live-search__panel.is-loading {
    min-height: 3rem;
}

.am-live-search__item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--am-text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.15s;
}

.am-live-search__item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.am-live-search__thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.am-live-search__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.am-live-search__title {
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-live-search__location {
    font-size: 0.8rem;
    color: var(--am-muted, #6c757d);
}

.am-live-search__price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--am-accent);
}

.am-live-search__empty,
.am-live-search__loading {
    margin: 0;
    padding: 1rem 1.1rem;
    font-size: 0.9rem;
    color: var(--am-muted, #6c757d);
}

.am-live-search__all-form {
    padding: 0.65rem 1rem 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.am-live-search__all-btn {
    display: block;
    width: 100%;
    border: none;
    background: var(--am-primary);
    color: #fff;
    font-family: var(--am-font);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.6rem 1rem;
    border-radius: var(--am-radius);
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.am-live-search__all-btn:hover {
    opacity: 0.92;
}

[data-theme="dark"] .am-city-dropdown__menu,
[data-theme="dark"] .am-live-search__panel {
    background: var(--am-surface, #1e293b);
    color: var(--am-text);
}

[data-theme="dark"] .am-city-dropdown__menu .droplink,
[data-theme="dark"] .am-live-search__item {
    color: var(--am-text);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .am-city-dropdown__menu .droplink:hover,
[data-theme="dark"] .am-live-search__item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* ── Section titles ── */
.am-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--am-text);
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.am-section-title::before {
    content: '';
    width: 4px;
    height: 1.4em;
    background: linear-gradient(180deg, var(--am-accent), var(--am-primary));
    border-radius: 2px;
}

/* ── Cards ── */
.am-card {
    background: var(--am-surface);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.am-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--am-shadow-md);
}

/* ── Alerts ── */
.am-alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--am-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.am-alert--danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.am-alert--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ── Footer info block (admin CMS) ── */
.am-footer-part {
    background: linear-gradient(180deg, #0a2a33 0%, var(--am-primary-dark) 100%);
    color: rgba(255, 255, 255, 0.85);
    padding: 2rem 1.25rem 0;
}

.am-footer-part__inner {
    width: var(--am-content-max);
    max-width: 100%;
    margin: 0 auto;
    overflow-x: auto;
}

.am-footer-part__inner img {
    max-width: 100%;
    height: auto;
}

.am-footer-part__inner a {
    color: rgba(255, 255, 255, 0.9);
}

.am-footer-part__inner a:hover {
    color: #fff;
}

/* ── Footer ── */
.am-footer {
    position: relative;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(56, 189, 248, 0.14), transparent 55%),
        linear-gradient(180deg, var(--am-primary-dark) 0%, #061f26 100%);
    color: rgba(255, 255, 255, 0.75);
    padding: 2.75rem 1.25rem 0;
    margin-top: auto;
    overflow: hidden;
}

.am-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 45%);
    pointer-events: none;
}

.am-footer__grid {
    position: relative;
    z-index: 1;
    width: var(--am-content-max);
    max-width: 100%;
    margin: 0 auto;
    padding-left: var(--am-content-pad);
    padding-right: var(--am-content-pad);
    display: grid;
    gap: 2rem 2.5rem;
    padding-bottom: 2rem;
}

.am-footer__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.am-footer__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.am-footer__grid--4 { grid-template-columns: 1.05fr 0.95fr 1fr 1.25fr; }

.am-footer__grid--duo {
    gap: clamp(2rem, 7vw, 4.5rem);
}

.am-footer__grid--no-news.am-footer__grid--3 {
    grid-template-columns: 1.1fr 1fr 1.15fr;
}

.am-footer__grid--no-news:not(.am-footer__grid--duo) .am-footer__col--stats {
    max-width: none;
}

.am-footer__col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.am-footer__grid--duo .am-footer__col:first-child {
    padding-right: clamp(0.5rem, 3vw, 2rem);
}

.am-footer__grid--duo .am-footer__col:last-child {
    padding-left: clamp(0.5rem, 3vw, 2rem);
}

.am-footer__grid--duo .am-footer__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 1.5rem;
}

@media (max-width: 576px) {
    .am-footer__grid--duo .am-footer__links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .am-footer__grid--3,
    .am-footer__grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .am-footer__grid--2,
    .am-footer__grid--3,
    .am-footer__grid--4 { grid-template-columns: 1fr; gap: 1.75rem; }
}

.am-footer__title {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 0.85rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.am-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.am-footer__links li { margin-bottom: 0.45rem; }

.am-footer__links a,
.am-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
}

.am-footer__links a:hover,
.am-footer a:hover { color: #fff; }

.am-footer__badge {
    margin-top: auto;
    padding-top: 1.25rem;
}

.am-footer__badge--bottom {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.am-footer__badge--bottom.am-footer__badge--de a {
    width: 52px;
    height: 52px;
}

.am-footer__badge--de a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    text-decoration: none;
}

.am-footer__badge--bottom .am-footer__badge-inner {
    font-size: 0.42rem;
}

.am-footer__badge-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 200deg, #000 0deg 120deg, #dd0000 120deg 240deg, #ffce00 240deg 360deg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.am-footer__badge-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    margin: 4px;
    border-radius: 50%;
    background: linear-gradient(180deg, #0a2a33 0%, #061f26 100%);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.am-footer__badge--de a:hover .am-footer__badge-inner {
    background: linear-gradient(180deg, #0d3540 0%, #082830 100%);
}

.am-footer__badge img {
    width: 68px;
    height: auto;
    display: block;
    opacity: 0.92;
    transition: opacity 0.15s;
}

.am-footer__badge--light img {
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.am-footer__badge a:hover img { opacity: 1; }

.am-footer__statistics {
    font-size: 0.8rem;
    line-height: 1.45;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--am-radius);
    padding: 1rem 1.15rem;
    height: 100%;
}

.am-footer__static-line {
    margin-bottom: 0.85rem;
}

.am-footer__static-line:last-child {
    margin-bottom: 0;
}

.am-footer__static-line > b {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.am-footer__col--stats {
    max-width: none;
}

.am-footer__static-rows {
    display: table;
    border-collapse: collapse;
}

.am-footer__static-row {
    display: table-row;
    font-size: 0.78rem;
    line-height: 1.4;
}

.am-footer__static-row span {
    display: table-cell;
    padding: 0.1rem 0;
    vertical-align: baseline;
}

.am-footer__static-row span:first-child {
    color: rgba(255, 255, 255, 0.62);
    padding-right: 0.55rem;
    white-space: nowrap;
}

.am-footer__static-row span:last-child {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.am-footer__news-card {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--am-radius);
    padding: 1.15rem 1.35rem;
    min-width: 0;
}

.am-footer__news-card .am-footer__title {
    margin-bottom: 0.65rem;
}

.am-footer__news-hint {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.6);
}

.am-footer__news-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.am-footer__news-btn {
    width: 100%;
    justify-content: center;
}

.am-footer__bottom {
    width: var(--am-content-max);
    max-width: 100%;
    margin: 0 auto;
    padding: 1.1rem var(--am-content-pad) 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem 1.25rem;
}

.am-footer__legal {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.am-footer__copy {
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
    justify-self: center;
}

.am-footer__copy a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.am-footer__copy a:hover { color: #fff; }

.am-footer__newsletter {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.am-footer__newsletter .am-input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.55rem 0.75rem;
    border-radius: var(--am-radius);
    font-size: 0.875rem;
}

.am-footer__newsletter .am-input::placeholder { color: rgba(255, 255, 255, 0.45); }

@media (max-width: 576px) {
    :root { --am-content-pad: 1rem; }
    .am-footer__static-line > b { margin-bottom: 0.5rem; }
    .am-footer__bottom {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "badge legal"
            "social social"
            "copy copy";
    }
    .am-footer__badge--bottom { grid-area: badge; }
    .am-footer__legal { grid-area: legal; justify-self: end; }
    .am-footer__social { grid-area: social; justify-self: center; }
    .am-footer__copy {
        grid-area: copy;
        width: 100%;
        justify-self: center;
    }
}

.am-footer__news-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.am-footer__news-check input { margin-top: 0.15rem; flex-shrink: 0; }

.am-footer__social {
    display: flex;
    gap: 0.55rem;
    margin: 0;
}

.am-footer__social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: background 0.15s;
}

.am-footer__social a:hover { background: var(--am-accent); color: #fff; }

.am-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ── Auth pages ── */
.am-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(145deg, var(--am-primary-dark) 0%, #0a3540 40%, var(--am-primary) 100%);
    position: relative;
}

.am-auth::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.am-auth__card {
    width: 100%;
    max-width: 440px;
    background: var(--am-surface);
    border-radius: var(--am-radius-lg);
    box-shadow: var(--am-shadow-lg);
    padding: 2.5rem 2rem;
    position: relative;
}

.am-auth__logo {
    display: block;
    height: 52px;
    margin: 0 auto 1.5rem;
}

.am-auth__title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--am-text);
    margin: 0 0 0.35rem;
}

.am-auth__subtitle {
    text-align: center;
    color: var(--am-text-muted);
    margin: 0 0 1.75rem;
    font-size: 0.9rem;
}

.am-form-group {
    margin-bottom: 1.15rem;
}

.am-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--am-text);
    margin-bottom: 0.4rem;
}

.am-form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--am-border);
    border-radius: 10px;
    font-family: var(--am-font);
    font-size: 0.95rem;
    background: var(--am-surface-alt);
    color: var(--am-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.am-form-control:focus {
    border-color: var(--am-primary-light);
    box-shadow: 0 0 0 3px rgba(12, 74, 92, 0.12);
    background: var(--am-surface);
}

.am-auth__footer-link {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    color: var(--am-primary-light);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.am-auth__footer-link:hover {
    color: var(--am-accent);
    text-decoration: underline;
}

.am-form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: var(--am-text-muted);
}

.am-form-check input { accent-color: var(--am-primary); }

/* Cache debug panel (global — also on index/home) */
.am-cache-debug {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 10050;
    max-width: min(420px, calc(100vw - 24px));
}

.am-cache-debug__box {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    font-size: 0.78rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.am-cache-debug__title {
    cursor: pointer;
    font-weight: 700;
    color: #93c5fd;
}

.am-cache-debug__grid {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.am-cache-debug__grid > div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.35rem;
}

.am-cache-debug__ok { color: #86efac; }
.am-cache-debug__fail { color: #fca5a5; }
