/* 진주컴퓨터 매출관리 — 밝은 업무 포털 스타일 (민트 포인트) */
:root {
  --teal: #14c3b8;
  --teal-d: #0da79d;
  --teal-pale: #e2f8f6;
  --blue: #4a8cff;
  --blue-pale: #e8f0ff;
  --yellow: #ffc24b;
  --yellow-pale: #fff5e0;
  --red: #ff6b6b;
  --red-pale: #ffecec;

  --brand: #1858d8;
  --ink: #2b3445;
  --ink2: #5a6474;
  --mut: #98a0ae;
  --bg: #f4f7fa;
  --card: #ffffff;
  --line: #eceff4;
  --line2: #dfe4ec;

  --sh: 0 2px 10px rgba(45, 60, 90, .06);
  --r: 16px;
}

* { box-sizing: border-box; }

/* display 지정이 있는 요소도 hidden이면 확실히 숨긴다 */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

button, input, select, textarea { font-family: inherit; font-size: 16px; }

/* ---------- 잠금 화면 ---------- */
.lock {
  position: fixed; inset: 0; z-index: 50;
  background: linear-gradient(160deg, #eafaf8 0%, var(--bg) 60%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lock-box {
  width: 100%; max-width: 340px; text-align: center;
  background: var(--card); border-radius: 20px; padding: 34px 24px; box-shadow: var(--sh);
}
.lock-logo { color: var(--teal); font-size: 28px; font-weight: 800; letter-spacing: -.8px; }
.lock-desc { color: var(--mut); margin: 6px 0 26px; font-size: 15px; }
.pin-row { display: flex; gap: 8px; margin-bottom: 10px; }
.lock input {
  flex: 1; min-width: 0; padding: 15px; border-radius: 12px; border: 1px solid var(--line2);
  text-align: center; letter-spacing: 2px; font-size: 18px; background: var(--bg);
}
.pin-eye {
  flex: none; padding: 0 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line2); background: var(--bg); color: var(--ink2);
  font-size: 14px; font-weight: 700;
}
.pin-eye.is-on { background: var(--teal); border-color: var(--teal); color: #fff; }
.lock .btn { width: 100%; padding: 15px; font-size: 17px; background: var(--teal); color: #fff; font-weight: 700; }

/* ---------- 상단 ---------- */
.topbox {
  background: transparent;
  padding: calc(env(safe-area-inset-top) + 18px) 16px 8px;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar-text {
  flex: 1; min-width: 0;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.topbar-title { font-size: 25px; font-weight: 800; letter-spacing: -.8px; }
.brand { color: #3BAAFA; }   /* 상단 '진주컴퓨터' 글자 (2026-09-19 사용자 지정) */
.topbar-date { font-size: 16px; font-weight: 600; color: var(--mut); }
.top-actions { display: flex; gap: 6px; flex: none; }
.icon-btn {
  background: var(--card); color: var(--ink2); border: 1px solid var(--line);
  width: 40px; height: 40px; border-radius: 50%; font-size: 16px; cursor: pointer;
}
.icon-btn:active { background: var(--teal-pale); }
.date-hidden {
  position: absolute; width: 1px; height: 1px; opacity: 0;
  pointer-events: none; border: none; padding: 0;
}

/* ---------- 요약 (하위 화면) ---------- */
.summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.sum-item {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 10px; text-align: center;
}
.sum-label { display: block; color: var(--mut); font-size: 12px; margin-bottom: 4px; font-weight: 600; }
.sum-item strong { color: var(--ink); font-size: 18px; font-weight: 800; }
.sum-item:first-child { background: var(--teal-pale); border-color: #c8f0ec; }
.sum-item:first-child .sum-label { color: var(--teal-d); }
.sum-item:first-child strong { color: var(--teal-d); }

/* ---------- 홈 ---------- */
.home { padding: 14px 14px calc(env(safe-area-inset-bottom) + 30px); }
.home-top { display: grid; gap: 12px; margin-bottom: 12px; }

.panel {
  background: var(--card); border-radius: var(--r); box-shadow: var(--sh);
  padding: 18px; margin-bottom: 12px;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.panel-note { font-size: 13px; color: var(--mut); }
.panel-eyebrow { display: block; font-size: 14px; color: var(--mut); font-weight: 700; }

.panel-hero { margin-bottom: 0; }
.hero-num {
  display: block; margin-top: 8px; font-size: 38px; font-weight: 800;
  letter-spacing: -1.4px; color: var(--ink);
}
.hero-sub { display: block; margin-top: 4px; font-size: 15px; color: var(--ink2); font-weight: 600; }
.hero-month {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin-top: 16px; padding: 13px 16px; cursor: pointer;
  background: var(--teal-pale); border: none; border-radius: 12px;
  font-family: inherit; font-size: 15px; font-weight: 700; color: var(--teal-d);
}
.hero-month b { font-size: 17px; font-weight: 800; }

/* 아이콘 타일 */
.icon-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.itile {
  cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--card); border: none; border-radius: var(--r);
  box-shadow: var(--sh); padding: 14px 6px 0; font-family: inherit;
}
.itile:active { transform: scale(.97); }
.itile-img { width: 52px; height: 52px; object-fit: contain; display: block; }
.itile-name { display: block; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--ink2); }

/* 숫자는 아래쪽에 선 긋고 크게 */
.itile-count {
  display: block; width: 100%; margin-top: 10px; padding: 10px 4px;
  border-top: 1px solid var(--line);
  font-size: 20px; font-weight: 800; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.itile-count.is-on { color: var(--red); }

/* 이번 주 */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wday {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px;
  text-align: center; cursor: pointer; background: var(--card);
}
.wday-num { display: block; font-size: 16px; font-weight: 800; }
.wday-eng { display: block; font-size: 10px; font-weight: 700; color: var(--mut); letter-spacing: .06em; }
.wday-cnt { display: block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--teal-d); }
.wday-cnt.is-zero { color: var(--line2); }
.wday.is-today { background: var(--teal); border-color: var(--teal); }
.wday.is-today .wday-num, .wday.is-today .wday-eng, .wday.is-today .wday-cnt { color: #fff; }

/* 바로가기 */
.quick-btns { display: grid; gap: 8px; }
.logout-btn {
  display: block; width: 100%; margin-top: 14px; padding: 12px; cursor: pointer;
  background: none; border: none; font-family: inherit;
  font-size: 14px; font-weight: 700; color: var(--mut); text-decoration: underline;
}
.logout-btn:active { color: var(--ink2); }
.big-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; font-family: inherit; font-size: 16px; font-weight: 700; color: var(--ink);
}
.big-arrow { font-size: 17px; color: var(--mut); }
.big-btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.big-btn-primary .big-arrow { color: #fff; }
.big-btn:active { transform: translateY(1px); }

/* ---------- 고르는 줄 ---------- */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 14px 0; }
.filter-bar select, .filter-bar input, .search-bar input {
  padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px;
  background: var(--card); color: var(--ink); font-size: 15px;
}
.filter-bar input { flex: 1; min-width: 140px; }
.filter-bar .quick-row { margin: 0; }
.search-bar { display: flex; gap: 8px; padding: 14px 14px 0; }
.search-bar input { flex: 1; }

/* ---------- 목록 ---------- */
.list { padding: 14px 14px 96px; display: flex; flex-direction: column; gap: 10px; }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 16px; cursor: pointer; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-name { font-weight: 800; font-size: 17px; letter-spacing: -.3px; }
.card-phone {
  color: var(--teal-d); font-size: 14px; font-weight: 600; text-decoration: none;
  background: var(--teal-pale); border-radius: 999px; padding: 4px 11px; white-space: nowrap;
}
.card-phone:active { background: #c8f0ec; }
.card-line { margin-top: 8px; color: var(--ink2); font-size: 14px; line-height: 1.5; }
.card-bottom {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.card-money { font-weight: 800; font-size: 17px; }
.card-actions { display: flex; gap: 6px; }

.list-rows { gap: 6px; }
.row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 12px; box-shadow: var(--sh);
  padding: 14px 16px; cursor: pointer;
}
.row-date { flex: none; color: var(--mut); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.row-name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name.is-tight { flex: none; max-width: 60%; }
.row-spacer { flex: 1; }
.row-money { flex: none; font-size: 14px; font-weight: 700; }

.cust-head {
  background: var(--card); border-radius: var(--r); box-shadow: var(--sh);
  padding: 18px; margin-bottom: 8px;
}
.cust-head .btn { margin-bottom: 12px; }
.cust-title { font-size: 20px; font-weight: 800; }
.cust-title span { font-size: 14px; font-weight: 400; color: var(--mut); margin-left: 8px; }
.cust-sub { margin-top: 6px; font-size: 14px; color: var(--teal-d); font-weight: 700; }

/* ---------- 배지 ---------- */
.badge {
  font-size: 12px; padding: 4px 10px; border-radius: 8px; font-weight: 700;
  background: var(--bg); color: var(--ink2); white-space: nowrap;
}
.badge-판매 { background: var(--blue-pale); color: #2a62cc; }
.badge-수리 { background: var(--yellow-pale); color: #a3700b; }
.badge-점검 { background: var(--teal-pale); color: var(--teal-d); }
.badge-완료 { background: #e8f6ec; color: #23884a; }
.badge-진행중 { background: var(--yellow-pale); color: #a3700b; }
.badge-접수 { background: var(--bg); color: var(--ink2); }
.badge-보류 { background: var(--red-pale); color: #cc4141; }
.badge-알림 { background: var(--red); color: #fff; }
.badge-단골 {
  background: var(--teal); color: #fff;
  min-width: 24px; padding: 4px 8px; text-align: center; border-radius: 999px;
}

.empty { text-align: center; color: var(--mut); padding: 52px 16px; font-size: 15px; }

/* ---------- 지난 기록 ---------- */
.history {
  background: var(--card); border-radius: var(--r); box-shadow: var(--sh);
  padding: 16px; margin-bottom: 14px;
}
.history-head { font-size: 14px; font-weight: 800; color: var(--teal-d); margin-bottom: 10px; }
.history-row {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 13px; color: var(--ink2); padding: 8px 0; border-top: 1px solid var(--line);
}
.history-date { flex: none; color: var(--mut); font-weight: 600; }
.history-what { flex: 1; line-height: 1.45; }
.history-money { flex: none; font-weight: 700; color: var(--ink); }

/* ---------- 버튼 ---------- */
.btn {
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px;
  font-weight: 700; cursor: pointer; background: var(--bg); color: var(--ink);
}
.btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-small { padding: 9px 14px; font-size: 14px; }
.btn-done { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn:active { transform: translateY(1px); }

.fab {
  position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 20px);
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: var(--teal); color: #fff; font-size: 27px; line-height: 1;
  box-shadow: 0 6px 18px rgba(20,195,184,.42); cursor: pointer; z-index: 20;
}

/* ---------- 입력 화면 ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; }
.sheet-top {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 12px) 14px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 800; font-size: 17px;
}
.sheet-body { flex: 1; overflow-y: auto; padding: 16px 14px calc(env(safe-area-inset-bottom) + 40px); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--mut); margin-bottom: 6px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px; border: 1px solid var(--line2); border-radius: 12px;
  background: var(--card); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-pale);
}
.field textarea { resize: vertical; line-height: 1.5; }

/* 연락처 칸 옆 전화 버튼 */
.field-row { display: flex; gap: 8px; align-items: stretch; }
.field-row input { flex: 1; min-width: 0; }
.call-btn {
  flex: none; width: 56px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--teal); color: #fff; text-decoration: none;
}
.call-btn:active { background: var(--teal-d); }
.call-btn.is-off { background: var(--line); color: var(--mut); pointer-events: none; }

.cust-title a { color: var(--teal-d); text-decoration: none; font-weight: 700; }

.photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.photo-btn {
  display: block; text-align: center; padding: 20px 8px; border-radius: 12px;
  background: var(--card); border: 1.5px dashed var(--line2); color: var(--ink2);
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.photo-btn-wide { margin-bottom: 14px; padding: 24px 8px; }
.ocr-msg { margin: 0 0 12px; font-size: 14px; color: var(--teal-d); font-weight: 600; min-height: 20px; }
.photo-preview { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.photo-preview img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; }

.quick-row { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; }
.chip {
  border: 1px solid var(--line2); background: var(--card); border-radius: 999px;
  padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--ink2); cursor: pointer;
}
.chip.is-on { background: var(--teal); color: #fff; border-color: var(--teal); }

.msg-error { color: #d94141; font-size: 14px; min-height: 20px; margin: 10px 0 0; font-weight: 600; }

/* ---------- 사진 여러 장 초안 ---------- */
.draft { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 14px; margin-bottom: 12px; }
.draft-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.draft-top img { width: 68px; height: 68px; object-fit: cover; border-radius: 12px; flex: none; }
.draft-note { flex: 1; font-size: 12px; color: var(--mut); line-height: 1.5; }
.draft-warn { color: #d94141; font-weight: 700; }
.draft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.draft-grid label { display: block; font-size: 12px; color: var(--mut); font-weight: 700; }
.draft-wide { grid-column: 1 / -1; }
.draft-grid input, .draft-grid select {
  width: 100%; margin-top: 5px; padding: 10px 12px; font-size: 15px;
  border: 1px solid var(--line2); border-radius: 10px; background: var(--card); color: var(--ink);
}

/* ---------- 알림 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 12px;
  font-size: 15px; font-weight: 700; z-index: 60; max-width: 90%; text-align: center;
}

/* ---------- PC 화면 ---------- */
@media (min-width: 820px) {
  #app { max-width: 1120px; margin: 0 auto; }
  .topbox { padding: 24px 24px 12px; }
  .topbar-title { font-size: 30px; }
  .topbar-date { font-size: 17px; }
  .summary { grid-template-columns: repeat(4, 1fr); }
  .home { padding: 20px 24px 40px; }
  /* 아이콘 타일 4개의 높이를 왼쪽 매출 패널에 맞춘다 */
  .home-top { grid-template-columns: 340px 1fr; align-items: stretch; }
  .panel-hero { height: 100%; margin-bottom: 0; }
  .hero-num { font-size: 42px; }
  .icon-tiles { gap: 12px; height: 100%; }
  .itile { padding: 20px 8px 0; }
  .itile-img { width: 64px; height: 64px; }
  .itile-name { font-size: 15px; margin-top: 10px; }
  .itile-count { font-size: 22px; padding: 12px 4px; }
  .quick-btns { grid-template-columns: repeat(2, 1fr); }
  .search-bar, .filter-bar { padding: 18px 24px 0; }
  .search-bar { max-width: 600px; }
  .list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 14px; padding: 20px 24px 40px;
  }
  .list-rows { display: flex; }
  .sheet-top, .sheet-body { max-width: 760px; width: 100%; margin: 0 auto; }
}

/* 저작권 한 줄 */
.copy{
  margin:26px 0 calc(18px + env(safe-area-inset-bottom));
  text-align:center;
  font-size:12.5px;
  color:var(--ink2);
  letter-spacing:.01em;
}
