.settings-section{
    display:grid;
    gap:18px;
}

.settings-heading{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
}

.settings-state{
    display:inline-flex;
    align-items:center;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}

.settings-state.is-on{
    background:var(--hw-light-blue);
    color:var(--hw-navy);
}

.settings-state.is-off{
    background:#F1F5F9;
    color:#475569;
}

.settings-form{
    display:grid;
    gap:18px;
}

.settings-switch-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:14px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--neutral);
}

.settings-switch-row input[type="checkbox"]{
    width:22px;
    height:22px;
    accent-color:var(--hw-blue);
}

@media(max-width:650px){
    .settings-heading,
    .settings-switch-row{
        align-items:flex-start;
        flex-direction:column;
    }
}


.template-list{
    display:grid;
    gap:18px;
    margin-top:18px;
}

.template-card{
    display:grid;
    gap:18px;
}

.template-card-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
}

.template-form{
    display:grid;
    gap:16px;
}

.template-placeholders{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-top:14px;
}

.template-placeholders > div{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--neutral);
}

.template-placeholders code{
    color:var(--hw-navy);
    font-weight:800;
}

@media(max-width:650px){
    .template-card-head{
        flex-direction:column;
    }

    .template-placeholders{
        grid-template-columns:1fr;
    }
}

/* Uniform checkbox alignment across the ERP (forms, settings and CMS). */
label.check-row, .check-row, label.checkbox-row, .checkbox-row, label.checkbox-label, .checkbox-label {
    display:inline-flex;align-items:center;justify-content:flex-start;gap:7px;vertical-align:middle;line-height:1.35;
}
label.check-row input[type="checkbox"], .check-row input[type="checkbox"],
label.check-row input[type="radio"], .check-row input[type="radio"],
label.checkbox-row input[type="checkbox"], .checkbox-row input[type="checkbox"],
label.checkbox-row input[type="radio"], .checkbox-row input[type="radio"],
label.checkbox-label input[type="checkbox"], .checkbox-label input[type="checkbox"],
label.checkbox-label input[type="radio"], .checkbox-label input[type="radio"]{
    flex:0 0 18px;width:18px;max-width:18px;height:18px;padding:0;margin:0;
    vertical-align:middle;align-self:center;
}
.settings-switch-row{justify-content:flex-start;align-items:center;gap:10px;}
.settings-switch-row input[type="checkbox"]{flex:0 0 22px;width:22px;max-width:22px;margin:0;align-self:center;order:-1;}
@media(max-width:650px){.settings-switch-row{flex-direction:row;align-items:center;}}

.settings-overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;}
.settings-overview-group{display:flex;flex-direction:column;gap:7px;padding:16px;border:1px solid var(--border);border-radius:10px;background:var(--surface);}
.settings-overview-group h3{font-size:15px;margin:0 0 5px;}
.settings-overview-group a{color:var(--hw-navy);font-weight:600;text-decoration:none;padding:3px 0;}
.settings-overview-group a:hover{text-decoration:underline;}
.settings-overview-group p{font-size:13px;line-height:1.45;color:var(--text-soft);margin:0;}
#firma,#mehrwertsteuer,#darstellung,#auftragsabschluss,#email{scroll-margin-top:90px;}
