/* ==========================================================================
   CLYMETA — Pure White Minimalist Executive Design System
   Aesthetic: Seamless White Canvas, Borderless Cards, Zero Lines / Strokes
   Typography: Google Sans
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Pure White Canvas & Soft Tone Surfaces */
  --bg-pure-white: #FFFFFF;
  --surface-card: #F8F9FB;
  --surface-card-hover: #F1F3F7;
  --surface-input: #F3F4F7;
  --surface-muted: #F8F9FB;

  /* Typography Colors */
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;

  /* Brand Primary */
  --brand-primary: #0043FE;
  --brand-primary-hover: #0036D6;
  --brand-primary-light: #EEF2FF;
  --brand-primary-focus: rgba(0, 67, 254, 0.15);

  /* Status Colors (Line-free, pure fill) */
  --status-in-progress-bg: #EEF4FF;
  --status-in-progress-text: #1D4ED8;

  --status-completed-bg: #ECFDF5;
  --status-completed-text: #047857;

  --status-pending-bg: #FFFBEB;
  --status-pending-text: #B45309;

  --status-on-hold-bg: #F3F4F6;
  --status-on-hold-text: #4B5563;

  /* Typography */
  --font-sans: 'Google Sans', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Courier New', monospace;

  /* Slate palette — neutral scale used throughout UI */
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Soft Ambient Depth (No Lines or Hard Borders) */
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-modal: 0 20px 40px -10px rgba(0, 0, 0, 0.12), 0 8px 16px -6px rgba(0, 0, 0, 0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: transparent !important; /* Eliminate hard lines */
}

body {
  font-family: var(--font-sans);
  background-color: #FFFFFF;
  background-image: none;
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ==========================================================================
   Navigation Bar (Seamless Pure White, Zero Lines)
   ========================================================================== */
.navbar {
  background: #FFFFFF;
  border: none;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 40;
}

.navbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-text-container {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* ==========================================================================
   Main Container
   ========================================================================== */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 4.5rem;
}

/* ==========================================================================
   Header Hero (Seamless White, Line-free)
   ========================================================================== */
.dashboard-header {
  background: var(--surface-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dashboard-header::before {
  display: none;
}

@media (min-width: 768px) {
  .dashboard-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.header-content {
  max-width: 720px;
}

.dashboard-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.dashboard-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Buttons (Line-Free, Solid & Tactile)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
}

.btn-secondary {
  background-color: var(--surface-input);
  color: var(--text-primary);
  border: none;
}

.btn-secondary:hover {
  background-color: var(--surface-card-hover);
  color: #000000;
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-icon:hover {
  background: var(--surface-input);
  color: var(--text-primary);
}

/* ==========================================================================
   KPI Metrics Grid (Line-Free Clean Cards)
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-card {
  background: var(--surface-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.65rem;
  display: flex;
  flex-direction: column;
  transition: background-color 0.15s ease;
}

.metric-card::after {
  display: none;
}

.metric-card:hover {
  background: var(--surface-card-hover);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

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

.metric-value {
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.metric-footer {
  margin-top: 0.65rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  border: none;
  padding-top: 0;
}

/* ==========================================================================
   Table & Section Controls (Borderless, Seamless)
   ========================================================================== */
.table-section {
  background: #FFFFFF;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.section-toolbar {
  padding: 1.25rem 0;
  border: none;
  border-bottom: none;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .section-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.toolbar-title-group h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.toolbar-title-group p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 270px;
}

.search-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-input);
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
}

.search-input:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--brand-primary);
}

/* Filter select */
.filter-select {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.65rem 1.85rem 0.65rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-input);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--brand-primary);
}

/* ==========================================================================
   Navigation Tabs for Stored Database Views
   ========================================================================== */
.table-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 2px solid #E5E7EB;
  margin-bottom: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
}

.table-nav-tabs::-webkit-scrollbar {
  display: none;
}

.table-tab-btn {
  font-family: var(--font-sans);
  border: none;
  background: transparent;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.table-tab-btn:hover {
  color: var(--text-primary);
  background: #F9FAFB;
}

.table-tab-btn.active {
  color: var(--brand-primary);
  font-weight: 600;
  border-bottom-color: var(--brand-primary);
  background: #EFF6FF;
}

.tab-badge {
  background: #E5E7EB;
  color: #4B5563;
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  line-height: 1;
  transition: all 0.15s ease;
}

.table-tab-btn.active .tab-badge {
  background: var(--brand-primary);
  color: #FFFFFF;
}

/* Document & Proof Download Pills */
.table-doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-sm);
  background: #EFF6FF;
  color: #1E40AF;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  max-width: 180px;
  border: 1px solid rgba(30, 64, 175, 0.15);
}

.table-doc-pill:hover {
  background: #DBEAFE;
  color: #1D4ED8;
  border-color: #93C5FD;
  transform: translateY(-1px);
}

.table-doc-pill.final-doc {
  background: #ECFDF5;
  color: #065F46;
  border-color: rgba(6, 95, 70, 0.18);
}

.table-doc-pill.final-doc:hover {
  background: #D1FAE5;
  color: #047857;
  border-color: #6EE7B7;
}

.table-doc-pill.proof-doc {
  background: #F5F3FF;
  color: #5B21B6;
  border-color: rgba(91, 33, 182, 0.18);
}

.table-doc-pill.proof-doc:hover {
  background: #EDE9FE;
  color: #4C1D95;
  border-color: #C4B5FD;
}

.table-doc-empty {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.table-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--surface-input);
  color: var(--text-secondary);
  white-space: nowrap;
}

.table-tag.method-cash {
  background: #ECFDF5;
  color: #065F46;
  font-weight: 600;
}

.table-tag.method-wire {
  background: #EFF6FF;
  color: #1E40AF;
  font-weight: 600;
}

.table-tag.method-card {
  background: #F5F3FF;
  color: #5B21B6;
  font-weight: 600;
}

/* ==========================================================================
   Data Table (Structured Grid Row & Column Cell Style)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table thead {
  background: #F9FAFB;
}

.data-table th {
  background: #F9FAFB;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4B5563;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid #E5E7EB;
  border-right: 1px solid #F3F4F6;
  white-space: nowrap;
}

.data-table th:last-child {
  border-right: none;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #E5E7EB;
  border-right: 1px solid #F3F4F6;
  color: var(--text-primary);
  vertical-align: middle;
}

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

.data-table tbody tr {
  background-color: #FFFFFF;
  transition: background-color 0.12s ease;
  cursor: pointer;
}

.data-table tbody tr:nth-child(even) {
  background-color: #FAFAFC;
}

.data-table tbody tr:hover {
  background-color: #EFF6FF !important;
}

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

/* Identification Number Badges (Borderless Clean Tags) */
.id-badge {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--surface-input);
  color: var(--text-primary);
  border: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.id-badge.cin {
  background: #EFF6FF;
  color: #1E40AF;
}

.id-badge.prj {
  background: #F5F3FF;
  color: #5B21B6;
}

.id-badge.inv {
  background: #ECFDF5;
  color: #065F46;
}

/* Status Pills (Line-free) */
.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  border: none;
}

.status-pill.in-progress {
  background: var(--status-in-progress-bg);
  color: var(--status-in-progress-text);
}

.status-pill.completed {
  background: var(--status-completed-bg);
  color: var(--status-completed-text);
}

.status-pill.pending {
  background: var(--status-pending-bg);
  color: var(--status-pending-text);
}

.status-pill.paid,
.status-pill.fully-paid {
  background: #ECFDF5;
  color: #047857;
}

.status-pill.partially-paid {
  background: #EFF6FF;
  color: #1D4ED8;
}

.status-pill.unpaid {
  background: #F3F4F6;
  color: #4B5563;
}

.status-pill.overdue {
  background: #FEF2F2;
  color: #DC2626;
}

.status-pill.on-hold {
  background: var(--status-on-hold-bg);
  color: var(--status-on-hold-text);
}

/* Empty State */
.empty-state {
  padding: 4rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

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

.empty-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 380px;
}

/* ==========================================================================
   Modals & Drawers (Borderless, Smooth White)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem 2rem;
  border: none;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-title-wrap p {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.modal-body {
  padding: 1.75rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
  background: #FFFFFF;
}

.modal-footer {
  padding: 1.25rem 2rem;
  border: none;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
}

/* ==========================================================================
   Form Components (Line-Free Filled Style)
   ========================================================================== */
.form-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  border: none;
  padding-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.15rem;
}

@media (min-width: 640px) {
  .form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.col-span-full,
.form-group.col-span-full {
  grid-column: 1 / -1;
  width: 100%;
}

.payment-details-card,
#payment-details-section {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
}

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

.form-label .req {
  color: #DC2626;
  margin-left: 0.15rem;
}

.form-input, .form-textarea, .form-select {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.7rem 0.95rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-input);
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--brand-primary);
}

.form-textarea {
  min-height: 85px;
  resize: vertical;
}

/* Auto-Generated Numbers Card (Line-free) */
.autogen-card {
  background: var(--surface-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.autogen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  border: none;
  padding-bottom: 0;
}

.autogen-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.autogen-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.autogen-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .autogen-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.autogen-item {
  background: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.autogen-item-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.autogen-item-code {
  font-family: var(--font-sans);
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Dropzone (Line-Free Soft Background) */
.dropzone {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  background: var(--surface-card);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.dropzone:hover, .dropzone.dragover {
  background: var(--brand-primary-light);
}

.dropzone.border-error {
  background-color: #FEF2F2 !important;
  box-shadow: 0 0 0 2px #EF4444;
}

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

.dropzone-subtext {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.uploaded-file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: var(--surface-card);
  border: none;
  border-radius: var(--radius-md);
  margin-top: 0.75rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ==========================================================================
   Side Drawer Details View (Line-Free)
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(4px);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer-card {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 550px;
  background: #FFFFFF;
  border: none;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 61;
}

.drawer-overlay.active .drawer-card {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.5rem 2rem;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
}

.drawer-body {
  padding: 1.85rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  background: #FFFFFF;
}

/* Toast Notifications (Line-Free) */
.toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: #111827;
  color: #FFFFFF;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  border: none;
  animation: slideInToast 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Full Page View Switching (Dashboard vs. Dedicated Registration Workspace)
   ========================================================================== */
.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

/* Navbar View Switcher Pills */
.nav-view-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #F3F4F6;
  padding: 0.25rem 0.35rem;
  border-radius: 9999px;
}

.nav-view-btn {
  border: none;
  background: transparent;
  padding: 0.38rem 0.95rem;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4B5563;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.nav-view-btn:hover {
  color: #111827;
}

.nav-view-btn.active {
  background: #FFFFFF;
  color: var(--brand-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-tab-badge {
  background: var(--brand-primary);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  line-height: 1;
}

/* ==========================================================================
   Dedicated Multi-Client Registration Workspace
   ========================================================================== */
.registration-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 4.5rem;
}

.reg-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.reg-header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.reg-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.crumb-link {
  color: #6B7280;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s;
}

.crumb-link:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.crumb-sep {
  color: #D1D5DB;
}

.crumb-current {
  color: #111827;
  font-weight: 600;
}

.reg-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reg-tabs-counter {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4B5563;
  background: #F3F4F6;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
}

/* Browser-style Tab Strip */
.client-tabs-bar-wrapper {
  display: flex;
  align-items: flex-end;
  background: #F3F4F6;
  border-radius: 12px 12px 0 0;
  padding: 8px 10px 0 10px;
  border: 1px solid #E5E7EB;
  border-bottom: none;
  overflow-x: auto;
  scrollbar-width: thin;
  gap: 4px;
}

.client-tabs-bar {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.client-tabs-bar::-webkit-scrollbar {
  display: none;
}

.client-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 12px;
  background: #E5E7EB;
  border-radius: 8px 8px 0 0;
  font-family: var(--font-sans);
  font-size: 0.825rem;
  font-weight: 500;
  color: #4B5563;
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
  position: relative;
  max-width: 220px;
}

.client-tab:hover {
  background: #FFFFFF;
  color: #111827;
}

.client-tab.active {
  background: #FFFFFF;
  color: var(--brand-primary);
  font-weight: 600;
  border-color: #E5E7EB;
  border-bottom: 2px solid #FFFFFF;
  margin-bottom: -1px;
  z-index: 2;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.03);
}

.tab-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9CA3AF;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.tab-status-dot.dirty {
  background: #2563EB;
}

.client-tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.client-tab-close {
  border: none;
  background: transparent;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  transition: all 0.12s ease;
}

.client-tab-close:hover {
  background: #FEE2E2;
  color: #DC2626;
}

.btn-add-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed #D1D5DB;
  border-radius: 8px 8px 0 0;
  color: #4B5563;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-add-tab:hover {
  background: #FFFFFF;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Form Panel Container */
.client-panels-container {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  min-height: 520px;
}

.client-form-panel {
  display: none;
  padding: 2.25rem 2.5rem;
}

.client-form-panel.active {
  display: block;
  animation: fadeInTab 0.15s ease;
}

.client-form-body {
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #F3F4F6;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel-title-wrap h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.015em;
}

.panel-title-wrap p {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-top: 0.2rem;
}

.panel-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  margin-top: 2rem;
  border-top: 1px solid #E5E7EB;
  gap: 1rem;
  flex-wrap: wrap;
}

.reg-workspace-empty {
  padding: 4.5rem 2rem;
  text-align: center;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
}

.empty-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
}

.reg-workspace-empty h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}

.reg-workspace-empty p {
  font-size: 0.875rem;
  color: var(--slate-500);
  max-width: 440px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.5;
}


/* ============================================================
   Loading Spinner — Supabase data fetch indicator
   ============================================================ */
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.db-loading-row td {
  text-align: center;
  padding: 3rem 1rem;
}

.db-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  color: #B91C1C;
  font-size: 0.875rem;
}
