/* =========================================
 * Dashboard (scoped by .dashboard)
 * File: app/static/css/dashboard.css
 * depends on: style.css (design tokens)
 * ======================================= */

/* 컨테이너 */
.dashboard {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 16px;
}

/* 페이지 타이틀/서브 */
.dashboard .header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard .header .title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #0f172a;
}
.dashboard .header .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

/* 요약 카드 (KPI) */
.dashboard .summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 16px;
}
.dashboard .stat-card {
  background: #fdfaf6;                /* 베이지 톤 */
  border: 1px solid #e2d9d0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 6px 24px rgba(2,6,23,0.06);
}
.dashboard .stat-card .label {
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
}
.dashboard .stat-card .value {
  margin-top: 6px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.dashboard .stat-card .delta {
  margin-top: 6px;
  font-size: .86rem;
  font-weight: 700;
}
.dashboard .stat-card .delta.up    { color: var(--ok); }
.dashboard .stat-card .delta.down  { color: var(--down); }
.dashboard .stat-card .delta.muted { color: var(--muted); }

/* 본문 카드 공통 */
.dashboard .card {
  max-width: 860px;
  margin: 0 auto 22px;
  padding: 20px 22px;
  background: #fdfaf6;                 /* 베이지 톤 */
  border: 1px solid #e2d9d0;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(2,6,23,0.06);
  text-align: center;                  /* 내용은 중앙 */
}
.dashboard .card + .card { margin-top: 16px; }

/* 카드 제목은 좌측 */
.dashboard .card-title,
.dashboard .card > h2,
.dashboard .card > h3 {
  text-align: left;
  margin: 0 0 12px;
  font-weight: 800;
  color: #5c4033;   /* 짙은 브라운 */
}

/* 카드 내부 내용은 중앙 */
.dashboard .card p,
.dashboard .card .line,
.dashboard .card ul,
.dashboard .card table {
  text-align: center;
  margin: 6px 0;
}
.dashboard .card ul {
  list-style: none;
  padding: 0;
}
.dashboard .card ul li {
  margin: 4px 0;
  text-align: center;
}

/* 카드 헤더 라인 */
.dashboard .card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

/* 구분선 */
.dashboard hr {
  border: 0;
  height: 1px;
  background: #e2d9d0;
  margin: 20px 0;
}

/* 뱃지 */
.dashboard .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  border: 1px solid transparent;
}
.dashboard .badge.ok {
  background: #ecfdf5; color: #047857; border-color: #a7f3d0;
}
.dashboard .badge.no {
  background: #fff1f2; color: #be123c; border-color: #fecdd3;
}

/* 툴바 */
.dashboard .toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.dashboard .toolbar .field {
  display: flex; align-items: center; gap: 6px;
}
.dashboard .toolbar input,
.dashboard .toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  background: #fff;
  color: var(--text);
}

/* 표 */
.dashboard table { width: 100%; border-collapse: collapse; }
.dashboard thead th {
  padding: 10px 8px;
  text-align: left;
  background: #f8f3ec;                  /* 연한 베이지 */
  border-bottom: 1px solid #e2d9d0;
  font-weight: 800;
  font-size: .92rem;
  color: #5c4033;
}
.dashboard tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: .95rem;
  color: var(--text);
}
.dashboard tbody tr:hover { background: #faf1e6; }
.dashboard .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 2열 레이아웃 */
.dashboard .grid-2 {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 16px;
}

/* 차트 자리 */
.dashboard .chart {
  height: 260px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: .92rem;
}

/* 버튼 (HTML에 클래스 없어도 통일 적용) */
.dashboard button {
  appearance: none;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.dashboard button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.dashboard button:active { background: var(--brand-darker); transform: translateY(0); }
.dashboard .card > div > button { margin: 4px 6px; }

/* 숫자 입력 */
.dashboard input[type="number"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  background: #fff;
  color: var(--text);
}

/* 설명 문단 */
.dashboard .muted { color: #64748b; }

/* 반응형 */
@media (max-width: 980px) {
  .dashboard .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dashboard { padding: 0 12px; }
  .dashboard .summary { grid-template-columns: 1fr; }
  .dashboard .card { padding: 14px; }
}
/* 버튼 그룹 중앙 정렬 */
.dashboard .card > div {
  text-align: center;
}

/* 버튼 묶음 */
.dashboard .btn-group {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* 금액 입력/증감 컨트롤 */
.dashboard .amount-control {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
/* 버튼 색상을 툴바(실사 배경) 톤에 맞춤 */
.dashboard button {
  background: #1d3557;       /* 네이비 */
}
.dashboard button:hover {
  background: #16324f;       /* 조금 더 어두운 hover */
}
.dashboard button:active {
  background: #0f2740;
}
.dashboard button {
  background: rgba(255,255,255,0.25);   /* 반투명 흰색 */
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(6px);
}
.dashboard button:hover {
  background: rgba(255,255,255,0.4);
}
/* 기본 버튼 스타일 */
.dashboard button {
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* 버튼별 개별 배경 */
#btnPayReg {
  background-image: url("/static/images/banners/nav.png");
}
#btnPayLand {
  background-image: url("/static/images/banners/land.jpg");
}
#btnPayBoth {
  background-image: url("/static/images/banners/wallet.jpg");
}
#btnSimRegInt {
  background-image: url("/static/images/banners/passport.jpg");
}
#btnSimLandInt {
  background-image: url("/static/images/banners/map.jpg");
}
.dashboard button:hover { filter: brightness(1.1); }
.dashboard button:active { filter: brightness(0.9); }
#btnPayReg,
#btnPayLand,
#btnPayBoth,
#btnSimRegInt,
#btnSimLandInt {
  background-image: url("/static/images/banners/nav.png");
}
.dashboard button {
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.dashboard button:hover { filter: brightness(1.15); }
.dashboard button:active { filter: brightness(0.9); }
