/* style.css - 예원예술대 산학협력단 회계관리 시스템 디자인 시스템 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS 변수 ── */
:root {
  --bg-base: #eef2f7;
  --bg-surface: #ffffff;
  --bg-elevated: #f4f7fb;
  --border: #e0e7ef;
  --border-light: #c8d5e8;

  --text-primary: #1a2236;
  --text-secondary: #4a5878;
  --text-muted: #8fa3bf;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.18);

  --grad-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grad-blue: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --grad-green: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-red: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  --grad-sidebar: linear-gradient(180deg, #1e2a45 0%, #16213a 60%, #0f172a 100%);

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;

  --shadow: 0 8px 32px rgba(37, 99, 235, 0.10);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-card: 0 4px 24px rgba(37, 99, 235, 0.08);

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 240px;
  --header-h: 64px;
}

/* ── 초기화 ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: linear-gradient(135deg, #e8edf5 0%, #dce6f5 50%, #e4e8f4 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── 스크롤바 ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ── 레이아웃 ── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── 사이드바 ── */
#sidebar {
  width: var(--sidebar-w);
  background: var(--grad-sidebar);
  border-right: none;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-decoration: none;
}

.sidebar-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.sidebar-logo-text {
  line-height: 1.3;
}

.sidebar-logo-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.sidebar-logo-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 8px 14px 4px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  color: rgba(255, 255, 255, 0.55);
  margin: 1px 4px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.55), rgba(37, 99, 235, 0.18));
  color: #fff;
  border-left: 3px solid #60a5fa;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.18);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
}

.nav-badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

/* ── 메인 콘텐츠 ── */
.main-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── 헤더 ── */
#app-header {
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(224, 231, 239, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 16px rgba(37, 99, 235, 0.06);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 20px;
  padding: 4px;
}

.header-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── 콘텐츠 영역 ── */
#app-content {
  flex: 1;
  padding: 24px;
  transition: opacity 0.15s ease;
}

#app-content.fade-out {
  opacity: 0;
}

/* ── 페이지 헤더 ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── 카드 ── */
.card {
  background: var(--bg-surface);
  border: 1px solid rgba(224, 231, 239, 0.7);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.card-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* ── KPI 카드 ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid rgba(224, 231, 239, 0.6);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.14);
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.kpi-blue {
  background: var(--grad-blue);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.kpi-red {
  background: var(--grad-red);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.22);
}

.kpi-green {
  background: var(--grad-green);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.22);
}

.kpi-purple {
  background: var(--grad-purple);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.22);
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.kpi-unit {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 2px;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── 통계 카드 ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value.accent {
  color: var(--accent);
}

/* ── 차트 ── */
.charts-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
  margin-bottom: 20px;
}

.chart-card {
  /* chart wrapper */
}

.chart-container {
  height: 260px;
  position: relative;
}

/* ── 테이블 ── */
.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.04);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.row-duplicate td {
  background: rgba(239, 68, 68, 0.04);
}

.empty-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 40px !important;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── 필터 바 ── */
.filter-bar {
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-row .form-group {
  margin-bottom: 0;
}

/* ── 진행 바 ── */
.progress-bar-wrap {
  position: relative;
  background: var(--bg-elevated);
  border-radius: 99px;
  height: 20px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: 99px;
  transition: width 0.5s ease;
}

.progress-bar.progress-danger {
  background: linear-gradient(90deg, var(--danger), #f97316);
}

.progress-bar.progress-warning {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.progress-bar.progress-success {
  background: linear-gradient(90deg, var(--success), #4ade80);
}

.progress-text {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── 뱃지 ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.badge-danger {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.badge-warning {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
}

.badge-info {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

.badge-neutral {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-category {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
}

.badge-accent {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  font-size: 10px;
}

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 12px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-file {
  cursor: pointer;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 14px;
  transition: background var(--transition);
}

.btn-icon:hover {
  background: var(--bg-elevated);
}

.action-btns {
  display: flex;
  gap: 4px;
  justify-content: center;
}

/* ── 폼 ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 200px;
}

label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.required {
  color: var(--danger);
}

.form-control {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control-sm {
  /* inherits form-control base styles */
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  transition: border-color var(--transition);
}

.form-control-sm:focus {
  outline: none;
  border-color: var(--accent);
}

select.form-control,
select.form-control-sm {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath d='M7 7l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
  padding-right: 28px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.search-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  width: 280px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── 카테고리 체크박스 ── */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip input {
  display: none;
}

.category-chip span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.category-chip input:checked+span {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.category-chip span:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* ── 모달 ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.2s ease;
}

.modal.large {
  max-width: 720px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── 드롭존 ── */
.upload-area-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.drop-zone-card {
  border: 2px dashed var(--border);
  transition: all var(--transition);
  cursor: pointer;
  text-align: center;
}

.drop-zone-card:hover,
.drop-zone-card.drag-over {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
}

.drop-zone-inner {
  padding: 40px 20px;
}

.drop-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.drop-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.drop-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ── 은행 설정 목록 ── */
.config-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ── 요약 바 ── */
.summary-bar {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  padding: 4px 0;
}

.summary-item {
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-item strong {
  color: var(--text-primary);
}

.summary-item.text-success strong {
  color: var(--success);
}

.summary-item.text-danger strong {
  color: var(--danger);
}

/* ── 페이지네이션 ── */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── 지출결의서 레이아웃 ── */
.voucher-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.voucher-left .card,
.voucher-right .card {
  margin-bottom: 0;
}

.voucher-preview-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.voucher-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.voucher-empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ── 지출결의서 본문 스타일 ── */
.voucher-doc {
  background: white;
  color: #1a1a1a;
  font-family: 'Noto Sans KR', serif;
  padding: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.voucher-header-section {
  text-align: center;
  margin-bottom: 16px;
}

.voucher-school-name {
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.voucher-dept {
  font-size: 11px;
  color: #666;
}

.voucher-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 6px;
  margin: 10px 0 8px;
  padding: 8px 0;
  border-top: 2.5px solid #1a1a1a;
  border-bottom: 2.5px solid #1a1a1a;
  color: #1a1a1a;
}

.voucher-meta {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 12px;
  color: #333;
}

.meta-label {
  font-weight: 600;
  margin-right: 6px;
}

.voucher-approval-grid {
  display: flex;
  border: 1px solid #999;
  margin: 12px 0;
  border-radius: 4px;
  overflow: hidden;
}

.approval-cell {
  flex: 1;
  border-right: 1px solid #999;
  text-align: center;
}

.approval-cell:last-child {
  border-right: none;
}

.approval-label {
  background: #f0f0f0;
  padding: 3px;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid #999;
  color: #333;
}

.approval-sign {
  height: 44px;
}

.voucher-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 12px;
}

.voucher-info-table th,
.voucher-info-table td {
  border: 1px solid #999;
  padding: 6px 10px;
}

.voucher-info-table th {
  background: #f5f5f5;
  font-weight: 700;
  width: 18%;
  text-align: center;
  color: #333;
}

.voucher-info-table td {
  color: #1a1a1a;
}

.amount-cell {
  padding: 8px 12px;
}

.korean-amount {
  font-weight: 800;
  font-size: 14px;
  color: #1a1a1a;
}

.num-amount {
  font-size: 12px;
  color: #555;
  margin-left: 10px;
}

.voucher-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  margin: 12px 0 6px;
}

.voucher-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.voucher-detail-table th,
.voucher-detail-table td {
  border: 1px solid #999;
  padding: 5px 8px;
  color: #1a1a1a;
}

.voucher-detail-table th {
  background: #f5f5f5;
  font-weight: 700;
  text-align: center;
  color: #333;
}

.voucher-detail-table .text-right {
  text-align: right;
}

.voucher-detail-table .text-center {
  text-align: center;
}

.total-row th {
  background: #e8e8e8;
  font-size: 12px;
  font-weight: 800;
}

.voucher-note-section {
  margin-top: 12px;
  font-size: 12px;
  color: #333;
}

.voucher-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #333;
}

.voucher-date {
  font-size: 13px;
  margin: 8px 0 14px;
  font-weight: 600;
}

.voucher-sign-section {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 8px 0 16px;
}

.sign-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.sign-line {
  width: 100px;
  border-bottom: 1px solid #333;
  display: inline-block;
  height: 16px;
}

.voucher-school-footer {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 8px;
}

/* ── 공통 ── */
.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-sm {
  font-size: 12px;
}

.text-muted {
  color: var(--text-muted);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.hint-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  margin-bottom: 16px;
}

/* ── 토스트 ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: var(--shadow);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 240px;
  max-width: 360px;
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-error {
  border-left: 3px solid var(--danger);
}

.toast-info {
  border-left: 3px solid var(--info);
}

.toast-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-info .toast-icon {
  color: var(--info);
}

/* ── 반응형 ── */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .voucher-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .main-area {
    margin-left: 0;
  }

  #sidebar-toggle {
    display: block;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  #app-content {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
  }

  .filter-row {
    flex-direction: column;
  }
}

/* ── 인쇄 숨김 ── */
@media print {

  #sidebar,
  #app-header,
  .voucher-preview-actions,
  .page-header {
    display: none;
  }
}

/* ── 로그인 화면 ── */
#login-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #1e2a6e 70%, #2d1b69 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  overflow: hidden;
}

#login-screen::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  top: -200px;
  right: -150px;
  pointer-events: none;
}

#login-screen::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
}

.login-logo {
  margin-bottom: 12px;
}

.login-logo img {
  height: 80px;
  object-fit: contain;
}

.login-logo-fallback {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #60a5fa, #818cf8);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.login-school {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 32px;
  letter-spacing: -0.3px;
}

.login-form {
  text-align: left;
}

.login-form .form-group {
  margin-bottom: 16px;
}

.login-form label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  display: block;
  margin-bottom: 7px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.95);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.login-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.7);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.login-btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 10px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
}

.login-btn:active {
  transform: translateY(0);
}

.login-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.login-error.show {
  display: block;
}

.login-footer {
  margin-top: 24px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.7;
}

.login-footer strong {
  color: rgba(255, 255, 255, 0.6);
}

/* ── 헤더 사용자 영역 ── */
.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.header-user-name {
  font-weight: 600;
  color: var(--text-primary);
}

.header-user-role {
  font-size: 10px;
  color: white;
  background: var(--accent);
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: 600;
}

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.btn-logout:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ── 사용자 관리 추가 스타일 ── */
.info-card {
  background: rgba(37, 99, 235, 0.03);
  border-color: rgba(37, 99, 235, 0.15);
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── 라디오 버튼 ── */
.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: normal;
}

.radio-label input[type="radio"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}