/* ═══════════════════════════════════════
   ReceiptFlow - Misc Component Styles
   ═══════════════════════════════════════ */

/* ── Shared / Reusable ── */

.icon-mr { margin-right: 6px; }
.icon-mr-sm { margin-right: 4px; }
.icon-mr-md { margin-right: 8px; }

.flex-row { display: flex; }
.flex-row--gap-sm { gap: 4px; }
.flex-row--gap { gap: 8px; }
.flex-row--gap-md { gap: 10px; }
.flex-row--gap-lg { gap: 12px; }
.flex-row--gap-xl { gap: 16px; }
.flex-row--center { align-items: center; }
.flex-row--between { justify-content: space-between; }
.flex-row--end { justify-content: flex-end; }
.flex-row--wrap { flex-wrap: wrap; }

.flex-col { display: flex; flex-direction: column; }
.flex-col--gap-sm { gap: 4px; }
.flex-col--gap { gap: 8px; }
.flex-col--gap-md { gap: 12px; }

.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-col-full { grid-column: 1 / -1; }
.grid-gap-md { gap: 16px; }

.text-mono { font-family: 'Source Code Pro', monospace; }
.text-bold { font-weight: 600; }
.text-bolder { font-weight: 700; }
.text-boldest { font-weight: 800; }
.text-sm { font-size: .82rem; }
.text-xs { font-size: .75rem; }
.text-muted-light { color: #94a3b8; }
.text-muted-mid { color: #64748b; }
.text-dark { color: #1e293b; }
.text-center { text-align: center; }
.text-nowrap { white-space: nowrap; }
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 14px; }
.mb-lg { margin-bottom: 16px; }
.mb-xl { margin-bottom: 20px; }
.mb-2xl { margin-bottom: 24px; }
.mb-3xl { margin-bottom: 28px; }
.mt-sm { margin-top: 2px; }
.mt-md { margin-top: 4px; }
.mt-lg { margin-top: 8px; }
.mt-xl { margin-top: 16px; }

.p-0 { padding: 0; }
.overflow-hidden { overflow: hidden; }

.btn--block { width: 100%; }
.btn--approve { background: #059669; color: #fff; border: none; }
.btn--approve:hover { background: #047857; }

.required-mark { color: #dc2626; }

.flash-alert--mb { margin-bottom: 16px; }

.card--flush { padding: 0; overflow: hidden; }
.card--narrow-form { max-width: 440px; }
.card__body--flush { padding: 0; }
.card__body--p-lg { padding: 24px; }
.card__body--p-sm { padding: 16px; }
.card__body--chart { padding: 8px 0 0; }

.page-subtitle { font-size: .85rem; color: var(--color-text-muted); }

/* ── Tooltip (chart tooltips) ── */

.chart-tooltip {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  font-size: .78rem;
}
.chart-tooltip__label { color: #64748b; margin-bottom: 4px; }
.chart-tooltip__value { font-weight: 700; font-family: 'Source Code Pro', monospace; }
.chart-tooltip__value--purple { color: #7c3aed; }
.chart-tooltip__value--blue { color: #2563eb; }
.chart-tooltip__name { font-weight: 600; color: #0f172a; margin-bottom: 2px; }
.chart-tooltip__pct { color: #94a3b8; }

/* ── Dashboard ── */

.dashboard__actions { display: flex; gap: 8px; }

.dashboard__stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 640px) {
  .dashboard__stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.dashboard__stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dashboard__stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.1;
}
.dashboard__stat-label {
  font-size: .73rem;
  color: #94a3b8;
  margin-top: 2px;
}

.dashboard__chart-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .dashboard__chart-grid { grid-template-columns: 1fr; }
}

.dashboard__chart-empty {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: .85rem;
}
.dashboard__chart-empty-icon {
  font-size: 2rem;
  opacity: .2;
  display: block;
  margin-bottom: 8px;
}

.dashboard__bar-empty {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: .85rem;
}
.dashboard__bar-empty-icon {
  font-size: 2rem;
  opacity: .2;
}

.dashboard__chart-icon--purple { color: #7c3aed; }
.dashboard__chart-icon--green { color: #059669; }
.dashboard__chart-icon--blue { color: #2563eb; }

.dashboard__monthly-total {
  font-size: .75rem;
  color: #94a3b8;
}

.dashboard__cat-legend {
  padding: 4px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dashboard__cat-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .75rem;
}
.dashboard__cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dashboard__cat-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #374151;
}
.dashboard__cat-pct {
  font-family: 'Source Code Pro', monospace;
  font-weight: 600;
  color: #0f172a;
  flex-shrink: 0;
}

.dashboard__recent-header {
  display: flex;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}
.dashboard__recent-title {
  padding: 12px 20px;
  font-size: .88rem;
  font-weight: 600;
  color: #6366f1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dashboard__recent-count {
  font-size: .7rem;
  background: #e0e7ff;
  color: #6366f1;
  border-radius: 99px;
  padding: 1px 7px;
}
.dashboard__recent-actions {
  margin-left: auto;
  padding: 10px 16px;
}

.dashboard__empty {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
}
.dashboard__empty-icon {
  font-size: 2rem;
  opacity: .3;
  display: block;
  margin-bottom: 8px;
}

.dashboard__td-date {
  font-size: .82rem;
  color: #64748b;
  white-space: nowrap;
}
.dashboard__td-vendor { font-weight: 500; }
.dashboard__td-category {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
}
.dashboard__td-category-icon { font-size: 11px; }
.dashboard__td-category-empty {
  font-size: .78rem;
  color: #94a3b8;
}
.dashboard__td-amount {
  text-align: right;
  font-family: 'Source Code Pro', monospace;
  font-weight: 700;
}

/* ── Pricing Page ── */

.pricing {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.pricing__header {
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.pricing__logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pricing__logo-icon i { color: #fff; font-size: .9rem; }
.pricing__logo-text {
  font-weight: 800;
  font-size: 1.15rem;
  color: #1e293b;
  letter-spacing: -.02em;
}
.pricing__nav-link {
  color: #64748b;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
}
.pricing__nav-cta {
  background: #6366f1;
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}

.pricing__hero {
  text-align: center;
  padding: 60px 24px 40px;
  max-width: 760px;
  margin: 0 auto;
}
.pricing__badge {
  display: inline-block;
  background: #eef2ff;
  color: #6366f1;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: .03em;
}
.pricing__hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #1e293b;
  line-height: 1.15;
  margin: 0 0 16px;
}
.pricing__hero-desc {
  font-size: 1.1rem;
  color: #64748b;
  margin: 0 0 32px;
  line-height: 1.6;
}

.pricing__currency-picker {
  display: inline-flex;
  gap: 4px;
  background: #fff;
  padding: 4px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  border: 1px solid #e2e8f0;
}
.pricing__currency-btn {
  padding: 6px 16px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  transition: all .15s;
}
.pricing__currency-btn--active {
  background: #6366f1;
  color: #fff;
}
.pricing__currency-btn--inactive {
  background: transparent;
  color: #64748b;
}

.pricing__plans {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
@media (max-width: 768px) {
  .pricing__plans { grid-template-columns: 1fr; }
}
.pricing__plans-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: #94a3b8;
}
.pricing__plans-loading i { font-size: 2rem; }

.pricing__plan-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing__plan-card--default {
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.pricing__popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  padding: 3px 18px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
}
.pricing__plan-header { margin-bottom: 24px; }
.pricing__plan-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pricing__plan-icon i { font-size: .9rem; }
.pricing__plan-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: #1e293b;
}
.pricing__plan-desc {
  color: #64748b;
  font-size: .88rem;
  margin: 0 0 20px;
  line-height: 1.5;
}
.pricing__plan-price {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 4px;
}
.pricing__price-amount {
  font-size: 2.5rem;
  font-weight: 900;
  color: #1e293b;
  line-height: 1;
}
.pricing__price-amount--free {
  font-size: 2rem;
}
.pricing__price-period {
  font-size: .85rem;
  color: #94a3b8;
  margin-bottom: 6px;
}
.pricing__plan-quota {
  color: #94a3b8;
  font-size: .8rem;
  margin: 0;
}
.pricing__plan-cta {
  display: block;
  text-align: center;
  padding: 12px 0;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 28px;
}
.pricing__plan-cta--primary { color: #fff; }
.pricing__plan-cta--outline { background: transparent; }

.pricing__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing__feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
}
.pricing__feature-icon {
  font-size: 1rem;
  flex-shrink: 0;
}
.pricing__feature-icon--check { color: #22c55e; }
.pricing__feature-icon--cross { color: #e2e8f0; }
.pricing__feature-text--active { color: #1e293b; }
.pricing__feature-text--inactive { color: #94a3b8; }

.pricing__compare {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.pricing__compare-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 32px;
}
.pricing__compare-table-wrap {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.pricing__compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.pricing__compare-table th,
.pricing__compare-table td {
  padding: 12px 20px;
  border-bottom: 1px solid #f1f5f9;
}
.pricing__compare-table thead tr { background: #f8fafc; }
.pricing__compare-table thead th {
  padding: 16px 20px;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
}
.pricing__compare-th-feature {
  text-align: left;
  color: #64748b;
  width: 40%;
}
.pricing__compare-th-plan { text-align: center; }
.pricing__compare-td-label { font-weight: 600; color: #1e293b; }
.pricing__compare-td-label--sub { color: #475569; font-weight: 400; }
.pricing__compare-td-value { text-align: center; font-weight: 600; color: #1e293b; }
.pricing__compare-td-check { text-align: center; }
.pricing__compare-row--alt { background: #f8fafc; }
.pricing__compare-icon--check { color: #22c55e; font-size: 1.1rem; }
.pricing__compare-icon--cross { color: #d1d5db; font-size: 1.1rem; }

.pricing__footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: .82rem;
}
.pricing__footer p { margin: 0; }
.pricing__footer-link {
  color: #6366f1;
  text-decoration: none;
}

/* ── Approvals ── */

.approval__tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}
.approval__tab {
  padding: 8px 20px;
  font-size: .88rem;
  cursor: pointer;
  border: none;
  background: none;
  transition: all .15s;
}
.approval__tab--active {
  font-weight: 700;
  border-bottom: 2.5px solid #6366f1;
  color: #6366f1;
}
.approval__tab--inactive {
  font-weight: 500;
  border-bottom: 2.5px solid transparent;
  color: #64748b;
}
.approval__tab-count {
  margin-left: 8px;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
}
.approval__tab-count--red { background: #ef4444; }
.approval__tab-count--gray { background: #94a3b8; }

.approval__step-badge {
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}

.approval__empty {
  padding: 48px;
  text-align: center;
  color: #94a3b8;
}
.approval__empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
}
.approval__empty-icon--green { color: #059669; }

.approval__vendor-name { font-weight: 600; font-size: .88rem; }
.approval__vendor-cat { font-size: .75rem; color: #94a3b8; }
.approval__amount {
  text-align: right;
  font-family: 'Source Code Pro', monospace;
  font-weight: 700;
  color: #2563eb;
}
.approval__level-name { font-weight: 600; font-size: .85rem; }
.approval__level-step { font-size: .75rem; color: #94a3b8; }
.approval__requester { font-size: .85rem; }
.approval__date { font-size: .82rem; color: #64748b; }

.approval__req-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.approval__req-vendor { font-weight: 700; font-size: .95rem; }
.approval__req-meta { font-size: .82rem; color: #64748b; margin-top: 2px; }
.approval__req-amount {
  font-family: 'Source Code Pro', monospace;
  font-weight: 700;
  color: #2563eb;
}

.approval__timeline-node {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
}
.approval__timeline-node--approved { background: #059669; color: #fff; }
.approval__timeline-node--rejected { background: #dc2626; color: #fff; }
.approval__timeline-node--pending { background: #d97706; color: #fff; }
.approval__timeline-node--waiting { background: #e2e8f0; color: #94a3b8; }

.approval__timeline-line {
  width: 2px;
  flex: 1;
  min-height: 16px;
  background: #e2e8f0;
  margin: 3px 0;
}

.approval__timeline-row { align-items: flex-start; }
.approval__timeline-col { align-items: center; flex-shrink: 0; }
.approval__timeline-content { flex: 1; }

.approval__timeline-step-meta { font-size: .8rem; color: #64748b; margin-top: 2px; }

.approval__timeline-comment {
  font-size: .8rem;
  color: #475569;
  margin-top: 4px;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #e2e8f0;
}

.approval__modal-summary {
  background: #f8fafc;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}
.approval__modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.approval__modal-table tr { border-bottom: 1px solid #e2e8f0; }
.approval__modal-table tr:last-child { border-bottom: none; }
.approval__modal-table td { padding: 7px 0; }
.approval__modal-table-label { color: #64748b; width: 40%; }
.approval__modal-table-value--amount {
  font-weight: 700;
  color: #2563eb;
  font-family: 'Source Code Pro', monospace;
}
.approval__modal-link {
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.approval__textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: .88rem;
  resize: vertical;
  outline: none;
  font-family: inherit;
}

/* ── Categories ── */

.category__icon-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s;
}
.category__icon-preview {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.category__icon-label {
  flex: 1;
  text-align: left;
  font-size: .85rem;
  color: #374151;
  font-family: 'Source Code Pro', monospace;
}
.category__icon-chevron { font-size: 11px; color: #94a3b8; }

.category__icon-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  padding: 10px;
}
.category__icon-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}
.category__icon-option {
  aspect-ratio: 1;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .1s;
}

.category__table-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.category__toggle--on { background: #6366f1; }
.category__toggle--off { background: #cbd5e1; }
.category__toggle-knob {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.category__toggle-knob--on { left: 20px; }
.category__toggle-knob--off { left: 2px; }

.category__preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 20px;
}
.category__preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.category__preview-name {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
}

.category__color-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.category__color-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow .15s;
}

.category__empty {
  text-align: center;
  padding: 48px 0;
  color: #94a3b8;
}
.category__empty-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.category__th-icon { width: 56px; }
.category__th-status { width: 100px; }
.category__th-actions { width: 100px; }

/* ── Vendors ── */

.vendor__search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.vendor__search-input { max-width: 300px; }

.vendor__td-name { font-weight: 600; }
.vendor__td-name-th { color: #64748b; }
.vendor__td-tax { font-family: 'Source Code Pro', monospace; font-size: .82rem; }
.vendor__td-phone { font-size: .82rem; }
.vendor__td-notes {
  font-size: .8rem;
  color: #64748b;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vendor__empty {
  text-align: center;
  padding: 40px 0;
  color: #94a3b8;
}
.vendor__tax-input { font-family: 'Source Code Pro', monospace; }

/* ── Profile ── */

.profile__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.profile__card-icon { color: #6366f1; margin-right: 8px; }

.profile__avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.profile__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
}
.profile__user-name {
  font-weight: 700;
  font-size: 1rem;
  color: #1e293b;
}
.profile__user-email {
  font-size: .82rem;
  color: #64748b;
}
.profile__user-role {
  display: inline-block;
  margin-top: 4px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6366f1;
}

/* ── Legal Pages (Privacy / Terms) ── */

.legal {
  min-height: 100vh;
  background: #f8fafc;
}
.legal__header {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  padding: 20px 24px;
}
.legal__header-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.legal__logo-icon { font-size: 20px; }
.legal__logo-text {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.3px;
}
.legal__content {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.legal__title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}
.legal__updated {
  font-size: .85rem;
  color: #94a3b8;
  margin-bottom: 40px;
}
.legal__section { margin-bottom: 28px; }
.legal__section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 8px;
}
.legal__section-body {
  font-size: .9rem;
  color: #334155;
  line-height: 1.75;
}
.legal__footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 16px;
}
.legal__footer-link {
  color: #7c3aed;
  font-size: .88rem;
  font-weight: 600;
}

/* ── Auth Layout ── */

.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}

.auth-float-icon {
  position: absolute;
  bottom: -5%;
  color: #fff;
  pointer-events: none;
}

.auth-card-wrap {
  width: 100%;
  padding: 0;
  position: relative;
  z-index: 10;
  animation: cardIn .4s ease both;
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}

.auth-card-header {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  padding: 24px 24px 20px;
  border-radius: 12px 12px 0 0;
  text-align: center;
  position: relative;
}
.auth-card-header__logo-icon { font-size: 22px; }
.auth-card-header__logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.auth-card-header__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  opacity: 0.9;
}
.auth-card-header__subtitle {
  margin: 4px 0 0;
  font-size: .82rem;
  opacity: 0.75;
}
.auth-card-header__logo { justify-content: center; }
.auth-card-header__lang {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* ── Login ── */

.login__pw-wrap { position: relative; }
.login__pw-input { padding-right: 40px; }
.login__pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 14px;
}

.login__links {
  margin-top: 16px;
  text-align: center;
  font-size: .85rem;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.login__link { color: #7c3aed; }
.login__link-sep { color: #e2e8f0; }

.login__quick-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.login__quick-title {
  font-size: .72rem;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.login__quick-btns { display: flex; gap: 8px; }
.login__quick-btn {
  flex: 1;
  padding: 7px 0;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
}

/* ── Register ── */

.register__terms { margin-bottom: 16px; }
.register__terms-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.register__terms-checkbox {
  margin-top: 3px;
  accent-color: #7c3aed;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.register__terms-text {
  font-size: .83rem;
  color: #475569;
  line-height: 1.5;
}
.register__terms-link {
  color: #7c3aed;
  font-weight: 600;
}
.register__footer {
  margin-top: 16px;
  text-align: center;
  font-size: .85rem;
}
.register__footer-link { color: #7c3aed; }

/* ── Forgot Password ── */

.forgot__desc {
  font-size: .85rem;
  color: #64748b;
  margin-bottom: 20px;
}
.forgot__footer {
  margin-top: 16px;
  text-align: center;
  font-size: .85rem;
}
.forgot__footer-link { color: #7c3aed; }

/* ── Verify OTP ── */

.otp__input {
  font-size: 1.5rem;
  letter-spacing: 8px;
  text-align: center;
}

/* ── Change Password ── */

.changepw__actions { display: flex; gap: 8px; }

/* ── Receipt History ── */

.rh__summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.rh__summary-body { text-align: center; padding: 14px; }
.rh__summary-value { font-size: 1.4rem; font-weight: 800; }
.rh__summary-label { font-size: .75rem; color: #64748b; margin-top: 2px; }

.rh__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

.rh__cat-dropdown { position: relative; }
.rh__cat-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 150px;
}
.rh__cat-btn--active { background: #ede9fe; }
.rh__cat-icon { font-size: .75rem; }
.rh__cat-icon--active { color: #7c3aed; }
.rh__cat-icon--muted { color: #94a3b8; }
.rh__cat-label { flex: 1; text-align: left; font-size: .85rem; }
.rh__cat-label--active { color: #7c3aed; }
.rh__cat-chevron { font-size: .65rem; color: #94a3b8; }

.rh__cat-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 200;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  min-width: 210px;
  padding: 4px 0;
  max-height: 280px;
  overflow-y: auto;
}
.rh__cat-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: .85rem;
}
.rh__cat-option--selected { background: #f5f3ff; }
.rh__cat-checkbox { accent-color: #7c3aed; }
.rh__cat-option-icon { font-size: 11px; width: 14px; text-align: center; }
.rh__cat-option-name--active { color: #7c3aed; font-weight: 600; }

.rh__cat-clear {
  width: 100%;
  padding: 6px 14px;
  background: none;
  border: none;
  border-top: 1px solid #f1f5f9;
  cursor: pointer;
  font-size: .8rem;
  color: #7c3aed;
  text-align: left;
  margin-top: 2px;
}

.rh__status-pills { display: flex; gap: 4px; align-items: center; }
.rh__status-pill {
  cursor: pointer;
  padding: 5px 10px;
  font-size: .78rem;
}
.rh__status-pill--off {
  border: 1px solid #e2e8f0;
  font-weight: 400;
}
.rh__status-pill--on {
  border: none;
  font-weight: 700;
}
.rh__status-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: .85rem;
  padding: 2px 4px;
}

.rh__empty { text-align: center; padding: 48px 20px; color: #94a3b8; }
.rh__empty-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.rh__empty-text { font-weight: 600; color: #64748b; margin-bottom: 8px; }

.rh__td-date { white-space: nowrap; font-size: .82rem; }
.rh__td-cat-badge { display: inline-flex; align-items: center; gap: 5px; }
.rh__td-cat-icon { font-size: 11px; }
.rh__td-vendor {
  font-weight: 500;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rh__td-amount {
  text-align: right;
  font-weight: 700;
  font-family: 'Source Code Pro', monospace;
}
.rh__td-conf { font-size: .75rem; font-weight: 700; }
.rh__td-actions { display: flex; gap: 6px; justify-content: flex-end; }
.rh__td-actions .btn { padding: 4px 10px; font-size: .75rem; }
.rh__td-actions .btn--danger { padding: 4px 8px; font-size: .75rem; }

.rh__th-actions--admin { width: 140px; }
.rh__th-actions { width: 100px; }

/* Delete confirm modal */
.rh__modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.rh__modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.rh__modal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rh__modal-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rh__modal-icon { color: #dc2626; font-size: 16px; }
.rh__modal-title { font-weight: 700; font-size: 1rem; color: #0f172a; }
.rh__modal-desc { font-size: .82rem; color: #64748b; margin-top: 2px; }
.rh__modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ── Receipt Upload ── */

.ru__card-icon { color: var(--color-primary); margin-right: 6px; }

.ru__selected-hint {
  margin-top: 10px;
  font-size: .8rem;
  color: var(--color-success);
}

.ru__pdf-badge {
  background: #fef2f2;
  color: #dc2626;
  border-radius: 5px;
  padding: 1px 7px;
  font-size: .72rem;
  font-weight: 600;
}
.ru__pdf-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.ru__status--pending { color: var(--color-text-muted); }
.ru__status--uploading { color: var(--color-primary); }
.ru__status--done { color: var(--color-success); }
.ru__status--error { color: var(--color-danger); }

.ru__progress { margin-top: 12px; }
.ru__progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}
.ru__progress-bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}
.ru__progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
  transition: width .3s;
}

.ru__file-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.ru__done-row { display: flex; gap: 8px; width: 100%; align-items: center; flex-wrap: wrap; }
.ru__done-msg { color: var(--color-success); font-weight: 600; }
.ru__done-fail { color: var(--color-danger); }

.ru__pdf-icon { color: #ef4444; font-size: 1.2rem; }

.ml-auto { margin-left: auto; }

/* ── Receipt Manual ── */

.rm__card-icon { color: var(--color-primary); margin-right: 6px; }
.rm__meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rm__amount-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.rm__form-group { margin: 0; }

.rm__cat-hint { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.rm__optional { color: #94a3b8; font-weight: 400; }

.rm__items-empty {
  text-align: center;
  padding: 24px 0;
  color: #94a3b8;
  font-size: .875rem;
}
.rm__items-empty-icon { font-size: 1.5rem; display: block; margin-bottom: 8px; }

.rm__items-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.rm__items-table thead tr { border-bottom: 1px solid var(--color-border); background: #f8fafc; }
.rm__items-table th {
  padding: 8px 12px;
  font-weight: 600;
  color: #64748b;
}
.rm__items-table th.text-right { text-align: right; }
.rm__items-table th.text-left { text-align: left; }
.rm__items-table-th-qty { width: 80px; }
.rm__items-table-th-unit { width: 80px; }
.rm__items-table-th-price { width: 110px; }
.rm__items-table-th-total { width: 110px; }
.rm__items-table-th-del { width: 40px; }
.rm__items-table tbody tr { border-bottom: 1px solid var(--color-border); }
.rm__items-table td { padding: 6px 8px; }

.rm__item-input { padding: 5px 8px; font-size: .85rem; }
.rm__item-input--right { text-align: right; }

.rm__item-del {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
}

.rm__calc-row { padding: 8px 12px; text-align: right; }

.rm__total-input--lg { font-weight: 700; font-size: 1rem; }

.rm__form-actions { display: flex; gap: 10px; justify-content: flex-end; }

.rm__vendor-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  overflow: hidden;
}
.rm__vendor-option {
  padding: 8px 12px;
  cursor: pointer;
  font-size: .875rem;
  color: #374151;
}
.rm__vendor-option:hover { background: #f1f5f9; }
.rm__vendor-icon { color: #94a3b8; margin-right: 8px; }

@media (max-width: 640px) {
  .rm__meta-grid { grid-template-columns: 1fr; }
  .rm__amount-grid { grid-template-columns: 1fr; }
  .profile__grid { grid-template-columns: 1fr; }
}
