/* DORFER Intranet V14.30.2 - responsive Header and mobile navigation hotfix.
   Existing business workflows and Supabase schema remain unchanged. */
:root{--dorfer30-search-bg:#edeae8;--dorfer30-search-border:#d3ccca}
/* Prevent the header controls from enforcing a wider page than the device. */
.shell,.shell>.main,.dorfer-topbar,.dorfer17-home-welcome,.dorfer17-page-context,
.dorfer-top-actions,.dorfer28-global-search{min-width:0}
.shell{width:100%;max-width:100%}
.shell>.main{width:100%;max-width:100%}
.dorfer-topbar{max-width:100%;box-sizing:border-box}
.dorfer-top-actions>.dorfer28-global-search{min-width:0;max-width:310px}
.dorfer-top-actions>.dorfer28-global-search>#v1428-search,
.dorfer28-global-search input{
  width:100%;min-width:0;background:var(--dorfer30-search-bg);
  border:1px solid var(--dorfer30-search-border);color:#2e2929;
  border-radius:10px;box-shadow:none;appearance:none;-webkit-appearance:none;
}
.dorfer28-global-search input::placeholder{color:#7e7775;opacity:1}
.dorfer28-global-search input:focus{background:#f3f1ef;border-color:#ac7379;outline:2px solid rgba(165,43,54,.18);outline-offset:1px}
/* The search on the order list shares the subdued surface. */
.dorfer-search-box{background:#f1eeec}
.dorfer-search-box input{background:transparent}
/* Start page banner and compact bar should stack BEFORE their controls collide. */
@media(max-width:1350px){
  .dorfer-topbar.dorfer17-home-header,.dorfer-topbar.dorfer17-compact-header{
    display:grid;grid-template-columns:minmax(0,1fr);align-content:center;
    align-items:start;gap:16px;height:auto;min-width:0;
  }
  .dorfer17-home-header .dorfer17-home-welcome,.dorfer17-compact-header .dorfer17-page-context{width:100%;min-width:0}
  .dorfer-top-actions{display:flex!important;flex-wrap:wrap;gap:9px!important;
    width:100%;min-width:0;flex:1 1 auto;align-items:center!important}
  .dorfer-top-actions>.dorfer28-global-search{min-width:0;max-width:400px;flex:1 1 210px}
  .dorfer-top-actions>.dorfer28-global-search>#v1428-search{min-width:0}
  .dorfer17-home-header .dorfer-profile-menu{margin-left:auto}
}
@media(max-width:950px){
  .shell>.main{min-width:0;padding:0}
  .dorfer-topbar.dorfer17-home-header,.dorfer-topbar.dorfer17-compact-header{
    margin:10px 12px 20px;border-radius:18px!important;padding:20px!important;gap:17px;min-height:0;
  }
  .dorfer-top-actions>.dorfer28-global-search{max-width:none;flex:1 1 240px;order:0}
  .dorfer-top-actions>.dorfer28-global-search>#v1428-search{min-height:44px;height:44px}
  .dorfer17-home-header .dorfer-refresh{display:inline-flex!important}
  .dorfer-refresh{min-width:44px!important}
  .dorfer-top-actions>.dorfer-profile-menu{margin-left:auto}
  /* Short, predictable bottom navigation with ALL other sections under Mehr. */
  .mobile-nav.dorfer30-mobile-nav{
    display:grid!important;grid-template-columns:repeat(var(--dorfer-mobile-columns,5),minmax(0,1fr));
    align-items:stretch;justify-content:stretch;gap:0;overflow:visible;
    padding:5px max(4px,env(safe-area-inset-left)) max(6px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-right));
    box-shadow:0 -3px 18px rgba(0,0,0,.045)
  }
  .dorfer30-mobile-nav>button,.dorfer30-mobile-more>summary{
    min-width:0;width:100%;min-height:55px;margin:0;display:flex;align-items:center;justify-content:center;
    flex-direction:column;gap:4px;padding:7px 3px;border:0;background:none;color:#646a68;
    text-align:center;white-space:nowrap;line-height:1.1;cursor:pointer;touch-action:manipulation;
  }
  .dorfer30-mobile-nav>button.sel{color:#a52b36;font-weight:800}
  .dorfer30-mobile-nav small{font-size:11px!important;font-weight:600;letter-spacing:-.015em;line-height:1.2;color:inherit}
  .dorfer30-mobile-icon{height:23px;display:inline-flex;align-items:center;justify-content:center;font-size:20px!important;line-height:1}
  .dorfer30-mobile-icon svg{height:22px;width:22px}
  .dorfer30-mobile-more{position:static;min-width:0}
  .dorfer30-mobile-more>summary{list-style:none}
  .dorfer30-mobile-more>summary::-webkit-details-marker{display:none}
  .dorfer30-mobile-more[open]>summary{color:#a52b36}
  .dorfer30-mobile-menu{
    position:fixed;left:12px;right:12px;bottom:calc(75px + env(safe-area-inset-bottom));z-index:35;
    max-height:min(64dvh,620px);overflow-y:auto;overscroll-behavior:contain;
    display:grid;gap:3px;background:#fff;border:1px solid #ded8d6;border-radius:15px;
    box-shadow:0 12px 45px #1c16163b;padding:14px 11px;
  }
  .dorfer30-mobile-menu>strong{font-size:14px;padding:4px 9px 10px}
  .dorfer30-mobile-menu button{display:flex;align-items:center;justify-content:flex-start;
    gap:11px;width:100%;min-width:0;min-height:45px;text-align:left;border:0;
    padding:8px 11px;border-radius:9px;background:transparent;color:#302b2b;
    font-size:14px;font-weight:600;white-space:normal;touch-action:manipulation}
  .dorfer30-mobile-menu button.sel{background:#f9eef0;color:#9d2c38}
  .dorfer30-mobile-menu button:active,.dorfer30-mobile-menu button:focus-visible{background:#f2eded}
  .dorfer30-menu-symbol{flex:0 0 27px;display:inline-flex;align-items:center;justify-content:center;font-size:19px!important}
  .dorfer30-menu-symbol svg{width:20px;height:20px}
  .workspace.content{min-width:0;max-width:100%}
}
@media(max-width:600px){
  .dorfer-topbar.dorfer17-home-header,.dorfer-topbar.dorfer17-compact-header{
    margin:8px 10px 16px;padding:18px 16px!important;gap:15px;
  }
  .dorfer17-home-welcome{gap:6px}
  .dorfer17-home-welcome>strong{font-size:clamp(23px,6.1vw,31px)!important;line-height:1.16;
    overflow-wrap:normal;word-break:normal}
  .dorfer17-home-welcome>small{font-size:12px;line-height:1.5;max-width:34ch;overflow-wrap:normal}
  .dorfer17-overline{font-size:10px;line-height:1.35}
  .dorfer-topbar .dorfer-top-actions{gap:8px!important;display:flex!important;align-content:start;align-items:center!important}
  .dorfer-top-actions>.dorfer28-global-search{flex:0 0 100%;width:100%;max-width:none;order:-1}
  .dorfer-top-actions>.dorfer-refresh{display:inline-flex!important;flex:0 0 44px!important;
    min-width:44px!important;max-width:44px!important;padding:0!important;justify-content:center!important}
  .dorfer-top-actions>.dorfer-refresh span{display:none!important}
  .dorfer-top-actions>.dorfer20-top-feedback{flex:0 0 43px!important}
  .dorfer-top-actions>.dorfer20-notification{flex:0 1 auto;min-width:0;max-width:125px;
    font-size:12px;padding:7px 10px;min-height:43px;line-height:1.25;white-space:normal}
  .dorfer-top-actions>.dorfer-profile-menu{flex:0 0 auto;margin-left:auto;max-width:60px}
  .dorfer17-home-header .dorfer-profile-menu>summary{padding:3px!important;min-height:43px}
  .dorfer-topbar .dorfer-avatar-small{width:39px;height:39px}
  .dorfer-topbar .dorfer-top-person{display:none!important}
  .dorfer-profile-menu>summary>.dorfer-icon{display:none}
  .dorfer-profile-dropdown{right:0;width:min(315px,calc(100vw - 42px))}
  .workspace.content{padding:14px 12px calc(100px + env(safe-area-inset-bottom))!important}
  .workspace.content>*,.workspace.content .card{max-width:100%;min-width:0}
}
@media(max-width:350px){
  .dorfer-topbar.dorfer17-home-header,.dorfer-topbar.dorfer17-compact-header{padding:15px 12px!important}
  .dorfer30-mobile-nav small{font-size:10px!important}
  .dorfer-top-actions>.dorfer20-notification{font-size:11px;max-width:100px}
}

@media(max-width:950px){
.dorfer30-mobile-menu button>span:last-child:not(.dorfer30-menu-symbol){font-size:14px!important;line-height:1.25;}
.dorfer30-mobile-menu button:focus-visible,.dorfer30-mobile-more>summary:focus-visible{outline:2px solid #a52b36;outline-offset:-2px;}
}
