/* Runtime-only app layer; existing employee/company permissions and design stay. */
:root{--erp-app-navy:#102a56;--erp-app-blue:#1747d1;--erp-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
html.erp-pwa{scroll-padding-top:calc(88px + env(safe-area-inset-top,0px))}
.erp-pwa body{padding-top:env(safe-area-inset-top,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
.erp-pwa .topbar{top:env(safe-area-inset-top,0px)}
.erp-pwa [hidden]{display:none!important}
.erp-session-check body{visibility:hidden!important}
.erp-app-toolbar{max-width:100%;display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap;padding:10px clamp(16px,3vw,48px);font-size:13px;background:#eef3fc;border-bottom:1px solid #dbe4f3;color:#354f75}
.erp-app-toolbar>span:first-child{margin-right:auto;font-weight:800;letter-spacing:.04em}.erp-app-toolbar small{font-weight:500;margin-left:8px;letter-spacing:0}
.erp-app-toolbar a{display:inline-flex;align-items:center;min-height:36px;color:#1747d1;text-decoration:none;font-weight:700}
.erp-app-notice{position:fixed;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));z-index:1200;border:1px solid #dcab55;box-shadow:0 4px 24px #142a4830;border-radius:14px;padding:16px 20px;color:#743b00;background:#fff4df;font:600 15px/1.6 system-ui,sans-serif;max-width:900px;margin:auto}
.erp-network-notice{top:calc(12px + env(safe-area-inset-top))}.erp-update-notice{bottom:calc(16px + env(safe-area-inset-bottom));background:#102a56;color:white;border-color:#254a86;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.erp-app-notice button{font:700 14px system-ui,sans-serif;min-height:44px;padding:10px 16px;border-radius:9px;border:1px solid #9aadca;background:white;color:#102a56;cursor:pointer}
.erp-install-dialog{width:min(820px,calc(100% - 24px));max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px);padding:28px;border:1px solid #dbe4f0;border-radius:22px;color:#18212f;overscroll-behavior:contain;overflow:auto}
.erp-install-dialog::backdrop{background:#08172da8}.erp-dialog-title{display:flex;gap:12px;align-items:center;justify-content:space-between}.erp-dialog-title h2{margin:0;font-size:25px}.erp-dialog-title button{min-width:44px;min-height:44px;border:1px solid #dbe4f0;border-radius:50%;background:#fff;cursor:pointer}
.erp-install-page{max-width:1000px!important;margin:auto;background:white;padding:clamp(20px,4vw,48px);border:1px solid #dce4f0;border-radius:24px}
.erp-install-heading{display:flex;align-items:center;gap:24px}.erp-install-heading img{border-radius:20px;flex-shrink:0}.erp-install-heading span{font-size:13px;font-weight:800;color:#1747d1;letter-spacing:.12em}.erp-install-heading h1{font-size:clamp(28px,3.8vw,43px);line-height:1.3}
.erp-install-guide section,.erp-install-page>section{margin-top:28px;padding-top:20px;border-top:1px solid #e0e6ef}.erp-install-guide h3{font-size:21px;margin:6px 0 16px}.erp-install-guide p,.erp-install-page p,.erp-install-page li{color:#43506a;line-height:1.8}
.erp-install-steps{list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.erp-install-steps li{background:#f2f6fc;border:1px solid #dce6f6;border-radius:14px;padding:18px}.erp-install-steps b{color:#143f80;display:flex;gap:8px;align-items:center}.erp-install-steps svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}.erp-install-steps p{font-size:15px;margin:10px 0 0}
.erp-install-tip{background:#f0f8f4;border-left:3px solid #178354;padding:14px;border-radius:8px;font-size:14px}.erp-nojs{padding:16px;background:#fff4df;color:#743b00}
.erp-table-scroll{width:100%;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.erp-table-scroll:focus-visible{outline:3px solid #3b74ed;outline-offset:2px}.erp-table-scroll table{max-width:none!important;min-width:100%;width:max-content;table-layout:auto!important}
.erp-table-scroll th,.erp-table-scroll td{word-break:keep-all!important;overflow-wrap:normal!important;white-space:nowrap;min-width:5.5rem}
.erp-camera-button{display:inline-flex;align-items:center;min-height:44px;margin:8px 8px 8px 0;padding:10px 15px;border:1px solid #bacceb;border-radius:10px;background:#eef4ff;color:#143f80;font:700 15px system-ui,sans-serif;cursor:pointer}
@media(max-width:1024px){
 .erp-pwa .shell,.erp-pwa .isolate-shell,.erp-pwa .reference-v3-main,.erp-pwa main{min-width:0;max-width:100%}
 .erp-pwa .shell{width:calc(100% - 28px)!important;margin:20px auto 40px}
 .erp-pwa .topbar{height:auto!important;min-height:62px;flex-wrap:wrap;padding:12px 16px!important;gap:12px}
 .erp-pwa .global-nav{overflow-x:auto;flex-wrap:nowrap;max-width:100%;width:100%;min-width:0}.erp-pwa .global-nav>*{flex-shrink:0;white-space:nowrap}
 .erp-pwa .top-company-switch{max-width:100%;overflow-x:auto}.erp-pwa .top-company-switch>*{flex-shrink:0}
 .erp-pwa .workspace-tabs{overflow:hidden}.erp-pwa .workspace-tab-list{min-width:0;overflow-x:auto}
 .erp-pwa .shell input:not([type=checkbox]):not([type=radio]),.erp-pwa .shell select,.erp-pwa .shell textarea{font-size:16px;max-width:100%}
 .erp-pwa button,.erp-pwa summary,.erp-pwa .primary{touch-action:manipulation;min-height:44px}
 .erp-pwa .shell .hero,.erp-pwa .shell .page-head,.erp-pwa .shell .heading{flex-wrap:wrap;gap:16px}
 .erp-pwa .shell .actions{flex-wrap:wrap}.erp-pwa .shell .actions>*{flex-shrink:0}
 .erp-pwa .mobile-nav{display:flex!important;position:fixed;bottom:0;left:0;right:0;z-index:1000;height:var(--erp-bottom)!important;padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));overflow-x:auto;overflow-y:hidden;justify-content:flex-start!important;gap:6px;align-items:center;background:#fff;border-top:1px solid #dce4ef;box-shadow:0 -4px 20px #102a5610}
 .erp-pwa .mobile-nav>a,.erp-pwa .mobile-nav>button{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;flex:1 0 68px;min-width:68px;max-width:110px;min-height:54px;margin:0!important;padding:4px!important;border:0;background:transparent;color:#244265;text-decoration:none;white-space:nowrap;font-size:20px}
 .erp-pwa .mobile-nav span{font-size:11px;white-space:nowrap;line-height:1.3}.erp-pwa .mobile-nav .pictogram{height:22px;width:22px;flex-shrink:0}
 .erp-pwa .erp-has-mobile-nav{padding-bottom:calc(var(--erp-bottom) + 24px)}.erp-has-mobile-nav .erp-update-notice{bottom:calc(var(--erp-bottom) + 12px)}
 .erp-pwa .build-tag{position:static;margin-bottom:16px}.erp-keyboard-open .mobile-nav{visibility:hidden}
 .erp-table-scroll::before{content:'↔ 표는 좌우로 이동해서 확인하세요';display:block;position:sticky;left:0;width:fit-content;font-size:12px;line-height:1.5;color:#5a6d88;padding:8px 2px}
}
@media(max-width:600px){
 .erp-pwa .shell .two,.erp-pwa .shell .kpis,.erp-pwa .shell .menu-grid,.erp-pwa .shell [class$='-grid']:not(.entry-grid):not(.calendar-grid),.erp-pwa .shell [style*='grid-template-columns']{grid-template-columns:minmax(0,1fr)!important}
 .erp-pwa .shell [class$='-grid']>*,.erp-pwa .shell .two>*{min-width:0;max-width:100%}
 .erp-pwa .shell form,.erp-pwa .shell fieldset{min-width:0;max-width:100%}.erp-pwa .shell fieldset{margin-left:0;margin-right:0}
 .erp-pwa .shell .paper,.erp-pwa .shell .card{padding:18px}
 .erp-pwa .brand{font-size:18px!important}.erp-pwa .brand small{font-size:11px!important}.erp-pwa .user{flex-wrap:wrap;max-width:100%}
 .erp-app-toolbar{gap:8px;padding:8px 14px}.erp-app-toolbar>span:first-child{font-size:11px}.erp-app-toolbar small{display:none}.erp-app-toolbar a{font-size:12px}
 .erp-install-heading{gap:16px;align-items:flex-start}.erp-install-heading img{width:58px;height:58px;border-radius:15px}.erp-install-heading h1{font-size:27px}
 .erp-install-steps{grid-template-columns:minmax(0,1fr)}.erp-install-dialog{padding:20px}.erp-dialog-title h2{font-size:22px}
 .erp-app-notice{padding:12px 14px;font-size:14px}.erp-update-notice button{flex:1}
}
@media(prefers-reduced-motion:reduce){.erp-pwa *{scroll-behavior:auto!important}}
@media print{
 .erp-app-toolbar,.erp-app-notice,.erp-install-dialog,.erp-nojs,.erp-camera-button,.mobile-nav{display:none!important}
 .erp-pwa body{padding:0!important}.erp-table-scroll{overflow:visible!important;max-width:none}.erp-table-scroll::before{display:none}
 .erp-table-scroll table{width:100%!important;min-width:0!important;table-layout:auto!important}.erp-table-scroll th,.erp-table-scroll td{white-space:normal;min-width:0!important}
}
