
/* Stedinger Archiv v05.64.00 – gemeinsame UI-Konsistenzschicht */
:root{
  --sa-ui-bg:#f4f6f5;
  --sa-ui-surface:#ffffff;
  --sa-ui-surface-soft:#f8faf9;
  --sa-ui-line:rgba(36,59,49,.14);
  --sa-ui-line-strong:rgba(36,59,49,.24);
  --sa-ui-text:#26362f;
  --sa-ui-muted:#6a7771;
  --sa-ui-radius:12px;
  --sa-ui-radius-sm:8px;
  --sa-ui-shadow:0 5px 20px rgba(28,50,40,.07);
  --sa-ui-shadow-hover:0 8px 24px rgba(28,50,40,.11);
  --sa-ui-focus:0 0 0 3px rgba(55,105,80,.14);
}
html{scroll-behavior:smooth}
body{background:var(--sa-ui-bg);color:var(--sa-ui-text)}
body,button,input,select,textarea{font-feature-settings:"kern" 1}
a{transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease}
.page-head,.pagehead{
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
  margin:0 0 18px;
}
.page-head h1,.pagehead h1{margin:.1rem 0 .25rem;line-height:1.15}
.page-head p,.pagehead p{margin:.2rem 0;color:var(--sa-ui-muted)}
.panel,.card{
  background:var(--sa-ui-surface);
  border:1px solid var(--sa-ui-line);
  border-radius:var(--sa-ui-radius);
  box-shadow:var(--sa-ui-shadow);
}
.panel,.card{margin-bottom:16px}
.panel>h2:first-child,.card>h2:first-child{margin-top:0}
.actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
button,.button,input[type="submit"],input[type="button"]{
  border-radius:var(--sa-ui-radius-sm);
  min-height:40px;
}
button,.button{
  transition:transform .12s ease,box-shadow .12s ease,background-color .12s ease,border-color .12s ease;
}
button:hover,.button:hover{transform:translateY(-1px)}
button:focus-visible,.button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:none;box-shadow:var(--sa-ui-focus);
}
input,select,textarea{
  border-radius:var(--sa-ui-radius-sm)!important;
  border-color:var(--sa-ui-line-strong)!important;
  background:#fff;
}
input:hover,select:hover,textarea:hover{border-color:rgba(36,59,49,.36)!important}
input:focus,select:focus,textarea:focus{border-color:var(--accent,#477a61)!important}
label{font-weight:600}
label small,.muted,small.muted{color:var(--sa-ui-muted)}
.table-wrap{
  overflow:auto;
  border:1px solid var(--sa-ui-line);
  border-radius:var(--sa-ui-radius-sm);
  background:var(--sa-ui-surface);
}
.table-wrap table{margin:0;border-collapse:separate;border-spacing:0;width:100%}
.table-wrap th{
  position:sticky;top:0;z-index:1;
  background:var(--sa-ui-surface-soft);
  color:var(--sa-ui-text);
  font-weight:700;
}
.table-wrap th,.table-wrap td{border-bottom:1px solid var(--sa-ui-line)}
.table-wrap tbody tr:last-child td{border-bottom:0}
.table-wrap tbody tr:hover td{background:rgba(72,119,94,.035)}
.flash,.alert{
  border-radius:var(--sa-ui-radius-sm);
  border:1px solid var(--sa-ui-line);
  box-shadow:0 3px 12px rgba(28,50,40,.05);
}
.badge,.pill,.tag,.chip{
  border-radius:999px;
}
.backend-topbar{
  border-bottom:1px solid var(--sa-ui-line);
  box-shadow:0 2px 12px rgba(28,50,40,.05);
}
.backend-top-search input{
  border-radius:999px!important;
  background:#fff!important;
}
.backend-quicknav{
  border-bottom:1px solid var(--sa-ui-line);
  box-shadow:0 2px 10px rgba(28,50,40,.04);
}
.backend-quicknav>a,
.backend-quicknav>details>summary{
  border-radius:9px;
}
.backend-quicknav>a:hover,
.backend-quicknav>details>summary:hover{
  background:rgba(67,108,87,.07);
}
.backend-quicknav .active{
  background:rgba(67,108,87,.10)!important;
  box-shadow:inset 0 0 0 1px rgba(67,108,87,.12);
}
.backend-quicknav details[open]>summary{
  background:rgba(67,108,87,.08);
}
.backend-quicknav details>div,
.backend-quicknav .backend-menu-panel{
  border:1px solid var(--sa-ui-line);
  border-radius:var(--sa-ui-radius);
  box-shadow:var(--sa-ui-shadow-hover);
}
.workspace-card,.record-card,.archive-card,.m2-tile{
  border-color:var(--sa-ui-line)!important;
  border-radius:var(--sa-ui-radius)!important;
  box-shadow:0 3px 12px rgba(28,50,40,.045);
}
.workspace-card:hover,.record-card:hover,.archive-card:hover,.m2-tile:hover{
  box-shadow:var(--sa-ui-shadow-hover);
}
.public-top{
  border-bottom:1px solid var(--sa-ui-line);
  box-shadow:0 2px 12px rgba(28,50,40,.045);
}
.sa-card,.sa-mini-card{
  border-radius:var(--sa-ui-radius)!important;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.sa-card:hover,.sa-mini-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--sa-ui-shadow-hover);
}
details>summary{cursor:pointer}
hr{border:0;border-top:1px solid var(--sa-ui-line)}
@media(max-width:900px){
  .page-head,.pagehead{gap:12px}
}
@media(max-width:700px){
  body{font-size:16px}
  .page-head,.pagehead{display:block}
  .page-head .actions,.pagehead .actions{margin-top:10px}
  .panel,.card{border-radius:10px}
  .actions>.button,.actions>button{min-height:44px}
  input,select,textarea,button,.button{font-size:16px}
  .backend-quicknav{overflow-x:auto}
}


/* v05.64.01 – Header rechts und Arbeitsplatz */
.backend-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:14px!important;
  flex-wrap:nowrap!important;
}
.archive-context-badge{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:36px!important;
  padding:0 11px!important;
  border:1px solid var(--sa-ui-line-strong)!important;
  border-radius:9px!important;
  background:#fff!important;
  line-height:1!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
.archive-context-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:5px;
  background:var(--accent,#2b5d66);
  color:#fff;
  font-size:11px;
  font-weight:800;
  line-height:1;
}
.backend-public-link{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  min-height:36px!important;
  padding:0 2px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.external-link-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:14px;
  height:14px;
  font-size:12px;
  line-height:1;
  transform:translateY(-1px);
}
.backend-actions>a,
.backend-actions .archive-context-badge{
  vertical-align:middle!important;
}
.backend-logout{margin:0!important}
.backend-logout button{margin:0!important;min-height:36px!important}
@media(max-width:1100px){
  .backend-actions{gap:9px!important}
}
@media(max-width:850px){
  .backend-actions{flex-wrap:wrap!important;justify-content:flex-start!important}
}


/* v05.65.00 – Backend-Navigation in zwei klaren Reihen */
@media(min-width:1181px){
  .backend-quicknav{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:7px!important;
    align-items:stretch!important;
    overflow:visible!important;
    position:sticky;
    top:8px;
  }
  .backend-quicknav>a,
  .backend-quicknav>details,
  .backend-quicknav>details>summary{
    width:100%!important;
    min-width:0!important;
  }
  .backend-quicknav>details{position:relative}
  .backend-quicknav>a,
  .backend-quicknav>details>summary{
    min-height:58px!important;
    justify-content:flex-start!important;
  }
  .backend-quicknav .backend-nav-label{min-width:0}
  .backend-quicknav .backend-nav-label b,
  .backend-quicknav .backend-nav-label small{
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

/* v05.65.00 – getrennte Logo-Größen */
.backend-topbar .brand-logo-frame{
  width:{{logo_backend_width}}px!important;
  height:{{logo_backend_height}}px!important;
  min-width:{{logo_backend_width}}px!important;
  min-height:{{logo_backend_height}}px!important;
  max-width:{{logo_backend_width}}px!important;
  max-height:{{logo_backend_height}}px!important;
  flex-basis:{{logo_backend_width}}px!important;
}
.backend-topbar .brand-logo{
  height:{{logo_backend_height}}px!important;
  max-width:{{logo_backend_width}}px!important;
  max-height:{{logo_backend_height}}px!important;
}
.public-header-v056500 .brand-logo-frame{
  width:{{logo_frontend_width}}px!important;
  height:{{logo_frontend_height}}px!important;
  min-width:{{logo_frontend_width}}px!important;
  min-height:{{logo_frontend_height}}px!important;
  max-width:{{logo_frontend_width}}px!important;
  max-height:{{logo_frontend_height}}px!important;
  flex-basis:{{logo_frontend_width}}px!important;
}
.public-header-v056500 .brand-logo{
  height:{{logo_frontend_height}}px!important;
  max-width:{{logo_frontend_width}}px!important;
  max-height:{{logo_frontend_height}}px!important;
}

/* Darstellung / Logo-Größe */
.settings-logo-size-panel{
  max-width:1460px;margin:12px auto 18px;padding:18px 20px;
  background:#fff;border:1px solid var(--sa-ui-line,rgba(36,59,49,.14));
  border-radius:14px;box-shadow:var(--sa-ui-shadow,0 5px 20px rgba(28,50,40,.07));
}
.settings-logo-size-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.settings-logo-size-head h2{margin:2px 0 4px}
.settings-logo-size-head p{margin:0;color:var(--sa-ui-muted,#6a7771)}
.settings-kicker{font-size:.74rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--accent,#244f59)}
.settings-logo-hint{padding:5px 9px;border-radius:999px;background:rgba(55,105,80,.08);font-size:.78rem;font-weight:700}
.settings-logo-size-form{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}
.settings-logo-size-form label{display:grid;gap:4px}
.settings-logo-size-form label>small{font-weight:400;color:var(--sa-ui-muted,#6a7771)}
.logo-size-input{display:flex;align-items:center;gap:7px}
.logo-size-input input{width:120px}
.settings-logo-size-form button{white-space:nowrap}

@media(max-width:1180px){
  .public-nav-v056500{
    grid-template-columns:auto repeat(5,minmax(145px,1fr));
    overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;
  }
  .public-nav-v056500>a,.public-nav-v056500>.public-nav-group>.public-nav-group-toggle{min-width:150px}
}
@media(max-width:850px){
  .public-head-main{grid-template-columns:1fr;gap:10px;padding:10px 12px}
  .public-brand{width:100%}
  .public-head-actions{justify-content:flex-start}
  .public-menu-toggle{display:inline-flex}
  .public-nav-v056500{
    display:none!important;padding:8px 12px!important;grid-template-columns:1fr!important;
    overflow:visible!important;background:#fff!important;
  }
  .public-nav-v056500.mobile-open{display:grid!important}
  .public-nav-v056500>a,.public-nav-v056500>.public-nav-group>.public-nav-group-toggle{
    min-width:0!important;min-height:54px;border:1px solid var(--sa-ui-line,rgba(36,59,49,.12))!important;
    border-radius:9px;margin-bottom:5px;
  }
  .public-nav-group{position:static}
  .public-nav-dropdown,.public-nav-group:nth-last-child(-n+2)>.public-nav-dropdown{
    position:static;width:auto;min-width:0;max-width:none;margin:-1px 0 7px;box-shadow:none;border-radius:9px;
  }
  .settings-logo-size-form{grid-template-columns:1fr}
}
@media(max-width:600px){
  .public-brand-copy small{display:none}
  .public-brand-copy b{white-space:normal;font-size:1.35rem}
  .public-head-action{padding:0 9px}
  .public-nav-dropdown-grid{grid-template-columns:1fr}
}


/* v05.65.02 – Frontend-Menü: kompakte zweistufige Navigation */
.public-header-v056502{
  display:block!important;
  min-height:0!important;
  padding:0!important;
  background:var(--sa-header-bg,#f8f5ee)!important;
  border-bottom:0!important;
}
.public-headline-v056502{
  max-width:1460px;
  margin:0 auto;
  padding:10px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.public-brand-v056502{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  min-width:0;
  text-decoration:none!important;
}
.public-brand-text-v056502{display:grid;gap:2px;min-width:0}
.public-brand-text-v056502 b{
  font-family:var(--front-heading-font,Georgia,serif);
  font-size:1.55rem;
  line-height:1.05;
  color:var(--accent,#244f59);
  white-space:nowrap;
}
.public-brand-text-v056502 small{
  color:var(--sa-ui-muted,#6a7771);
  font-size:.74rem;
  font-weight:600;
  white-space:nowrap;
}
.public-utility-v056502{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.public-utility-link,.public-mobile-toggle-v056502{
  min-height:36px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--sa-ui-line-strong,rgba(36,59,49,.24));
  border-radius:8px;
  background:#fff;
  color:var(--sa-ui-text,#26362f);
  text-decoration:none;
  font-size:.86rem;
  font-weight:650;
}
.public-utility-link:hover,.public-mobile-toggle-v056502:hover{
  background:rgba(55,105,80,.055);
  border-color:rgba(55,105,80,.34);
}
.public-admin-link{
  background:var(--accent,#244f59)!important;
  border-color:var(--accent,#244f59)!important;
  color:#fff!important;
}
.public-mobile-toggle-v056502{display:none}

.public-mainnav-v056502{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
  background:#fff!important;
  border-top:1px solid var(--sa-ui-line,rgba(36,59,49,.14));
  border-bottom:1px solid var(--sa-ui-line,rgba(36,59,49,.14));
  box-shadow:0 3px 12px rgba(28,50,40,.045);
  position:relative;
  z-index:55;
}
.public-mainnav-inner-v056502{
  max-width:1460px;
  margin:0 auto;
  padding:0 16px;
  display:flex;
  align-items:stretch;
  justify-content:flex-start;
  gap:2px;
}
.public-mainnav-item{
  min-height:46px!important;
  box-sizing:border-box;
  padding:0 14px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--sa-ui-text,#26362f)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  text-decoration:none!important;
  font-size:.9rem!important;
  font-weight:700!important;
  white-space:nowrap;
  cursor:pointer;
  position:relative;
}
.public-mainnav-item:hover{
  background:rgba(55,105,80,.055)!important;
  color:var(--accent,#244f59)!important;
}
.public-mainnav-item.active,
.public-mainnav-group.open>.public-mainnav-item{
  color:var(--accent,#244f59)!important;
  background:rgba(55,105,80,.07)!important;
}
.public-mainnav-item.active::after,
.public-mainnav-group.open>.public-mainnav-item::after{
  content:"";
  position:absolute;
  left:12px;right:12px;bottom:0;
  height:3px;
  border-radius:3px 3px 0 0;
  background:var(--accent,#244f59);
}
.public-mainnav-arrow{
  font-size:.72rem;
  opacity:.55;
  transition:transform .15s ease;
}
.public-mainnav-group.open .public-mainnav-arrow{transform:rotate(180deg)}
.public-mainnav-group{position:relative}
.public-dropdown-v056502{
  display:none;
  position:absolute;
  left:0;
  top:calc(100% + 7px);
  min-width:300px;
  width:max-content;
  max-width:min(560px,90vw);
  padding:10px;
  background:#fff;
  border:1px solid var(--sa-ui-line-strong,rgba(36,59,49,.22));
  border-radius:11px;
  box-shadow:0 14px 34px rgba(28,50,40,.16);
}
.public-mainnav-group.open>.public-dropdown-v056502{display:block}
.public-mainnav-group:nth-last-child(-n+2)>.public-dropdown-v056502{left:auto;right:0}
.public-dropdown-title-v056502{
  padding:2px 6px 8px;
  margin-bottom:5px;
  border-bottom:1px solid var(--sa-ui-line,rgba(36,59,49,.12));
  color:var(--accent,#244f59);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.public-dropdown-links-v056502{
  display:grid;
  grid-template-columns:repeat(2,minmax(140px,1fr));
  gap:3px 8px;
}
.public-dropdown-links-v056502 a{
  min-height:36px;
  padding:7px 8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid transparent;
  border-radius:7px;
  color:var(--sa-ui-text,#26362f);
  text-decoration:none;
  font-size:.85rem;
  line-height:1.2;
}
.public-dropdown-links-v056502 a:hover,
.public-dropdown-links-v056502 a.active{
  background:rgba(55,105,80,.06);
  border-color:rgba(55,105,80,.11);
  color:var(--accent,#244f59);
}
.public-dropdown-links-v056502 a span:last-child{opacity:.38;font-size:1rem}

/* technische Backend-Schnelllinks gehören nicht in die öffentliche Hauptnavigation */
.public-header-v056502 a[href*="/admin/arbeitscenter"],
.public-header-v056502 a[href*="/admin/system"],
.public-header-v056502 a[href*="/admin/mobile"],
.public-header-v056502 a[href*="/admin/geo"]{display:none!important}

/* getrennte Frontend-Logo-Größe aus Darstellung weiterverwenden */
.public-header-v056502 .brand-logo-frame{
  width:{{logo_frontend_width}}px!important;
  height:{{logo_frontend_height}}px!important;
  min-width:{{logo_frontend_width}}px!important;
  min-height:{{logo_frontend_height}}px!important;
  max-width:{{logo_frontend_width}}px!important;
  max-height:{{logo_frontend_height}}px!important;
}
.public-header-v056502 .brand-logo{
  height:{{logo_frontend_height}}px!important;
  max-width:{{logo_frontend_width}}px!important;
  max-height:{{logo_frontend_height}}px!important;
}

@media(max-width:980px){
  .public-mainnav-inner-v056502{overflow-x:auto;scrollbar-width:thin}
  .public-mainnav-item{padding:0 11px!important;font-size:.86rem!important}
}
@media(max-width:820px){
  .public-headline-v056502{align-items:flex-start;gap:10px;flex-direction:column}
  .public-utility-v056502{width:100%;justify-content:flex-start}
  .public-mobile-toggle-v056502{display:inline-flex}
  .public-mainnav-v056502{display:none!important}
  .public-mainnav-v056502.mobile-open{display:block!important}
  .public-mainnav-inner-v056502{
    display:grid;
    grid-template-columns:1fr;
    overflow:visible;
    padding:8px 12px 10px;
  }
  .public-mainnav-item{
    width:100%!important;
    justify-content:space-between!important;
    min-height:44px!important;
    border:1px solid var(--sa-ui-line,rgba(36,59,49,.13))!important;
    border-radius:8px!important;
    margin-bottom:4px;
  }
  .public-mainnav-item.active::after,
  .public-mainnav-group.open>.public-mainnav-item::after{display:none}
  .public-mainnav-group{position:static}
  .public-dropdown-v056502,
  .public-mainnav-group:nth-last-child(-n+2)>.public-dropdown-v056502{
    position:static;
    width:auto;
    min-width:0;
    max-width:none;
    margin:-1px 0 7px;
    box-shadow:none;
  }
}
@media(max-width:560px){
  .public-brand-text-v056502 small{display:none}
  .public-brand-text-v056502 b{white-space:normal;font-size:1.35rem}
  .public-dropdown-links-v056502{grid-template-columns:1fr}
  .public-utility-link,.public-mobile-toggle-v056502{font-size:.82rem}
}


/* v05.65.03 – Frontend Kopfzeile: Suche und Backend konsequent rechts */
.public-headline-v056502{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
}
.public-brand-v056502{
  justify-self:start!important;
  min-width:0!important;
}
.public-utility-v056502{
  justify-self:end!important;
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  white-space:nowrap;
}
.public-search-link{order:10}
.public-admin-link{order:20}
.public-mobile-toggle-v056502{order:30}

@media(max-width:820px){
  .public-headline-v056502{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
  }
  .public-brand-v056502{align-self:flex-start}
  .public-utility-v056502{
    width:100%!important;
    justify-self:auto!important;
    justify-content:flex-end!important;
    margin-left:0!important;
  }
}
@media(max-width:560px){
  .public-utility-v056502{
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
}
