/* Scoped adaptation of V1 dashboard.html + sidebar.html/layout.js.
   The approved shared welcome, registration and company preparation stay intact. */
.restaurant-shell {
  --ink:#1f2937; --muted:#6b7280; --brand:#2563eb;
  --line:#e5e7eb; --surface:#fff;
  background:#f3f4f6;color:#1f2937;
  font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  min-height:100dvh;display:grid;grid-template-columns:256px minmax(0,1fr);
}
.restaurant-shell *{box-sizing:border-box}
.restaurant-shell [hidden]{display:none!important}
.restaurant-sidebar a,.restaurant-module,.restaurant-mobile-nav a{color:inherit;text-decoration:none}
.restaurant-sidebar button,.restaurant-header button,.restaurant-header select,.restaurant-mobile-nav button,.restaurant-switch-branch,.restaurant-module-search{font:inherit}
.restaurant-shell :focus-visible{outline:3px solid #2563eb;outline-offset:3px}
.restaurant-sidebar.sidebar{position:sticky;top:0;width:auto;height:100dvh;overflow-y:auto;background:#fff;border:0;border-right:1px solid #e5e7eb;padding:16px 12px;display:flex;flex-direction:column;gap:12px;transform:none;visibility:visible;z-index:30}
.restaurant-brand{display:flex;align-items:center;gap:6px;min-height:48px;margin-bottom:8px}
.restaurant-brand>a{display:flex;align-items:center;gap:8px;min-width:0;flex:1;font-size:18px;font-weight:700}
.restaurant-brand img{width:40px;height:40px;object-fit:contain}
.restaurant-brand small{display:block;font-size:12px;font-weight:400;color:#6b7280}
.restaurant-brand button{border:0;background:transparent;font-size:21px;padding:8px;cursor:pointer;border-radius:6px}
.restaurant-sidebar nav{display:flex;flex-direction:column;gap:4px}
.restaurant-sidebar nav a{border:0;display:flex;align-items:center;gap:10px;padding:9px 12px;min-height:40px;font-size:14px;font-weight:400;border-radius:6px;color:#374151;line-height:20px}
.restaurant-sidebar nav a:hover{background:#f3f4f6}
.restaurant-sidebar nav a[aria-current=page]{background:#2563eb;color:#fff;font-weight:500}
.restaurant-nav-symbol{font-size:20px;line-height:24px;width:24px;flex-shrink:0;text-align:center}
.restaurant-account{border-top:1px solid #e5e7eb;padding-top:12px;margin-top:auto}
.restaurant-account p{font-size:12px;overflow-wrap:anywhere;padding:8px 12px;line-height:1.5;margin:0}
.restaurant-account small{display:block;color:#6b7280}
.restaurant-account>button{display:flex;align-items:center;gap:10px;width:100%;border:0;border-radius:6px;background:transparent;padding:10px 12px;text-align:left;color:#4b5563;font-size:13px;cursor:pointer}
.restaurant-account>button:hover{background:#f3f4f6}
.restaurant-account>button span:first-child{width:24px;flex-shrink:0}
.restaurant-workspace.app-workspace{min-width:0;margin:0;width:auto}
.restaurant-header.app-header{position:sticky;top:0;height:auto;min-height:72px;background:#fff;border-bottom:1px solid #e5e7eb;padding:12px 24px;display:flex;gap:24px;z-index:20}
.restaurant-header .context-select{min-width:0;max-width:320px;display:flex;flex-direction:column;gap:4px;flex:1}
.restaurant-header .context-select label{font-size:12px;color:#6b7280;margin:0}
.restaurant-header select{width:100%;min-width:0;max-width:100%;height:34px;min-height:34px;border:1px solid #d1d5db;border-radius:5px;background:#fff;padding:4px 28px 4px 8px;font-size:14px}
.restaurant-role{margin-left:auto;color:#6b7280;font-size:13px;white-space:nowrap}
.restaurant-shell .menu-toggle{display:none}
.restaurant-main.dashboard-main{max-width:2240px;padding:24px;margin:0 auto;width:100%;min-width:0}
.restaurant-welcome{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-radius:12px;background:#fff;box-shadow:0 1px 3px #0000001a;margin-bottom:20px}
.restaurant-welcome h1{font-size:30px;line-height:36px;letter-spacing:normal;margin:0;font-weight:700;color:#1f2937;overflow-wrap:anywhere}
.restaurant-welcome p{font-size:14px;line-height:20px;margin:6px 0 0;color:#4b5563}
.restaurant-activity{padding:12px 16px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;margin-bottom:24px;box-shadow:none}
.restaurant-activity p{font-size:12px;color:#6b7280;margin:0 0 10px}
.restaurant-activity .home-activity-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.restaurant-activity .home-metric{display:flex;flex-direction:column;align-items:flex-start;min-height:0;background:transparent;border:0;box-shadow:none;padding:0;gap:4px;border-radius:0}
.restaurant-activity .home-metric+.home-metric{border-left:1px solid #e5e7eb;padding-left:16px}
.restaurant-activity .home-metric span{font-size:12px;color:#4b5563;font-weight:400}
.restaurant-activity .home-metric strong{font-size:23px;line-height:28px;color:#1f2937;font-weight:700}
.restaurant-activity .home-metric small{font-size:11px;line-height:15px;color:#6b7280}
.restaurant-search-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.restaurant-module-search{width:384px;max-width:100%;min-height:40px;border:1px solid #d1d5db;border-radius:5px;padding:8px 16px;background:#fff;box-shadow:0 1px 2px #0000000d;font-size:14px;margin:0 0 16px}
.restaurant-module-section{padding-top:16px;margin-top:24px;border-top:1px solid #e5e7eb}
.restaurant-module-section:first-child{border-top:0;margin-top:0}
.restaurant-module-section:nth-child(odd){background:#f9fafb;border-radius:12px;padding:20px 16px 16px}
.restaurant-module-section h2{display:flex;align-items:center;gap:8px;font-size:20px;line-height:28px;font-weight:700;color:#374151;margin:0 0 12px;letter-spacing:normal}
.restaurant-module-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.restaurant-module{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;border-radius:16px;background:white;box-shadow:0 2px 6px #0000000d;min-height:96px;transition:transform .2s,box-shadow .2s;gap:4px}
.restaurant-module:hover{transform:translateY(-2px);box-shadow:0 6px 14px #0000001a}
.restaurant-module>span{font-size:32px;line-height:40px}
.restaurant-module>strong{font-size:14px;line-height:20px;font-weight:500;color:#374151}
.restaurant-footer{text-align:center;font-size:12px;color:#9ca3af;padding:32px 0 12px}
.restaurant-mobile-nav{display:none}
.restaurant-shell.restaurant-collapsed{grid-template-columns:72px minmax(0,1fr)}
.restaurant-collapsed .restaurant-nav-text{display:none}
.restaurant-collapsed .restaurant-brand{flex-direction:column}
.restaurant-collapsed .restaurant-brand img{width:34px;height:34px}
.restaurant-collapsed .restaurant-sidebar{padding:12px 6px}
.restaurant-collapsed .restaurant-sidebar nav a{justify-content:center;padding:10px 4px}
.restaurant-collapsed .restaurant-account>button{justify-content:center;padding:10px 4px}
@media(min-width:1600px) {
  .restaurant-main.dashboard-main{padding:32px 40px}
  .restaurant-module-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
  .restaurant-module-section,.restaurant-module-section:first-child,.restaurant-module-section:nth-child(odd){margin:0;padding:20px 16px;border:1px solid #e5e7eb;background:#f9fafb;border-radius:12px}
  .restaurant-module-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
  .restaurant-module{max-width:280px;padding:20px;min-height:100px}
}
@media(max-width:1100px) {
  .restaurant-shell{grid-template-columns:224px minmax(0,1fr)}
  .restaurant-main.dashboard-main{padding:20px}
  .restaurant-header.app-header{gap:16px;padding:12px 20px}
  .restaurant-welcome{padding:20px}
  .restaurant-welcome h1{font-size:24px;line-height:30px}
  .restaurant-module-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:767px) {
  .restaurant-shell,.restaurant-shell.restaurant-collapsed{display:block}
  .restaurant-sidebar.sidebar{position:fixed;top:0;bottom:calc(56px + env(safe-area-inset-bottom,0px));left:0;width:256px;height:calc(100dvh - 56px - env(safe-area-inset-bottom,0px));transform:translateX(-100%);visibility:hidden;padding:16px 12px;box-shadow:2px 0 8px #0002;z-index:50}
  .restaurant-sidebar.sidebar.is-open{transform:translateX(0);visibility:visible}
  .restaurant-collapsed .restaurant-nav-text{display:initial}
  .restaurant-collapsed .restaurant-brand{flex-direction:row}
  .restaurant-collapsed .restaurant-sidebar nav a,.restaurant-collapsed .restaurant-account>button{justify-content:flex-start;padding:9px 12px}
  .restaurant-shell #restaurant-collapse{display:none}
  .restaurant-shell .menu-toggle{display:flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:5px;border:1px solid #e5e7eb}
  .restaurant-header.app-header{padding:10px 12px;gap:8px;min-height:68px}
  .restaurant-header .context-select{max-width:none}
  .restaurant-role{display:none}
  .restaurant-main.dashboard-main{padding:16px 12px calc(80px + env(safe-area-inset-bottom,0px))}
  .restaurant-main :is(a,button,input,select,textarea){scroll-margin-block:88px}
  .restaurant-welcome{padding:16px;flex-direction:column;align-items:flex-start;gap:12px;margin-bottom:16px}
  .restaurant-welcome h1{font-size:24px;line-height:30px}
  .restaurant-activity{padding:12px;margin-bottom:20px}
  .restaurant-activity .home-activity-grid{grid-template-columns:1fr;gap:10px}
  .restaurant-activity .home-metric{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:center}
  .restaurant-activity .home-metric+.home-metric{border-left:0;border-top:1px solid #e5e7eb;padding:10px 0 0}
  .restaurant-activity .home-metric small{grid-column:1/-1}
  .restaurant-activity .home-metric strong{font-size:20px;line-height:24px}
  .restaurant-module-section{margin-top:20px}
  .restaurant-module-section h2{font-size:18px;line-height:24px}
  .restaurant-module-section:nth-child(odd){padding:16px 12px}
  .restaurant-module-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .restaurant-module{padding:16px;border-radius:12px;min-height:96px}
  .restaurant-module>span{font-size:24px;line-height:32px}
  .restaurant-module>strong{font-size:12px;line-height:16px}
  .restaurant-module-search{width:100%}
  .restaurant-mobile-nav{display:flex;position:fixed;inset:auto 0 0;height:calc(56px + env(safe-area-inset-bottom,0px));background:white;border-top:1px solid #e5e7eb;z-index:60;justify-content:space-around;padding-bottom:env(safe-area-inset-bottom,0px)}
  .restaurant-mobile-nav a,.restaurant-mobile-nav button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;flex:1;font-size:11px;border:0;background:transparent;padding:4px;color:#4b5563;line-height:14px}
  .restaurant-mobile-nav .restaurant-nav-text{display:block}
  .restaurant-mobile-nav a[aria-current=page]{color:#2563eb;background:#eff6ff}
  .restaurant-shell .menu-backdrop{position:fixed;inset:0 0 calc(56px + env(safe-area-inset-bottom,0px));background:#0006;z-index:40}
}
@media(prefers-reduced-motion:reduce){.restaurant-module{transition:none}.restaurant-module:hover{transform:none}}
