/* Leekim Tax & Treasury System Custom Stylesheet */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-main: #f8fafc;
  --border-color: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: #f1f5f9;
  color: var(--text-main);
  margin: 0;
  padding: 0;
}

/* Header */
.top-header {
  background-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Tab Buttons */
.nav-tab-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  background: transparent;
  color: #94a3b8;
}
.nav-tab-btn:hover {
  background-color: #1e293b;
  color: #ffffff;
}
.nav-tab-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* Layout */
.main-wrapper {
  max-width: 1400px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

/* Cards */
.card-box {
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.card-header {
  background-color: #f8fafc;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-body {
  padding: 1.25rem;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.kpi-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0.25rem 0;
  font-variant-numeric: tabular-nums;
}

/* Spreadsheet Tables */
.sheet-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}
.sheet-table th, .sheet-table td {
  border: 1px solid #cbd5e1;
  padding: 7px 12px;
  font-size: 13px;
  white-space: nowrap;
}
.sheet-table th {
  background-color: #f1f5f9;
  font-weight: 700;
  color: #334155;
  text-align: center;
}
.sheet-table tr:hover td {
  background-color: #f8fafc;
}
.cell-editable {
  cursor: cell;
  outline: none;
}
.cell-editable:focus {
  background-color: #eff6ff !important;
  box-shadow: inset 0 0 0 2px #3b82f6;
}
.num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }
.btn-indigo { background: #4f46e5; color: #fff; }
.btn-indigo:hover { background: #4338ca; }
.btn-dark { background: #334155; color: #fff; }
.btn-dark:hover { background: #1e293b; }
.btn-warning { background: #d97706; color: #fff; }
.btn-warning:hover { background: #b45309; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-box {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 650px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
