/* store-theme.css — 스토어형 디자인 (2026-12)
   · 매장 앱 느낌: 흰 바탕 · 검정 굵은 글씨 · 파랑(#0058a3) + 노랑(#ffdb00) 포인트 · 각진 카드 · 알약 모양 버튼
   · 가장 마지막에 로드 (design.css, xmas.css 다음) — 끄려면 index.html 에서 store-theme.css / store-theme.js 두 줄 삭제 */

:root {
  --st-blue: #0058a3;
  --st-blue-600: #004f93;
  --st-yellow: #ffdb00;
  --st-ink: #111111;
  --st-text: #484848;
  --st-muted: #767676;
  --st-line: #dfdfdf;
  --st-bg: #f5f5f5;

  /* design.css 공통 값 덮어쓰기 → 앱 전체에 한 번에 적용 */
  --ds-primary: var(--st-blue);
  --ds-primary-600: var(--st-blue-600);
  --ds-primary-50: #f0f6fb;
  --ds-ink: var(--st-ink);
  --ds-text: var(--st-text);
  --ds-muted: var(--st-muted);
  --ds-subtle: #929292;
  --ds-line: var(--st-line);
  --ds-line-strong: #cccccc;
  --ds-bg: var(--st-bg);
  --ds-radius: 8px;
  --ds-radius-sm: 6px;
  --ds-shadow: none;
  --ds-shadow-lg: 0 8px 24px -8px rgba(0, 0, 0, .25);
  --ds-focus: 0 0 0 2px var(--st-ink);
}
html, body { background-color: var(--st-bg) !important; color: var(--st-ink); }
body { -webkit-font-smoothing: antialiased; }

/* ===================== 상단 바: 파랑 ===================== */
.app-header { background: var(--st-blue) !important; border-bottom: 0 !important; padding: 10px 14px 8px !important; }
.app-header .app-title { color: #fff !important; font-size: 17px !important; font-weight: 800 !important; letter-spacing: -.3px; }
.app-header .app-subtitle { display: none !important; }
.app-header .logo-icon { color: var(--st-ink) !important; background: var(--st-yellow); width: 30px; height: 30px; border-radius: 6px; display: inline-flex !important; align-items: center; justify-content: center; font-size: 15px !important; }
.app-header .logo-area { gap: 9px !important; }
#btn-global-refresh, #btn-manual-guide, #btn-notification-bell, #user-profile-badge {
  background: rgba(255,255,255,.14) !important; border: 1px solid rgba(255,255,255,.28) !important; border-radius: 999px !important; height: 32px !important;
}
#btn-global-refresh, #btn-manual-guide, #btn-notification-bell { width: 32px !important; }
#btn-global-refresh i, #btn-manual-guide i, #btn-notification-bell i, #user-profile-badge > i { color: #fff !important; }
#btn-global-refresh .refresh-label { display: none !important; }
#user-profile-badge { padding: 0 10px !important; }
#current-user-name { color: #fff !important; max-width: 70px !important; font-size: 12px !important; }
#admin-role-badge { background: var(--st-yellow) !important; color: var(--st-ink) !important; border: 0 !important; }
#notif-badge { background: var(--st-yellow) !important; color: var(--st-ink) !important; box-shadow: none !important; }

/* 판매 TOP 줄: 노랑 */
#sales-ticker { background: var(--st-yellow) !important; color: var(--st-ink) !important; margin: 8px -14px -8px !important; }
#sales-ticker .st-label { color: var(--st-ink) !important; }
#sales-ticker .st-label i { color: #d14a00 !important; }
#sales-ticker .st-rank { background: var(--st-ink) !important; color: var(--st-yellow) !important; border-radius: 4px !important; }
#sales-ticker .st-slide { color: var(--st-ink) !important; }
#sales-ticker .st-loc { background: rgba(0,0,0,.1) !important; color: var(--st-ink) !important; }
#sales-ticker .st-qty { color: var(--st-blue) !important; }
#sales-ticker .st-count { color: rgba(0,0,0,.45) !important; }
#sales-ticker .st-thumb { border: 1px solid rgba(0,0,0,.08); }

/* ===================== 하단 메뉴: 가운데 '입출고 등록' 노란 원 버튼 ===================== */
.bottom-nav { background: #fff !important; border-top: 1px solid var(--st-line) !important; box-shadow: none !important; overflow: visible !important; }
.bottom-nav-5 .nav-item { color: var(--st-muted) !important; font-weight: 600 !important; }
.bottom-nav-5 .nav-item i { color: inherit !important; }
.bottom-nav-5 .nav-item.active { color: var(--st-ink) !important; font-weight: 800 !important; }
.bottom-nav-5 .nav-item.active::before { background: var(--st-ink) !important; height: 3px !important; left: 30% !important; right: 30% !important; border-radius: 0 0 3px 3px !important; }
.bottom-nav-5 .nav-item.st-center { position: relative; overflow: visible !important; }
.bottom-nav-5 .nav-item.st-center i {
  width: 52px; height: 52px; margin-top: -26px; margin-bottom: 2px; border-radius: 50%;
  background: var(--st-yellow); color: var(--st-ink) !important; font-size: 21px !important;
  display: flex !important; align-items: center; justify-content: center;
  border: 4px solid #fff; box-shadow: 0 4px 12px -4px rgba(0,0,0,.35);
}
.bottom-nav-5 .nav-item.st-center.active i { background: var(--st-blue); color: #fff !important; }
.bottom-nav-5 .nav-item.st-center.active::before { display: none !important; }
.bottom-nav-5 .nav-item.st-center span { color: var(--st-ink) !important; font-weight: 800 !important; }

/* ===================== 제목 · 카드 · 입력 · 버튼 ===================== */
.tab-page h2, .card-header h2 { color: var(--st-ink) !important; font-weight: 800 !important; letter-spacing: -.4px; }
.tab-page h2 i, .card-header h2 i { color: var(--st-ink) !important; }
.card-box, .info-card, .tb-card { border-radius: 8px !important; box-shadow: none !important; border: 1px solid var(--st-line) !important; }
.input-control, .search-control, .tab-page select, .tab-page input[type="text"], .tab-page input[type="search"], .tab-page input[type="date"], .tab-page input[type="number"] {
  border-radius: 4px !important; border: 1px solid #929292 !important; background: #fff !important; color: var(--st-ink) !important;
}
.input-control:focus, .search-control:focus, .tab-page select:focus, .tab-page input:focus { border-color: var(--st-ink) !important; box-shadow: 0 0 0 1px var(--st-ink) !important; }
.btn-submit, .btn-primary { border-radius: 999px !important; background: var(--st-blue) !important; font-weight: 800 !important; box-shadow: none !important; }
.btn-submit:active, .btn-primary:active { background: var(--st-blue-600) !important; }
.btn-secondary { border-radius: 999px !important; }

/* 칩·필터는 알약 + 선택 시 검정 */
.filter-chip.active, .chip.active, .tb-filter.active { background: var(--st-ink) !important; color: #fff !important; border-color: var(--st-ink) !important; }

/* ===================== 메뉴(홈) ===================== */
.st-hello { background: var(--st-blue); color: #fff; margin: -14px -14px 14px; padding: 16px 18px 18px; }
.st-hello h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.5px; color: #fff; }
.st-hello p { margin: 4px 0 0; font-size: 13px; opacity: .85; font-weight: 600; }
.st-hello-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.st-hello-stats div { background: rgba(255,255,255,.12); border-radius: 8px; padding: 9px 10px; }
.st-hello-stats b { display: block; font-size: 19px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.15; }
.st-hello-stats small { font-size: 11px; font-weight: 600; opacity: .85; }
.st-hello-stats .hot b { color: var(--st-yellow); }

.menu-section-title { color: var(--st-ink) !important; font-size: 16px !important; font-weight: 800 !important; margin: 18px 2px 10px !important; }
.menu-section-title i { color: var(--st-ink) !important; }
.menu-section-sub { color: var(--st-muted) !important; font-weight: 600 !important; }

/* 오늘 할 일: 한 장 · 각진 · 아이콘은 단색 사각 */
.menu-task-list { border-radius: 8px !important; border: 1px solid var(--st-line) !important; box-shadow: none !important; }
.menu-task-list > .menu-task { padding: 14px 14px !important; }
.menu-task-list .menu-task-icon { border-radius: 6px !important; width: 40px !important; height: 40px !important; }
.menu-task-list .menu-task-title { font-size: 15.5px !important; color: var(--st-ink) !important; }
.menu-task-list .menu-task-sub { color: var(--st-text) !important; }
.menu-task-list .menu-task-count { background: var(--st-ink) !important; color: #fff !important; border-radius: 4px !important; }
.menu-task-list .menu-task-count.done { background: #0a8a00 !important; color: #fff !important; }
.menu-task-list .menu-task .nav-badge { border-radius: 4px !important; }
.menu-task-list .menu-task-arrow { color: var(--st-ink) !important; }

/* 바로가기: 큰 타일 → 2줄 목록형 */
.menu-tile-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0 !important; background: #fff; border: 1px solid var(--st-line); border-radius: 8px; overflow: hidden; }
.menu-tile-grid .menu-tile { flex-direction: row !important; justify-content: flex-start !important; align-items: center !important; gap: 10px !important; padding: 14px 12px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; min-height: 0 !important; height: auto !important; border-bottom: 1px solid #efefef !important; position: relative; }
.menu-tile-grid .menu-tile:nth-child(odd) { border-right: 1px solid #efefef !important; }
.menu-tile-grid .menu-tile-icon { width: 34px !important; height: 34px !important; border-radius: 6px !important; margin: 0 !important; font-size: 15px !important; flex-shrink: 0; }
.menu-tile-grid .menu-tile-text { font-size: 14px !important; font-weight: 700 !important; color: var(--st-ink) !important; text-align: left !important; }
.menu-tile-grid .menu-tile .nav-badge { position: static !important; margin-left: auto !important; border-radius: 4px !important; }

/* ===================== 입출고 등록 ===================== */
.rc-btn { border-radius: 8px !important; box-shadow: none !important; }
.rc-btn.in, .rc-in, [data-rc="in"] { background: var(--st-blue) !important; }
.rc-btn.out, .rc-out, [data-rc="out"] { background: var(--st-yellow) !important; color: var(--st-ink) !important; }
.rc-btn.out *, .rc-out *, [data-rc="out"] * { color: var(--st-ink) !important; }

/* ===================== 재고 조회 카드 ===================== */
.simple-stock-card, .stock-card-item { border-radius: 8px !important; box-shadow: none !important; border-color: var(--st-line) !important; }
.btn-quick-in { background: #fff !important; color: var(--st-blue) !important; border: 1.5px solid var(--st-blue) !important; border-radius: 999px !important; }
.btn-quick-out { background: #fff !important; color: var(--st-ink) !important; border: 1.5px solid var(--st-ink) !important; border-radius: 999px !important; }

/* ===================== 팝업(시트) ===================== */
.tb-sheet { border-radius: 12px 12px 0 0 !important; }
.tb-sheet-done { border-radius: 999px !important; }
.perm-pw-box { border-radius: 10px !important; }
.perm-pw-actions button, .perm-pw-ok { border-radius: 999px !important; }

/* ===================== 알림(토스트) ===================== */
#toast-container > *, .toast { border-radius: 6px !important; background: var(--st-ink) !important; color: #fff !important; }

/* 방문자 수는 메뉴(홈) 파란 띠로 옮김 → 입출고 등록 화면의 줄은 숨김 (숫자는 계속 갱신됨) */
.visitor-counter-bar { display: none !important; }

/* ===================== 로그인 화면 ===================== */
.login-overlay .login-card { border-radius: 12px !important; }
.login-input-wrap .input-control { border-radius: 4px !important; border: 1px solid #929292 !important; background: #fff !important; }
.login-input-wrap .input-control:focus { border-color: var(--st-ink) !important; box-shadow: 0 0 0 1px var(--st-ink) !important; }
.login-overlay .btn-login { border-radius: 999px !important; }
.login-guest { border-radius: 8px !important; }
.login-brand .login-logo { border-radius: 10px !important; }

/* 홈 파란 띠: 왼쪽 인사 · 오른쪽 자주 접속 TOP */
.st-hello-top { display: flex; align-items: flex-start; gap: 12px; }
.st-hello-text { flex: 1; min-width: 0; }
.st-hello-text p + p { margin-top: 1px; }
.st-rank { flex-shrink: 0; width: 138px; background: rgba(255,255,255,.12); border-radius: 8px; padding: 8px 10px; }
.st-rank-title { font-size: 11px; font-weight: 800; color: var(--st-yellow); margin-bottom: 4px; display: flex; justify-content: space-between; align-items: baseline; }
.st-rank-title small { font-size: 10px; font-weight: 600; color: rgba(255,255,255,.7); }
.st-rank-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 2px 0; color: #fff; }
.st-rank-row.me { font-weight: 900; }
.st-rank-row.me .st-rank-nm::after { content: " (나)"; font-size: 10px; opacity: .75; }
.st-rank-no { width: 18px; text-align: center; flex-shrink: 0; font-size: 12px; font-weight: 800; }
.st-rank-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.st-rank-row b { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 12px; }
.st-rank-row b::after { content: attr(data-u); font-size: 10px; font-weight: 600; opacity: .8; margin-left: 1px; }
.st-rank-empty { font-size: 11.5px; color: rgba(255,255,255,.75); padding: 4px 0; }
.st-rank-more { width: 100%; margin-top: 4px; height: 22px; border: 0; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font-size: 10.5px; font-weight: 800; cursor: pointer; }
.st-hello h3 { font-size: 18px !important; line-height: 1.3; }
.st-hello-name { font-size: 22px; white-space: nowrap; }

/* 홈: 콘크리트 재고 버튼 + 목록 */
.st-hello-stats .st-stat-btn { background: rgba(255,255,255,.12); border: 0; border-radius: 8px; padding: 9px 10px; text-align: left; color: #fff; font: inherit; cursor: pointer; }
.st-hello-stats .st-stat-btn:active { background: rgba(255,255,255,.22); }
.st-hello-stats .st-stat-btn.hot b { color: var(--st-yellow); }
.st-cc-step { color: var(--st-ink) !important; background: #fff3b0 !important; }
.st-cc-help { font-size: 12.5px; color: var(--st-text); background: #f5f5f5; border-radius: 6px; padding: 10px 12px; line-height: 1.5; margin-bottom: 8px; }
.st-cc-list { display: flex; flex-direction: column; }
.st-cc-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 2px; border: 0; border-bottom: 1px solid #efefef; background: #fff; text-align: left; font: inherit; cursor: pointer; }
.st-cc-item:active { background: #fafafa; }
.st-cc-info { flex: 1; min-width: 0; }
.st-cc-name { font-size: 13.5px; font-weight: 800; color: var(--st-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-cc-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11.5px; color: var(--st-muted); margin-top: 2px; }
.st-cc-no { font-weight: 800; color: var(--st-text); font-variant-numeric: tabular-nums; }
.st-cc-right { flex-shrink: 0; text-align: right; }
.st-cc-right b { display: block; font-size: 17px; font-weight: 900; color: var(--st-ink); }
.st-cc-right b small { font-size: 10.5px; font-weight: 600; color: var(--st-muted); margin-left: 1px; }
.st-cc-days { display: inline-block; margin-top: 2px; font-size: 10.5px; font-weight: 800; background: var(--st-ink); color: #fff; border-radius: 4px; padding: 1px 6px; }
#sales-ticker { display: none !important; }   /* 판매 TOP 배너 끔 (2026-11-30) */

/* ===== 모바일 상단 제목 잘림 방지 (2026-11-30) ===== */
.app-header .header-content { display: flex !important; align-items: center !important; gap: 8px !important; flex-wrap: nowrap !important; }
.app-header .logo-area { flex: 1 1 auto !important; min-width: 0 !important; }
.app-header .logo-area > div { min-width: 0; }
.app-header .logo-icon { flex-shrink: 0; }
.app-header .app-title { white-space: nowrap !important; }
.app-header .header-actions { flex-shrink: 0 !important; }
@media (max-width: 480px) {
  .app-header { padding-left: 10px !important; padding-right: 10px !important; }
  /* 두 줄: 세일즈 창고 / 입출고 */
  .app-header .app-title { flex-direction: column !important; align-items: flex-start !important; gap: 0 !important; font-size: 15px !important; line-height: 1.15 !important; }
  .app-header .title-long { display: block !important; font-size: 11px !important; font-weight: 700 !important; color: rgba(255,255,255,.8) !important; letter-spacing: 0; }
  .app-header .app-title > span[style*="font-size:12px"] { display: none !important; }
  .app-header .logo-area { gap: 7px !important; }
  .app-header .header-actions { gap: 5px !important; }
  #btn-global-refresh, #btn-manual-guide, #btn-notification-bell { width: 32px !important; min-width: 32px !important; height: 32px !important; }
  #btn-global-refresh i, #btn-manual-guide i, #btn-notification-bell i { font-size: 13.5px !important; }
  #user-profile-badge { height: 32px !important; padding: 0 4px 0 9px !important; gap: 4px !important; }
  #user-profile-badge .btn-logout { min-width: 24px !important; min-height: 24px !important; padding: 0 !important; }
}
@media (max-width: 374px) {
  .app-header .header-actions { gap: 4px !important; }
  #btn-global-refresh, #btn-manual-guide, #btn-notification-bell { width: 30px !important; min-width: 30px !important; height: 30px !important; }
  #current-user-name { font-size: 12px !important; max-width: 52px !important; }
}
@media (max-width: 340px) {
  .app-header .logo-icon { display: none !important; }
}

/* 순위 박스 탭: 접속 / Test Buy (2026-11-30) */
.st-rank-tabs { display: flex; gap: 3px; background: rgba(0,0,0,.18); border-radius: 999px; padding: 2px; margin-bottom: 6px; }
.st-rank-tab { flex: 1; height: 20px; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.8); font-size: 10.5px; font-weight: 800; cursor: pointer; padding: 0; white-space: nowrap; }
.st-rank-tab.on { background: var(--st-yellow); color: var(--st-ink); }

/* ===== 홈 상단 눈사람 (겨울) 2026-11-30 ===== */
.st-hello-top { position: relative; }
.st-snowman { position: absolute; right: 150px; bottom: -4px; width: 58px; height: 72px; pointer-events: none; z-index: 0; }
.st-hello-text, .st-rank { position: relative; z-index: 1; }
.st-sm-body { width: 100%; height: 100%; overflow: visible; }
.st-sm-sway { transform-origin: 40px 95px; animation: stSmSway 3.2s ease-in-out infinite; }
.st-sm-head { transform-origin: 40px 47px; animation: stSmHead 3.2s ease-in-out infinite; }
.st-sm-wave { transform-origin: 58px 58px; animation: stSmWave 1.1s ease-in-out infinite; }
.st-sm-scarf { transform-origin: 44px 57px; animation: stSmScarf 1.6s ease-in-out infinite; }
@keyframes stSmSway { 0%,100% { transform: rotate(-4deg) translateY(0); } 25% { transform: rotate(0) translateY(-3px); } 50% { transform: rotate(4deg) translateY(0); } 75% { transform: rotate(0) translateY(-3px); } }
@keyframes stSmHead { 0%,100% { transform: rotate(3deg); } 50% { transform: rotate(-3deg); } }
@keyframes stSmWave { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-28deg); } }
@keyframes stSmScarf { 0%,100% { transform: rotate(0); } 50% { transform: rotate(12deg); } }
.st-sf { position: absolute; top: -14px; width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: 0; animation: stSf 4s linear infinite; }
.st-sf.f1 { left: 2px; animation-delay: 0s; }
.st-sf.f2 { left: 22px; width: 4px; height: 4px; animation-delay: 1.3s; animation-duration: 4.6s; }
.st-sf.f3 { left: 44px; animation-delay: 2.4s; }
.st-sf.f4 { left: 60px; width: 3px; height: 3px; animation-delay: .7s; animation-duration: 3.6s; }
.st-sf.f5 { left: 32px; width: 3px; height: 3px; animation-delay: 3.1s; animation-duration: 5s; }
@keyframes stSf { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 50% { transform: translate(6px, 40px); } 90% { opacity: .8; } 100% { transform: translate(-4px, 82px); opacity: 0; } }
@media (min-width: 440px) { .st-snowman { right: 50%; margin-right: -60px; width: 72px; height: 90px; } }
@media (max-width: 359px) { .st-snowman { display: none; } }
@media (prefers-reduced-motion: reduce) { .st-sm-sway, .st-sm-head, .st-sm-wave, .st-sm-scarf, .st-sf { animation: none !important; } .st-sf { display: none; } }

/* 눈사람 말풍선 */
.st-sm-bubble { position: absolute; left: 50%; bottom: 100%; margin-bottom: 4px; transform: translateX(-50%); background: #fff; color: var(--st-ink, #111); font-size: 10.5px; font-weight: 800; line-height: 1.3; text-align: center; white-space: nowrap; padding: 4px 8px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.18); animation: stSmBubble 3.2s ease-in-out infinite; }
.st-sm-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: #fff; }
@keyframes stSmBubble { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .st-sm-bubble { animation: none !important; } }
/* 좁은 화면: 말풍선을 눈사람 왼쪽에 (위에 두면 날짜 글자를 가림) */
@media (max-width: 439px) {
  .st-sm-bubble { left: auto; right: 100%; bottom: 34px; margin: 0 4px 0 0; transform: none; animation-name: stSmBubbleL; }
  .st-sm-bubble::after { left: 100%; top: 50%; margin: -5px 0 0; border-top-color: transparent; border-left-color: #fff; }
  @keyframes stSmBubbleL { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
}
