:root {
  color-scheme: light;
  --bg-body: #f5f7fb;
  --bg-surface: #ffffff;
  --bg-subtle: #eef1f8;
  --border: #e2e8f0;
  --border-strong: #cbd5f5;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  --text-faint: #94a3b8;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-blue: #0ea5e9;
  --accent-green: #22c55e;
  --accent-orange: #f97316;
  --accent-pink: #ec4899;
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.08);
  --radius-lg: 20px;
  --sidebar-width: 174px;
  --sidebar-collapsed-width: 70px;
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-body);
  color: var(--text-primary);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  zoom: 0.8;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* ===== Sales Page Styles ===== */
.sales-page {
  padding: 0 16px;
  background: var(--bg-body);
}

/* Sales Header */
.sales-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 20px 0;
}

.sales-tabs {
  display: flex;
  gap: 8px;
}

.sales-tab {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
}

.sales-tab.active {
  color: var(--accent-purple);
  background: var(--bg-surface);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.sales-tab:hover {
  color: var(--accent-purple);
}

.sales-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 300px;
}

.sales-search i {
  color: var(--text-tertiary);
  font-size: 14px;
}

.sales-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: var(--text-primary);
}

.sales-search input::placeholder {
  color: var(--text-faint);
}

/* Sales Filters */
.sales-filters {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 16px;
  margin: 12px;
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Date Range */
.date-range {
  flex: 0 0 auto;
}

.date-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.date-input-group input[type="date"] {
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  font-weight: 500;
}

.date-separator {
  color: var(--text-tertiary);
  font-weight: 600;
}

/* Quick Date Buttons */
.quick-dates {
  flex: 1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-date-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s;
}

.quick-date-btn.active {
  color: white;
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.quick-date-btn:hover {
  background: var(--accent-purple);
  color: white;
  border-color: var(--accent-purple);
}

/* Filter Select */
.filter-select {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
}

.filter-select:hover {
  border-color: var(--accent-purple);
}

.filter-select:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Filter Actions */
.filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.action-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.reset-btn {
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.reset-btn:hover {
  background: #f1f3f5;
  border-color: #cbd5e0;
}

.download-btn {
  color: white;
  background: var(--accent-purple);
  border: 1px solid var(--accent-purple);
}

.download-btn:hover {
  background: #7c3aed;
}

/* Sales Summary */
.sales-summary {
  display: grid;
  grid-template-columns: 1.0fr 1.0fr 0.65fr 0.8fr 0.75fr 0.65fr 0.65fr 1.1fr;
  gap: 4px;
  margin: 0 12px 12px 12px;
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 4px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.summary-card.highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fbbf24;
}

.summary-label {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 3px;
}

.summary-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-value.revenue {
  color: var(--accent-blue);
}

.summary-value.profit {
  color: var(--accent-green);
}

.summary-value.discount {
  color: var(--accent-orange);
}

.summary-value.unpaid {
  color: #dc2626;
}

.payment-detail {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: 4px;
}

/* Sales Table */
.sales-table-container {
  background: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 0 12px 20px 12px;
}

.sales-table {
  width: 100%;
  border-collapse: collapse;
}

.sales-table thead {
  background: var(--bg-subtle);
  border-bottom: 2px solid var(--border);
}

.sales-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sales-table th:first-child,
.sales-table td:first-child {
  text-align: center;
}

.sales-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.sales-table tbody tr:hover {
  background: #f9fafb;
}

.sales-table tbody tr.unpaid-row {
  background: #fef2f2;
}

.sales-table tbody tr.unpaid-row:hover {
  background: #fee2e2;
}

.sales-table td {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: middle;
}

/* Payment ID Container */
.payment-id-container {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}

.payment-id {
  font-weight: 600;
  color: var(--accent-purple);
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 10px;
  white-space: nowrap;
}

.installment-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: white;
  background: #f97316;
  border-radius: 4px;
  white-space: nowrap;
}

/* Member Info */
.member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.member-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.member-account {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Member Info Simple (without avatar) */
.member-info-simple {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member-phone {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Member Info Compact (name + last 4 digits) */
.member-info-compact {
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-info-compact .member-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.member-phone-short {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: 'Courier New', monospace;
}

/* Type Badge */
.type-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-purple);
  background: #f3e8ff;
  border-radius: 6px;
}

/* Sales Item */
.sales-item {
  font-weight: 500;
  color: var(--text-primary);
}

/* Product Amount */
.product-amount {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Amount */
.amount {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.amount.unpaid-amount {
  color: #dc2626;
  text-decoration: line-through;
}

/* Payment Method */
.payment-method {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

.payment-method.card {
  color: #0ea5e9;
  background: #e0f2fe;
}

.payment-method.cash {
  color: #22c55e;
  background: #dcfce7;
}

.payment-method.unpaid {
  color: #dc2626;
  background: #fee2e2;
}

/* Payment Date */
.payment-date {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.payment-date.unpaid-date {
  color: #dc2626;
  font-weight: 600;
}

/* Status Icon */
.status-icon {
  display: inline-block;
  font-size: 18px;
}

.status-icon.registered {
  color: var(--accent-green);
}

.status-icon.not-registered {
  color: var(--text-faint);
}

/* Icon Button */
.icon-btn {
  padding: 6px;
  font-size: 16px;
  color: var(--accent-purple);
  background: transparent;
  border-radius: 6px;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: #f3e8ff;
}

.no-receipt {
  color: var(--text-faint);
  font-size: 14px;
}

/* Receipt Cell */
.receipt-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.receipt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.receipt-btn.view {
  background: #e0f2fe;
  color: #0284c7;
}

.receipt-btn.view:hover {
  background: #bae6fd;
  transform: scale(1.05);
}

.receipt-btn.upload {
  background: #dbeafe;
  color: #2563eb;
}

.receipt-btn.upload:hover {
  background: #bfdbfe;
  transform: scale(1.05);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
  margin: 0;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover {
  background: var(--accent-purple);
  color: white;
  border-color: var(--accent-purple);
}

.page-btn.active {
  background: var(--accent-purple);
  color: white;
  border-color: var(--accent-purple);
}

/* ===== Settlement Page Styles ===== */
.settlement-page {
  padding: 24px;
  background: var(--bg-body);
}

/* Settlement Header */
.settlement-header {
  margin-bottom: 20px;
}

.settlement-tabs {
  display: flex;
  gap: 8px;
}

.settlement-tab {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
}

.settlement-tab.active {
  color: var(--accent-purple);
  background: var(--bg-surface);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.settlement-tab:hover {
  color: var(--accent-purple);
}

/* Settlement Filters */
.settlement-filters {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.filter-top-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-bottom-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Settlement Type Radio */
.settlement-type-radio {
  display: flex;
  gap: 16px;
  align-items: center;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.radio-text {
  user-select: none;
}

.info-icon {
  color: var(--text-tertiary);
  font-size: 13px;
  cursor: help;
}

/* Calendar Icon */
.calendar-icon {
  color: var(--text-tertiary);
  font-size: 14px;
}

/* Filter Actions Right */
.filter-actions-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* Settlement Summary */
.settlement-summary {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-surface);
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 150px;
}

.summary-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 600;
}

.summary-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-value.primary {
  color: var(--accent-blue);
}

.summary-value.warning {
  color: var(--accent-orange);
}

.summary-value.highlight {
  color: var(--accent-purple);
}

/* Settlement Table */
.settlement-table-container {
  background: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow-x: auto;
}

.settlement-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1400px;
}

.settlement-table thead {
  background: var(--bg-subtle);
  border-bottom: 2px solid var(--border);
}

.settlement-table th {
  padding: 14px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.3;
}

.settlement-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.settlement-table tbody tr:hover {
  background: #f9fafb;
}

.settlement-table td {
  padding: 14px 12px;
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: middle;
}

.settlement-table .text-center {
  text-align: center;
}

.settlement-table .text-right {
  text-align: right;
}

.settlement-table .amount-cell {
  font-weight: 500;
  font-family: 'Monaco', 'Courier New', monospace;
}

.settlement-table .amount-cell.strong {
  font-weight: 700;
  color: var(--accent-purple);
}

/* Settlement Status Badge */
.settlement-status {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

.settlement-status.pending {
  color: #8b5cf6;
  background: #f3e8ff;
}

.settlement-status.completed {
  color: #22c55e;
  background: #dcfce7;
}

.settlement-status.waiting {
  color: #f97316;
  background: #fed7aa;
}

/* Payment Badge */
.payment-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

.payment-badge.platform {
  color: #f97316;
  background: #fed7aa;
}

.payment-badge.card {
  color: #0ea5e9;
  background: #e0f2fe;
}

/* Responsive */
@media (max-width: 900px) {
  .sales-summary {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .quick-dates {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .sales-summary {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .sales-table-container {
    overflow-x: auto;
  }
  
  .sales-table {
    min-width: 1200px;
  }
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-indigo);
  outline-offset: 2px;
}

input {
  font: inherit;
  border: none;
}

.layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 20px 32px;
  gap: 24px;
  transition: width 0.2s ease;
}

.sidebar__brand {
  display: flex;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
}

.brand__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__name {
  font-weight: 700;
  font-size: 1rem;
}

.brand__subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.sidebar__section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar__section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar__menu-link:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.sidebar__menu-item.is-active .sidebar__menu-link {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.18));
  color: var(--accent-indigo);
  font-weight: 600;
}

.sidebar__icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: var(--bg-subtle);
}

.sidebar__icon.tone-indigo {
  color: var(--accent-indigo);
}

.sidebar__icon.tone-purple {
  color: var(--accent-purple);
}

.sidebar__icon.tone-blue {
  color: var(--accent-blue);
}

.sidebar__icon.tone-green {
  color: var(--accent-green);
}

.sidebar__icon.tone-orange {
  color: var(--accent-orange);
}

.sidebar__icon.tone-pink {
  color: var(--accent-pink);
}

.sidebar__icon.tone-slate {
  color: var(--text-tertiary);
}

.sidebar__label {
  flex: 1;
  font-weight: 500;
}

.sidebar__badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.sidebar__menu-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar__menu-item.is-leaf {
  gap: 0;
}

.sidebar__menu-item.is-open > .sidebar__menu-link {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.14));
}

.sidebar__menu-link.sidebar__menu-toggle {
  width: 100%;
}

.sidebar__label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  align-items: flex-start;
  text-align: left;
}

.sidebar__label {
  display: block;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.1;
}

.sidebar__access {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar__caret {
  font-size: 0.75rem;
  color: var(--text-faint);
  transition: transform 0.2s ease, color 0.2s ease;
  margin-left: auto;
}

.sidebar__menu-item.is-active > .sidebar__menu-link .sidebar__caret,
.sidebar__menu-item.is-open > .sidebar__menu-link .sidebar__caret {
  color: var(--accent-indigo);
}

.sidebar__menu-item.is-open > .sidebar__menu-link .sidebar__caret {
  transform: rotate(180deg);
}

.sidebar__submenu {
  list-style: none;
  margin: 0 0 0 40px;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.sidebar__menu-item.is-open > .sidebar__submenu {
  display: flex;
}

.sidebar__submenu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar__submenu-label {
  flex: 1;
  white-space: nowrap;
}

.sidebar__submenu-link:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.sidebar__submenu-item.is-active .sidebar__submenu-link {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.16));
  color: var(--accent-indigo);
  font-weight: 600;
}

.sidebar__footer {
  margin-top: auto;
}

.sidebar__cta {
  padding: 16px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar__cta-title {
  font-weight: 600;
}

.sidebar__cta-desc {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.sidebar__cta-link {
  font-size: 0.85rem;
  color: var(--accent-indigo);
  font-weight: 600;
}

.workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__search {
  background: var(--bg-subtle);
  border-radius: 16px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  color: var(--text-tertiary);
}

.topbar__search input {
  background: transparent;
  width: 220px;
  color: var(--text-primary);
}

.search-icon {
  font-size: 1rem;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  background: var(--bg-subtle);
}

.icon-button.subtle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.05);
}

.icon-bars,
.icon-bell {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
}

.icon-bars {
  background: linear-gradient(
    currentColor 0 2px,
    transparent 2px 6px,
    currentColor 6px 8px,
    transparent 8px 12px,
    currentColor 12px 14px
  );
  border-radius: 2px;
}

.icon-bell::before,
.icon-bell::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: currentColor;
}

.icon-bell::before {
  width: 14px;
  height: 12px;
  border-radius: 7px 7px 2px 2px;
  top: 2px;
}

.icon-bell::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  bottom: -4px;
}

.badge-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

.ghost-button {
  padding: 0 16px;
  height: 40px;
  border-radius: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.05);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.08);
}

.user-chip__avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.user-chip__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-chip__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.user-chip__role {
  font-size: 0.75rem;
  color: var(--accent-indigo);
}

.user-chip__chevron {
  font-size: 1.1rem;
  color: var(--text-tertiary);
}

.page-intro {
  padding: 28px 32px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.page-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.page-description {
  margin: 8px 0 0;
  color: var(--text-tertiary);
  font-size: 0.95rem;
}

.page-actions {
  display: flex;
  gap: 12px;
}

.action-group {
  display: flex;
  gap: 8px;
}

.btn {
  height: 40px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn.btn-ghost {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-indigo);
}

.main-content {
  flex: 1;
  padding: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tab-control {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 14px;
  gap: 4px;
}

.tab-control__item {
  padding: 8px 18px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.tab-control__item.is-active {
  background: var(--bg-surface);
  color: var(--accent-indigo);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.attendance-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.attendance-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.attendance-date {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
}

.attendance-date__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.attendance-date__meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.attendance-filters {
  display: flex;
  gap: 8px;
}

.chip-button {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  font-weight: 500;
}

.chip-button.is-active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
}

.attendance-summary {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.attendance-summary span {
  color: var(--text-secondary);
  font-weight: 500;
}

.attendance-summary strong {
  font-size: 1.2rem;
  color: var(--accent-indigo);
}

.attendance-summary__meta {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.attendance-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.attendance-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  min-height: 210px;
}

.attendance-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.attendance-card__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.attendance-card__header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.attendance-card__name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.attendance-card__name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.attendance-card__checkin {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-purple);
  white-space: nowrap;
}

.attendance-card__info {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.attendance-card__icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  background: var(--bg-subtle);
  border-radius: 4px;
  transition: all 0.2s;
}

.service-icon:hover {
  transform: scale(1.15);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.service-icon--pt {
  background: rgba(139, 92, 246, 0.1);
}

.service-icon--uniform {
  background: rgba(34, 197, 94, 0.1);
}

.service-icon--locker {
  background: rgba(249, 115, 22, 0.1);
}

.attendance-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.attendance-card__row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.attendance-card__row .label {
  color: var(--text-tertiary);
}

.attendance-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-green);
}

.tag.status-warning {
  background: rgba(249, 115, 22, 0.14);
  color: var(--accent-orange);
}

.tag.status-expired {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
}

.memo {
  color: var(--accent-purple);
  font-weight: 500;
}

.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.dashboard-top__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.dashboard-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}

.dashboard-tabs button {
  border: none;
  background: transparent;
  padding: 6px 18px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.dashboard-tabs button.is-active {
  background: var(--accent-indigo);
  color: #fff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.25);
}

.dashboard-announce {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.dashboard-top__right {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.dashboard-date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.dashboard-date-nav h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dashboard-kpi-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: stretch;
}

.dashboard-kpi-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.dashboard-notice__icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.dashboard-notice__text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

.dashboard-kpi-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  flex: 1;
}

@media (max-width: 1280px) {
  .dashboard-kpi-row {
    grid-template-columns: 1fr;
  }
  
  .dashboard-kpi-cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  
  .dashboard-kpi-row .kpi-card--todo {
    width: 100%;
    min-width: 0;
  }
}

.dashboard-kpi-cards .kpi-card {
  padding: 9px 11px;
  gap: 4px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dashboard-kpi-cards .kpi-card__header {
  gap: 2px;
}

.dashboard-kpi-cards .kpi-card__title {
  font-size: 0.72rem;
  line-height: 1.25;
}

.dashboard-kpi-cards .kpi-card__subtitle {
  font-size: 0.66rem;
  line-height: 1.25;
}

.dashboard-kpi-cards .kpi-card__value {
  font-size: 1.25rem;
  margin: 3px 0;
  line-height: 1.2;
}

.dashboard-kpi-cards .kpi-card__cta {
  padding: 5px 11px;
  font-size: 0.72rem;
  margin-top: auto;
}

.dashboard-kpi-cards .list-metric {
  gap: 6px;
  flex: 1;
}

.dashboard-kpi-cards .list-metric li {
  font-size: 0.73rem;
  line-height: 1.35;
}

.dashboard-kpi-cards .kpi-card--list .kpi-card__header h3 {
  font-size: 0.83rem;
}

.dashboard-kpi-cards .kpi-card--list .kpi-card__header span {
  font-size: 0.66rem;
}

.dashboard-kpi-cards .list-metric__label,
.dashboard-kpi-cards .list-metric__value,
.dashboard-kpi-cards .list-metric__accent {
  font-size: 0.73rem;
}

.dashboard-kpi-row .kpi-card--todo {
  gap: 12px;
  padding: 14px 16px;
  width: 380px;
  min-width: 380px;
}

.dashboard-kpi-row .kpi-card--todo .kpi-card__header h3 {
  font-size: 0.95rem;
}

.dashboard-kpi-row .todo-list {
  gap: 8px;
  flex: 1;
}

.dashboard-kpi-row .todo-list li {
  padding: 9px 13px;
}

@media (max-width: 768px) {
  .dashboard-top__left {
    justify-content: center;
  }

  .dashboard-tabs {
    justify-content: center;
  }
}

.kpi-card {
  position: relative;
  background: var(--bg-surface);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  min-height: 0;
}

.kpi-card--highlight {
  color: #fff;
  box-shadow: none;
  overflow: hidden;
}

.kpi-card--highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.kpi-card--highlight:hover::after {
  opacity: 1;
}

.kpi-card--light {
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: none;
}

.kpi-card__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: inherit;
  opacity: 0.92;
}

.kpi-card__subtitle {
  font-size: 0.72rem;
  color: inherit;
  opacity: 0.7;
}

.kpi-card__value {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0;
  color: inherit;
}

.kpi-card__cta {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.kpi-card--highlight .kpi-card__cta {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.kpi-card--highlight .kpi-card__cta:hover {
  background: rgba(255, 255, 255, 0.28);
}

.kpi-card--light .kpi-card__cta {
  color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.1);
}

.kpi-card--light .kpi-card__cta:hover {
  background: rgba(99, 102, 241, 0.16);
}

.kpi-card--list {
  gap: 14px;
}

.kpi-card--list .kpi-card__header {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
}

.kpi-card--list .kpi-card__header h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.kpi-card--list .kpi-card__header span {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.list-metric {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-metric li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.list-metric__label {
  font-weight: 600;
  color: var(--text-primary);
}

.list-metric__value {
  font-weight: 600;
  color: var(--accent-indigo);
}

.list-metric__accent {
  font-size: 0.72rem;
  color: var(--accent-green);
  font-weight: 600;
}

.leaderboard li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.leaderboard__name {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.leaderboard__value {
  font-weight: 600;
  color: var(--accent-indigo);
}

.leaderboard__trend {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 600;
}

.kpi-card--vip .vip-list {
  gap: 10px;
}

.kpi-card--vip .vip-list li {
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.kpi-card--vip .vip-tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-indigo);
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 8px;
}

.kpi-card--vip .vip-name {
  font-weight: 600;
  color: var(--text-primary);
}

.kpi-card--vip .vip-value {
  color: var(--accent-indigo);
  font-weight: 700;
  font-size: 0.85rem;
}

.kpi-card__cta--link {
  background: none;
  color: var(--accent-indigo);
  padding: 0;
}

.kpi-card__cta--link:hover {
  text-decoration: underline;
}

.kpi-card--todo {
  gap: 18px;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todo-list li {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.08);
  font-size: 0.82rem;
}

.todo-list li > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.todo-list li strong {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.82rem;
}

.todo-list li > div > span {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.todo-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.todo-list li[data-status="pending"] .todo-badge {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
}

.todo-list li[data-status="done"] .todo-badge {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.todo-list li[data-status='alert'] {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.18);
}

.todo-list li[data-status='alert'] strong {
  color: #ef4444;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-grid .span-12 {
  grid-column: span 12;
}

.dashboard-grid .span-8 {
  grid-column: span 8;
}

.dashboard-grid .span-4 {
  grid-column: span 4;
}

.dashboard-grid .span-5 {
  grid-column: span 5;
}

.dashboard-grid .span-6 {
  grid-column: span 6;
}

.dashboard-grid .span-7 {
  grid-column: span 7;
}

@media (max-width: 1280px) {
  .dashboard-grid .span-8,
  .dashboard-grid .span-7 {
    grid-column: span 6;
  }

  .dashboard-grid .span-4,
  .dashboard-grid .span-5,
  .dashboard-grid .span-6 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .dashboard-grid .span-12,
  .dashboard-grid .span-8,
  .dashboard-grid .span-7,
  .dashboard-grid .span-6,
  .dashboard-grid .span-5,
  .dashboard-grid .span-4 {
    grid-column: span 12;
  }
}

.panel {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel__header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.panel__header span {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.panel__body {
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel--line .panel__body {
  gap: 18px;
}

.panel--center .panel__body {
  align-items: center;
}

.panel__body--center {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.panel--value .panel__body {
  min-height: 160px;
}

.metric {
  font-weight: 700;
  color: var(--accent-indigo);
}

.metric--xl {
  font-size: 2rem;
}

.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip--leader {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.chip__name {
  color: inherit;
}

.chip__value {
  color: inherit;
  font-weight: 700;
}

.empty-state {
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  text-align: center;
  color: var(--text-tertiary);
  background: rgba(236, 241, 255, 0.45);
  font-size: 0.95rem;
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.task-list li:last-child {
  border-bottom: none;
}

.chart {
  width: 100%;
  display: block;
}

.chart--line {
  height: 48px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), transparent 70%);
  border-radius: 16px;
  padding: 16px;
  box-sizing: border-box;
}

.chart--line polyline {
  fill: none;
  stroke: var(--accent-indigo);
  stroke-width: 2;
}

.chart--line circle {
  fill: white;
  stroke: var(--accent-indigo);
  stroke-width: 1;
}

.chart__labels {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-align: center;
}

.chart--bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 100px;
}

.chart--bar.chart--bar-wide {
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chart--bar.chart--bar-wide .bar__value {
  width: 10px;
}

.bar {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  flex-direction: column;
}

.bar__value {
  width: 24px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--accent-blue), rgba(14, 165, 233, 0.4));
}

.bar__label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.chart--grouped {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-end;
}

.group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.group__bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100px;
}

.group__bar {
  width: 20px;
  border-radius: 10px 10px 4px 4px;
  background: var(--bg-subtle);
}

.group__bar--primary {
  background: linear-gradient(180deg, #6366f1, rgba(99, 102, 241, 0.45));
}

.group__bar--secondary {
  background: linear-gradient(180deg, #22c55e, rgba(34, 197, 94, 0.45));
}

.group__label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.chart-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot--primary {
  background: #6366f1;
}

.dot--secondary {
  background: #22c55e;
}

.pie-chart--compact {
  width: 140px;
  height: 140px;
  box-shadow: inset 0 0 0 10px var(--bg-surface);
}

.ranking-list,
.vip-list,
.summary-list,
.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-list li,
.vip-list li,
.summary-list li,
.legend li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.rank-name {
  font-weight: 600;
}

.rank-value {
  color: var(--accent-indigo);
}

.rank-trend {
  color: var(--accent-green);
  font-weight: 600;
}

.summary-list li strong,
.vip-list li strong,
.legend li strong {
  font-weight: 600;
}

.summary-list .dot,
.legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.summary-list li {
  color: var(--text-secondary);
}

.summary-list li strong {
  color: var(--text-primary);
}

.pie-chart {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 16px;
  box-shadow: inset 0 0 0 12px var(--bg-surface);
}

.legend li {
  color: var(--text-secondary);
}

.legend li strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.layout.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
  padding: 24px 12px;
}

.layout.sidebar-collapsed .sidebar__label,
.layout.sidebar-collapsed .sidebar__section-title,
.layout.sidebar-collapsed .sidebar__cta,
.layout.sidebar-collapsed .sidebar__badge,
.layout.sidebar-collapsed .brand__label,
.layout.sidebar-collapsed .sidebar__label-group,
.layout.sidebar-collapsed .sidebar__caret,
.layout.sidebar-collapsed .sidebar__submenu {
  display: none;
}

.layout.sidebar-collapsed .sidebar__icon {
  margin: 0 auto;
}

.layout.sidebar-collapsed .sidebar__menu-link {
  justify-content: center;
}

.layout.sidebar-collapsed .sidebar__menu {
  gap: 12px;
}

.layout.sidebar-collapsed .sidebar__section {
  gap: 16px;
}

.layout.sidebar-collapsed .sidebar__section-title {
  margin: 0;
}

.layout.sidebar-collapsed .topbar {
  padding-left: 24px;
}

@media (max-width: 1280px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-panels--two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    height: 72px;
    width: 100%;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar__section-title,
  .sidebar__footer,
  .brand__subtitle {
    display: none;
  }

  .workspace {
    min-height: calc(100vh - 72px);
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 12px;
    padding: 16px;
  }

  .page-intro,
  .main-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .dashboard-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-toolbar__left {
    width: 100%;
  }

  .dashboard-toolbar__actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-period {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .attendance-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .attendance-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}


/* ==================== Members Page ==================== */

.members-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 24px;
}

/* Members Tabs */
.members-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 4px;
}

.members-tab {
  padding: 12px 20px;
  border: none;
  background: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  white-space: nowrap;
}

.members-tab:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.members-tab.is-active {
  color: var(--accent-indigo);
  font-weight: 600;
}

.members-tab.is-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-indigo);
}

/* Members Stats */
.members-stats {
  display: flex;
  gap: 24px;
  padding: 16px 0;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value--primary {
  color: var(--accent-indigo);
}

/* Search Bar */
.members-search {
  margin-top: 8px;
}

.search-input-wrapper {
  position: relative;
  max-width: 500px;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.5;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  background: var(--bg-surface);
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Filters */
.members-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filters-container {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.875rem;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-row::-webkit-scrollbar {
  height: 6px;
}

.filter-row::-webkit-scrollbar-track {
  background: var(--bg-subtle);
  border-radius: 3px;
}

.filter-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.filter-row::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

.filter-row--secondary {
  padding-top: 4px;
}

.filter-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-dropdown:hover {
  border-color: var(--text-tertiary);
  background: var(--bg-subtle);
}

.filter-dropdown__icon {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Members Table */
.members-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.members-table thead {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.members-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.th-checkbox {
  width: 48px;
  text-align: center;
}

.th-sortable {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.sort-btn {
  margin-left: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.th-sortable:hover .sort-btn {
  opacity: 1;
}

.members-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.members-table tbody tr:hover {
  background: var(--bg-subtle);
}

.members-table tbody tr:last-child {
  border-bottom: none;
}

.members-table td {
  padding: 16px;
  vertical-align: middle;
}

/* Member Cell */
.member-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.member-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.member-phone {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* Gender Badge */
.gender-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid;
}

.status-badge--valid {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.3);
}

.status-badge--expired {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-badge--prospect {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
  border-color: rgba(234, 179, 8, 0.3);
}

.status-badge--none {
  background: rgba(148, 163, 184, 0.2);
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.3);
}

/* Membership Badge */
.membership-cell {
  max-width: 200px;
}

.membership-badge {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Session Count */
.session-count {
  font-weight: 500;
  color: var(--text-primary);
}

/* Text Utilities */
.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-tertiary);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 0;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

.pagination-btn.is-active {
  border-color: var(--accent-indigo);
  background: var(--accent-indigo);
  color: white;
  font-weight: 600;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 1280px) {
  .members-stats {
    flex-wrap: wrap;
  }
  
  .filter-row {
    gap: 6px;
  }
  
  .filter-dropdown {
    padding: 7px 12px;
    font-size: 0.8125rem;
  }
}

@media (max-width: 768px) {
  .members-stats {
    gap: 16px;
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
  
  .members-table {
    font-size: 0.8125rem;
  }
  
  .members-table th,
  .members-table td {
    padding: 12px;
  }
  
  .member-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.9375rem;
  }
}

/* ========================================
   Member Detail Page
   ======================================== */

.member-detail-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
}

/* Profile Header */
.member-profile-header {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.member-profile-main {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.member-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.member-profile-info {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.member-profile-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-profile-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.member-profile-phone {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
}

.member-profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Member Info Grid */
.member-info-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px 12px;
  padding-left: 24px;
  border-left: 2px solid var(--border);
}

.member-info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-info-label {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.member-info-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Stats Cards Row */
.member-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.member-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  min-height: 60px;
}

.member-stat-icon {
  font-size: 1rem;
  line-height: 1;
}

.member-stat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-stat-label {
  font-size: 0.625rem;
  color: var(--text-tertiary);
  margin: 0;
}

.member-stat-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.member-stat-date {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}


/* Compact Stat Cards for Right Column */
.stat-card-compact {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 135px;
}

.stat-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-card-header .stat-icon {
  font-size: 1rem;
}

.stat-card-header h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin: 0;
}

.stat-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.stat-value-row .stat-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card-body .stat-date {
  font-size: 0.625rem;
  color: var(--text-secondary);
}

.empty-text {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: center;
  padding: 20px 0;
}

.count-badge {
  font-size: 0.6875rem;
  color: var(--accent-indigo);
  font-weight: 500;
}

.product-type-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6875rem;
  background: var(--bg-subtle);
  border-radius: 4px;
  color: var(--text-secondary);
  margin-left: 6px;
}

.badge-active {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.6875rem;
  margin-left: 6px;
}
/* Detail Grid Layout */

/* 4-COLUMN GRID LAYOUT */
/* 4-Column Grid Layout */
.member-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: start;
}

/* Row 1: Products (1칸) | Attendance (1칸) | Reservation (1칸) | 2x2 Stats (1칸) */
.products-section {
  grid-column: span 1;
}

.attendance-section {
  grid-column: span 1;
}

.reservation-section {
  grid-column: span 1;
}

.stat-cards-wrapper {
  display: flex;
  grid-column: span 1;
}

.stat-cards-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}

/* Row 2: Payment (2칸) | Class Log (1칸) | Notes (1칸) */
.payment-section {
  grid-column: span 2;
}

.class-log-section {
  grid-column: span 1;
}

.notes-section {
  grid-column: span 1;
}
.tabs-header {
  display: flex;
  gap: 12px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  position: relative;
  padding-bottom: 8px;
}

.tab-btn.active {
  color: var(--text-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-indigo);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

.empty-state p {
  margin: 0;
}
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
  text-align: center;
  padding: 20px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
}
}

/* Detail Panel */
.detail-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.detail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.detail-panel-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.detail-panel-link {
  font-size: 0.875rem;
  color: var(--accent-indigo);
  text-decoration: none;
  font-weight: 500;
}

.detail-panel-link:hover {
  color: var(--accent-blue);
}

.detail-panel-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  height: 280px;
  max-height: 280px;
}

/* Scrollbar styling */
.detail-panel-body::-webkit-scrollbar {
  width: 6px;
}

.detail-panel-body::-webkit-scrollbar-track {
  background: var(--bg-subtle);
  border-radius: 3px;
}

.detail-panel-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.detail-panel-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Product Item */
.product-item {
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.product-item:hover {
  background: var(--bg-surface);
  border-color: var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.product-type {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.product-period {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Visit Item */
.visit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.visit-item:hover {
  background: var(--bg-surface);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.visit-date-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visit-date {
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 500;
}

.visit-time {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

/* Payment Table */
.payment-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.payment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.payment-table thead {
  background: var(--bg-subtle);
}

.payment-table th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.payment-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.payment-table tbody tr:last-child td {
  border-bottom: none;
}

.payment-table tbody tr:hover {
  background: var(--bg-subtle);
}

.payment-id {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.08);
  padding: 4px 8px;
  border-radius: 4px;
}

.payment-product {
  font-weight: 500;
}

.payment-method-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-error {
  color: #ef4444;
}

/* Empty State */
.empty-state {
  padding: 40px 20px;
  text-align: center;
}

.empty-state p {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin: 0;
}

/* Button Icon Small */
.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-icon-sm:hover {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: white;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1280px) {
  .member-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .member-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .member-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .member-profile-header {
    padding: 20px;
  }
  
  .member-profile-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .member-profile-info {
    min-width: auto;
  }
  
  .member-profile-actions {
    justify-content: center;
  }
  
  .member-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-left: 0;
    border-left: none;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
  
  .member-stats-row {
    grid-template-columns: 1fr;
  }
  
  .payment-table {
    font-size: 0.75rem;
  }
  
  .payment-table th,
  .payment-table td {
    padding: 10px 12px;
  }
}

/* Member Cell Link */
.member-cell-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s;
}

.member-cell-link:hover {
  opacity: 0.7;
}

.member-cell-link .member-name {
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}

.member-cell-link:hover .member-name {
  text-decoration-color: var(--accent-indigo);
}

/* 4 Column Layout for Member Detail */
.member-detail-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
  align-items: start;
}

.member-detail-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.member-detail-col .detail-panel {
  height: 100%;
  max-height: 280px;
  overflow: hidden;
}

.member-detail-col .detail-panel .detail-panel-body {
  max-height: 200px;
  overflow-y: auto;
  padding: 16px;
}

.member-detail-col .member-stat-card {
  margin-bottom: 12px;
}

.member-detail-col .member-stat-card:last-child {
  margin-bottom: 0;
}

/* Stats Cards Row - 4 columns */
.member-stats-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* Responsive for 4 Column Layout */
@media (max-width: 1440px) {
  .member-detail-grid-4col {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .member-stats-row-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .member-detail-grid-4col {
    grid-template-columns: 1fr;
  }
  
  .member-stats-row-4 {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Prospect Members Page
   ======================================== */

/* Search Section */
.prospect-search-section {
  padding: 24px 0;
}

.search-input-wrapper {
  position: relative;
  max-width: 600px;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  opacity: 0.5;
}

.search-input-large {
  width: 100%;
  padding: 14px 16px 14px 48px;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: all 0.2s;
}

.search-input-large:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input-large::placeholder {
  color: var(--text-tertiary);
}

/* Table Header Info */
.table-header-info {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.total-count {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
}

.total-count strong {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.125rem;
}

/* Prospects Table */
.prospects-table {
  table-layout: fixed;
}

.prospects-table thead th {
  background: var(--bg-subtle);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 14px 16px;
  border-bottom: 2px solid var(--border);
}

.prospects-table thead th:nth-child(1) { width: 15%; } /* 예비회원명 */
.prospects-table thead th:nth-child(2) { width: 8%; }  /* 성별 */
.prospects-table thead th:nth-child(3) { width: 12%; } /* 유입일자 */
.prospects-table thead th:nth-child(4) { width: 12%; } /* 유입경로 */
.prospects-table thead th:nth-child(5) { width: 53%; } /* 메모 */

.prospects-table tbody td {
  padding: 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.prospect-name-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prospect-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.prospect-phone {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.memo-column {
  text-align: left;
}

.memo-cell {
  max-width: 100%;
}

.memo-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* Responsive */
@media (max-width: 1280px) {
  .prospects-table thead th:nth-child(1) { width: 18%; }
  .prospects-table thead th:nth-child(5) { width: 47%; }
}

@media (max-width: 768px) {
  .prospect-search-section {
    padding: 16px 0;
  }
  
  .search-input-wrapper {
    max-width: 100%;
  }
  
  .prospects-table {
    font-size: 0.8125rem;
  }
  
  .prospects-table thead th,
  .prospects-table tbody td {
    padding: 12px;
  }
  
  .memo-text {
    font-size: 0.8125rem;
  }
}

/* ============================================
   OT 리스트 페이지 스타일
   ============================================ */

.orientation-page {
  /* padding removed for consistent tab position */

}

/* Header Section */
.orientation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.orientation-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.orientation-actions {
  display: flex;
  gap: 12px;
}

/* OT Table Styles */
.orientation-table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.orientation-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  min-width: 1400px;
}

.orientation-table thead {
  background: var(--surface-secondary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.orientation-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.orientation-table .th-section-header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.orientation-table .th-sub {
  background: #f8f9fc;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

.orientation-table .th-member {
  min-width: 200px;
  width: 15%;
}

.orientation-table .th-registration {
  min-width: 120px;
  width: 8%;
}

.orientation-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s;
}

.orientation-table tbody tr:hover {
  background-color: #fafbfc;
}

.orientation-table td {
  padding: 16px;
  vertical-align: top;
}

/* Member Cell in OT Table */
.td-member .member-cell {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
}

.td-member .member-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.td-member .member-name-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.td-member .member-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.status-badge--sm {
  font-size: 0.6875rem;
  padding: 2px 8px;
}

.td-member .member-phone {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.td-member .member-gender {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Registration Info */
.registration-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.registration-date {
  font-size: 0.8125rem;
  color: var(--text-primary);
  font-weight: 500;
}

.days-badge {
  display: inline-block;
  padding: 4px 8px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 12px;
  text-align: center;
  width: fit-content;
}

/* Workout Info Cells */
.td-goal {
  max-width: 150px;
}

.workout-goal {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
}

.td-exercises {
  max-width: 200px;
}

.exercise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exercise-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #e0e7ff;
  color: #4f46e5;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 12px;
  white-space: nowrap;
}

/* Fitness Level Badge */
.level-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
}

.level-badge--beginner {
  background: #dbeafe;
  color: #1e40af;
}

.level-badge--intermediate {
  background: #fef3c7;
  color: #b45309;
}

.level-badge--advanced {
  background: #fee2e2;
  color: #b91c1c;
}

/* Health Notes */
.td-notes {
  max-width: 150px;
}

.health-notes {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* OT Progress */
.ot-progress-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 120px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-percent {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6366f1;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-fill--complete {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* Trainer Info */
.td-trainer {
  min-width: 100px;
}

.trainer-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.preferred-time {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

/* Next Session */
.td-next-session {
  text-align: center;
}

.next-session-date {
  display: inline-block;
  padding: 6px 12px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
}

.session-complete {
  display: inline-block;
  padding: 6px 12px;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.empty-state-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .orientation-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .orientation-actions {
    width: 100%;
  }
  
  .orientation-actions button {
    flex: 1;
  }
}

/* Tab Links Styling */
.members-tabs a.members-tab {
  text-decoration: none;
  color: inherit;
}

.members-tabs a.members-tab:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* ============================================
   추천 리스트 페이지 스타일
   ============================================ */

.referral-page {

}

/* Header Section */
.referral-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.referral-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.referral-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* View Mode Toggle */
.view-mode-toggle {
  display: flex;
  background: var(--surface-secondary);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.toggle-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.toggle-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
}

.toggle-btn.is-active {
  background: white;
  color: var(--accent-indigo);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.referral-actions {
  display: flex;
  gap: 12px;
}

/* Referral Table */
.referral-table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.referral-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  min-width: 1400px;
}

.referral-table thead {
  background: var(--surface-secondary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.referral-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.referral-table .th-section-header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.referral-table .th-sub {
  background: #f8f9fc;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

.referral-table .th-date {
  min-width: 100px;
  width: 8%;
}

.referral-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s;
}

.referral-table tbody tr:hover {
  background-color: #fafbfc;
}

.referral-table td {
  padding: 16px;
  vertical-align: middle;
}

/* Date Cell */
.td-date {
  text-align: center;
}

.referral-date {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Member Cell in Referral Table */
.td-member {
  min-width: 160px;
}

.td-member .member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-member .member-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.td-member .member-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.td-member .member-phone {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.td-member .member-gender {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* Registration Date */
.td-registered {
  text-align: center;
}

.registered-date {
  font-size: 0.8125rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Count Badges */
.td-count {
  text-align: center;
}

.count-badge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.count-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 6px;
  text-align: center;
  min-width: 50px;
}

.count-badge--new {
  background: #dbeafe;
  color: #1e40af;
}

.count-badge--low {
  background: #e0e7ff;
  color: #4f46e5;
}

.count-badge--medium {
  background: #fef3c7;
  color: #b45309;
}

.count-badge--high {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.first-badge {
  display: inline-block;
  padding: 3px 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 10px;
}

/* Membership Cell */
.td-membership {
  max-width: 200px;
}

.td-membership .membership-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Benefit Type */
.td-benefit {
  text-align: center;
}

.benefit-type {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
}

/* Status Badge */
.td-status {
  text-align: center;
}

.status-badge--complete {
  background: #d1fae5;
  color: #065f46;
}

.status-badge--pending {
  background: #fef3c7;
  color: #b45309;
}

.status-badge--processing {
  background: #dbeafe;
  color: #1e40af;
}

/* Memo */
.td-memo {
  max-width: 200px;
}

.memo-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Summary Cards */
.referral-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.summary-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.summary-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 12px;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .referral-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .referral-controls {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }
  
  .view-mode-toggle {
    width: 100%;
  }
  
  .toggle-btn {
    flex: 1;
  }
  
  .referral-actions {
    width: 100%;
  }
  
  .referral-actions button {
    flex: 1;
  }
  
  .referral-summary {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   전자계약 설정 페이지 스타일
   ============================================ */

.contract-settings-page {

}

/* Header Section */
.contract-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}

.contract-settings-info {
  flex: 1;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.section-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Template List */
.template-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

/* Template Card */
.template-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.template-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.template-info {
  flex: 1;
}

.template-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.template-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.template-status {
  display: flex;
  align-items: center;
}

.status-badge--active {
  background: #d1fae5;
  color: #065f46;
}

.status-badge--inactive {
  background: #f3f4f6;
  color: #6b7280;
}

/* Template Card Body */
.template-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sections */
.template-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subsection-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subsection-title i {
  color: var(--accent-indigo);
  font-size: 1rem;
}

.section-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 50%;
}

.section-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-description-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Variables */
.template-variables {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.variable-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variable-tag {
  display: inline-block;
  padding: 6px 12px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
}

/* Template Meta */
.template-meta {
  display: flex;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.meta-item i {
  color: var(--text-secondary);
}

/* Template Card Footer */
.template-card-footer {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  background: #f9fafb;
  border-top: 1px solid var(--border);
}

.text-danger {
  color: #dc2626 !important;
}

.text-danger:hover {
  color: #b91c1c !important;
  background: #fee2e2 !important;
}

/* Help Section */
.help-section {
  margin-top: 32px;
}

.help-card {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fbbf24;
  border-radius: 12px;
}

.help-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: white;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #f59e0b;
}

.help-content {
  flex: 1;
}

.help-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #92400e;
  margin: 0 0 12px 0;
}

.help-list {
  margin: 0;
  padding-left: 20px;
  color: #78350f;
  font-size: 0.875rem;
  line-height: 1.8;
}

.help-list li {
  margin-bottom: 8px;
}

.help-list li:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .contract-settings-header {
    flex-direction: column;
    gap: 16px;
  }
  
  .contract-settings-header button {
    width: 100%;
  }
  
  .template-card-footer {
    flex-wrap: wrap;
  }
  
  .template-card-footer button {
    flex: 1;
    min-width: calc(50% - 4px);
  }
  
  .help-card {
    flex-direction: column;
  }
  
  .help-icon {
    align-self: center;
  }
}

/* 페이지별 콘텐츠 패딩 통일 */
.orientation-header,
.orientation-table-wrapper,
.orientation-page .empty-state {
  margin-left: 24px;
  margin-right: 24px;
}

.referral-header,
.referral-table-wrapper,
.referral-summary,
.referral-page .empty-state {
  margin-left: 24px;
  margin-right: 24px;
}

.contract-settings-header,
.template-list,
.help-section,
.contract-settings-page .empty-state {
  margin-left: 24px;
  margin-right: 24px;
}

/* ============================================
   상품 페이지 스타일
   ============================================ */

.products-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Search Section */
.products-search-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

/* Filters */
.products-filters {
  padding: 16px 24px;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}

/* Products Table */
.products-table-wrapper {
  overflow-x: auto;
  margin: 0 24px;
  margin-top: 20px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  min-width: 1600px;
  background: white;
  border: 1px solid var(--border);
}

.products-table thead {
  background: #f9fafb;
  border-bottom: 2px solid var(--border);
}

.products-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 0.8125rem;
}

.products-table .th-checkbox {
  width: 40px;
  text-align: center;
}

.products-table .th-product-type {
  min-width: 180px;
}

.products-table .th-product-name {
  min-width: 200px;
}

.products-table .th-stats,
.products-table .th-limit {
  min-width: 120px;
  text-align: center;
}

.products-table .th-price {
  min-width: 150px;
  text-align: center;
}

.products-table .th-capacity,
.products-table .th-unit-sale,
.products-table .th-personal-sale,
.products-table .th-tax {
  min-width: 100px;
  text-align: center;
}

.products-table .th-membership {
  min-width: 120px;
  text-align: center;
}

.products-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s;
}

.products-table tbody tr:hover {
  background-color: #fafbfc;
}

.products-table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-right: 1px solid #f3f4f6;
}

.products-table td:last-child {
  border-right: none;
}

/* Product Row Styles */
.product-row--price-only {
  background: #fafbfc;
}

.td-product-type {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.td-product-name {
  font-weight: 500;
}

.product-name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.star-icon {
  font-size: 0.875rem;
  color: #fbbf24;
}

.product-name-text {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.product-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 4px;
}

/* Stats and Limit Cells */
.td-stats,
.td-limit {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.stats-cell,
.limit-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* Price Cell */
.td-price {
  text-align: center;
  border-top: 1px solid #f3f4f6;
}

.product-row:first-child .td-price {
  border-top: none;
}

.price-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.price-period {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.price-amount {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Capacity and Options */
.td-capacity,
.td-membership,
.td-option {
  text-align: center;
  font-size: 0.8125rem;
}

.option-mark {
  display: inline-block;
  min-width: 20px;
  font-weight: 600;
  font-size: 0.875rem;
}

.option-mark--yes {
  color: #16a34a;
}

.option-mark--no {
  color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
  .products-search-section,
  .products-filters {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .products-table-wrapper {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* ========================================
   Schedule Page Styles
   ======================================== */

.schedule-page {
  background: #f8f9fa;
  min-height: 100vh;
}

/* Header Section */
.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #e9ecef;
}

.schedule-header-left,
.schedule-header-center,
.schedule-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* View Mode Tabs */
.view-mode-tabs {
  display: flex;
  gap: 4px;
  background: #f1f3f5;
  padding: 4px;
  border-radius: 8px;
}

.view-mode-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.view-mode-tab:hover {
  background: #e9ecef;
  color: #495057;
}

.view-mode-tab.active {
  background: white;
  color: #7c3aed;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-mode-tab.today {
  color: #7c3aed;
}

/* Date Navigation */
.date-nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.date-nav-btn:hover {
  background: #f8f9fa;
  border-color: #7c3aed;
}

.current-date {
  padding: 0 16px;
}

.date-text {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
}

/* New Schedule Button */
.btn-new-schedule {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-new-schedule:hover {
  background: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-new-schedule .btn-icon {
  font-size: 18px;
  font-weight: 700;
}

/* Filters Section */
.schedule-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: white;
  border-bottom: 1px solid #e9ecef;
}

.filters-left {
  display: flex;
  gap: 8px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  font-size: 14px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-select:hover {
  border-color: #7c3aed;
}

.filters-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.view-toggle:hover {
  background: #f8f9fa;
  border-color: #7c3aed;
}

.view-toggle.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: white;
}

.view-label {
  font-size: 14px;
  color: #6c757d;
  cursor: pointer;
}

.view-label:hover {
  color: #7c3aed;
}

/* Calendar Container */
.schedule-calendar {
  padding: 24px;
  overflow-x: auto;
}

.calendar-container {
  display: flex;
  min-width: 1400px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* Time Column */
.time-column {
  flex-shrink: 0;
  width: 80px;
  border-right: 1px solid #e9ecef;
}

.time-header {
  height: 100px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.time-slot {
  height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
  border-bottom: 1px solid #f1f3f5;
}

.time-label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

/* Trainers Grid */
.trainers-grid {
  flex: 1;
  position: relative;
}

/* Trainers Header */
.trainers-header {
  display: flex;
  height: 100px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.trainer-header-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border-right: 1px solid #e9ecef;
}

.trainer-header-cell:last-child {
  border-right: none;
}

.trainer-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trainer-avatar {
  font-size: 20px;
}

.trainer-name {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.trainer-date {
  font-size: 11px;
  color: #6c757d;
}

.date-day {
  font-weight: 500;
}

/* Time Grid */
.time-grid {
  position: relative;
  display: flex;
  flex-direction: column;
}

.time-row {
  display: flex;
  height: 60px;
  border-bottom: 1px solid #f1f3f5;
}

.grid-cell {
  flex: 1;
  border-right: 1px solid #f1f3f5;
  position: relative;
}

.grid-cell:last-child {
  border-right: none;
}

/* Appointments Overlay */
.appointments-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

/* Appointment Blocks */
.appointment-block {
  position: absolute;
  padding: 8px;
  border-radius: 6px;
  border-left: 3px solid;
  pointer-events: all;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
  margin: 1px;
}

.appointment-block:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

/* Appointment Colors */
.appointment-gray {
  background: #e9ecef;
  border-left-color: #6c757d;
}

.appointment-pink {
  background: #fce7f3;
  border-left-color: #ec4899;
}

.appointment-blue {
  background: #dbeafe;
  border-left-color: #3b82f6;
}

.appointment-purple {
  background: #ede9fe;
  border-left-color: #7c3aed;
}

.appointment-green {
  background: #d1fae5;
  border-left-color: #10b981;
}

/* Appointment Content */
.appointment-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
}

.appointment-time {
  font-size: 10px;
  color: #6c757d;
  font-weight: 500;
  white-space: nowrap;
}

.appointment-title {
  font-size: 13px;
  font-weight: 600;
  color: #212529;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-subtitle {
  font-size: 11px;
  color: #6c757d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 1440px) {
  .schedule-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .schedule-header-left,
  .schedule-header-center,
  .schedule-header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .trainer-name {
    max-width: 60px;
  }
}

@media (max-width: 768px) {
  .schedule-filters {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .filters-left,
  .filters-right {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .time-column {
    width: 60px;
  }
  
  .time-label {
    font-size: 10px;
  }
  
  .trainer-name {
    font-size: 12px;
    max-width: 50px;
  }
  
  .appointment-title {
    font-size: 11px;
  }
}


/* ========================================
   Notices Page Styles
   ======================================== */

.notices-page {
  background: #f8f9fa;
  min-height: 100vh;
}

/* Tabs */
.notices-tabs {
  display: flex;
  gap: 8px;
  padding: 24px 24px 16px;
  border-bottom: 2px solid #e9ecef;
}

.notices-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #6c757d;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.notices-tab:hover {
  color: #495057;
}

.notices-tab.active {
  color: #212529;
  font-weight: 600;
  border-bottom-color: #212529;
}

/* Header Section */
.notices-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: white;
}

/* Search */
.notices-search {
  position: relative;
  width: 320px;
}

.notices-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #6c757d;
}

.notices-search .search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.notices-search .search-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Register Button */
.btn-register-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-register-notice:hover {
  background: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-register-notice .btn-icon {
  font-size: 18px;
  font-weight: 700;
}

/* Table Container */
.notices-table-container {
  margin: 0 24px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Table */
.notices-table {
  width: 100%;
  border-collapse: collapse;
}

.notices-table thead {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.notices-table th {
  padding: 16px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.notices-table tbody tr {
  border-bottom: 1px solid #f1f3f5;
  transition: background 0.2s;
}

.notices-table tbody tr:hover {
  background: #f8f9fa;
}

.notices-table tbody tr:last-child {
  border-bottom: none;
}

.notices-table td {
  padding: 16px 12px;
  font-size: 14px;
  color: #212529;
}

/* Column Widths */
.col-checkbox {
  width: 50px;
  text-align: center;
}

.col-number {
  width: 80px;
  text-align: center;
  color: #6c757d;
}

.col-title {
  min-width: 400px;
}

.col-pinned {
  width: 180px;
  text-align: center;
  color: #6c757d;
}

.col-author {
  width: 120px;
  text-align: center;
}

.col-date {
  width: 140px;
  text-align: center;
  color: #6c757d;
}

.col-views {
  width: 100px;
  text-align: center;
  color: #6c757d;
}

/* Notice Title Link */
.notice-title-link {
  color: #212529;
  text-decoration: none;
  transition: color 0.2s;
}

.notice-title-link:hover {
  color: #7c3aed;
  text-decoration: underline;
}

/* Checkbox */
.notices-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #7c3aed;
}

/* Pagination */
.notices-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  gap: 8px;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 6px;
  font-size: 14px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: #f8f9fa;
  border-color: #7c3aed;
}

.pagination-btn.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: white;
  font-weight: 600;
}

/* Items Per Page */
.items-per-page {
  position: fixed;
  bottom: 24px;
  left: 24px;
}

.items-select {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.items-select:hover {
  border-color: #7c3aed;
}

.items-select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Responsive Design */
@media (max-width: 1440px) {
  .col-title {
    min-width: 300px;
  }
  
  .col-pinned {
    width: 150px;
  }
}

@media (max-width: 768px) {
  .notices-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .notices-search {
    width: 100%;
  }
  
  .notices-table-container {
    overflow-x: auto;
  }
  
  .notices-table {
    min-width: 800px;
  }
}


/* ========================================
   Consult Page Styles
   ======================================== */

.consult-page {
  background: #f8f9fa;
  min-height: 100vh;
}

/* Tabs */
.consult-tabs {
  display: flex;
  gap: 8px;
  padding: 24px 24px 16px;
  border-bottom: 2px solid #e9ecef;
}

.consult-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #6c757d;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.consult-tab:hover {
  color: #495057;
}

.consult-tab.active {
  color: #212529;
  font-weight: 600;
  border-bottom-color: #212529;
}

/* Header */
.consult-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: white;
}

.consult-filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

.consult-filters .search-input {
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  width: 240px;
  transition: all 0.2s;
}

.consult-filters .search-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.btn-register-consult {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-register-consult:hover {
  background: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Table */
.consult-table-container {
  margin: 0 24px 24px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.consult-table {
  width: 100%;
  border-collapse: collapse;
}

.consult-table thead {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.consult-table th {
  padding: 16px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.consult-table tbody tr {
  border-bottom: 1px solid #f1f3f5;
  transition: background 0.2s;
}

.consult-table tbody tr:hover {
  background: #f8f9fa;
}

.consult-table td {
  padding: 16px 12px;
  font-size: 14px;
  color: #212529;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-상담예정 {
  background: #fef3c7;
  color: #d97706;
}

.status-상담완료 {
  background: #dbeafe;
  color: #2563eb;
}

.status-등록완료 {
  background: #d1fae5;
  color: #059669;
}

.status-상담취소 {
  background: #fee2e2;
  color: #dc2626;
}

/* Pagination */
.consult-pagination {
  display: flex;
  justify-content: center;
  padding: 24px;
  gap: 8px;
}

/* ========================================
   Community Page Styles
   ======================================== */

.community-page {
  background: #f8f9fa;
  min-height: 100vh;
}

/* Tabs */
.community-tabs {
  display: flex;
  gap: 8px;
  padding: 24px 24px 16px;
  border-bottom: 2px solid #e9ecef;
  overflow-x: auto;
}

.community-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #6c757d;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}

.community-tab:hover {
  color: #495057;
}

.community-tab.active {
  color: #212529;
  font-weight: 600;
  border-bottom-color: #212529;
}

/* Header */
.community-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: white;
}

.community-search {
  position: relative;
  width: 320px;
}

.community-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #6c757d;
}

.community-search .search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.community-search .search-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.btn-register-post {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-register-post:hover {
  background: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Table */
.community-table-container {
  margin: 0 24px 24px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.community-table {
  width: 100%;
  border-collapse: collapse;
}

.community-table thead {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.community-table th {
  padding: 16px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.community-table tbody tr {
  border-bottom: 1px solid #f1f3f5;
  transition: background 0.2s;
}

.community-table tbody tr:hover {
  background: #f8f9fa;
}

.community-table td {
  padding: 16px 12px;
  font-size: 14px;
  color: #212529;
}

/* Category Badge */
.category-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.category-자유게시판 {
  background: #e0e7ff;
  color: #4f46e5;
}

.category-운동후기 {
  background: #fce7f3;
  color: #ec4899;
}

.category-질문/답변 {
  background: #dbeafe;
  color: #2563eb;
}

.category-이벤트 {
  background: #fef3c7;
  color: #d97706;
}

.category-공지사항 {
  background: #dcfce7;
  color: #16a34a;
}

/* Post Title Link */
.post-title-link {
  color: #212529;
  text-decoration: none;
  transition: color 0.2s;
}

.post-title-link:hover {
  color: #7c3aed;
  text-decoration: underline;
}

/* Column Widths */
.col-category {
  width: 110px;
}

.col-likes,
.col-comments {
  width: 100px;
  text-align: center;
}

/* Pagination */
.community-pagination {
  display: flex;
  justify-content: center;
  padding: 24px;
  gap: 8px;
}

/* Responsive Design */
@media (max-width: 1440px) {
  .consult-filters {
    flex-wrap: wrap;
  }
  
  .community-search {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .consult-header,
  .community-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .consult-filters .search-input,
  .community-search {
    width: 100%;
  }
  
  .community-tabs {
    padding-bottom: 0;
  }
  
  .consult-table-container,
  .community-table-container {
    overflow-x: auto;
  }
  
  .consult-table,
  .community-table {
    min-width: 1000px;
  }
}


/* ========================================
   Guide Main Tabs (Common for all guide pages)
   ======================================== */

.guide-main-tabs {
  display: flex;
  gap: 4px;
  padding: 24px 24px 0;
  background: #f8f9fa;
}

.guide-main-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: #6c757d;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px 8px 0 0;
  position: relative;
}

.guide-main-tab:hover {
  color: #495057;
  background: #e9ecef;
}

.guide-main-tab.active {
  background: white;
  color: #212529;
  font-weight: 600;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* Adjust sub tabs to align properly */
.notices-tabs,
.consult-tabs,
.community-tabs {
  padding-top: 0;
  background: white;
}


/* ========================================
   Sales Page Styles
   ======================================== */

.sales-page {
  background: #f8f9fa;
  min-height: 100vh;
}

/* Main Tabs */
.sales-main-tabs {
  display: flex;
  gap: 4px;
  padding: 24px 24px 0;
  background: #f8f9fa;
}

.sales-main-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: #6c757d;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px 8px 0 0;
}

.sales-main-tab:hover {
  color: #495057;
  background: #e9ecef;
}

.sales-main-tab.active {
  background: white;
  color: #212529;
  font-weight: 600;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* Search Bar */
.sales-search-bar {
  position: relative;
  padding: 16px 24px;
  background: white;
}

.sales-search-bar .search-icon {
  position: absolute;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #6c757d;
}

.sales-search-bar .search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.sales-search-bar .search-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Filters Section */
.sales-filters-section {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  background: white;
  align-items: center;
  flex-wrap: wrap;
}

.date-range-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: white;
}

.calendar-icon {
  font-size: 16px;
}

.date-range-input {
  border: none;
  font-size: 14px;
  color: #212529;
  font-weight: 500;
  width: 200px;
  cursor: pointer;
}

.date-range-input:focus {
  outline: none;
}

.quick-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-filter-btn {
  padding: 8px 16px;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.quick-filter-btn:hover {
  background: #f8f9fa;
  border-color: #7c3aed;
}

.quick-filter-btn.active {
  background: #7c3aed;
  color: white;
  border-color: #7c3aed;
}

/* Controls */
.sales-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-top: 1px solid #f1f3f5;
  flex-wrap: wrap;
  gap: 12px;
}

.sales-dropdowns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-dropdown {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-dropdown:hover {
  border-color: #7c3aed;
}

.filter-dropdown:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.sales-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 8px 16px;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #f8f9fa;
  border-color: #7c3aed;
  color: #7c3aed;
}



/* Sales Table */
.sales-table-container {
  margin: 0 24px 24px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sales-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1600px;
}

.sales-table thead {
  background: #f8f9fa;
  border-bottom: 2px solid #e9ecef;
}

.sales-table th {
  padding: 14px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.sales-table tbody tr {
  border-bottom: 1px solid #f1f3f5;
  transition: background 0.2s;
}

.sales-table tbody tr:hover {
  background: #f8f9fa;
}

.sales-table td {
  padding: 14px 12px;
  font-size: 13px;
  color: #212529;
}

/* Column Widths */
.col-payment-id {
  width: 100px;
}

.col-member {
  width: 150px;
}

.col-sales-type {
  width: 120px;
}

.col-sales-item {
  min-width: 200px;
}

.col-amount,
.col-paid {
  width: 110px;
  text-align: right;
}

.col-method {
  width: 100px;
}

.col-date {
  width: 150px;
}

.col-staff {
  width: 100px;
  text-align: center;
}

.col-registered {
  width: 110px;
  text-align: center;
}

.col-receipt {
  width: 80px;
  text-align: center;
}

/* Payment ID Link */
.payment-id-link {
  color: #7c3aed;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.payment-id-link:hover {
  color: #6d28d9;
  text-decoration: underline;
}

/* Member Info */
.member-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-avatar {
  font-size: 20px;
}

.member-name {
  font-weight: 500;
}

/* Payment Method Badge */
.payment-method-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.method-카드 {
  background: #dbeafe;
  color: #2563eb;
}

.method-현금 {
  background: #dcfce7;
  color: #16a34a;
}

.method-계좌이체 {
  background: #e0e7ff;
  color: #4f46e5;
}

.method-스포츠유체 {
  background: #fef3c7;
  color: #d97706;
}

/* Registered Badge */
.registered-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: #ede9fe;
  color: #7c3aed;
}

/* Receipt Status */
.receipt-status {
  font-weight: 600;
  font-size: 14px;
}

.receipt-status.available {
  color: #16a34a;
}

.receipt-status.unavailable {
  color: #dc2626;
}

/* Pagination */
.sales-pagination {
  display: flex;
  justify-content: center;
  padding: 24px;
  gap: 8px;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 6px;
  font-size: 14px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: #f8f9fa;
  border-color: #7c3aed;
}

.pagination-btn.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: white;
  font-weight: 600;
}

/* Checkbox */
.sales-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #7c3aed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sales-filters-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .date-range-input {
    width: 100%;
  }
  
  .quick-filters {
    width: 100%;
  }
  
  .sales-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .sales-table-container {
    overflow-x: auto;
  }
}

/* ===== Staff Page Styles ===== */
.staff-page {
  padding: 24px;
  background: var(--bg-body);
}

/* Staff Header */
.staff-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}

.staff-search-box {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.staff-search-box i {
  color: var(--text-tertiary);
  font-size: 14px;
}

.staff-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: var(--text-primary);
}

.staff-search-box input::placeholder {
  color: var(--text-faint);
}

.staff-add-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  background: #6366f1;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.staff-add-btn:hover {
  background: #5558e3;
}

.staff-add-btn i {
  font-size: 13px;
}

/* Staff Filters */
.staff-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.staff-filter-select {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
}

.staff-filter-select:hover {
  border-color: var(--accent-purple);
}

.staff-filter-select:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.staff-filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.filter-action-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-action-btn:hover {
  background: #f1f3f5;
  border-color: #cbd5e0;
}

/* Staff Count */
.staff-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 4px;
}

/* Staff Table */
.staff-table-container {
  background: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
}

.staff-table thead {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.staff-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.staff-table .th-content {
  display: flex;
  align-items: center;
  gap: 6px;
}

.staff-table .th-content i {
  font-size: 12px;
  color: var(--text-tertiary);
}

.staff-table .th-content .info-icon {
  cursor: help;
}

.staff-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.staff-table tbody tr:hover {
  background: #f9fafb;
}

.staff-table td {
  padding: 16px;
  font-size: 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

/* Staff Basic Info */
.staff-basic-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.staff-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.staff-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.staff-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.staff-phone {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Staff Other Fields */
.staff-department {
  font-size: 13px;
  color: var(--text-primary);
}

.staff-role {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
}

.staff-email {
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
}

.staff-status {
  font-size: 13px;
  color: var(--text-primary);
}

.staff-activity {
  font-size: 13px;
  color: var(--text-primary);
  text-align: center;
}

.staff-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1200px) {
  .staff-filters {
    flex-direction: column;
  }
  
  .staff-filter-actions {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .staff-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .staff-search-box {
    max-width: 100%;
  }
  
  .staff-table-container {
    overflow-x: auto;
  }
  
  .staff-table {
    min-width: 900px;
  }
}

/* ===================================
   Payroll Page (급여정산)
   =================================== */

.payroll-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 탭 (급여정산 / 급여설정) */
.payroll-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.payroll-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.payroll-tab:hover {
  color: var(--text-primary);
}

.payroll-tab.active {
  color: var(--accent-indigo);
  border-bottom-color: var(--accent-indigo);
}

/* 급여일 및 근무기간 헤더 */
.payroll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.payroll-date h2 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.payroll-date p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.payroll-settings-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.payroll-settings-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-indigo);
  transform: translateY(-1px);
}

/* 통계 요약 */
.payroll-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.payroll-summary-main {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.payroll-stat-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s;
}

.payroll-stat-card.primary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-color: rgba(99, 102, 241, 0.2);
}

.payroll-stat-card.secondary {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: rgba(234, 179, 8, 0.2);
}

.payroll-stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.payroll-stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.payroll-stat-card.primary .stat-value {
  color: var(--accent-indigo);
}

.payroll-stat-card.secondary .stat-value {
  color: #eab308;
}

.payroll-stat-card .stat-sublabel {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* 통계 그리드 */
.payroll-summary-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.payroll-summary-grid .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.payroll-summary-grid .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

.payroll-summary-grid .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* 필터 섹션 */
.payroll-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.payroll-filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.payroll-filter-select {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

.payroll-filter-select:hover {
  border-color: var(--accent-indigo);
}

.payroll-filter-select:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.payroll-filter-actions {
  display: flex;
  gap: 8px;
}

.payroll-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.payroll-action-btn:hover {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.05);
}

.payroll-action-btn.primary {
  background: var(--accent-green);
  color: white;
  border-color: var(--accent-green);
}

.payroll-action-btn.primary:hover {
  background: #10b981;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 데이터 테이블 */
.payroll-table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
}

.payroll-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1400px;
}

.payroll-table thead {
  background: var(--bg-secondary);
}

.payroll-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.payroll-table th .th-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.payroll-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.payroll-table tbody tr:hover {
  background: var(--bg-secondary);
}

.payroll-table tbody tr:last-child {
  border-bottom: none;
}

.payroll-table td {
  padding: 16px 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* 구성원 정보 */
.payroll-member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payroll-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.payroll-member-name {
  font-weight: 600;
  color: var(--text-primary);
}

.payroll-position {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.payroll-resignation-date,
.payroll-schedule-count,
.payroll-attendance-count {
  text-align: center;
  color: var(--text-secondary);
  font-weight: 500;
}

.payroll-base-salary,
.payroll-allowance,
.payroll-bonus,
.payroll-deduction,
.payroll-adjustment {
  text-align: right;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

/* 급여정보 추가 버튼 */
.payroll-add-info-btn {
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.payroll-add-info-btn:hover {
  background: var(--accent-indigo);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.payroll-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
}

.payroll-more-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

/* 페이지네이션 */
.payroll-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
}

/* 반응형 */
@media (max-width: 1400px) {
  .payroll-summary-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {
  .payroll-summary-main {
    grid-template-columns: 1fr;
  }
  
  .payroll-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .payroll-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .payroll-filter-group {
    flex-direction: column;
  }
  
  .payroll-filter-select {
    width: 100%;
  }
  
  .payroll-table-container {
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .payroll-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .payroll-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================================
   Locker Page (락커 관리)
   =================================== */

.locker-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 헤더 (버튼) */
.locker-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.locker-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex: 1;
  max-width: 400px;
  transition: all 0.2s;
}

.locker-search-box:focus-within {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.locker-search-box i {
  color: var(--text-tertiary);
  font-size: 0.95rem;
}

.locker-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.locker-search-box input::placeholder {
  color: var(--text-tertiary);
}

.locker-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-indigo);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.locker-add-btn:hover {
  background: #5b47db;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

/* 컨트롤 (구역 선택 + 액션 버튼) */
.locker-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
}

.locker-zone-selector {
  flex: 0 0 auto;
}

.locker-zone-select {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 180px;
}

.locker-zone-select:hover {
  border-color: var(--accent-indigo);
}

.locker-zone-select:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.locker-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.locker-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.locker-action-btn:hover {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.05);
}

.locker-action-btn.primary {
  background: var(--accent-green);
  color: white;
  border-color: var(--accent-green);
}

.locker-action-btn.primary:hover {
  background: #10b981;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 통계 정보 */
.locker-stats {
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.locker-stat-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: 4px;
  text-align: center;
  justify-content: center;
}

.locker-stat-item .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.locker-stat-item .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.locker-stat-item .stat-value.occupied {
  color: var(--accent-green);
}

.locker-stat-item .stat-value.available {
  color: var(--text-tertiary);
}

/* 락커 그리드 */
.locker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 100px));
  grid-auto-rows: 100px;
  gap: 10px;
}

.locker-card {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  min-height: 100px;
  height: 100px;
}

.locker-card:hover {
  border-color: var(--accent-indigo);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.locker-card.occupied {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.02);
}

.locker-card.available {
  border-color: var(--border);
  background: var(--bg-secondary);
  opacity: 0.6;
}

.locker-card.available:hover {
  opacity: 1;
  border-color: var(--accent-blue);
}

/* 락커 카드 헤더 */
.locker-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1px;
  padding-bottom: 0px;
}

.locker-number {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.locker-status-badge {
  padding: 2px 6px;
  background: var(--accent-green);
  color: white;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
}

.locker-status-badge.valid {
  background: var(--accent-green);
  color: white;
}

.locker-status-badge.expired {
  background: #ef4444;
  color: white;
}

/* 락커 카드 내용 */
.locker-card-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  justify-content: flex-start;
}

.locker-card-content.empty {
  justify-content: center;
  align-items: center;
}

.locker-member-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
}

.locker-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.locker-member-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  line-height: 1.2;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.locker-date-info {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.2;
  margin-top: 2px;
}

.locker-empty-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--text-tertiary);
}

.locker-empty-message i {
  font-size: 1.4vw;
  opacity: 0.4;
}

.locker-empty-message span {
  font-size: 1vw;
  font-weight: 600;
}

/* 락커 카드 액션 */
.locker-card-actions {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 0px;
}

.locker-card-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 1vw;
  transition: all 0.2s;
  border-radius: 3px;
  font-size: 0.65rem;
}

.locker-card-action-btn:hover {
  background: var(--bg-secondary);
  color: var(--accent-indigo);
}

/* 반응형 */
@media (max-width: 1600px) {
}

@media (max-width: 1400px) {
}

@media (max-width: 1200px) {
}

@media (max-width: 992px) {
  .locker-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .locker-zone-select {
    width: 100%;
  }
  
  .locker-actions {
    justify-content: stretch;
  }
  
  .locker-action-btn {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .locker-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .locker-search-box {
    max-width: 100%;
  }
  
  .locker-stats {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
}



/* ========================================
   Page Tabs Styles
   ======================================== */

.page-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.page-tab {
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  cursor: pointer;
}

.page-tab:hover {
  color: var(--accent-indigo);
}

.page-tab.active {
  color: var(--accent-indigo);
  border-bottom-color: var(--accent-indigo);
}

/* ========================================
   Access Log Page Styles
   ======================================== */

.access-log-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 필터 영역 */
.access-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.access-date-filter {
  display: flex;
  align-items: center;
}

.access-date-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.access-date-btn:hover {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.05);
}

.access-time-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.access-filter-btn {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.access-filter-btn:hover {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

.access-filter-btn.active {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: white;
}

/* 검색 및 정렬 */
.access-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.access-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex: 1;
  min-width: 250px;
}

.access-search i {
  color: var(--text-tertiary);
}

.access-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
}

.access-search input::placeholder {
  color: var(--text-tertiary);
}

.access-sort {
  display: flex;
  gap: 8px;
}

.access-sort-select {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  min-width: 100px;
}

.access-count {
  padding: 10px 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* 출입 기록 테이블 */
.access-table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.access-table {
  width: 100%;
  border-collapse: collapse;
}

.access-table thead {
  background: var(--bg-secondary);
}

.access-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.access-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.access-table tbody tr:last-child {
  border-bottom: none;
}

.access-table tbody tr:hover {
  background: var(--bg-secondary);
}

.access-table td {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.access-timestamp {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.access-date {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.access-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.access-member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.access-member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.access-member-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.access-member-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.access-member-phone {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.access-staff-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
}

.access-staff-badge i {
  color: var(--accent-purple);
}

.access-staff-badge span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.access-status-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-green);
  color: white;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ========================================
   Access Settings Page Styles
   ======================================== */

.access-settings-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.settings-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.settings-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-item-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-item-title i {
  color: var(--accent-indigo);
}

.settings-item-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 32px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-indigo);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* 시간대 설정 */
.settings-time-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.settings-time-item:last-child {
  border-bottom: none;
}

.settings-time-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
}

.settings-time-label i {
  color: var(--accent-indigo);
}

.settings-time-range {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-input {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .access-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .access-search {
    min-width: 100%;
  }

  .access-sort {
    width: 100%;
  }

  .access-sort-select {
    flex: 1;
  }

  .access-table-container {
    overflow-x: auto;
  }

  .access-table {
    min-width: 600px;
  }

  .settings-time-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .settings-time-range {
    width: 100%;
  }

  .time-input {
    flex: 1;
  }
}


/* Compact Settings Variants */
.settings-card.compact {
  padding: 16px;
  gap: 16px;
}

.settings-item.compact {
  padding-bottom: 16px;
  gap: 6px;
}

.settings-item.compact .settings-item-title {
  font-size: 0.95rem;
}

.settings-item.compact .settings-item-description {
  font-size: 0.85rem;
  padding-left: 28px;
}

/* Membership Settings */
.membership-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.membership-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.membership-tab:hover {
  color: var(--accent-indigo);
}

.membership-tab.active {
  color: var(--accent-indigo);
  border-bottom-color: var(--accent-indigo);
}

.membership-tab i {
  font-size: 0.85rem;
}

.membership-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 16px;
}

.membership-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s;
}

.membership-item:last-child {
  border-bottom: none;
}

.membership-item:hover {
  background: var(--bg-secondary);
}

.membership-item i {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.membership-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* Compact time settings */
.settings-card.compact .settings-time-item {
  padding: 12px 0;
}



/* ===== Finance Management Page ===== */
.cost-management-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Operation Period Banner */
.operation-period {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fbbf24;
  border-radius: 12px;
  padding: 16px 20px;
}

.period-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.period-icon {
  font-size: 1.3rem;
}

.period-title {
  font-size: 0.9rem;
  color: #92400e;
  line-height: 1.5;
}

.period-title strong {
  color: #78350f;
  font-weight: 700;
}

.period-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.period-progress {
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.period-labels {
  font-size: 0.75rem;
  color: #a16207;
}

/* Main Finance Cards */
.finance-main-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.finance-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finance-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.finance-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-tabs {
  display: flex;
  gap: 4px;
}

.tab-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: var(--surface-hover);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.finance-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.finance-card-change {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.finance-card-change.positive {
  color: #22c55e;
}

.finance-card-change.negative {
  color: #ef4444;
}

.finance-card-change strong {
  font-weight: 700;
}

/* Account List */
.account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-list h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
}

.account-item:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
}

.account-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-icon {
  font-size: 1.2rem;
}

.account-name {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.account-balance {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Category Breakdown */
.category-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

.category-badge.expense {
  opacity: 0.9;
}

.category-amount {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.category-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.category-progress {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Finance Section */
.finance-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.finance-section-header {
  margin-bottom: 20px;
}

.finance-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.finance-section-title i {
  color: var(--primary);
}

/* Monthly Trend Chart */
.monthly-trend-chart {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  min-width: 90px;
  text-align: right;
}

.chart-bars {
  flex: 1;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 16px;
  height: 300px;
}

.month-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.bar-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 260px;
  width: 100%;
}

.bar {
  position: relative;
  width: 32px;
  min-height: 10px;
  border-radius: 6px 6px 0 0;
  transition: all 0.3s;
  cursor: pointer;
}

.bar:hover {
  opacity: 0.8;
  transform: translateY(-4px);
}

.revenue-bar {
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
}

.expense-bar {
  background: linear-gradient(180deg, #c084fc, #a855f7);
}

.bar-value {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.month-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.chart-legend-horizontal {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.revenue {
  background: #3b82f6;
}

.legend-dot.expense {
  background: #a855f7;
}

/* Finance Detail Table */
.finance-detail-table {
  overflow-x: auto;
}

.finance-detail-table .data-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-detail-table .data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--background);
  border-bottom: 2px solid var(--border);
}

.finance-detail-table .data-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.amount-cell {
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.amount-cell.revenue {
  color: #3b82f6;
}

.amount-cell.expense {
  color: #a855f7;
}

.amount-cell.profit {
  color: #22c55e;
  font-size: 1rem;
}

.badge-success {
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-danger {
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.total-row {
  background: var(--background);
  font-weight: 700;
}

.total-row td {
  border-bottom: none;
  padding: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
  .finance-main-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .monthly-trend-chart {
    flex-direction: column;
  }
  
  .chart-y-axis {
    flex-direction: row;
    min-width: auto;
    text-align: center;
  }
  
  .chart-bars {
    height: 250px;
  }
  
  .bar {
    width: 24px;
  }
}

/* ===== Payment Detail Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg-surface);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.detail-value.highlight {
  color: var(--primary-600);
  font-size: 16px;
}

.detail-value.unpaid-text {
  color: #dc2626;
}

.detail-value.paid-text {
  color: #16a34a;
}

.installment-info {
  background: var(--bg-subtle);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.installment-icon {
  font-size: 20px;
}

.installment-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.modal-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.modal-btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.modal-btn-secondary:hover {
  background: var(--border);
}

.modal-btn-primary {
  background: var(--primary-600);
  color: white;
}

.modal-btn-primary:hover {
  background: var(--primary-700);
}

.table-row-clickable {
  cursor: pointer;
  transition: background-color 0.2s;
}

.table-row-clickable:hover {
  background-color: var(--bg-subtle) !important;
}


/* Unpaid Amount Notice */
.unpaid-notice {
  font-size: 11px;
  color: #dc2626;
  font-weight: 600;
  margin-top: 2px;
}


/* ========================================
   Product Modal
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.modal-container {
  background: white;
  border-radius: 12px;
  width: 95%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.modal-description {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin: 0 0 14px 0;
}

.modal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.modal-tab {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.modal-tab:hover {
  background: var(--bg-subtle);
  border-color: var(--text-tertiary);
}

.modal-tab.active {
  background: var(--accent-indigo);
  color: white;
  border-color: var(--accent-indigo);
}

.modal-search {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.modal-search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.modal-search-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-search-btn {
  padding: 8px 14px;
  background: var(--accent-indigo);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-search-btn:hover {
  background: var(--accent-blue);
  transform: translateY(-1px);
}

/* Tag cloud layout for products */
.modal-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
  padding: 4px 0;
}

.modal-product-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: #f5f5f5;
  color: #555;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border: 1px solid transparent;
}

.modal-product-tag:hover {
  background: #e8e8ff;
  color: var(--accent-indigo);
  border-color: var(--accent-indigo);
  transform: translateY(-1px);
}

.modal-product-tag:active {
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(0);
}

/* Legacy styles - keeping for backward compatibility */
.modal-product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
}

.modal-product-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-product-item:hover {
  background: var(--bg-subtle);
  border-color: var(--accent-indigo);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.modal-product-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-product-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-indigo);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}

.modal-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-product-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.modal-product-meta {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 0 0 12px 12px;
}

.modal-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-cancel {
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.modal-btn-cancel:hover {
  background: var(--bg-subtle);
  border-color: var(--text-tertiary);
}

.modal-btn-confirm {
  background: var(--accent-indigo);
  color: white;
}

.modal-btn-confirm:hover {
  background: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.modal-btn-confirm-purple {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--accent-indigo);
  color: white;
}

.modal-btn-confirm-purple:hover {
  background: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Product detail modal (second modal) */
.modal-container-detail {
  background: white;
  border-radius: 12px;
  width: 95%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

.product-detail-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 12px 0;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-label {
  flex-shrink: 0;
  width: 120px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}

.date-range-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.form-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  background: white;
  color: var(--text-primary);
  cursor: pointer;
}

.form-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  background: white;
  color: var(--text-primary);
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-btn {
  padding: 6px 12px;
  background: #f5f5f5;
  color: #555;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tag-btn.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-indigo);
  border-color: var(--accent-indigo);
}

.tag-btn:hover {
  background: #e8e8ff;
  border-color: var(--accent-indigo);
}

.amount-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--bg-subtle);
  border-radius: 6px;
}

.amount-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.amount-col label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.amount-col .amount-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-link-section {
  text-align: center;
  padding: 8px 0;
}

.detail-link {
  color: var(--accent-indigo);
  font-size: 0.8125rem;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-indigo);
}

.detail-link:hover {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.selection-action {
  text-align: center;
}

.btn-select-product {
  padding: 8px 24px;
  background: white;
  color: var(--accent-indigo);
  border: 1px solid var(--accent-indigo);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-select-product:hover {
  background: var(--accent-indigo);
  color: white;
}

/* Scrollbar for modal */
.modal-body::-webkit-scrollbar,
.modal-product-list::-webkit-scrollbar,
.modal-product-tags::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track,
.modal-product-list::-webkit-scrollbar-track,
.modal-product-tags::-webkit-scrollbar-track {
  background: var(--bg-subtle);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb,
.modal-product-list::-webkit-scrollbar-thumb,
.modal-product-tags::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.modal-product-list::-webkit-scrollbar-thumb:hover,
.modal-product-tags::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ========================================
   Product Assignment Modal - Form Layout
   ======================================== */


/* ========================================
   Split Modal Layout (Left: Select/Config, Right: List)
   ======================================== */

.modal-container-split {
  background: white;
  border-radius: 12px;
  width: 95%;
  max-width: 1100px;
  height: 110.5vh; /* 고정 높이 (85vh × 1.3) */
  max-height: 110.5vh; /* 최대 높이도 고정 */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

.modal-body-split {
  display: flex;
  gap: 0;
  flex: 1;
  overflow: hidden; /* 전체 body는 overflow 숨김 */
  min-height: 0; /* flex 자식이 올바르게 스크롤되도록 */
}

/* Left Panel - Product Selection and Config */
.modal-left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* 왼쪽 패널에 스크롤 */
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  min-height: 0; /* flex 스크롤 활성화 */
}

/* Blue Section - Product Selection */
.product-selection-tabs {
  border: 2px solid var(--accent-indigo);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.tabs-header {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.tab-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--accent-indigo);
  color: white;
  font-weight: 600;
}

.tab-btn:hover:not(.active) {
  background: var(--bg-subtle);
}

.product-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-tag-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-primary);
  font-size: 0.8125rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.product-tag-btn:hover {
  background: #f0f0ff;
  border-color: var(--accent-indigo);
}

.product-tag-btn.selected {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
  font-weight: 600;
}

/* Red Section - Product Config Form */
.product-config-form {
  border: 2px solid #e74c3c;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.form-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.selected-product-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-remove {
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-radius: 4px;
  cursor: pointer;
}

.btn-remove:hover {
  background: #fee;
  border-color: #e74c3c;
  color: #e74c3c;
}

.config-field {
  margin-bottom: 14px;
}

.config-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.config-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  background: white;
  cursor: pointer;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  background: white;
  cursor: pointer;
}

.config-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-indigo);
  font-size: 0.75rem;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-indigo);
}

.config-link:hover {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.amount-display {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 6px;
  margin: 16px 0;
}

.amount-col {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.amount-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.amount-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.detail-settings-link {
  color: var(--accent-indigo);
  font-size: 0.8125rem;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-indigo);
}

.detail-settings-link:hover {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.btn-add-product {
  padding: 8px 32px;
  border: 1px solid var(--accent-indigo);
  background: white;
  color: var(--accent-indigo);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-product:hover {
  background: var(--accent-indigo);
  color: white;
}

/* Right Panel - Green Section: Selected Products List */
.modal-right-panel {
  width: 350px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #f8fdf8;
  border: 2px solid #27ae60;
  border-radius: 0 12px 0 0;
  min-height: 0; /* flex 스크롤 활성화 */
  margin-right: 20px; /* 오른쪽 여백 추가 */
}

.selected-products-title {
  padding: 14px 16px;
  background: #27ae60;
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  border-bottom: 1px solid #229954;
  flex-shrink: 0; /* 타이틀은 항상 표시 */
}

.selected-products-list {
  flex: 1;
  overflow-y: auto; /* 오른쪽 패널에 스크롤 */
  padding: 16px 20px; /* 좌우 패딩 증가 */
  min-height: 0; /* flex 스크롤 활성화 */
}

.empty-state-selection {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.selected-product-item {
  background: white;
  border: 1px solid #d4edda;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.product-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.product-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-remove-item {
  padding: 2px 6px;
  border: 1px solid #ccc;
  background: white;
  color: #999;
  font-size: 0.75rem;
  border-radius: 3px;
  cursor: pointer;
}

.btn-remove-item:hover {
  background: #fee;
  border-color: #e74c3c;
  color: #e74c3c;
}

.product-item-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.product-item-amount {
  font-weight: 600;
  color: #27ae60;
  font-size: 0.875rem;
}

.modal-btn-purple {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--accent-indigo);
  color: white;
}

.modal-btn-purple:hover {
  background: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Payment Method Section */
.payment-method-section {
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
}

.section-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.payment-method-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.payment-method-item {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 28px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.payment-method-select {
  flex-shrink: 0;
  width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  background: white;
  cursor: pointer;
}

.payment-amount-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  text-align: right;
}

.btn-remove-payment {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-payment:hover {
  background: #fee;
  border-color: #e74c3c;
  color: #e74c3c;
}

.btn-add-payment {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--accent-indigo);
  background: white;
  color: var(--accent-indigo);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-payment:hover {
  background: rgba(99, 102, 241, 0.05);
  border-style: solid;
}

/* Amount Info Section */
.amount-info-section {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 16px;
}

.amount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.amount-row:last-child {
  border-bottom: none;
  font-weight: 600;
}

.amount-row .amount-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.amount-row .amount-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Date Input Fields */
.date-input-field {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  background: white;
  cursor: pointer;
}

.date-input-field:read-only {
  background: #f5f5f5;
  cursor: not-allowed;
}

.date-input-field:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Custom scrollbar for modal panels */
.modal-left-panel::-webkit-scrollbar,
.selected-products-list::-webkit-scrollbar {
  width: 8px;
}

.modal-left-panel::-webkit-scrollbar-track,
.selected-products-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.modal-left-panel::-webkit-scrollbar-thumb,
.selected-products-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.modal-left-panel::-webkit-scrollbar-thumb:hover,
.selected-products-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Two-column layout for config fields */
.config-field-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.config-field-half {
  flex: 1;
  margin-bottom: 0 !important;
}

/* Two-thirds and one-third layout */
.config-field-two-thirds {
  flex: 2;
  margin-bottom: 0 !important;
}

.config-field-one-third {
  flex: 1;
  margin-bottom: 0 !important;
}

/* Unpaid amount highlighting */
.amount-row-highlight {
  font-weight: 600;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 8px;
}

.amount-row-warning {
  background-color: #fff3cd;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #ffc107;
}

.amount-row-warning .amount-value {
  color: #856404;
  font-weight: 700;
}

/* 3-Column Amount Grid Section */
.amount-grid-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 8px 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #e0e0e0;
  align-items: center;
}

.amount-grid-column {
  display: contents;
}

.amount-grid-column-discount {
  display: contents;
}

.amount-grid-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  grid-row: 1;
}

.amount-grid-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  grid-row: 2;
}

.amount-grid-unpaid {
  font-size: 0.6875rem;
  color: #856404;
  background: #fff3cd;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #ffc107;
  font-weight: 600;
  grid-row: 3;
  text-align: center;
}

.amount-grid-unpaid.zero {
  display: none;
}

/* Payment input fields */
.payment-sale-input,
.payment-received-input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  text-align: right;
}

.payment-sale-input {
  background: #fff8e1;
  border-color: #ffc107;
  grid-column: 2; /* 판매금액 열 */
}

.payment-sale-input:focus {
  outline: none;
  border-color: #ff9800;
  background: white;
}

.payment-received-input {
  background: white;
  grid-column: 3; /* 받은금액 열 */
}

.payment-received-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
}

/* Single received input for additional payment methods */
.payment-received-only {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  text-align: right;
  background: white;
  grid-column: 3; /* 받은금액 열 - 위의 받은금액과 동일한 열 */
}

.payment-received-only:focus {
  outline: none;
  border-color: var(--accent-indigo);
}

/* Payment header row */
.payment-header-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 28px;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.payment-header-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.payment-header-spacer {
  width: 28px;
}

/* Discount amount display */
.amount-grid-discount {
  font-size: 1rem;
  color: #dc3545;
  font-weight: 700;
  text-align: center;
  grid-row: 2;
}

.amount-grid-discount.zero {
  visibility: hidden;
}

/* Half-width config field */
.config-field-half-width {
  max-width: 50%;
}

/* 회원 정보 수정 모달 */
.modal-container-edit {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

.modal-body-edit {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* 프로필 섹션 */
.edit-profile-section {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.edit-profile-avatar {
  position: relative;
}

/* 입력 필드 */
.edit-field {
  margin-bottom: 20px;
}

.edit-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.edit-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.edit-input:focus {
  outline: none;
  border-color: #8b7ab8;
}

.edit-input:read-only {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

/* 성별 라디오 버튼 */
.edit-radio-group {
  display: flex;
  gap: 16px;
}

.edit-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
}

.edit-radio-label input[type="radio"] {
  cursor: pointer;
}

/* 생년월일 입력 */
.edit-date-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-input-small {
  width: 70px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.edit-input-small:focus {
  outline: none;
  border-color: #8b7ab8;
}

.edit-date-group span {
  font-size: 14px;
  color: #666;
}

/* 주소 그룹 */
.edit-address-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.edit-address-group .edit-input {
  flex: 1;
}

.btn-remove-tag {
  padding: 8px 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: background-color 0.2s;
}

.btn-remove-tag:hover {
  background: #e0e0e0;
}

/* 텍스트 영역 */
.edit-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.edit-textarea:focus {
  outline: none;
  border-color: #8b7ab8;
}

/* 모달 버튼 스타일 업데이트 */
.modal-btn-primary {
  background: #8b7ab8;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-btn-primary:hover {
  background: #7a69a7;
}

/* 스크롤바 스타일 */
.modal-body-edit::-webkit-scrollbar {
  width: 8px;
}

.modal-body-edit::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.modal-body-edit::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.modal-body-edit::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 주소 검색 버튼 */
.btn-address-search {
  padding: 10px 16px;
  background: #8b7ab8;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-address-search:hover {
  background: #7a69a7;
}

.btn-address-search i {
  font-size: 14px;
}

/* 주소 input 클릭 가능 스타일 */
#memberAddress {
  cursor: pointer !important;
  background-color: white !important;
}

#memberAddress:hover {
  border-color: #8b7ab8;
}

/* ===== 전체 디자인 개선: 둥근 모서리 & 음영 효과 ===== */

/* 기본 카드 스타일 개선 */
.detail-panel,
.member-profile-header,
.sales-table-container,
.member-grid-4col > section {
  border-radius: 16px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  background: white;
  border: 1px solid #f0f0f0;
}

/* 회원 정보 그리드 음영 */
.member-info-grid {
  background: #f8fdf8 !important;
  border: 2px solid #c8e6c9 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.15) !important;
  padding: 20px !important;
}

/* 상품 아이템 카드 */
.product-item {
  background: white;
  border: 1px solid #f0f0f0 !important;
  border-radius: 12px !important;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-2px);
}

/* 결제 내역 테이블 */
.payment-history-table {
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
}

.payment-history-table th {
  background: #f8f9fa !important;
  border-bottom: 2px solid #e9ecef !important;
}

.payment-history-table td {
  border-bottom: 1px solid #f0f0f0 !important;
}

/* 출석 기록 아이템 */
.visit-history-item {
  background: white;
  border: 1px solid #f0f0f0 !important;
  border-radius: 10px !important;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* 버튼 스타일 개선 */
.btn,
.btn-primary,
.btn-secondary,
.btn-outline {
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.2s;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-1px);
}

/* 입력 필드 */
.edit-input,
.edit-textarea,
.date-input-field,
.payment-sale-input,
.payment-received-input {
  border-radius: 8px !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.2s;
}

.edit-input:focus,
.edit-textarea:focus,
.date-input-field:focus,
.payment-sale-input:focus,
.payment-received-input:focus {
  border-color: #8b7ab8 !important;
  box-shadow: 0 0 0 3px rgba(139, 122, 184, 0.1) !important;
}

/* 모달 컨테이너 */
.modal-container-split,
.modal-container-edit {
  border-radius: 20px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
}

/* 상품 태그 버튼 */
.product-tag-btn {
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.2s;
}

.product-tag-btn:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-1px);
}

.product-tag-btn.selected {
  box-shadow: 0 3px 8px rgba(139, 122, 184, 0.25) !important;
}

/* 금액 정보 그리드 */
.amount-grid-section {
  background: #fafafa !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

/* 결제수단 섹션 */
.payment-method-section {
  background: white;
  border: 1px solid #f0f0f0 !important;
  border-radius: 12px !important;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

/* 선택한 상품 리스트 */
.selected-products-list {
  background: #f8f9fa !important;
  border-radius: 12px !important;
  padding: 12px;
}

.selected-product-item {
  background: white !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 10px !important;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* 탭 버튼 */
.tab-btn {
  border-radius: 8px 8px 0 0 !important;
  transition: all 0.2s;
}

.tab-btn.active {
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* 미수금 배지 */
.amount-grid-unpaid {
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(255, 193, 7, 0.2) !important;
}

/* 헤더 패널 */
.detail-panel-header {
  border-radius: 12px 12px 0 0 !important;
}

/* 프로필 아바타 */
.member-avatar-large {
  border-radius: 50% !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* 상태 배지 */
.status-badge {
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* 검색 입력 */
.sales-search {
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* 드롭다운 */
select,
.config-select,
.edit-input[type="select"] {
  border-radius: 8px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

/* 노트 섹션 */
.notes-section {
  background: #fffef7 !important;
  border: 1px solid #f5f0e0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

/* 애니메이션 효과 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-panel,
.product-item,
.visit-history-item {
  animation: fadeIn 0.3s ease-out;
}

/* 출석 기록 컴팩트 스타일 */
.visit-history-item {
  padding: 8px 12px !important;
  margin-bottom: 4px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.visit-history-item .visit-date {
  font-size: 13px !important;
  font-weight: 500;
}

.visit-history-item .visit-time {
  font-size: 12px !important;
  color: #666;
}

/* 출석 기록 섹션 */
.detail-panel.visit-section {
  max-height: 400px;
  overflow-y: auto;
}

/* 출석 기록 리스트 컨테이너 */
.detail-panel-body {
  padding: 12px !important;
}

/* 출석 기록 아이템 컴팩트 스타일 - 더 많은 내용 표시 */
.visit-item {
  padding: 6px 10px !important;
  margin-bottom: 4px !important;
  min-height: auto !important;
}

.visit-date-group {
  gap: 6px !important;
}

.visit-date {
  font-size: 13px !important;
  line-height: 1.3 !important;
}

.visit-time {
  font-size: 12px !important;
  line-height: 1.3 !important;
}

/* 출석 기록 섹션 최대 높이 설정 */
.attendance-section .detail-panel-body {
  max-height: 350px;
  overflow-y: auto;
  padding: 8px !important;
}

/* 삭제 버튼 크기 축소 */
.visit-item .btn-icon-sm {
  padding: 2px 6px !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

/* 회원 정보 그리드 - 초록색 제거, 일반 카드 스타일 */
.member-info-grid {
  background: white !important;
  border: 1px solid #f0f0f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  padding: 20px !important;
}

/* ========================================
   COMPACT LIST DESIGN - 상품 & 출석 기록
   ======================================== */

/* 상품 리스트 컴팩트 디자인 */
.products-list {
  padding: 0 !important;
}

.product-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.product-list-item:last-child {
  border-bottom: none;
}

.product-list-item:hover {
  background-color: #fafafa;
}

.product-list-icon {
  color: #ec407a;
  font-size: 10px;
  margin-top: 4px;
  flex-shrink: 0;
}

.product-list-content {
  flex: 1;
  min-width: 0;
}

.product-list-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.product-list-name {
  font-size: 14px;
  font-weight: 600;
  color: #212121;
}

.product-list-badge {
  display: inline-block;
  padding: 2px 8px;
  background-color: #e3f2fd;
  color: #1976d2;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.product-list-period {
  font-size: 12px;
  color: #757575;
  line-height: 1.4;
}

.product-menu-btn {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.product-list-item:hover .product-menu-btn {
  opacity: 1;
}

/* 출석 기록 리스트 컴팩트 디자인 */
.attendance-list {
  padding: 0 !important;
}

.attendance-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #f5f5f5;
  transition: background-color 0.2s ease;
}

.attendance-list-item:last-child {
  border-bottom: none;
}

.attendance-list-item:hover {
  background-color: #fafafa;
}

.attendance-list-icon {
  color: #ec407a;
  font-size: 8px;
  flex-shrink: 0;
}

.attendance-list-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.attendance-list-date {
  font-size: 13px;
  color: #424242;
  font-weight: 500;
  min-width: 100px;
}

.attendance-list-time {
  font-size: 13px;
  color: #757575;
}

.btn-icon-xs {
  background: none;
  border: none;
  font-size: 16px;
  color: #bdbdbd;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
}

.attendance-list-item:hover .btn-icon-xs {
  opacity: 1;
}

.btn-icon-xs:hover {
  color: #f44336;
  transform: scale(1.2);
}

/* 패널 헤더 간격 조정 */
.products-section .detail-panel-header,
.attendance-section .detail-panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
}

/* 탭 버튼 스타일 개선 */
.tabs-header {
  display: flex;
  gap: 4px;
}

.tab-btn {
  padding: 6px 12px;
  background: none;
  border: none;
  color: #757575;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background-color: #f5f5f5;
  color: #212121;
  font-weight: 600;
}

.tab-btn:hover:not(.active) {
  background-color: #fafafa;
  color: #424242;
}

/* 카운트 뱃지 스타일 */
.count-badge {
  font-size: 12px;
  color: #9e9e9e;
  font-weight: 400;
}

/* 스크롤 영역 최적화 */
.products-section .detail-panel-body,
.attendance-section .detail-panel-body {
  max-height: 400px;
  overflow-y: auto;
}

/* 스크롤바 스타일 */
.products-section .detail-panel-body::-webkit-scrollbar,
.attendance-section .detail-panel-body::-webkit-scrollbar {
  width: 6px;
}

.products-section .detail-panel-body::-webkit-scrollbar-track,
.attendance-section .detail-panel-body::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.products-section .detail-panel-body::-webkit-scrollbar-thumb,
.attendance-section .detail-panel-body::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 3px;
}

.products-section .detail-panel-body::-webkit-scrollbar-thumb:hover,
.attendance-section .detail-panel-body::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}


/* ========================================
   ALIGNED 4-COLUMN GRID WITH FIXED HEIGHT
   ======================================== */

/* 4개 섹션 높이 통일 */
.member-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: stretch; /* 높이 맞춤 */
}

/* 각 섹션을 동일한 높이로 설정 */
.products-section,
.attendance-section,
.reservation-section,
.stat-cards-wrapper {
  display: flex;
  flex-direction: column;
  height: 450px; /* 고정 높이 */
}

/* detail-panel 전체 높이 사용 */
.products-section.detail-panel,
.attendance-section.detail-panel,
.reservation-section.detail-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* body 영역이 남은 공간 채우도록 */
.products-section .detail-panel-body,
.attendance-section .detail-panel-body,
.reservation-section .detail-panel-body {
  flex: 1;
  overflow-y: auto;
  max-height: none; /* 이전 max-height 제거 */
}

/* stat-cards-wrapper도 동일한 높이 */
.stat-cards-wrapper {
  height: 100%;
}

.stat-cards-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  height: 100%;
  width: 100%;
}

/* 통계 카드들이 그리드 영역 가득 채우기 */
.stat-card-compact {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* 가로 폭 조정 - 각 컬럼을 약간 좁게 */
.member-grid-4col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 100%;
}


/* ========================================
   ATTENDANCE VIEW TOGGLE & CALENDAR
   ======================================== */

/* 출석 기록 섹션 가로 폭 조정 */
.attendance-section {
  max-width: 95%; /* 가로 길이 약간 줄임 */
}

/* 출석 기록 폰트 크기 줄임 */
.attendance-list-date {
  font-size: 12px !important; /* 13px → 12px */
  min-width: 90px;
}

.attendance-list-time {
  font-size: 11px !important; /* 13px → 11px */
}

/* 헤더에 뷰 전환 버튼 배치 */
.attendance-section .detail-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.attendance-view-toggle {
  display: flex;
  gap: 4px;
  background: #f5f5f5;
  padding: 3px;
  border-radius: 6px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.view-toggle-btn:hover {
  background: #e0e0e0;
}

.view-toggle-btn.active {
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-icon {
  display: inline-block;
}

/* 캘린더 스타일 */
.attendance-calendar {
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e0e0e0;
}

.calendar-title {
  font-size: 15px;
  font-weight: 600;
  color: #212121;
}

.calendar-nav-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #616161;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.calendar-nav-btn:hover {
  background: #f5f5f5;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #757575;
  padding: 8px 0;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  color: #424242;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-day:hover:not(.empty) {
  background: #f5f5f5;
}

.calendar-day.empty {
  visibility: hidden;
}

.calendar-day.today {
  background: #e3f2fd;
  font-weight: 600;
  color: #1976d2;
}

.calendar-day.attended {
  background: #fff3e0;
  border: 2px solid #ff9800;
}

.calendar-day.attended.today {
  background: #e1f5fe;
  border: 2px solid #03a9f4;
}

.day-number {
  font-size: 13px;
}

.attendance-dot {
  position: absolute;
  bottom: 2px;
  font-size: 6px;
  color: #ec407a;
}

/* 캘린더 뷰 스크롤 */
.attendance-calendar::-webkit-scrollbar {
  width: 6px;
}

.attendance-calendar::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.attendance-calendar::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 3px;
}


/* ========================================
   FIX: ATTENDANCE SECTION SIZE CONSISTENCY
   ======================================== */

/* 출석 기록 섹션 크기 고정 */
.attendance-section {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}

/* 리스트/캘린더 뷰 모두 동일한 높이 */
#attendanceListView,
#attendanceCalendarView {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* 캘린더 그리드 크기 고정 */
.calendar-grid {
  width: 100%;
  max-width: 100%;
}

/* 캘린더 날짜 셀 크기 고정 */
.calendar-day {
  min-height: 40px;
  max-height: 60px;
  padding: 4px;
}


/* ========================================
   CRITICAL FIX: LOCK ALL SECTION HEIGHTS
   ======================================== */

/* 모든 4개 섹션 높이 완전 고정 */
.products-section,
.attendance-section,
.reservation-section,
.stat-cards-wrapper {
  height: 450px !important;
  min-height: 450px !important;
  max-height: 450px !important;
  flex: none !important;
}

/* detail-panel 높이도 고정 */
.products-section.detail-panel,
.attendance-section.detail-panel,
.reservation-section.detail-panel {
  height: 450px !important;
  min-height: 450px !important;
  max-height: 450px !important;
}

/* body 영역이 남은 공간만 사용하도록 */
.products-section .detail-panel-body,
.attendance-section .detail-panel-body,
.reservation-section .detail-panel-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
}

/* 캘린더 뷰도 동일한 제약 */
#attendanceListView,
#attendanceCalendarView {
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* stat-cards-wrapper 높이 고정 */
.stat-cards-wrapper {
  height: 450px !important;
}

.stat-cards-grid-2x2 {
  height: 450px !important;
  min-height: 450px !important;
  max-height: 450px !important;
}


/* 회원 페이지 필터 드롭다운 스타일 */
.filter-dropdown {
  position: relative;
}

.filter-dropdown.active {
  background-color: #e91e63;
  color: white;
}

.filter-dropdown.has-active-filter {
  background-color: #f8bbd0;
  border-color: #e91e63;
}

.filter-badge {
  display: inline-block;
  background-color: #e91e63;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
  min-width: 18px;
  text-align: center;
}

.filter-dropdown.has-active-filter .filter-badge {
  background-color: white;
  color: #e91e63;
}

.filter-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 180px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 9999;
  margin-top: 4px;
  padding: 8px 0;
}

.filter-options label {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.filter-options label:hover {
  background-color: #f5f5f5;
}

.filter-options input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.filter-options input[type="checkbox"]:checked + span {
  color: #e91e63;
  font-weight: 500;
}


/* 생일 필터 스타일 */
.filter-options-birthday {
  min-width: 280px;
  max-width: 320px;
}

.filter-section {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  padding: 4px 16px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0 8px;
}

.filter-grid label {
  padding: 6px 8px;
  font-size: 13px;
}

.filter-grid label span {
  white-space: nowrap;
}


/* 필터 드롭다운 래퍼 - 상대 위치 지정 */
.filter-dropdown-wrapper {
  position: relative;
  display: inline-block;
}


/* 필터 드롭다운이 잘리지 않도록 overflow visible 설정 */
.members-filters {
  overflow: visible !important;
}

.filters-container {
  overflow: visible !important;
}

.filter-row {
  overflow: visible !important;
  position: relative;
  z-index: 100;
}

.filter-dropdown-wrapper {
  position: relative;
  display: inline-block;
  z-index: 100;
}


/* 범위 필터 스타일 */
.filter-options-range {
  min-width: 300px;
  padding: 12px 16px;
}

.range-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.range-input {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
}

.range-input:focus {
  outline: none;
  border-color: #e91e63;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.range-filter span {
  color: #666;
  font-size: 14px;
  white-space: nowrap;
}

.range-filter .btn {
  margin-left: auto;
}

