/* =========================================
   MYN TRAVEL ERP - Global Stylesheet
   ========================================= */

/* --- CSS Variables --- */
:root {
  --navy:         #1a2b4a;
  --navy-light:   #243660;
  --orange:       #e8913a;
  --orange-light: #f5a855;
  --orange-bg:    #fff7ee;
  --success:      #28a745;
  --success-bg:   #e8f5ec;
  --danger:       #dc3545;
  --danger-bg:    #fdf0f1;
  --warning:      #ffc107;
  --info:         #4a90e2;
  --info-bg:      #eaf2fc;

  --bg-main:      #f0f2f5;
  --bg-white:     #ffffff;
  --border:       #d8dde6;
  --border-light: #eaecf0;
  --text-primary: #1a2b4a;
  --text-secondary:#6b7a99;
  --text-light:   #a0abbe;

  --shadow-sm:    0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.16);

  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;

  --sidebar-w:    220px;
  --header-h:     52px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Meiryo UI', 'Meiryo', 'Segoe UI', 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* --- App Layout --- */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =========================================
   SIDEBAR
   ========================================= */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--navy);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s ease;
  z-index: 100;
}

.sidebar-logo {
  padding: 0 16px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.sidebar-logo .logo-icon {
  width: 32px; height: 32px;
  background: var(--orange);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: white; font-weight: 700; flex-shrink: 0;
}
.sidebar-logo .logo-text {
  font-size: 0.82rem; font-weight: 700; color: white; line-height: 1.2;
}
.sidebar-logo .logo-text span {
  display: block; font-size: 0.62rem; color: rgba(255,255,255,0.5); font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.nav-section {
  padding: 6px 12px 2px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  margin-top: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 0;
  text-decoration: none;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}
.nav-item.active {
  background: rgba(232,145,58,0.18);
  color: var(--orange-light);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--orange);
  border-radius: 0 2px 2px 0;
}
.nav-item .nav-icon { font-size: 0.95rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .nav-label { flex: 1; }
.nav-item .nav-badge {
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
}

.sidebar-user {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sidebar-user .user-avatar {
  width: 32px; height: 32px;
  background: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: white; font-weight: 700; flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; overflow: hidden; }
.sidebar-user .user-name { font-size: 0.75rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: 0.62rem; color: rgba(255,255,255,0.5); }
.sidebar-user .logout-btn {
  background: none; border: none;
  font-size: 0.78rem; color: rgba(255,255,255,0.4);
  padding: 4px; cursor: pointer; border-radius: 4px;
}
.sidebar-user .logout-btn:hover { color: var(--danger); background: rgba(220,53,69,0.1); }

/* =========================================
   TOP HEADER
   ========================================= */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.top-header {
  height: var(--header-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.top-header .page-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}
.top-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-header .header-date {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* =========================================
   PAGE BODY
   ========================================= */
.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.page-body::-webkit-scrollbar { width: 6px; }
.page-body::-webkit-scrollbar-track { background: transparent; }
.page-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* =========================================
   SEARCH BAR
   ========================================= */
.search-bar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--bg-white);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

/* =========================================
   CARDS
   ========================================= */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}
.card-body { padding: 16px 18px; }

/* =========================================
   DATA TABLE
   ========================================= */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.data-table th {
  background: var(--bg-main);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.72rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.data-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.data-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
.data-table tbody tr:hover {
  background: rgba(232,145,58,0.05);
}
.data-table .amount {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* =========================================
   FORM CONTROLS
   ========================================= */
.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 3px;
}
.form-control {
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-primary);
  background: white;
  transition: border-color 0.15s;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,145,58,0.12);
}
.form-control[disabled] {
  background: var(--bg-main);
  color: var(--text-light);
}
select.form-control { cursor: pointer; }
input[type="date"].form-control { cursor: pointer; }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary   { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--navy-light); }

.btn-orange    { background: var(--orange); color: white; }
.btn-orange:hover { background: var(--orange-light); }

.btn-success   { background: var(--success); color: white; }
.btn-success:hover { filter: brightness(0.9); }

.btn-danger    { background: var(--danger); color: white; }
.btn-danger:hover { filter: brightness(0.9); }

.btn-secondary { background: var(--bg-main); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border-light); }

.btn-sm { padding: 4px 10px; font-size: 0.72rem; }
.btn-lg { padding: 10px 20px; font-size: 0.9rem; }

/* =========================================
   BUTTON STYLE GUIDE (통일 규칙 v2)
   각 버튼은 명확한 역할이 있습니다:
   - Search  : 검색 실행 (청록색)
   - Clear   : 검색 결과 지우기 (회색)
   - Reset   : 입력 폼 되돌리기 (주황색)
   - Save    : 저장/등록 (초록색)
   - Edit    : 변경/편집 (보라색)
   - Delete  : 삭제 (빨간색)
   - Cancel  : 취소/모달 닫기 (회색)
   ========================================= */

/* 🩵 Search - 검색 실행 (청록색) */
.btn-search {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: #17A2B8;
  color: white;
}
.btn-search:hover { background: #138496; }
.btn-search:active { transform: scale(0.97); }

/* ⚪ Clear - 검색 결과 지우기 (회색) */
.btn-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: #6c757d;
  color: white;
}
.btn-clear:hover { background: #5a6268; }
.btn-clear:active { transform: scale(0.97); }

/* 🟠 Reset - 입력 폼 되돌리기 (주황색) */
.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: #e8913a;
  color: white;
}
.btn-reset:hover { background: #d47f28; }
.btn-reset:active { transform: scale(0.97); }

/* 🟢 Save - 저장/등록 (초록색) */
.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: #28a745;
  color: white;
}
.btn-save:hover { background: #218838; }
.btn-save:active { transform: scale(0.97); }

/* 🟣 Edit - 변경/편집 (보라색) */
.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: #8b5cf6;
  color: white;
}
.btn-edit:hover { background: #7c3aed; }
.btn-edit:active { transform: scale(0.97); }

/* 🔴 Delete - 삭제 (빨간색) */
.btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: #dc3545;
  color: white;
}
.btn-delete:hover { background: #c82333; }
.btn-delete:active { transform: scale(0.97); }

/* ⚪ Cancel - 취소/모달 닫기 (회색) */
.btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: white;
  color: #6c757d;
}
.btn-cancel:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.btn-cancel:active { transform: scale(0.97); }

/* 크기 옵션 (작음 / 큼) */
.btn-search.btn-sm, .btn-clear.btn-sm, .btn-reset.btn-sm,
.btn-save.btn-sm, .btn-edit.btn-sm, .btn-delete.btn-sm, .btn-cancel.btn-sm {
  padding: 4px 10px;
  font-size: 0.72rem;
}

.btn-search.btn-lg, .btn-clear.btn-lg, .btn-reset.btn-lg,
.btn-save.btn-lg, .btn-edit.btn-lg, .btn-delete.btn-lg, .btn-cancel.btn-lg {
  padding: 10px 22px;
  font-size: 0.9rem;
}

/* =========================================
   BADGES / STATUS
   ========================================= */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
}
.badge-success  { background: #d4edda; color: #155724; }
.badge-danger   { background: #f8d7da; color: #721c24; }
.badge-warning  { background: #fff3cd; color: #856404; }
.badge-info     { background: #cce5ff; color: #004085; }
.badge-secondary{ background: #e2e3e5; color: #383d41; }
.badge-navy     { background: #1a2b4a; color: white; }
.badge-orange   { background: #fff7ee; color: var(--orange); border: 1px solid var(--orange); }

/* 예약 이력 배지 */
.hist-nb    { background: #d4edda; color: #155724; }
.hist-rv    { background: #cce5ff; color: #004085; }
.hist-fnl   { background: #e2e3e5; color: #383d41; }
.hist-cxl   { background: #f8d7da; color: #721c24; }
.hist-cxlchg{ background: #fff3cd; color: #856404; }

/* =========================================
   MODAL
   ========================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 640px;
  max-width: 95vw;
  max-height: 92vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-sm { width: 420px; }
.modal-lg { width: 860px; }
.modal-xl { width: 1100px; }

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--navy); }
.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-light);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }

.modal-body { padding: 20px; }

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: white;
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
#toastContainer {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 100000;   /* 9999 → 100000 : 精算書·支出明細書·完了報告書 팝업(10000~10100) 뒤에 숨던 것 (june님 2026-11-08) */
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  max-width: 340px;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.info    { background: var(--info); }
.toast.warning { background: var(--warning); color: #333; }
@keyframes toastIn  { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateX(20px); } }

/* =========================================
   UTILITIES
   ========================================= */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }
.text-navy   { color: var(--navy); }
.text-orange { color: var(--orange); }
.fw-bold     { font-weight: 700; }
.fw-600      { font-weight: 600; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mb-8        { margin-bottom: 8px; }
.mb-16       { margin-bottom: 16px; }

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-light);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.85rem; }

/* =========================================
   LOGIN PAGE (별도)
   ========================================= */
body.login-page {
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, #243660 50%, #2d4070 100%);
}
.login-card {
  background: white;
  border-radius: 16px;
  padding: 44px 40px;
  width: 380px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}
.login-card .login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-card .login-logo .logo-box {
  width: 56px; height: 56px;
  background: var(--navy);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 10px;
}
.login-card .login-logo h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
}
.login-card .login-logo p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.login-field { margin-bottom: 18px; }
.login-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.login-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  transition: border-color 0.15s;
}
.login-field input:focus { outline: none; border-color: var(--navy); }
.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}
.login-btn:hover { background: var(--orange); }
.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  display: none;
}
.login-footer {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-light);
  margin-top: 28px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .sidebar { width: 56px; min-width: 56px; }
  .sidebar .nav-label, .sidebar .logo-text,
  .sidebar .nav-section, .sidebar .user-info { display: none; }
  .sidebar-logo { justify-content: center; padding: 0; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item .nav-icon { width: auto; }
  .sidebar-user { justify-content: center; padding: 10px; }
}


/* =========================================
   SIDEBAR - 섹션 접기/펼치기
   ========================================= */
.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  margin-top: 6px;
  transition: color 0.15s;
  user-select: none;
}
.nav-section-header:hover {
  color: rgba(255,255,255,0.75);
}
.nav-section-header.open {
  color: rgba(255,255,255,0.55);
}
.sb-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s;
}
.nav-section-body {
  overflow: hidden;
}

/* ============================================================
   ✉ メッセージ (알림)   2026-10-10
   머리말의 종 아이콘 + 메시지 팝업. 모든 화면 공통.
   ============================================================ */
.msg-wrap { position: relative; display: inline-block; margin-left: 4px; }
/* 눈에 띄게 — 네모난 버튼에 큼직한 ✉ (june님 2026-10-10) */
.msg-bell { position: relative; background: var(--navy); border: 1px solid var(--navy);
            border-radius: 7px; width: 44px; height: 34px; cursor: pointer;
            font-size: 1.25rem; line-height: 1; color: #fff; }
.msg-bell:hover { background: #2c4475; }
/* 안 읽은 게 있으면 색만 바뀐다.
   ※ 깜빡이게 했다가 뺐다 — 급하지 않은 것까지 신경 쓰이면 피곤하다 (june님 2026-10-10) */
.msg-bell.has { background: #dc3545; border-color: #dc3545; }
.msg-badge { position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px;
             padding: 0 5px; border-radius: 11px; background: #fff; color: #dc3545;
             border: 2px solid #dc3545;
             font-size: 0.72rem; font-weight: 800; line-height: 17px; }

.msg-box { display: none; position: absolute; right: 0; top: 40px; width: 420px;
           max-height: 460px; background: #fff; border: 1px solid #d8dadd; border-radius: 7px;
           box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 8000; overflow: hidden;
           flex-direction: column; text-align: left; }
.msg-box.open { display: flex; }
.msg-box-hd { padding: 8px 12px; background: #f4f5f6; border-bottom: 1px solid #e4e6e8;
              font-size: 0.8rem; font-weight: 700; color: #222; display: flex; align-items: center; }
.msg-readall { margin-left: auto; font-size: 0.68rem; padding: 2px 8px; cursor: pointer;
               border: 1px solid #c3c6ca; background: #fff; border-radius: 3px; color: #444; }
.msg-list { overflow: auto; flex: 1; }
.msg-empty { padding: 28px 0; text-align: center; color: #999; font-size: 0.78rem; }
.msg-box-ft { padding: 7px 12px; border-top: 1px solid #e4e6e8; background: #fafbfb; text-align: center; }
.msg-box-ft a { font-size: 0.74rem; color: #1d4ed8; text-decoration: none; font-weight: 600; }

.msg-item { border-bottom: 1px solid #f0f1f2; }
.msg-line { display: flex; align-items: center; gap: 6px; padding: 7px 11px; cursor: pointer; }
.msg-line:hover { background: #fafbfc; }
.msg-item.unread .msg-line { background: #f3f7ff; }
.msg-item.unread .msg-ttl { font-weight: 700; }
.msg-ref { font-size: 0.68rem; color: #555; font-family: monospace; white-space: nowrap; }
/* 国内事務所 코드 — 「(S)」「(S·P)」. 번호 바로 뒤 (2026-10-16) */
.msg-off { font-size: 0.66rem; font-weight: 700; color: #2C5282; margin-left: 3px; white-space: nowrap; }
.msg-ttl { font-size: 0.76rem; color: #222; flex: 1; overflow: hidden;
           text-overflow: ellipsis; white-space: nowrap; }
.msg-time { font-size: 0.65rem; color: #999; white-space: nowrap; }

/* 상태 뱃지 — 予約検索 목록과 같은 색 */
.msg-st { font-size: 0.6rem; font-weight: 800; padding: 1px 5px; border-radius: 3px;
          border: 1px solid; white-space: nowrap; }
.st-NB     { color:#475569; border-color:#cbd5e1; background:#f8fafc; }
.st-FNL    { color:#1d4ed8; border-color:#bfdbfe; background:#eff6ff; }
.st-RV     { color:#7e22ce; border-color:#e9d5ff; background:#faf5ff; }
.st-CXL    { color:#dc2626; border-color:#fecaca; background:#fef2f2; }
.st-CXLCHG { color:#b45309; border-color:#fde68a; background:#fffbeb; }
.st-請求   { color:#047857; border-color:#a7f3d0; background:#ecfdf5; }

.msg-detail { display: none; padding: 0 11px 9px 11px; }
.msg-detail.open { display: block; }
.msg-body { font-size: 0.74rem; color: #444; line-height: 1.7; white-space: pre-wrap; }
.msg-acts { margin-top: 7px; display: flex; align-items: center; gap: 8px; }
.msg-go { font-size: 0.72rem; color: #1d4ed8; text-decoration: none; font-weight: 600; }
.msg-confirm { font-size: 0.72rem; font-weight: 700; padding: 3px 12px; cursor: pointer;
               background: #1d4ed8; color: #fff; border: 1px solid #1d4ed8; border-radius: 4px; }
.msg-done { font-size: 0.72rem; color: #047857; font-weight: 600; }

/* AGT 를 고르면 団体番号에 들어갈 약자를 옆에 보여준다 (2026-10-11) */
.code-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 28px; padding: 0 7px; margin-left: -2px;
  background: var(--navy); color: #fff; border-radius: 4px;
  font-size: 0.82rem; font-weight: 800; letter-spacing: .5px;
}

/* ============================================================
   生年月日 손입력 칸 (june님 2026-10-29)
   숫자 8자만 치면 하이픈이 들어간다. 📅 를 누르면 달력도 열린다.
   ============================================================ */
.bd-wrap { position: relative; display: block; width: 100%; }
.bd-wrap .bd-text { width: 100%; padding-right: 22px !important; }
.bd-wrap .bd-text.bd-bad { border-color: #DC3545; background: #fff5f5; }
.bd-wrap .bd-pick {
    position: absolute; right: 0; bottom: 0;
    width: 1px; height: 1px; opacity: 0; pointer-events: none; border: none; padding: 0;
}
.bd-wrap .bd-btn {
    position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
    border: none; background: transparent; cursor: pointer;
    font-size: 0.78rem; line-height: 1; padding: 1px 2px; opacity: .55;
}
.bd-wrap .bd-btn:hover { opacity: 1; }
