/* ============================================================
   터한의원 지점 인트라넷 - 공통 스타일
   컬러: 딥그린(#1F3B2C) 베이스, 골드(#C9A15A) 포인트, 웜아이보리(#FAF7F1) 배경
   ============================================================ */

:root {
  --brand-dark: #1f3b2c;
  --brand-mid: #2f5744;
  --brand-gold: #c9a15a;
  --bg: #faf7f1;
  --card: #ffffff;
  --text: #24291f;
  --text-sub: #6b7268;
  --border: #e6e1d6;
  --danger: #b3492f;
  --success: #2f6b4f;
  --warn: #b8863a;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(31, 59, 44, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* 상단 헤더 */
.topbar {
  background: var(--brand-dark);
  color: #fff;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.topbar .brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--brand-gold);
  margin-top: 2px;
}
.topbar a.logout {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  text-decoration: none;
}

main {
  flex: 1;
  padding: 20px;
  padding-bottom: 90px;
}

/* 카드 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.card h2 {
  font-size: 14px;
  margin: 0 0 10px;
  color: var(--brand-mid);
}

/* 대시보드 통계 그리드 */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-box .num {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-dark);
}
.stat-box .num.gold { color: var(--brand-gold); }
.stat-box .label {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* 버튼 */
.btn {
  display: inline-block;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: var(--brand-dark);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn:active { opacity: 0.85; }
.btn.gold { background: var(--brand-gold); color: var(--brand-dark); }
.btn.outline {
  background: transparent;
  color: var(--brand-dark);
  border: 1.5px solid var(--brand-dark);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 입력폼 */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--text);
}
input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
textarea { resize: vertical; min-height: 80px; }

/* 뱃지 */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge.wait { background: #f3ead2; color: var(--warn); }
.badge.approved { background: #e1efe6; color: var(--success); }
.badge.rejected { background: #f5e1db; color: var(--danger); }
.badge.must { background: var(--danger); color: #fff; }

/* 리스트 아이템 */
.list-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item .title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.list-item .title {
  font-weight: 700;
  font-size: 14.5px;
}
.list-item .meta {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
}
.list-item .content {
  font-size: 13.5px;
  color: var(--text);
  margin-top: 8px;
  white-space: pre-wrap;
}

/* 하단 탭바 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 10;
}
.tabbar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text-sub);
  font-size: 11px;
  padding: 6px 0;
}
.tabbar a .icon { font-size: 19px; display: block; margin-bottom: 2px; }
.tabbar a.active { color: var(--brand-dark); font-weight: 700; }

/* 로그인 화면 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
  max-width: 480px;
  margin: 0 auto;
}
.login-wrap .logo-title {
  text-align: center;
  margin-bottom: 32px;
}
.login-wrap .logo-title h1 {
  color: var(--brand-dark);
  font-size: 22px;
  margin: 0;
}
.login-wrap .logo-title p {
  color: var(--brand-gold);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 6px 0 0;
}

.msg { font-size: 13px; margin-top: 10px; }
.msg.error { color: var(--danger); }
.msg.success { color: var(--success); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-sub);
  font-size: 13.5px;
}

a.plain { color: var(--brand-mid); text-decoration: underline; }
