:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f0;
  --text2: #9099b3;
  --accent: #4f7bff;
  --accent-bg: rgba(79,123,255,0.12);
  --success: #2ecc8a;
  --success-bg: rgba(46,204,138,0.12);
  --danger: #e05c5c;
  --danger-bg: rgba(224,92,92,0.12);
  --warning: #f5a623;
  --warning-bg: rgba(245,166,35,0.12);
  --header-text: #94a3b8;
  --radius: 12px;
}

.light-mode {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface2: #eef0f7;
  --border: rgba(0,0,0,0.08);
  --text: #1a1d27;
  --text2: #6b7280;
  --accent: #3b63e8;
  --accent-bg: rgba(59,99,232,0.08);
  --success: #16a96b;
  --success-bg: rgba(22,169,107,0.10);
  --danger: #dc3545;
  --danger-bg: rgba(220,53,69,0.10);
  --warning: #d48806;
  --warning-bg: rgba(212,136,6,0.10);
  --header-text: #475569;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; background: var(--bg); color: var(--text); transition: background 0.3s; }

.app { display: flex; min-height: 100vh; }

.sidebar { width: 220px; flex-shrink: 0; background: var(--surface); border-right: 0.5px solid var(--border); display: flex; flex-direction: column; padding: 0 0 1.25rem 0; position: fixed; height: 100vh; overflow-y: auto; transition: background 0.3s; }
.sidebar-logo { height: 52px; padding: 0 1.25rem; border-bottom: 0.5px solid var(--border); display: flex; align-items: center; gap: 10px; box-sizing: border-box; }
.logo-icon { width: 32px; height: 32px; background: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.logo-icon i { font-size: 16px; color: #fff; }
.logo-name { font-size: 15px; font-weight: 600; color: var(--text); }
.nav-section { padding: 0 0.75rem; margin-bottom: 0.25rem; }
.nav-label { font-size: 13px; color: var(--text2); font-weight: 700; padding: 0.5rem 0.5rem 0.3rem; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text2); cursor: pointer; transition: all 0.15s; margin-bottom: 2px; }
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; }
.nav-item i { font-size: 18px; }
.sidebar-bottom { margin-top: auto; padding: 0.75rem; border-top: 0.5px solid var(--border); }
.user-info { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.user-info:hover { background: var(--surface2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-bg); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--accent); }
.user-name { font-size: 14px; color: var(--text); font-weight: 500; }
.user-role { font-size: 12px; color: var(--text2); }

.main { flex: 1; margin-left: 220px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: 52px; background: var(--surface); border-bottom: 0.5px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; position: sticky; top: 0; z-index: 10; transition: background 0.3s; }
.topbar-title { font-size: 18px; font-weight: 700; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.date-badge { font-size: 13px; color: var(--text2); background: var(--surface2); border: 0.5px solid var(--border); border-radius: 20px; padding: 0 12px; height: 32px; display: inline-flex; align-items: center; box-sizing: border-box; }
.theme-btn { background: var(--surface2); border: 0.5px solid var(--border); color: var(--text2); border-radius: 20px; padding: 0 12px; height: 32px; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; box-sizing: border-box; transition: all 0.2s; }
.theme-btn:hover { color: var(--text); border-color: var(--accent); }

.content { padding: 1.5rem; flex: 1; }

.btn { border: none; border-radius: 8px; padding: 7px 14px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #6b91ff; }
.btn-secondary { background: none; border: 0.5px solid var(--border); color: var(--text2); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border: 0.5px solid var(--danger); }

.card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 1.25rem; transition: background 0.3s; }

.form-field { margin-bottom: 1rem; }
.form-label { font-size: 13px; color: var(--text2); font-weight: 500; margin-bottom: 5px; display: block; }
input, select, textarea, button { font-family: inherit; }
.form-input { width: 100%; background: var(--surface2); border: 0.5px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 14px; color: var(--text); outline: none; transition: border-color 0.2s; }
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text2); }
.form-select { width: 100%; background: var(--surface2); border: 0.5px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 14px; color: var(--text); outline: none; cursor: pointer; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 5px; padding: 2px 8px; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-accent { background: var(--accent-bg); color: var(--accent); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }

.table-wrap { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.table-header { padding: 10px 14px; border-bottom: 0.5px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.table-title { font-size: 14px; font-weight: 500; color: var(--text); }
table { width: 100%; border-collapse: collapse; }
thead th { font-size: 14px; font-weight: 700; color: var(--header-text); padding: 10px 12px; text-align: left; border-bottom: 0.5px solid var(--border); background: var(--surface2); white-space: nowrap; }
tbody tr { border-bottom: 0.5px solid var(--border); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
tbody td { font-size: 14px; color: var(--text); padding: 10px 12px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 1.5rem; width: 420px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-title { font-size: 15px; font-weight: 600; color: var(--text); }
.modal-close { background: none; border: none; color: var(--text2); cursor: pointer; font-size: 18px; }
.modal-close:hover { color: var(--text); }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1.25rem; }

.pos { color: var(--success); font-weight: 600; }
.neg { color: var(--danger); font-weight: 600; }
.muted { color: var(--text2); }
.zero { color: var(--text2); opacity: 0.4; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 2.5rem 2rem; width: 100%; max-width: 380px; }
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo-icon { width: 48px; height: 48px; background: var(--accent); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.login-logo-icon i { font-size: 24px; color: #fff; }
.login-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.login-sub { font-size: 14px; color: var(--text2); }
.login-btn { width: 100%; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 0.5rem; transition: background 0.2s; }
.login-btn:hover { background: #6b91ff; }
.login-error { font-size: 13px; color: var(--danger); margin-top: 8px; text-align: center; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 8px; flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-wrap { position: relative; }
.search-wrap i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--text2); }
.search-wrap input { background: var(--surface); border: 0.5px solid var(--border); border-radius: 8px; padding: 7px 12px 7px 32px; font-size: 14px; color: var(--text); outline: none; width: 180px; transition: border-color 0.2s; }
.search-wrap input:focus { border-color: var(--accent); }
.search-wrap input::placeholder { color: var(--text2); }
.filter-select { background: var(--surface); border: 0.5px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 14px; color: var(--text2); outline: none; cursor: pointer; }

.summary-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 1.25rem; }
.summary-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.sc-top { display: flex; align-items: baseline; gap: 5px; margin-bottom: 10px; }
.sc-code { font-size: 14px; font-weight: 700; color: var(--text); }
.sc-name { font-size: 14px; font-weight: 700; color: var(--text); }
.sc-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.sc-label { font-size: 14px; font-weight: 700; color: var(--text); }
.sc-in { font-size: 14px; font-weight: 700; color: var(--success); }
.sc-out { font-size: 14px; font-weight: 700; color: var(--danger); }
.sc-div { border: none; border-top: 0.5px solid var(--border); margin: 7px 0; }
.sc-netrow { display: flex; justify-content: space-between; align-items: baseline; }
.sc-netlabel { font-size: 14px; font-weight: 700; color: var(--text); }
.sc-net { font-size: 14px; font-weight: 700; color: var(--text); text-align: right; }
.sc-net.pos { color: var(--success); }
.sc-net.neg { color: var(--danger); }

/* 사이드바 햄버거 토글 */
.sidebar { transition: width 0.2s ease, background 0.3s; }
.sidebar-logo { justify-content: space-between; }
.burger-btn { background: none; border: none; color: var(--text2); cursor: pointer; padding: 6px; border-radius: 6px; font-size: 18px; transition: background 0.15s; display: flex; align-items: center; }
.burger-btn:hover { background: var(--surface2); color: var(--text); }
.main { transition: margin-left 0.2s ease; }

/* 축소 상태 */
.sidebar.collapsed { width: 60px; }
.sidebar.collapsed ~ .main,
body:has(.sidebar.collapsed) .main { margin-left: 60px; }
.sidebar.collapsed .logo-name,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .user-info { display: none; }
.sidebar.collapsed .nav-item { font-size: 0; justify-content: center; padding: 8px 0; gap: 0; }
.sidebar.collapsed .nav-item i { font-size: 18px; }
.sidebar.collapsed .nav-section { padding: 0 6px; }
.sidebar.collapsed .logo-icon { display: none; }

/* 햄버거 가운데 정렬 */
.sidebar.collapsed .sidebar-logo {
  padding: 0;
  justify-content: center;
  margin-bottom: 0.75rem;
  border-bottom: 0.5px solid var(--border);
}



/* 테이블 컬럼 세로 구분선 */
.table-wrap table th:not(:last-child),
.table-wrap table td:not(:last-child) {border-right: 1px solid var(--border) !important; }

/* 일별 전체 통계 - 셀 사이 옅은 세로선 */
#dailyStatsContent table td + td, #dailyStatsContent table th + th { border-left: 1px solid var(--border); }

/* 모든 표 - 데이터 행 컴팩트 + 굵게 */
.table-wrap table tbody td { padding: 6px 12px !important; font-weight: 700 !important; }
.table-wrap table tbody td.muted { color: var(--text) !important; }

/* 업체별 통계 - 펼침/접힘 모션 */
@keyframes scSlideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.sc-anim { animation: scSlideDown 0.22s ease-out; }

/* 로딩 스피너 */
@keyframes fxspin { to { transform: rotate(360deg); } }
.fx-spinner { display:inline-flex; align-items:center; gap:8px; color:var(--text2); font-size:13px; }
.fx-spinner svg { animation: fxspin 0.9s linear infinite; }

/* 대시보드 카드 페이드인 모션 */
@keyframes dashFadeIn { from { opacity: 0; } to { opacity: 1; } }
.dash-fadein { animation: dashFadeIn 0.45s ease-out; }
.dash-fadein-delay { animation: dashFadeIn 0.45s ease-out 0.3s both; }

/* 대시보드 막대 - 50:50에서 잠시 멈춰있다가 스윽 최종 비율로 안착 */
/* HTML 인라인 style의 --final-width로 최종 폭 지정 */
@keyframes dashBarSettle {
  0%, 33%  { width: 50%; }
  100%     { width: var(--final-width, 50%); }
}
.dash-bar-settle {
  animation: dashBarSettle 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.45s both;
}

/* 모든 표의 숫자 자릿수 균일 정렬 */
table {
  font-variant-numeric: tabular-nums;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--text2); }

/* 사용자 드롭다운 (상단 우측) */
.user-dropdown { position: relative; }
.user-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 0.5px solid var(--border);
  border-radius: 20px; padding: 0 10px 0 4px;
  height: 32px; box-sizing: border-box;
  font-size: 13px; color: var(--text); cursor: pointer;
  transition: all 0.2s;
}
.user-trigger:hover { border-color: var(--accent); }
.user-trigger .avatar-sm {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.user-trigger-name { font-weight: 600; }
.user-trigger-caret { font-size: 14px; transition: transform 0.2s; color: var(--text2); }
.user-dropdown.open .user-trigger-caret { transform: rotate(180deg); }
.user-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: 10px; min-width: 200px; padding: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); z-index: 100;
}
.user-dropdown.open .user-dropdown-menu { display: block; }
.user-dropdown-header {
  padding: 10px 12px 8px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.user-dropdown-name { font-size: 14px; font-weight: 700; color: var(--text); }
.user-dropdown-role {
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}
.user-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 6px;
  font-size: 13px; color: var(--text); cursor: pointer;
  transition: background 0.15s;
}
.user-dropdown-item:hover { background: var(--surface2); }
.user-dropdown-item i { font-size: 16px; color: var(--text2); }

/* 로그아웃 버튼 (상단 우측) */
.logout-btn {
  background: var(--surface2); border: 0.5px solid var(--border);
  border-radius: 20px; padding: 0 12px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  color: var(--text2); cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover { color: var(--danger, #dc2626); border-color: var(--danger, #dc2626); }
.logout-btn i { font-size: 16px; }
.theme-btn { display: none !important; }

/* ============================================================
   마카티 정산 — Stage 1 (공통 + 정산 리스트 탭)
   추가일: 2026-05-19
   ============================================================ */

/* --- 페이지 컨테이너 --- */
.makati-page { }

/* --- 탭 바 --- */
.makati-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.makati-tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--header-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.makati-tab:hover { border-color: var(--header-text); }
.makati-tab.active {
  background: var(--header-text);
  border-color: var(--header-text);
  color: #fff;
  font-weight: 600;
}

/* --- 날짜 네비게이션 --- */
.makati-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

/* --- 섹션 카드 (.card 위에 마진만 추가) --- */
.makati-section { padding: 20px; }

.makati-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.makati-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--header-text);
}

/* --- 메타 입력 row (기준환율 / 거래환율 / 저장 버튼) --- */
.makati-meta-row {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.makati-form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* --- 폼 필드 --- */
.makati-field { display: flex; flex-direction: column; }
.makati-field-grow { flex: 1; min-width: 160px; }
.makati-field-label {
  display: block;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 4px;
  font-weight: 600;
}

/* --- 인풋 (마카티 전용 컴팩트 스타일) --- */
.makati-input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.makati-input:focus { border-color: var(--accent); }
.makati-input::placeholder { color: var(--text2); }

.makati-input-rate {
  width: 140px;
  font-weight: 600;
  padding: 8px 10px;
  font-size: 14px;
}
.makati-date-input {
  font-size: 14px;
  color: var(--header-text);
}

.makati-readonly-rate {
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 140px;
  font-weight: 600;
  color: var(--header-text);
  box-sizing: border-box;
}

.makati-markup {
  color: var(--accent);
  font-weight: 600;
  font-size: 11px;
}

/* --- 작은 버튼 (마카티 전용 padding 축소) --- */
.makati-btn-sm { padding: 6px 12px; font-size: 13px; }

/* --- Stat 카드 그리드 --- */
.makati-stat-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.makati-stat-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.makati-stat-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* --- Stat 카드 본체 --- */
.makati-stat {
  background: var(--surface2);
  border-radius: 8px;
  padding: 14px;
}
.makati-stat-label {
  font-weight: 600;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 4px;
}
.makati-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--header-text);
}

/* Stat 변형: 정보 톤 (디파짓 같은 정보성) */
.makati-stat--info .makati-stat-value { color: var(--accent); }

/* Stat 변형: 강조 톤 (마감잔액) — accent-bg 사용해 연한 강조 */
.makati-stat--accent {
  background: var(--success-bg);
}
.makati-stat--accent .makati-stat-label { color: #0d7a4a; }
.makati-stat--accent .makati-stat-value { color: #0d7a4a; }

/* Stat 변형: 매출 (warning 톤) — 마감잔액과 구분하기 위해 warning 사용 */
.makati-stat--profit {
  background: var(--warning-bg);
}
.makati-stat--profit .makati-stat-label { color: #a16207; }
.makati-stat--profit .makati-stat-value { color: #a16207; }

/* --- 빈 상태 메시지 --- */
.makati-empty {
  font-weight: 600;
  color: var(--text2);
  font-size: 13px;
  padding: 20px;
  text-align: center;
  background: var(--surface2);
  border-radius: 6px;
}

/* --- 테이블 --- */
.makati-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.makati-table thead tr { background: var(--surface2); }
.makati-table th {
  padding: 8px 10px;
  color: var(--header-text);
  font-weight: 600;
}
.makati-table tbody tr { border-bottom: 1px solid var(--border); }
.makati-table td { padding: 8px 10px; }
.makati-cell-muted { color: var(--text2); }

.makati-table-total {
  background: var(--surface2);
  font-weight: 700;
}
.makati-table-total td {
  padding: 10px;
  color: var(--header-text);
}

/* --- 아이콘 버튼 (행 삭제 등) --- */
.makati-icon-btn {
  padding: 4px 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--danger);
  transition: background 0.15s;
}
.makati-icon-btn:hover { background: var(--danger-bg); }

/* --- Admin 전용 영역 (warning 톤 사용, 톤 다운) --- */
.makati-admin-panel {
  background: var(--warning-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.makati-admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.makati-admin-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 6px;
}
.makati-admin-hint {
  font-size: 11px;
  color: var(--warning);
  opacity: 0.85;
}
.makati-admin-list {
  margin-top: 10px;
  font-size: 13px;
}
.makati-admin-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}


/* --- 강조 버튼 (네비게이션 내 주요 액션) --- */
.makati-btn-emphasis {
  background: var(--accent-bg) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 600;
}
.makati-btn-emphasis:hover {
  background: var(--accent) !important;
  color: #fff !important;
}


/* --- 정산 리스트: 환율+stat / 입금 좌우 분할 --- */
.makati-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.makati-split > div { min-width: 0; }

/* 좁은 화면에서는 위아래로 다시 쌓기 */
@media (max-width: 1100px) {
  .makati-split { grid-template-columns: 1fr; }
}


/* --- 입금 추가 폼: 4개 인풋 균일 폭 + 추가 버튼 고정 --- */
.makati-deposit-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 70px;
  gap: 8px;
  align-items: end;
  margin-bottom: 16px;
}
.makati-deposit-form .makati-input { width: 100%; box-sizing: border-box; }
.makati-deposit-add {
  height: 32px;
  justify-content: center;
  padding: 0;
}

/* --- 입금 테이블: 4개 컬럼 균일 + 관리 컬럼 70px --- */
.makati-table th.makati-col-uniform,
.makati-table td.makati-col-uniform {
  width: calc((100% - 70px) / 4);
}


/* --- 테이블 세로 구분선 --- */
.makati-table th,
.makati-table td {
  border-right: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.makati-table th:last-child,
.makati-table td:last-child {
  border-right: none;
}


/* --- 월별 요약 테이블 컬럼 폭 (9컬럼) --- */
.makati-monthly-table { table-layout: fixed; }
/* 앞 3개: 일자 60px, 환율 2개 각 90px */
.makati-monthly-table th:nth-child(1),
.makati-monthly-table td:nth-child(1) { width: 50px; }
.makati-monthly-table th:nth-child(2),
.makati-monthly-table td:nth-child(2),
.makati-monthly-table th:nth-child(3),
.makati-monthly-table td:nth-child(3) { width: 80px; }
/* 뒤 6개(총입금/페소금액/페소원가/매출/디파짓/잔액): 나머지 폭 균등 분배 */
.makati-monthly-table th:nth-child(n+4),
.makati-monthly-table td:nth-child(n+4) { width: calc((100% - 210px) / 6); }


/* --- 통화 셀: 기호 없이 숫자만 우측 정렬 --- */
.makati-cur-num {
  display: block;
  text-align: right;
  font-variant-numeric: tabular-nums;
}


/* --- 월별 요약: 페소금액/원가 셀 아래 markup 작게 --- */
.makati-markup-block {
  display: block;
  text-align: right;
  font-size: 10px;
  margin-top: 2px;
}


/* --- 월별 요약: 셀 상단 정렬 (markup 2줄/1줄 혼합 정렬 맞춤) --- */
.makati-monthly-table td { vertical-align: top; }


/* --- 디파짓 리스트 테이블 컬럼 폭 (6컬럼) --- */
.makati-deposit-table { table-layout: fixed; }
.makati-deposit-table td { vertical-align: top; }
.makati-deposit-table th:nth-child(1),
.makati-deposit-table td:nth-child(1) { width: 50px; }
.makati-deposit-table th:nth-child(2),
.makati-deposit-table td:nth-child(2),
.makati-deposit-table th:nth-child(3),
.makati-deposit-table td:nth-child(3) { width: 80px; }
.makati-deposit-table th:nth-child(6),
.makati-deposit-table td:nth-child(6) { width: 60px; }


/* --- 월별 요약 + 디파짓 좌우 분할 --- */
.makati-merge-split {
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: 16px;
  align-items: start;
}
.makati-merge-split > div { min-width: 0; }
@media (max-width: 1400px) {
  .makati-merge-split { grid-template-columns: 1fr; }
}


/* --- 디파짓 추가 폼: 3개 입력 균일 + 추가 버튼 고정 --- */
.makati-deposit-out-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 70px;
  gap: 8px;
  align-items: end;
}
.makati-deposit-out-form .makati-input { width: 100%; box-sizing: border-box; }


/* --- 월별 요약 + 디파짓 테이블 폰트 축소 (좌우 합침 대응) --- */
.makati-monthly-table th,
.makati-monthly-table td,
.makati-deposit-table th,
.makati-deposit-table td {
  font-size: 12px;
}


/* --- 디파짓 영역: 월별 네비 높이만큼 상단 여백 (정렬 맞춤) --- */
.makati-merge-split > div:nth-child(2) {
  padding-top: 52px;
}
@media (max-width: 1400px) {
  .makati-merge-split > div:nth-child(2) {
    padding-top: 0;
  }
}


