:root{
    --green:#1f7a3a;
    --green2:#35a853;
    --text:#162019;
    --muted:#647067;
    --border:#dbe4dc;
    --card:#ffffff;
    --shadow:0 0.875rem 2.2rem rgba(0,0,0,.14);

    --fs-xs:.8rem;
    --fs-sm:.9rem;
    --fs:1rem;
    --fs-lg:1.1rem;
    --fs-xl:1.5rem;
    --fs-xxl:2.1rem;

    --space-xs:.4rem;
    --space-sm:.75rem;
    --space:1rem;
    --space-lg:1.25rem;
    --space-xl:1.5rem;
    --space-xxl:2rem;

    --radius-sm:.75rem;
    --radius:1rem;
    --radius-lg:1.4rem;
    --radius-xl:1.75rem;
}

*{
    box-sizing:border-box;
}

body,
body.am-body{
    margin:0;
    min-height:100vh;
    font-family:Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(53,168,83,.22), transparent 34%),
        linear-gradient(180deg,#f8fbf8,#e8efe9);
    color:var(--text);
}

a{
    color:inherit;
    text-decoration:none;
}

h2{
    margin:1.5rem 0 .75rem;
    text-align:center;
    font-size:var(--fs-xxl);
    font-weight:900;
    letter-spacing:-.04em;
}

.am-main,
main{
    width:min(47.5rem,100%);
    margin:0 auto;
    padding:var(--space-lg);
}

/* HEADER */

.am-topbar,
header{
    position:sticky;
    top:0;
    z-index:1000;

    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:var(--space);

    padding:.75rem 1rem;

    background:var(--green);
    color:#fff;

    box-shadow:0 .125rem .625rem rgba(0,0,0,.15);
}

.am-topbar-left,
.am-topbar-right{
    flex:1;
}

.am-topbar-center{
    flex:2;
    text-align:center;
}

.am-topbar-right{
    text-align:right;
}

.am-topbar h1,
header h1{
    margin:0;
    font-size:1.2rem;
    font-weight:900;
    color:#fff;
}

.am-home-link,
.am-logout-link,
.am-logout{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.4rem;

    padding:.625rem .875rem;

    background:rgba(255,255,255,.15);
    color:#fff;

    border-radius:.75rem;
    font-weight:700;
}

.am-home-link:hover,
.am-logout-link:hover,
.am-logout:hover{
    background:rgba(255,255,255,.25);
}

/* KARTEN */

.am-card,
.am-welcome,
.am-hero{
    background:rgba(255,255,255,.86);
    backdrop-filter:blur(.625rem);
    border:1px solid rgba(255,255,255,.75);
    border-radius:var(--radius-xl);
    padding:var(--space-lg);
    margin-bottom:var(--space);
    box-shadow:var(--shadow);
}

.am-card h2,
.am-card h3{
    margin-top:0;
}

.am-card p{
    line-height:1.45;
}

/* START */

.am-start{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:1.75rem;
    padding:var(--space-xl);
}

.am-hero{
    text-align:center;
    padding:2rem 1.4rem;
}

.am-hero h1,
.am-welcome h1{
    margin:0 0 .75rem;
    font-size:var(--fs-xxl);
    font-weight:900;
    letter-spacing:-.04em;
}

.am-hero p,
.am-welcome p{
    margin:0;
    color:var(--muted);
    font-size:var(--fs-lg);
}

.am-logo{
    width:5.6rem;
    height:5.6rem;
    margin:0 auto 1rem;

    display:flex;
    align-items:center;
    justify-content:center;


    color:#fff;

    font-size:3rem;
}

.am-logo.small{
    width:5rem;
    height:5rem;
    font-size:2.8rem;
}

.am-start-buttons{
    max-width:31rem;
    margin:2rem auto;

    display:flex;
    flex-direction:column;
    gap:1rem;
}

.am-start-btn{
    display:flex;
    justify-content:center;
    align-items:center;

    min-height:4.4rem;

    background:var(--green);
    color:#fff;

    font-size:1.2rem;
    font-weight:700;

    border-radius:1rem;
    box-shadow:0 .25rem .75rem rgba(0,0,0,.15);
}

/* BUTTONS */

.am-bigbtn,
.am-menu-btn{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:.75rem;

    width:100%;
    padding:1.125rem;

    border:none;
    border-radius:1.4rem;

    background:linear-gradient(135deg,var(--green2),var(--green));
    color:#fff;

    box-shadow:0 .75rem 1.5rem rgba(31,122,58,.28);

    font-size:1.05rem;
    font-weight:900;

    cursor:pointer;
}

.am-bigbtn{
    justify-content:center;
    flex-direction:column;
    min-height:5.4rem;
    font-size:1.5rem;
}

.am-bigbtn small,
.am-menu-btn small{
    display:block;
    margin-top:.25rem;
    font-size:.8rem;
    font-weight:600;
    opacity:.9;
}

.am-menu-btn:hover,
.am-bigbtn:hover{
    transform:translateY(-.125rem);
    filter:brightness(1.04);
}

.am-menu-btn:active,
.am-bigbtn:active{
    transform:scale(.98);
}

.am-menu-list{
    display:grid;
    gap:.875rem;
}

.am-menu-icon{
    display:grid;
    place-items:center;

    flex:0 0 3rem;
    width:3rem;
    height:3rem;

    background:rgba(255,255,255,.2);
    border-radius:1rem;

    font-size:1.6rem;
}

/* KUNDENSUCHE */

#kundenSuche,
input[type="text"]{
    width:100%;

    padding:1.125rem 1.25rem;
    margin:.75rem 0 1.125rem;

    border:2px solid var(--border);
    border-radius:1.25rem;

    background:#fff;

    font-size:1.25rem;
    font-weight:800;

    outline:none;

    box-shadow:0 .5rem 1.25rem rgba(0,0,0,.08);
}

#kundenSuche:focus,
input[type="text"]:focus{
    border-color:var(--green2);
    box-shadow:0 0 0 .3rem rgba(53,168,83,.16);
}

#kundenErgebnis .am-menu-btn{
    margin-bottom:.625rem;
}
#almenErgebnis .am-menu-btn{
    margin-bottom:.625rem;
}




.am-suche-links{
    flex:1;
    min-width:0;

    line-height:1.35;

    white-space:normal;
    word-break:break-word;
}

.am-suche-links strong{
    font-weight:700;
}

.am-suche-rechts{
    flex:0 0 35%;
    min-width:0;

    margin-left:1rem;

    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;

    text-align:right;

    color:#555;
    font-size:.9rem;
    font-weight:600;
}

.am-kunde-mitbetrieb{
    background:#c9f7c9 !important;
    background-image:none !important;
    border-left:.25rem solid #1f9d3a !important;
    color:#111 !important;
}

.am-kunde-ohnebetrieb{
    background:#ffe08a !important;
    background-image:none !important;
    border-left:.625rem solid #ff9800 !important;
    color:#111 !important;
}

.am-reiner-betrieb{
    background:#bfe7ff !important;
    background-image:none !important;
    border-left:.625rem solid #1976d2 !important;
    color:#111 !important;
}

/* BETRIEB / INFO */

.am-betrieb-art{
    display:inline-block;

    margin-bottom:.625rem;
    padding:.25rem .75rem;

    border-radius:999rem;

    background:#e8f5e9;
    color:var(--green);

    font-size:.75rem;
    font-weight:700;

    text-transform:uppercase;
}

.am-infoliste{
    list-style:none;
    margin:0 0 1rem 0;
    padding:0;
}

.am-infoliste li{
    background:#f7f7f7;
    border:1px solid #e3e3e3;
    border-radius:.75rem;

    padding:.75rem .875rem;
    margin-bottom:.625rem;

    line-height:1.4;
    word-break:break-word;

    box-shadow:0 .0625rem .2rem rgba(0,0,0,.08);
}

.am-infoliste li strong{
    display:block;

    margin-bottom:.25rem;

    color:var(--green);

    font-size:.9rem;
    font-weight:700;

    text-transform:uppercase;
}

/* LOGIN */

.am-login-wrap{
    min-height:100vh;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:1rem;
}

.am-login{
    width:100%;
    max-width:26rem;
}

.am-login h1{
    margin:0;
    text-align:center;
    color:var(--green);
}

.am-login p{
    text-align:center;
    color:#666;
    margin:.5rem 0 1.5rem;
}

.am-login label{
    display:block;
    margin-bottom:.4rem;
    margin-top:.9rem;
    font-weight:600;
}

.am-login input[type=email],
.am-login input[type=password]{
    width:100%;

    padding:.9rem;

    border:1px solid #d8d8d8;
    border-radius:.75rem;

    font-size:1rem;
}

.am-login input:focus{
    outline:none;
    border-color:var(--green);
    box-shadow:0 0 0 .2rem rgba(31,122,58,.15);
}

.am-submit{
    width:100%;

    margin-top:1.2rem;
    padding:1rem;

    border:none;
    border-radius:.875rem;

    background:var(--green);
    color:#fff;

    font-size:1rem;
    font-weight:700;

    cursor:pointer;
}

.am-error{
    background:#ffe2e2;
    color:#c00000;

    border:1px solid #ffbcbc;
    border-radius:.75rem;

    padding:.9rem;
    margin-bottom:1rem;

    text-align:center;
}

/* FORMULARE */

form,
.am-form{
    display:flex;
    flex-direction:column;
    gap:.75rem;
}

label{
    font-weight:700;
}

input,
textarea,
select{
    width:100%;

    padding:.75rem;

    border:1px solid #ccc;
    border-radius:.625rem;

    box-sizing:border-box;
}

textarea,
.am-form textarea{
    min-height:7.5rem;
    resize:vertical;
}

.am-form select{
    padding:.9rem 1rem;

    border:1px solid #d6dbe1;
    border-radius:.75rem;

    background:#fff;
    color:#222;

    font-size:1rem;
    font-family:inherit;

    appearance:none;
}

.am-check{
    display:flex !important;
    align-items:center;
    gap:.625rem;

    margin-top:1rem;
    padding:.75rem;

    background:#f7f7f7;

    border-radius:.75rem;
}

.am-check input{
    width:auto;
}

.am-check input[type="checkbox"]{
    width:1.375rem;
    height:1.375rem;
}

.savebtn,
.am-save-btn{
    width:100%;

    border:0;
    border-radius:.875rem;

    padding:1rem;

    background:var(--green);
    color:#fff;

    font-size:1.1rem;
    font-weight:700;

    cursor:pointer;
}

.savebtn{
    background:#28a745;
}

.ok{
    background:#d4edda;
    color:#155724;

    padding:.75rem;
    margin-bottom:.9rem;

    border-radius:.625rem;
}

/* VORSCHLÄGE */

.am-suggest-box{
    display:none;

    margin-top:.4rem;
    margin-bottom:1rem;

    border:1px solid #d6dbe1;
    border-radius:.75rem;

    overflow:hidden;

    background:#fff;

    box-shadow:0 .5rem 1.4rem rgba(0,0,0,.12);
}

.am-suggest-item{
    width:100%;

    display:block;

    padding:.85rem 1rem;

    border:0;
    border-bottom:1px solid #eef1f4;

    background:#fff;

    text-align:left;

    cursor:pointer;
}

.am-suggest-item:last-child{
    border-bottom:0;
}

.am-suggest-item:hover{
    background:#f3f8e9;
}

.am-suggest-item strong{
    font-size:1.05rem;
}

.am-suggest-item small,
.am-suggest-item span{
    color:#666;
}

/* BEARBEITEN */

.am-edit-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:.9rem;
}

.am-edit-text{
    flex:1;
    line-height:1.45;
}

.am-edit-icon{
    width:2.75rem;
    height:2.75rem;
    min-width:2.75rem;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:#ff9800;
    color:#fff;

    font-size:1.3rem;

    box-shadow:0 .25rem .75rem rgba(0,0,0,.25);
}

.am-edit-icon:hover{
    background:#f57c00;
    transform:scale(1.05);
}

/* ZURÜCK-LINK */

p > a:not(.am-menu-btn){
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-height:3rem;

    padding:.75rem 1rem;

    border-radius:1rem;
    border:1px solid var(--border);

    background:#fff;
    color:var(--green);

    font-weight:900;

    box-shadow:0 .375rem .875rem rgba(0,0,0,.08);
}

/* RESPONSIVE */

@media(max-width:600px){

    .am-main,
    main{
        padding:.2rem;
    }

    .am-topbar{
        padding:.625rem;
    }

    .am-home-link,
    .am-logout-link{
        padding:.5rem .625rem;
        font-size:.9rem;
    }

    .am-topbar h1{
        font-size:1rem;
    }

    h2,
    .am-hero h1,
    .am-welcome h1{
        font-size:1.8rem;
    }

    .am-card,
    .am-welcome{
        border-radius:1.25rem;
        padding:1rem;
    }

.am-menu-btn{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:1rem;
}


    .am-menu-icon{
        width:2.75rem;
        height:2.75rem;
        flex-basis:2.75rem;
    }

    .am-start-buttons{
        margin:1rem;
    }

    .am-start-btn{
        min-height:4rem;
        font-size:1.05rem;
    }

    .am-suche-rechts{
        max-width:42%;
        font-size:.82rem;
    }

    iframe{
        height:21rem !important;
    }
}

footer{
    margin-top:2rem;
    padding:1.5rem 1rem;

    text-align:center;

    color:#6c757d;

    font-size:.9rem;
    font-weight:600;

    letter-spacing:.05em;
}

footer p{
    margin:0;
}
/* Zugeordnete Betriebe */

.am-betrieb-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;

    padding:12px 0;
    border-bottom:1px solid #e5e5e5;
}

.am-betrieb-row:last-child{
    border-bottom:none;
}

.am-betrieb-row strong{
    display:block;
    font-size:1.05em;
    color:#222;
}

.am-betrieb-row small{
    color:#666;
    line-height:1.4;
}

.am-delete-btn{
    display:inline-block;

    padding:8px 14px;

    background:#d9534f;
    color:#fff;
    text-decoration:none;

    border-radius:8px;
    font-size:.92em;
    white-space:nowrap;

    transition:.2s;
}

.am-delete-btn:hover{
    background:#c9302c;
    color:#fff;
}

@media (max-width:700px){

    .am-betrieb-row{
        flex-direction:column;
        align-items:flex-start;
    }

    .am-delete-btn{
        width:100%;
        text-align:center;
        margin-top:8px;
    }

}
.am-loader{
    width:46px;
    height:46px;
    border:6px solid #ddd;
    border-top:6px solid #333;
    border-radius:50%;
    animation: amSpin 1s linear infinite;
    margin:0 auto 10px auto;
}

@keyframes amSpin{
    from { transform:rotate(0deg); }
    to { transform:rotate(360deg); }
}
