/* ============================================================
   05. Mobile — OPS 모바일 패턴을 VOC 토큰으로 적용
   카드형 목록 · 상세 KV 카드 · 통일된 Pretendard 스케일
   max-width:768px
   ============================================================ */

.hamburger{
  display:none;width:40px;height:40px;margin:0 4px 0 6px;padding:0;border:0;background:none;
  flex-direction:column;align-items:center;justify-content:center;gap:5px;flex:none;border-radius:var(--r-sm);
}
.hamburger span{width:18px;height:2px;background:var(--ink-700);border-radius:1px;display:block}
.hamburger:hover{background:var(--bg-head)}
.mob-overlay{display:none;position:fixed;top:var(--hd-h);left:0;right:0;bottom:0;background:rgba(15,20,40,.45);z-index:98}
.mob-overlay.open{display:block}
.m-list{display:none}
.hdr-logo{cursor:pointer}
body.mob-nav-open{overflow:hidden}

@media(max-width:768px){
  :root{--hd-h:52px;--r-lg:12px}
  html,body{overflow-x:hidden}
  body{font-size:14px;line-height:1.5}
  button,input,select,textarea,.btn,.inp,.f-sel,.f-date,.f-search input{
    font-family:inherit;
  }
  input,select,textarea,.inp,.f-sel,.f-date,.f-search input{font-size:16px}

  /* --- 로그인 --- */
  #loginScreen{padding:16px;align-items:flex-start;padding-top:max(24px, env(safe-area-inset-top))}
  .login-wrap{width:100%;max-width:400px;padding:28px 20px 24px;margin:0;border-radius:16px}
  .login-brand .mark{font-size:20px}
  .login-brand .sub{font-size:13px}
  .fld label{font-size:13px}
  .fld input,.btn-login{height:48px;font-size:16px}
  .login-hint{font-size:13px}

  /* --- 헤더 --- */
  .hamburger{display:flex}
  .mob-overlay{top:calc(var(--hd-h) + env(safe-area-inset-top))}
  .hdr{padding:0 10px 0 2px;padding-top:env(safe-area-inset-top);height:calc(var(--hd-h) + env(safe-area-inset-top))}
  .hdr-logo{width:auto;padding:0 8px 0 0;gap:6px;background:transparent;color:var(--nav-800)}
  .hdr-logo .nm,.hdr-logo .vc{display:none}
  .hdr-home{display:none}
  .hdr-path{display:none}
  .hdr-user .tx{display:none}
  .hdr-user{padding-left:6px;margin-left:2px}
  .btn-out{padding:0 10px;height:32px;font-size:13px}

  /* --- 사이드바: 오프캔버스 --- */
  .sb{
    top:calc(var(--hd-h) + env(safe-area-inset-top));
    transform:translateX(-100%);
    box-shadow:8px 0 24px rgba(16,24,40,.22);
    transition:transform .22s ease;
    z-index:99;
    padding-bottom:env(safe-area-inset-bottom);
  }
  .sb.mobile-open{transform:translateX(0)}
  .sb a.itm,.sb-sec>.hd{min-height:44px;padding-top:12px;padding-bottom:12px;font-size:14px}
  .main{margin-left:0;padding-top:calc(var(--hd-h) + env(safe-area-inset-top))}
  .page{padding:12px 12px 28px}
  .ftr{padding:10px 12px max(12px, env(safe-area-inset-bottom));flex-wrap:wrap;font-size:12px}
  .ftr .rg{margin-left:0}

  /* --- 페이지 헤더 --- */
  .pg-hd{flex-direction:column;gap:10px;align-items:stretch;margin-bottom:12px}
  .pg-hd .acts{margin-left:0;justify-content:flex-start}
  .pg-hd h2{font-size:18px;letter-spacing:-.3px}
  .pg-hd .sub{font-size:13px;line-height:1.55}
  .pg-hd .acts .btn{height:40px;font-size:13.5px;padding:0 14px}

  /* --- 타이포 스케일 통일 --- */
  .sm,.hint,.f-sum,.card-hd .sub,.mut{font-size:13px}
  .card-hd h3{font-size:15px}
  .note{font-size:13px;line-height:1.6}
  .note b{font-size:13.5px}
  .empty{font-size:13.5px;padding:36px 12px}
  .tagx{
    height:auto;line-height:1.3;padding:3px 8px;border-radius:6px;font-size:11.5px;
  }
  .bdg2{height:24px;padding:0 8px;border-radius:6px;font-size:11.5px}
  .code,.tbl .code{font-size:13px}

  /* --- 그리드 · KPI --- */
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px;margin-bottom:12px}
  .kpi{padding:14px;border-radius:14px}
  .kpi .lb{font-size:12.5px}
  .kpi .vl{font-size:24px;letter-spacing:-.5px}
  .kpi .df{font-size:12px}
  .grid2,.grid3,.grid-2-1,.f2,.f3,.set-wrap,.org-layout,.d-grid,.d-photos{grid-template-columns:1fr}
  .set-nav{display:flex;overflow-x:auto;gap:6px;padding:8px;-webkit-overflow-scrolling:touch}
  .set-nav button{flex:none;white-space:nowrap;min-height:40px;font-size:13.5px;padding:8px 12px}
  .card-bd[style*="display:grid"]{grid-template-columns:1fr!important}

  /* --- 필터 (OPS 세로 스택 · 2열) --- */
  .filter{padding:12px;border-radius:12px;margin-bottom:10px}
  .f-row{align-items:stretch}
  .f-search{min-width:0;width:100%;flex:1 1 100%}
  .f-search input,.f-sel,.f-date{height:44px;font-size:16px;border-radius:8px}
  .f-period{display:flex;align-items:stretch;gap:6px;width:100%;min-width:0}
  .f-period .f-sel{
    flex:0 1 7.6em;min-width:0;width:auto;max-width:42%;padding-left:8px;padding-right:22px;
  }
  .f-chips{flex:1 1 auto;width:auto;min-width:0;display:flex;border-radius:8px}
  .f-chips button{
    flex:1 1 0;min-width:0;height:44px;padding:0 4px;font-size:12.5px;
    display:flex;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;
  }
  .f-dates{display:flex;align-items:center;gap:6px;width:100%;min-width:0}
  .f-dates .f-date{flex:1 1 0;min-width:0;width:auto}
  .f-dates .f-tilde{flex:none}
  .f-go{margin-left:0;width:100%}
  .f-go .btn{flex:1;height:44px;justify-content:center;font-size:14px}
  .f-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    width:100%;
  }
  .f-grid .f-sel{
    min-width:0;width:100%;padding-left:8px;padding-right:22px;
    overflow:hidden;text-overflow:ellipsis;
  }
  .f-sum{font-size:13px}

  /* --- 민원현황 모바일 (시안 카드형) --- */
  .m-list-page{padding-bottom:72px}
  .m-list-hd{margin-bottom:14px}
  .m-list-hd h2{font-size:22px;font-weight:800;letter-spacing:-.4px;margin:0}
  .m-list-hd .sub{margin-top:4px;font-size:13px;color:var(--ink-500)}
  .m-list-add{
    width:100%;height:48px;border-radius:12px;justify-content:center;
    font-size:15px;font-weight:700;margin-bottom:12px
  }
  .m-dash-page .m-list-add{font-weight:600}
  .m-progress-card{
    background:#fff;border:1px solid #dfe5ee;border-radius:14px;
    padding:14px 14px 12px;margin-bottom:4px;
    box-shadow:0 1px 4px rgba(15,23,42,.06);
  }
  .m-progress-hd{
    display:flex;align-items:baseline;justify-content:space-between;gap:8px;
    margin-bottom:12px;
  }
  .m-progress-hd h3{margin:0;font-size:15px;font-weight:800;color:var(--ink-900)}
  .m-progress-hd span{font-size:12.5px;color:var(--ink-400);font-weight:600}
  .m-progress-cols{display:flex;gap:4px}
  .m-progress-col{
    flex:1;min-width:0;padding:0;border:0;background:none;
    display:flex;flex-direction:column;align-items:center;gap:6px;
    font-family:inherit;color:inherit;
  }
  .m-progress-bar{display:block;width:100%;height:4px;border-radius:99px}
  .m-progress-lb{font-size:12px;font-weight:600;color:#8b93a0;line-height:1}
  .m-progress-vl{
    font-size:20px;font-weight:800;letter-spacing:-.4px;color:var(--ink-900);
    line-height:1.1;font-variant-numeric:tabular-nums;
  }
  .m-progress-col.is-zero .m-progress-vl{color:#c5cad3;font-weight:700}
  .m-progress-ft{
    display:flex;align-items:center;justify-content:space-between;gap:8px;
    margin-top:12px;padding-top:10px;border-top:1px solid #eef1f5;
    font-size:12.5px;color:var(--ink-400);font-weight:600;
  }
  .m-progress-ft b{font-weight:800}
  .m-progress-ft b.is-ok{color:#15803D}
  .m-progress-ft b.is-low{color:#DC2626}
  .m-progress-ft b.is-empty{color:var(--ink-400);font-weight:700}
  .m-sec{margin-top:20px}
  .m-sec-hd{
    display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
    margin-bottom:10px;
  }
  .m-sec-hd h3{
    margin:0;font-size:16px;font-weight:800;letter-spacing:-.2px;color:var(--ink-900);
    line-height:1.3;
  }
  .m-sec-hd .sub{margin-top:3px;font-size:12.5px;color:var(--ink-500);line-height:1.4}
  .m-sec-hd .btn{flex:none;margin-top:1px;height:32px;min-height:32px;padding:0 10px}
  .m-urgent-list .m-item{border-color:#f0c4cc}
  .m-urgent-list .m-item-sub b{font-weight:800}
  .m-filter{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
  .m-search{position:relative}
  .m-search .mg{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--ink-400);font-size:13px}
  .m-search input{
    width:100%;height:44px;padding:0 12px 0 36px;border:1px solid var(--ink-300);
    border-radius:10px;background:#fff;outline:none;font-size:15px
  }
  .m-filter-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .m-filter-row .f-sel{width:100%;min-width:0;height:44px;border-radius:10px}
  .m-list-page .qtabs-chip{gap:8px;margin-bottom:14px}
  .m-list-page .qtab{
    height:34px;padding:0 14px;border-radius:999px;border:1px solid #c5d4ef;
    background:#fff;color:var(--pri-700);font-size:13px
  }
  .m-list-page .qtab .n{color:inherit}
  .m-list-page .qtab.on{background:var(--pri-700);border-color:var(--pri-700);color:#fff}
  .m-item-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
  .m-item-ft{border-top:1px dashed #dfe5ee}
  .m-fab{
    position:fixed;right:16px;bottom:calc(18px + env(safe-area-inset-bottom));
    z-index:40;width:54px;height:54px;border-radius:50%;
    background:var(--pri-700);color:#fff;font-size:26px;font-weight:600;line-height:1;
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 8px 20px rgba(30,58,138,.35)
  }
  .m-fab:active{background:var(--nav-700)}

  /* --- 상태 탭: 가로 스크롤 --- */
  .qtabs{
    display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;margin-bottom:10px;
    -webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px;
  }
  .qtabs::-webkit-scrollbar{display:none}
  .qtab{
    flex:0 0 auto;height:36px;padding:0 12px;font-size:13px;
    justify-content:center;white-space:nowrap;border-radius:8px;
  }
  .qt-right{flex:0 0 auto;margin-left:auto;padding-left:6px}
  .chk{font-size:13px}

  /* --- 목록 카드: OPS order-list-card --- */
  .card--list{
    background:transparent;border:none;box-shadow:none;margin-bottom:12px;
  }
  .card--list .card-hd{
    background:#fff;border:1px solid #dfe5ee;border-radius:10px;
    margin-bottom:10px;padding:10px 14px;
  }
  .card--list .card-bd.p0{padding:0;background:transparent}
  .card-hd{flex-wrap:wrap;gap:6px}
  .card-hd .r{margin-left:0;width:100%;justify-content:flex-start}
  .tbl-wrap{margin:0;-webkit-overflow-scrolling:touch}
  .desk-tbl{display:none}
  .m-list{
    display:flex;flex-direction:column;gap:12px;padding:0;
  }
  .m-list .empty{
    background:#fff;border:1px solid #dfe5ee;border-radius:12px;
  }
  .m-item{
    display:block;width:100%;text-align:left;background:#fff;
    border:1px solid #dfe5ee;border-radius:12px;padding:14px;
    box-shadow:0 1px 4px rgba(15,23,42,.07);color:inherit;
    font-family:inherit;
  }
  .m-item:active{background:#f9fbff;box-shadow:0 2px 8px rgba(15,23,42,.1)}
  .m-item-hd{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:6px}
  .m-item-hd > div{flex:1;min-width:0}
  .m-item-tt{font-size:15px;font-weight:600;line-height:1.35;color:var(--ink-900);flex:1;min-width:0;word-break:break-word}
  .m-item-no{font-family:inherit;font-size:12px;font-weight:700;color:var(--pri-700);word-break:break-all}
  .m-item-total{font-size:18px;font-weight:800;letter-spacing:-.4px;color:var(--ink-900);line-height:1.1;flex:none}
  .m-item-total em{font-size:12px;font-style:normal;font-weight:600;color:var(--ink-400);margin-left:2px}
  .m-item-mt{font-size:13px;color:#3a4150;line-height:1.45;margin-top:2px}
  .m-item-sub{margin-top:4px;font-size:13px;color:#6b7482;line-height:1.4}
  .m-item-ft{
    display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;
    margin-top:10px;padding-top:10px;border-top:1px solid #edf1f6;
    font-size:13px;color:#596579;
  }
  .m-stat-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
  .m-pill{
    display:inline-flex;align-items:center;gap:4px;height:26px;padding:0 10px;
    border-radius:8px;font-size:12px;font-weight:700;border:1px solid transparent;
  }
  .m-pill b{font-variant-numeric:tabular-nums}
  .m-pill-new{background:var(--st-new-bg);color:var(--st-new);border-color:#bfd2fb}
  .m-pill-conf{background:var(--st-wait-bg);color:var(--st-wait);border-color:#b7e0ea}
  .m-pill-run{background:var(--st-run-bg);color:var(--st-run);border-color:#f7dca9}
  .m-pill-late{background:var(--st-late-bg);color:var(--st-late);border-color:#efb0c0}
  .m-pill-fin{background:var(--st-done-bg);color:var(--st-done);border-color:#c1e6d0}
  .m-pill.is-zero{opacity:.72}

  /* --- 상세 카드 --- */
  .d-page{gap:12px}
  .d-hero{padding:14px;border-radius:12px}
  .d-hero-tt{font-size:18px}
  .d-hero-meta{font-size:13px}
  .d-hero-acts{
    display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px
  }
  .d-hero-acts .btn{
    width:100%;min-width:0;height:42px;justify-content:center;font-size:14px;flex:none
  }
  .d-hero-acts .btn:only-child{grid-column:1 / -1}
  .d-card{border-radius:12px;border-color:#dfe5ee;box-shadow:0 1px 4px rgba(15,23,42,.07)}
  .d-card-hd{font-size:15px;padding:14px 14px 10px;flex-wrap:wrap}
  .d-card-bd{padding:4px 14px 14px}
  .d-kv-row{gap:12px;padding:11px 0;font-size:14px;align-items:flex-start}
  .d-kv-row dt{width:88px;font-size:13px}
  .d-kv-row dd{font-size:14px}
  .d-prose{font-size:14px}
  .d-hint{font-size:13px}
  .d-tabwrap .tabs{
    position:sticky;top:calc(var(--hd-h) + env(safe-area-inset-top));
    z-index:6;border:1px solid #dfe5ee;border-radius:10px;padding:0 4px;
    box-shadow:0 1px 4px rgba(15,23,42,.06);
    overflow:hidden;
  }
  .d-tab-body{padding:12px 0 0}
  .tabs{
    padding:0 8px;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;
    -webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none;
  }
  .tabs::-webkit-scrollbar{display:none;width:0;height:0}
  .tabs button{flex:1 1 0;min-width:0;height:44px;padding:0 10px;font-size:14px}
  .tabs .r{display:none}
  .steps{gap:4px}
  .steps.d-steps{
    flex-wrap:nowrap;overflow:hidden;width:100%;gap:0
  }
  .steps.d-steps .st{
    flex:1 1 0;min-width:0;height:28px;padding:0 4px;font-size:11px;
    justify-content:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:14px
  }
  .steps.d-steps .ln{width:6px;min-width:6px;flex:none;margin:0 2px}
  .dl .row{font-size:14px}
  .dl .row>dt{font-size:13px}

  /* --- 폼 · 버튼 --- */
  .form-stack{max-width:none;gap:12px}
  .form-col{padding:16px;border-radius:12px}
  .form-col>h4{font-size:15px}
  .fg>label{font-size:13px}
  .inp,select.inp{height:44px}
  textarea.inp{min-height:110px;font-size:16px}
  .seg button{height:44px;font-size:14px}
  .btn{min-height:40px;font-size:13.5px}
  .form-actions{
    position:sticky;bottom:0;z-index:5;background:var(--bg);
    padding:10px 0 max(10px, env(safe-area-inset-bottom));margin:0 -12px;padding-left:12px;padding-right:12px;
    border-top:1px solid var(--line-soft);
  }
  .form-actions .btn{flex:1;justify-content:center;height:48px;font-size:15px}

  /* --- 설정 --- */
  .tree{font-size:14px}
  .tree .nd{min-height:44px;flex-wrap:wrap;padding:10px 8px}
  .tree .nd .r{width:100%;justify-content:flex-end;margin-top:6px}
  .set-wrap .card-bd[style*="display:grid"] .tree{border-right:0!important;padding-right:0!important;max-height:none!important}
  .org-layout{grid-template-columns:1fr}
  .org-tree{max-height:none}
  .org-tree-row{height:44px}
  .org-kv{grid-template-columns:1fr}

  /* --- 차트 · 타임라인 --- */
  .bar-row{font-size:13px}
  .chart,.card-bd svg{max-width:100%;height:auto}
  .tl .it .tm{font-size:12.5px}
  .tl .it .hd{font-size:14px}
  .tl .it .bd{font-size:13px}

  /* --- 모달: 풀스크린 --- */
  .mask{padding:0;align-items:stretch}
  .modal,.modal.wide{
    width:100%;max-width:100%;max-height:100dvh;height:100dvh;border-radius:0;
  }
  .modal-hd{padding:14px 16px;padding-top:max(14px, env(safe-area-inset-top))}
  .modal-hd h3{font-size:17px}
  .modal-bd{padding:16px;font-size:14px}
  .modal-desc{font-size:13px}
  .modal-ft{
    padding:12px 16px max(12px, env(safe-area-inset-bottom));
    border-radius:0;gap:8px;
  }
  .modal-ft .btn{flex:1;height:48px;justify-content:center;font-size:15px}

  .toast{bottom:max(20px, env(safe-area-inset-bottom));max-width:calc(100vw - 24px);font-size:14px}
}

@media(max-width:480px){
  .kpi .vl{font-size:22px}
}
