/* Tierflohmarkt responsive Ergänzung V4
   Fokus:
   - normale Desktop-Ansicht bleibt
   - auf Handy kommt der Inhalt zuerst
   - Anzeigenlisten/Anzeigekarten werden auf Mobil sauber untereinander gebaut
   - Bild bzw. "Kein Bild vorhanden" steht über den Details
   - Werbung bleibt im Fluss
*/

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

table,
input,
select,
textarea,
button {
    max-width: 100%;
}

.tfm-ad,
.optad360Ads,
.optad360AdsTOP,
.optad360Adsleft {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 10px auto;
    text-align: center;
    overflow: hidden;
    clear: both;
}

/* Tablet / Handy: Grundlayout */
@media (max-width: 900px) {
    body {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 16px;
        line-height: 1.45;
        background: #fff;
    }

    body > center:first-of-type,
    body > center:first-of-type > table:first-child,
    body > center:first-of-type > table:first-child tbody,
    body > center:first-of-type > table:first-child tr,
    body > center:first-of-type > table:first-child td {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
    }

    body > center:first-of-type > table:first-child img {
        max-height: 70px;
        width: auto;
    }

    table.tfm-layout,
    table.tfm-layout > tbody,
    table.tfm-layout > tbody > tr {
        display: flex;
        flex-direction: column;
        width: 100% !important;
    }

    table.tfm-layout > tbody > tr > td {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 8px;
        padding-right: 8px;
    }

    table.tfm-layout > tbody > tr > td.content {
        order: 1;
    }

    table.tfm-layout > tbody > tr > td.tfm-leftcol {
        order: 2;
    }

    table.tfm-layout > tbody > tr > td.rightuser {
        order: 3;
    }

    .content {
        text-align: left !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    .content > table,
    .content table[width],
    .content table[border] {
        width: 100% !important;
        max-width: 100% !important;
    }

    .content a {
        overflow-wrap: anywhere;
    }

    .content h1 {
        font-size: 24px;
        line-height: 1.2;
    }

    .content h2 {
        font-size: 21px;
        line-height: 1.25;
    }

    .content h3 {
        font-size: 18px;
        line-height: 1.3;
    }

    .content input[type="text"],
    .content input[type="email"],
    .content input[type="password"],
    .content input[type="search"],
    .content select,
    .content textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 40px;
        font-size: 16px;
    }

    .content textarea {
        min-height: 130px;
    }

    .content input[type="submit"],
    .content button,
    .button {
        width: 100%;
        max-width: 420px;
        min-height: 44px;
        font-size: 16px;
        padding: 10px 14px !important;
        white-space: normal;
    }

    /* Innere Detailtabellen bleiben lesbar */
    .content table table {
        width: 100% !important;
        table-layout: auto !important;
    }

    .content table table td {
        max-width: 100% !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .content table table td[align="right"] {
        width: 95px !important;
        min-width: 95px !important;
        max-width: 95px !important;
        text-align: left !important;
        font-weight: bold;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    .content img[src*="/images/klein/"],
    .content img[src*="/images/typen/"],
    .content a[rel="lightbox"] img,
    .content img[rel="lightbox"] {
        max-width: 100% !important;
        height: auto !important;
    }

    .tfm-leftcol {
        border-top: 3px solid #000066;
        margin-top: 16px;
        padding-top: 10px;
    }

    .tfm-leftcol .links,
    .rightuser .links,
    .rightcoltext,
    .leftcoltext,
    .tfm-footer-nav,
    .tfm-right-ad-box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
    }

    .tfm-leftcol ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .tfm-leftcol li {
        margin: 0;
        padding: 0;
    }

    .tfm-leftcol li a,
    .rightuser a {
        display: block;
        padding: 10px 8px;
        border-bottom: 1px solid #ddd;
        text-decoration: none !important;
    }

    .rightuser form table,
    .rightuser form tbody,
    .rightuser form tr,
    .rightuser form td {
        display: block;
        width: 100% !important;
    }

    .tfm-footer-nav td {
        display: block;
        width: 100% !important;
        line-height: 1.8;
    }

    .tfm-ad,
    .optad360Ads,
    .optad360AdsTOP,
    .optad360Adsleft {
        width: 100% !important;
        min-height: 80px;
        margin: 12px auto;
    }
}

/* Mobil: äußere Anzeigenzeilen untereinander, Bild oben */
@media (max-width: 700px) {
    .content > table > tbody > tr,
    .content > table > tr {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    .content > table > tbody > tr > td,
    .content > table > tr > td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 4px !important;
        vertical-align: top !important;
    }

    /* 1. Zelle = Bildbereich */
    .content > table > tbody > tr > td:first-child,
    .content > table > tr > td:first-child {
        order: 1;
        text-align: center !important;
        padding-bottom: 10px !important;
    }

    /* 2. Zelle = Detailbereich */
    .content > table > tbody > tr > td:last-child,
    .content > table > tr > td:last-child {
        order: 2;
    }

    .content > table > tbody > tr > td:first-child img,
    .content > table > tr > td:first-child img {
        display: block;
        margin: 0 auto;
        width: auto !important;
        max-width: min(100%, 340px) !important;
        max-height: 300px !important;
        object-fit: contain;
    }

    /* Falls "Kein Bild vorhanden" gezeigt wird, auch schön mittig und nicht winzig */
    .content > table > tbody > tr > td:first-child img[src*="kein"],
    .content > table > tr > td:first-child img[src*="kein"],
    .content > table > tbody > tr > td:first-child img[alt*="Kein"],
    .content > table > tr > td:first-child img[alt*="Kein"] {
        max-width: min(100%, 300px) !important;
        max-height: 240px !important;
    }

    /* Detailtabelle unter dem Bild als 2-Spalten-Grid */
    .content > table > tbody > tr > td:last-child table tr,
    .content > table > tr > td:last-child table tr {
        display: grid !important;
        grid-template-columns: 110px minmax(0, 1fr) !important;
        column-gap: 10px;
        align-items: start;
        width: 100% !important;
    }

    .content > table > tbody > tr > td:last-child table td,
    .content > table > tr > td:last-child table td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 4px !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .content > table > tbody > tr > td:last-child table td[align="right"],
    .content > table > tr > td:last-child table td[align="right"] {
        font-weight: bold;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    .content > table > tbody > tr > td:last-child table tr > td:only-child,
    .content > table > tr > td:last-child table tr > td:only-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 17px;
    }

    table.tfm-layout > tbody > tr > td {
        padding-left: 6px;
        padding-right: 6px;
    }

    .content h1 {
        font-size: 21px;
    }

    .content h2 {
        font-size: 19px;
    }

    .content table {
        font-size: 16px;
    }

    .content input[type="submit"],
    .content button,
    .button {
        max-width: 100%;
    }

    .content > table > tbody > tr > td:last-child table tr,
    .content > table > tr > td:last-child table tr {
        grid-template-columns: 98px minmax(0, 1fr) !important;
        column-gap: 8px;
    }
}


/* Anzeigen.php Karten-Feinschliff */
.tfm-ad-card {
    clear: both;
}

@media (max-width: 900px) {
    .tfm-filter-form {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 680px;
        margin: 10px auto 16px auto;
        padding: 10px;
        border: 1px solid #ddd;
        background: #fffdf5;
    }

    .tfm-filter-form select,
    .tfm-filter-form input[type="submit"] {
        width: 100% !important;
        min-height: 42px;
        font-size: 16px;
    }

    .tfm-filter-form input[type="radio"] {
        width: auto !important;
        min-height: 0 !important;
        margin-right: 4px;
    }

    .tfm-pages {
        width: 100% !important;
        margin: 10px auto !important;
    }

    .tfm-pages td {
        display: inline-block !important;
        width: auto !important;
        padding: 6px !important;
    }

    .tfm-pages a,
    .tfm-pages strong {
        display: inline-block;
        padding: 8px 10px;
        border: 1px solid #ccc;
        background: #fff;
        margin: 2px;
    }

    .tfm-ad-inline {
        margin: 16px 0;
        padding: 8px 0;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        background: #fff;
    }
}

@media (max-width: 700px) {
    table.tfm-ad-card {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 12px 0 !important;
        padding: 0 !important;
        border: 1px solid #d6d6d6 !important;
        border-radius: 8px;
        overflow: hidden;
        background-clip: padding-box;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    }

    table.tfm-ad-card > tbody,
    table.tfm-ad-card > tbody > tr {
        display: block !important;
        width: 100% !important;
    }

    table.tfm-ad-card > tbody > tr:first-child {
        display: flex !important;
        flex-direction: column !important;
    }

    table.tfm-ad-card td.tfm-ad-image {
        display: block !important;
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        padding: 10px 10px 4px 10px !important;
        background: rgba(255,255,255,0.45);
    }

    table.tfm-ad-card td.tfm-ad-image img {
        display: block;
        margin: 0 auto;
        width: auto !important;
        max-width: min(100%, 340px) !important;
        max-height: 310px !important;
        object-fit: contain;
    }

    table.tfm-ad-card td.tfm-ad-image img[src*="keinbild"] {
        max-width: min(100%, 250px) !important;
        max-height: 190px !important;
        opacity: 0.75;
    }

    table.tfm-ad-card td.tfm-ad-details {
        display: block !important;
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px 10px 12px 10px !important;
    }

    table.tfm-ad-card table.tfm-ad-detail-table {
        display: block !important;
        width: 100% !important;
    }

    table.tfm-ad-card table.tfm-ad-detail-table > tbody {
        display: block !important;
        width: 100% !important;
    }

    table.tfm-ad-card table.tfm-ad-detail-table tr {
        display: grid !important;
        grid-template-columns: 92px minmax(0, 1fr) !important;
        column-gap: 8px;
        align-items: start;
        width: 100% !important;
        padding: 3px 0;
    }

    table.tfm-ad-card table.tfm-ad-detail-table td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 3px 0 !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    table.tfm-ad-card table.tfm-ad-detail-table td[align="right"] {
        font-weight: bold;
        color: #111;
        text-align: left !important;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    table.tfm-ad-card table.tfm-ad-detail-table tr > td:only-child {
        grid-column: 1 / -1;
    }

    table.tfm-ad-card table.tfm-ad-detail-table a[href*="anzeige-solo.php"] {
        display: inline-block;
        padding: 7px 10px;
        margin: 2px 0;
        border: 1px solid #0a5fb4;
        border-radius: 6px;
        background: #f4f9ff;
        text-decoration: none;
        font-weight: bold;
    }

    table.tfm-ad-card th {
        display: none !important;
    }

    table.tfm-ad-card-placeholder {
        background: #fff8e8 !important;
    }

    table.tfm-ad-card-top {
        border: 2px solid #bf0000 !important;
    }

    table.tfm-ad-card-bunt {
        background: #fff6a8 !important;
    }
}


/* Mobile Schnellnavigation */
.tfm-mobile-nav {
    display: none;
}

@media (max-width: 900px) {
    .tfm-mobile-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 100%;
        max-width: 360px;
        margin: 8px auto 10px auto;
        padding: 0 6px;
    }

    .tfm-mobile-nav a {
        display: block;
        padding: 10px 8px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        color: #000066;
        text-align: center;
        font-weight: bold;
        text-decoration: none;
        font-size: 15px;
    }

    .tfm-mobile-nav a:active {
        background: #eef4ff;
    }
}

@media (max-width: 430px) {
    .tfm-mobile-nav {
        grid-template-columns: 1fr 1fr;
    }

    .tfm-mobile-nav a {
        font-size: 14px;
        padding: 9px 5px;
    }
}


/* Startseite mobil als saubere Karten */
.tfm-home-categories {
    clear: both;
}

@media (max-width: 900px) {
    .tfm-home-categories {
        display: block !important;
        width: 100% !important;
        max-width: 680px !important;
        margin: 10px auto !important;
    }

    .tfm-home-categories > tbody,
    .tfm-home-categories > tbody > tr {
        display: contents !important;
    }

    .tfm-home-categories {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 0 8px;
    }

    .tfm-home-cat {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        padding: 8px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
        text-align: center !important;
    }

    .tfm-home-cat-img {
        display: block;
        width: 100% !important;
        max-width: 140px !important;
        height: auto !important;
        margin: 0 auto 4px auto;
        border-radius: 5px;
    }

    .tfm-home-cat-name {
        display: block;
        font-size: 17px;
        margin: 3px 0 6px 0;
    }

    .tfm-home-cat-links,
    .tfm-home-cat-links tbody,
    .tfm-home-cat-links tr,
    .tfm-home-cat-links td {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
    }

    .tfm-home-cat-links {
        margin: 0 !important;
    }

    .tfm-home-cat-links li {
        list-style: none;
        margin: 0;
        padding: 0;
        line-height: 1.45;
        border-top: 1px solid #eee;
    }

    .tfm-home-cat-links li a {
        display: inline-block;
        padding: 5px 0;
        font-size: 15px;
    }

    .tfm-section-heading {
        display: block !important;
        width: 100% !important;
        max-width: 680px !important;
        margin: 14px auto 8px auto !important;
    }

    .tfm-section-heading tbody,
    .tfm-section-heading tr,
    .tfm-section-heading td {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }

    .tfm-home-ad-card {
        margin: 12px auto !important;
        max-width: 680px !important;
    }

    .tfm-city-links {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100% !important;
        max-width: 680px !important;
        margin: 8px auto !important;
        padding: 0 8px;
    }

    .tfm-city-links tbody,
    .tfm-city-links tr {
        display: contents !important;
    }

    .tfm-city-links td {
        display: block !important;
        width: auto !important;
        border: 1px solid #eee;
        border-radius: 6px;
        background: #fff;
        padding: 6px !important;
    }

    .tfm-city-links a {
        display: block;
        text-decoration: none !important;
    }

    .tfm-city-search,
    .tfm-city-search tbody,
    .tfm-city-search tr,
    .tfm-city-search td {
        display: block !important;
        width: 100% !important;
        max-width: 680px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: left !important;
    }

    .tfm-city-search-form {
        display: block;
        width: 100%;
    }

    .tfm-city-search input[type="text"] {
        width: 100% !important;
        min-height: 42px;
        font-size: 16px;
    }

    .tfm-city-search input[type="image"] {
        width: 100% !important;
        max-width: 180px !important;
        height: auto !important;
        margin-top: 6px;
    }

    .tfm-stats {
        width: 100% !important;
        max-width: 420px !important;
        margin: 10px auto 16px auto !important;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        padding: 6px;
    }

    .tfm-stats td {
        padding: 5px 8px !important;
        border-bottom: 1px solid #eee;
    }
}

@media (max-width: 430px) {
    .tfm-home-categories {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0 6px;
    }

    .tfm-home-cat {
        padding: 6px !important;
    }

    .tfm-home-cat-name {
        font-size: 15px;
    }

    .tfm-home-cat-links li a {
        font-size: 14px;
    }

    .tfm-city-links {
        grid-template-columns: 1fr;
    }
}


/* Startseite Bottom-Fix V8: Städte, Suche, Statistik sauber untereinander */
@media (max-width: 900px) {
    /* Der ältere CSS-Block hat die Tabellen zu stark umgebaut.
       Hier werden die unteren Startseitenbereiche stabil als Blöcke dargestellt. */
    .tfm-city-links,
    .tfm-city-search,
    .tfm-stats {
        display: block !important;
        width: calc(100% - 12px) !important;
        max-width: 680px !important;
        margin: 10px auto !important;
        padding: 0 !important;
        clear: both !important;
        float: none !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .tfm-city-links tbody,
    .tfm-city-links tr,
    .tfm-city-links td,
    .tfm-city-search tbody,
    .tfm-city-search tr,
    .tfm-city-search td,
    .tfm-stats tbody,
    .tfm-stats tr,
    .tfm-stats td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        float: none !important;
        clear: both !important;
        box-sizing: border-box !important;
        text-align: left !important;
    }

    .tfm-city-links td {
        border: 1px solid #eee !important;
        border-radius: 6px !important;
        background: #fff !important;
        padding: 8px !important;
        margin: 6px 0 !important;
    }

    .tfm-city-links a {
        display: block !important;
        padding: 2px 0 !important;
        text-decoration: none !important;
    }

    .tfm-city-search {
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        background: #fff !important;
        padding: 10px !important;
    }

    .tfm-city-search-form,
    .tfm-city-search form {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .tfm-city-search input[type="text"] {
        display: block !important;
        width: 100% !important;
        min-height: 42px !important;
        font-size: 16px !important;
        margin: 4px 0 8px 0 !important;
    }

    .tfm-city-search input[type="image"],
    .tfm-city-search img[src*="absenden"] {
        display: block !important;
        width: auto !important;
        max-width: 180px !important;
        height: auto !important;
        margin: 6px 0 !important;
    }

    .tfm-stats {
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        background: #fff !important;
        padding: 8px !important;
    }

    .tfm-stats td {
        padding: 6px 8px !important;
        border-bottom: 1px solid #eee !important;
    }

    .tfm-stats tr:last-child td {
        border-bottom: 0 !important;
    }

    /* Wenn Werbung direkt nach den unteren Tabellen kommt, Abstand geben */
    .tfm-stats + .tfm-ad,
    .tfm-city-search + .tfm-ad,
    .tfm-city-links + .tfm-ad {
        margin-top: 14px !important;
    }
}


/* Suche-Seite mobil */
.tfm-search-page,
.tfm-search-summary {
    max-width: 720px;
    margin: 12px auto;
    padding: 10px;
}

.tfm-search-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #ffffd8;
    padding: 12px;
}

.tfm-search-form label {
    display: block;
    font-weight: bold;
}

.tfm-search-form input,
.tfm-search-form select {
    width: 100%;
    min-height: 38px;
    margin-top: 4px;
}

.tfm-search-form button {
    grid-column: 1 / -1;
    min-height: 44px;
    font-weight: bold;
}

.tfm-search-new {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #0a5fb4;
    border-radius: 6px;
    background: #f4f9ff;
    text-decoration: none;
    font-weight: bold;
}

@media (max-width: 700px) {
    .tfm-search-page,
    .tfm-search-summary {
        width: 100%;
        margin: 8px 0;
        padding: 8px;
    }

    .tfm-search-page h1,
    .tfm-search-summary h1 {
        font-size: 22px;
        margin: 6px 0 10px 0;
    }

    .tfm-search-form {
        display: block;
        width: 100%;
        padding: 10px;
    }

    .tfm-search-form label {
        display: block;
        margin-bottom: 10px;
    }

    .tfm-search-form input,
    .tfm-search-form select,
    .tfm-search-form button {
        width: 100% !important;
        min-height: 44px;
        font-size: 16px;
    }

    table.tfm-search-result-card {
        display: block !important;
        width: 100% !important;
        margin: 12px 0 !important;
        border: 1px solid #d6d6d6 !important;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    }

    table.tfm-search-result-card > tbody,
    table.tfm-search-result-card > tbody > tr {
        display: block !important;
        width: 100% !important;
    }

    table.tfm-search-result-card td.tfm-ad-image,
    table.tfm-search-result-card td.tfm-ad-details {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px 10px !important;
    }

    table.tfm-search-result-card td.tfm-ad-image {
        text-align: center !important;
        background: rgba(255,255,255,0.45);
    }

    table.tfm-search-result-card td.tfm-ad-image img {
        display: block;
        margin: 0 auto;
        max-width: min(100%, 340px) !important;
        max-height: 300px !important;
        object-fit: contain;
    }

    table.tfm-search-result-card table.tfm-ad-detail-table tr {
        display: grid !important;
        grid-template-columns: 105px minmax(0, 1fr) !important;
        column-gap: 8px;
        width: 100% !important;
    }

    table.tfm-search-result-card table.tfm-ad-detail-table td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 4px 0 !important;
        overflow-wrap: anywhere;
    }

    table.tfm-search-result-card table.tfm-ad-detail-table td[align="right"] {
        font-weight: bold;
        text-align: left !important;
        white-space: normal;
        overflow-wrap: normal;
    }

    table.tfm-search-result-card th {
        display: none !important;
    }
}


/* Mobile Cleanup:
   - alte Footer-Navigation mit gelben Pfeilen ausblenden
   - "Jetzt kostenlos Kleinanzeige aufgeben!" mobil ausblenden,
     weil oben bereits der Button "Anzeige aufgeben" vorhanden ist.
*/
@media (max-width: 900px) {
    .tfm-footer-nav {
        display: none !important;
    }

    .tfm-create-cta {
        display: none !important;
    }
}


/* Profi/Login mobil sauber */
.tfm-profi-login {
    max-width: 560px;
    margin: 12px auto;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.tfm-profi-login h1 {
    margin: 0 0 12px 0;
    font-size: 22px;
    text-align: center;
}

.tfm-profi-login-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.tfm-profi-login-form label {
    display: block;
    font-weight: bold;
}

.tfm-profi-login-form input[type="text"],
.tfm-profi-login-form input[type="password"] {
    display: block;
    width: 100%;
    min-height: 42px;
    margin-top: 4px;
    padding: 8px;
    font-size: 16px;
}

.tfm-profi-login-form button {
    min-height: 44px;
    font-weight: bold;
    font-size: 16px;
}

.tfm-login-check {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
}

.tfm-login-check input {
    width: auto !important;
    min-height: 0 !important;
}

.tfm-login-links {
    margin: 4px 0 0 0;
    text-align: center;
}

.tfm-login-links a {
    display: inline-block;
    padding: 8px 10px;
}

.tfm-login-note {
    margin-top: 12px;
    font-size: 14px;
    color: #333;
}

@media (max-width: 700px) {
    .tfm-profi-login {
        margin: 8px 0;
        padding: 12px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .tfm-profi-login h1 {
        font-size: 21px;
    }

    .tfm-profi-login-form button {
        width: 100%;
    }
}


/* Mobile Startseiten-Cleanup:
   Newsblock, Umfrage und ersten Top-Werbeblock auf Handy ausblenden.
   Desktop bleibt unverändert.
*/
@media (max-width: 900px) {
    .tfm-news-block,
    .tfm-survey-block,
    .tfm-ad-top {
        display: none !important;
    }
}


/* Mobile Startseite Platz sparen */
@media (max-width: 900px) {
    .tfm-top-ad-area,
    .tfm-top-ad-spacer {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .tfm-mobile-nav {
        margin-bottom: 6px !important;
    }

    .tfm-home-categories {
        margin-top: 6px !important;
    }

    .content {
        padding-top: 0 !important;
    }

    table.tfm-layout > tbody > tr > td.content {
        padding-top: 0 !important;
    }
}
