/* 결차트: 화면 틀 (왼쪽 메뉴, 위쪽 띠, 삼선 메뉴, 휴대폰 아래 메뉴, 대시보드) */
.ic { width: 20px; height: 20px; flex: none; }
html.noscroll { overflow: hidden; }

/* 위쪽 띠 오른쪽 */
.topact { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topact .me { font-size: 13px; color: var(--sub); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; transition: background .15s, border-color .15s, transform .15s; white-space: nowrap; }
.pill.ghost { color: #111; border: 1px solid transparent; }
.pill.ghost:hover { background: #f1f1ef; }
.pill.solid { background: #111; color: #fff; padding-right: 14px; box-shadow: 0 6px 16px -8px rgba(0,0,0,.5); }
.pill.solid:hover { transform: translateY(-1px); }
.pill .arr { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.16); position: relative; }
.pill .arr::after { content: ""; position: absolute; left: 6px; top: 6.500px; width: 6px; height: 6px; border-top: 1.6px solid #fff; border-right: 1.6px solid #fff; transform: rotate(45deg); }
.burger { width: 42px; height: 42px; border-radius: 12px; border: 1px solid #dededb; background: #fff; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4.500px; cursor: pointer; transition: border-color .15s; }
.burger:hover { border-color: #111; }
.burger i { width: 17px; height: 1.800px; background: #111; border-radius: 2px; display: block; }
.sitetop .wrap { height: 68px; }
.sitetop .sitenav { margin-left: 8px; }

/* 옆에서 나오는 메뉴 */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawerback { position: absolute; inset: 0; background: rgba(17,17,17,.38); opacity: 0; transition: opacity .24s; }
.drawerpanel { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .24s ease; box-shadow: -30px 0 60px -30px rgba(0,0,0,.35); }
.drawer.on .drawerback { opacity: 1; }
.drawer.on .drawerpanel { transform: none; }
.drawerhead { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.xbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #dededb; background: #fff; position: relative; cursor: pointer; }
.xbtn::before, .xbtn::after { content: ""; position: absolute; left: 11px; right: 11px; top: 19px; height: 1.800px; background: #111; border-radius: 2px; }
.xbtn::before { transform: rotate(45deg); }
.xbtn::after { transform: rotate(-45deg); }
.drawerwho { display: flex; gap: 12px; align-items: center; padding: 18px 20px 6px; }
.drawerwho b { display: block; }
.drawernav { padding: 10px 12px; flex: 1; overflow-y: auto; }
.drawernav a { display: flex; align-items: center; gap: 14px; padding: 15px 12px; border-radius: 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.drawernav a:hover, .drawernav a.on { background: #f4f4f2; }
.drawernav .ic { color: #555; }
.drawerfoot { padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 8px; }
.drawerfoot p { text-align: center; margin-top: 6px; }

/* 휴대폰: 소개 페이지 아래에 붙는 단추 */
.appbar { display: none; }

/* PC 왼쪽 메뉴 */
.sidebar { display: none; }
@media (min-width: 1024px) {
  body.hasside { padding-left: 244px; background: #fafaf9; }
  body.hasside .top { display: none; }
  body.hasside .sidebar { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: 244px; background: #fff; border-right: 1px solid var(--line); padding: 22px 14px 16px; z-index: 30; }
  body.hasside main.page { padding-top: 36px; }
  body.hasside .wrap { max-width: 1180px; padding: 0 36px; }
  body.hasside .card, body.hasside .stat, body.hasside .fc { background: #fff; }
}
.sidebar .brand { margin: 2px 8px 22px; }
.sidetag { font-size: 12px; font-weight: 600; color: var(--sub); margin: -14px 10px 16px; }
.sidecta { height: 44px; margin-bottom: 16px; }
.sidecta .ic { width: 18px; height: 18px; }
.sidenav { display: grid; gap: 2px; flex: 1; align-content: start; }
.sidenav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #555; font-weight: 500; font-size: 15px; transition: background .12s, color .12s; }
.sidenav a:hover { background: #f6f6f4; color: #111; }
.sidenav a.on { background: #111; color: #fff; font-weight: 600; }
.sidefoot { border-top: 1px solid var(--line); padding-top: 14px; }
.sidewho { display: flex; align-items: center; gap: 10px; padding: 0 6px 10px; min-width: 0; }
.sidewho b { display: block; font-size: 14px; }
.sidewho span { display: block; font-size: 12.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.sidewho .av { color: #333; font-size: 15px; max-width: none; }
.sideout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 10px; color: var(--sub); font-size: 14px; cursor: pointer; }
.sideout:hover { background: #f6f6f4; color: #111; }
.sideout .ic { width: 17px; height: 17px; }

/* 대시보드 */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid #e9e9e6; border-radius: 14px; padding: 18px 20px; display: grid; gap: 2px; position: relative; box-shadow: 0 1px 2px rgba(17,17,17,.03); }
.kpi .ic { position: absolute; right: 18px; top: 18px; color: #9b9b9b; }
.kpi span { font-size: 13px; color: var(--sub); }
.kpi b { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; }
.kpi b small { font-size: 15px; font-weight: 600; margin-left: 2px; }
.kpi em { font-style: normal; font-size: 12.5px; color: var(--sub); }
.chart { width: 100%; height: auto; display: block; }
.chart .cv { font-size: 11px; font-weight: 600; fill: #555; font-variant-numeric: tabular-nums; }
.chart .cl { font-size: 11px; fill: #9b9b9b; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.meter:first-of-type { border-top: 0; }
.meter span { font-weight: 600; }
.meter span em { font-style: normal; font-weight: 400; font-size: 13px; color: var(--sub); margin-left: 6px; }
.meter b { font-size: 17px; }
.meter i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #efefec; display: block; overflow: hidden; }
.meter u { display: block; height: 100%; background: #111; border-radius: 3px; text-decoration: none; }
.minibars { display: flex; align-items: flex-end; gap: 6px; height: 74px; margin-top: 6px; }
.minibars span { flex: 1; background: #d9d9d5; border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.minibars span.now { background: #111; }
.minilabels { display: flex; gap: 6px; margin-top: 6px; }
.minilabels span { flex: 1; text-align: center; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }

@media (max-width: 1023px) {
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .sitetop .wrap { height: 56px; }
  .sitetop .pill { display: none; }
  .burger { width: 40px; height: 40px; border: 0; background: #f4f4f2; }
  .top .who, .topact .me { display: none; }
  .kpi b { font-size: 24px; }
  .kpi { padding: 14px 16px; }
  /* 앱처럼: 아래 메뉴에 아이콘 */
  .tabbar { box-shadow: 0 -8px 24px -18px rgba(0,0,0,.3); border-top: 0; padding-top: 4px; }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 8px 0 9px; font-size: 11px; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a.on { box-shadow: none; }
  .tabbar a.on .ic { stroke-width: 2.3; }
  body:has(.appbar) { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .appbar { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -18px rgba(0,0,0,.35); }
  .appbar .btn { height: 48px; border-radius: 14px; }
  .appbar .btn.block { grid-column: 1 / -1; }
  .savebar { bottom: 58px; }
}
@media print { .sidebar, .drawer, .appbar { display: none !important; } body.hasside { padding-left: 0; background: #fff; } }
.sidewho .av { display: inline-grid; overflow: visible; white-space: normal; max-width: none; font-size: 15px; color: #333; }

/* PC 오른쪽 위: 내 메뉴 (설정, 로그아웃) */
.deskbar { display: none; }
@media (min-width: 1024px) {
  body.hasside .deskbar { display: flex; align-items: center; justify-content: flex-end; gap: 14px; height: 60px; padding: 0 36px; position: sticky; top: 0; z-index: 20; background: rgba(250,250,249,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  body.hasside main.page { padding-top: 28px; }
}
.deskwhere { font-size: 13.5px; color: var(--sub); }
.usermenu { position: relative; }
.usermenu summary { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 4px; border: 1px solid #dededb; border-radius: 999px; background: #fff; cursor: pointer; list-style: none; font-size: 14px; transition: border-color .12s; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover, .usermenu[open] summary { border-color: #111; }
.usermenu summary .av { width: 32px; height: 32px; }
.usermenu summary > .ic { width: 16px; height: 16px; color: #777; }
.usermenu-pop { position: absolute; right: 0; top: 50px; width: 220px; background: #fff; border: 1px solid #e3e3e0; border-radius: 14px; padding: 8px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.35); }
.usermenu-pop p { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usermenu-pop p b { display: block; font-size: 14.5px; }
.usermenu-pop p span { font-size: 12.5px; color: var(--sub); }
.usermenu-pop a, .usermenu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; background: none; border-radius: 9px; font-size: 14.5px; color: #222; cursor: pointer; text-align: left; }
.usermenu-pop a:hover, .usermenu-pop button:hover { background: #f4f4f2; }
.usermenu-pop .ic { width: 18px; height: 18px; color: #666; }
@media print { .deskbar { display: none !important; } }
