:root {
  --bg: #f4f9f9;
  --bg-subtle: #eaf5f5;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #072144;
  --text-secondary: #0d2a4d;
  --muted: #3b6b8a;
  --border: #b8d0e0;
  --border-light: #e3eef3;
  --accent: #01aba8;
  --accent-hover: #00705f;
  --accent-light: #e6f7f6;
  --accent-gradient: linear-gradient(135deg, #01aba8 0%, #00705f 100%);
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --shadow-sm: 0 1px 2px rgba(7, 33, 68, 0.04);
  --shadow: 0 4px 16px rgba(7, 33, 68, 0.06);
  --shadow-lg: 0 12px 32px rgba(7, 33, 68, 0.1);
  --shadow-glow: 0 0 0 3px rgba(1, 171, 168, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --font-display: 'Fraunces', serif;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at top left, rgba(99,102,241,0.07), transparent 35%),
    radial-gradient(circle at bottom right, rgba(139,92,246,0.05), transparent 35%),
    var(--bg);
  overflow-x: hidden;
}

#root {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-taskbar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 58px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,0.7);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}

.taskbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 8px 14px 8px 0;
  margin-right: 10px;
  border-right: 1px solid rgba(226,232,240,0.7);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.taskbar-brand:hover {
  transform: translateY(-1px);
}

.taskbar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin-right: 8px;
  vertical-align: middle;
}

.taskbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.taskbar-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
}

.taskbar-link:hover {
  color: var(--text);
  background: var(--border-light);
  transform: translateY(-1px);
}

.taskbar-link-active {
  color: #fff;
  background: var(--accent-gradient);
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.25);
}

.taskbar-link-active:hover {
  color: #fff;
  background: var(--accent-gradient);
  filter: brightness(1.05);
}

.taskbar-link-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
}

.taskbar-link-group:hover {
  color: var(--text);
  background: var(--border-light);
  transform: translateY(-1px);
}

.taskbar-link-group-active {
  color: #fff;
  background: var(--accent-gradient);
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.25);
}

.taskbar-link-group-active:hover {
  color: #fff;
  background: var(--accent-gradient);
  filter: brightness(1.05);
}

.taskbar-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.taskbar-caret {
  font-size: 0.65rem;
  opacity: 0.75;
  margin-left: 2px;
}

.taskbar-spacer {
  flex: 1;
  min-width: 8px;
}

.taskbar-utility {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.taskbar-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.taskbar-user-btn:hover {
  background: var(--bg-subtle);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.taskbar-fy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.taskbar-fy-label {
  color: var(--muted);
  font-weight: 500;
}

.taskbar-fy select {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font: inherit;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
}

.taskbar-dropdown-wrap {
  position: relative;
}

.taskbar-dropdown-trigger {
  display: inline-flex;
  align-items: center;
}

.taskbar-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(14px) saturate(180%);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  max-width: 260px;
  z-index: 200;
  padding: 6px;
  animation: dropIn 180ms ease-out;
}

.taskbar-dropdown-right {
  right: 0;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.taskbar-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-xs);
  text-decoration: none;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.taskbar-dropdown-item:hover,
.taskbar-dropdown-item-active {
  background: var(--accent-light);
  color: var(--accent);
}

.taskbar-dropdown-item-active {
  font-weight: 600;
}

.app-main {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 28px 56px;
}

.welcome-banner-wrap {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px;
}

.welcome-banner-wrap > * {
  animation: slideDown 240ms ease-out;
}

.welcome-banner-gradient {
  margin: 16px 0 0;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 28px rgba(1, 171, 168, 0.28);
}

.welcome-banner-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.welcome-banner-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.welcome-banner-greeting {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.welcome-banner-greeting strong {
  color: #ffffff;
  opacity: 0.95;
}

.welcome-banner-meta {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 300ms ease-out;
}

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

.page-centered {
  max-width: 520px;
  margin: 40px auto;
  width: 100%;
}

.login-logo {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin: 0 auto 16px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  font-family: var(--font-display);
}

.page-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.page-subtitle a {
  color: var(--accent);
  font-weight: 500;
}

.auth-switch {
  margin: 20px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}

.terms-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.terms-agree input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.terms-agree a {
  color: var(--accent);
  font-weight: 500;
}

.terms-agree a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.policy-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.policy-content h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--text);
}

.policy-content p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.policy-meta {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.policy-table th,
.policy-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.policy-table th {
  font-weight: 600;
  background: var(--bg-subtle);
}

.policy-content ul,
.policy-content ol {
  margin: 0 0 12px;
  padding-left: 24px;
  color: var(--text-secondary);
}

.policy-content li {
  margin: 4px 0;
}

.password-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.password-toggle {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s;
  line-height: 0;
}

.password-toggle:hover {
  color: var(--text);
}

.field-optional {
  font-weight: 400;
  color: var(--muted);
}

.dev-code-hint {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.page-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.page-breadcrumb-sep {
  color: var(--border);
  user-select: none;
}

.page-breadcrumb-link {
  color: var(--muted);
  text-decoration: none;
}

.page-breadcrumb-link:hover {
  color: var(--accent);
}

.page-breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

.banner-error,
.banner-success {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  animation: slideDown 240ms ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.banner-error {
  color: #991b1b;
  background: var(--danger-bg);
  border: 1px solid #fecaca;
}

.banner-info {
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.temp-password {
  background: #1e3a8a;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.08em;
}

.banner-success {
  color: #065f46;
  background: var(--success-bg);
  border: 1px solid #a7f3d0;
}

.loading,
.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 48px 20px;
  font-size: 0.9rem;
}

.filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.search-field input,
.search-field select {
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}

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

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #94a3b8;
}

.form-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fadeIn 200ms ease-out;
}

.modal {
  width: 100%;
  max-width: 520px;
}

.modal .panel,
.modal .section-card {
  backdrop-filter: none;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.entry-card-popup {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.entry-card-popup > * {
  min-width: 0;
}

.entry-card-popup-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.entry-card-popup-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.entry-card-popup-body {
  display: grid;
  gap: 10px;
}

.entry-card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  background: var(--surface-muted, #f8fafc);
}

.entry-card-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.entry-card-value {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin: 0 auto;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  max-width: 520px;
}

.modal-card-wide {
  max-width: 720px;
}

.card-popup-title {
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: var(--text);
}

.card-popup-body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.55;
}

.card-popup-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.select-company-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  max-height: 90vh;
  overflow-y: auto;
}

.login-card .login-logo {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 14px;
}

.login-card .form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-card .form-field-wide {
  grid-column: auto;
}

.login-card .auth-switch {
  text-align: center;
}

.signup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  max-height: 90vh;
  overflow-y: auto;
}

.signup-card .auth-switch {
  text-align: center;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-span {
  grid-column: 1 / -1;
}

.select-company-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.select-company-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.select-company-option:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(7, 33, 68, 0.1);
}

.select-company-option:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.select-company-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

.panel-narrow {
  max-width: 640px;
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.1s, opacity 0.15s, background 0.15s;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.28);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-small {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.btn-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}

.btn-warning:hover:not(:disabled) {
  background: #fcd34d;
  color: #78350f;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.entry-panel {
  width: 100%;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.summary-cards-stacked {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.summary-card-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.summary-card-row--single {
  grid-template-columns: 1fr;
}

.summary-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px) saturate(180%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.summary-card-primary {
  background: linear-gradient(135deg, rgba(238,242,255,0.9) 0%, rgba(232,240,255,0.9) 100%);
  border-color: #c7d2fe;
}

.summary-card-primary:hover {
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.12);
}

.summary-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.summary-value {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}

.amount-high {
  color: var(--success);
  font-weight: 700;
}

.amount-low {
  color: var(--danger);
  font-weight: 700;
}

.amount-cell {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.amount-cell--zero {
  color: var(--muted);
  font-weight: 400;
}

.amount-cell--positive {
  color: var(--success);
}

.amount-cell--negative {
  color: var(--danger);
}

.banner-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.banner-status--success {
  color: #065f46;
  background: var(--success-bg);
  border: 1px solid #a7f3d0;
}

.banner-status--warning {
  color: #92400e;
  background: var(--warning-bg);
  border: 1px solid #fde68a;
}

.banner-warning {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.5;
}

.banner-warning strong {
  color: #78350f;
}

.banner-warning .duplicate-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

.banner-warning .duplicate-list li {
  margin-bottom: 4px;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  min-width: 0;
}

.transaction-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 600px;
}

.transaction-table th,
.transaction-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.transaction-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--border-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}



.transaction-table tbody tr:hover {
  background: var(--border-light);
}

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

.aging-buckets h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--text);
}

.aging-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aging-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: box-shadow 0.15s ease;
}

.aging-card:hover {
  box-shadow: var(--shadow-sm);
}

.aging-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.aging-card-org {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.aging-card-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.aging-card-right {
  text-align: right;
  white-space: nowrap;
}

.aging-card-outstanding {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.aging-card-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--border-light);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

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

.aging-card-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aging-card-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.aging-card-value {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.aging-card-btn {
  width: 100%;
  text-align: center;
}

.table-total-row td {
  background: #f4f9f9;
  border-top: 2px solid var(--border);
  font-weight: 600;
  color: var(--text);
}

.actions-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  justify-content: center;
  border-bottom: none !important;
}

.actions-cell .btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

.actions-cell .btn-small {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.form-error {
  margin: 0 0 16px;
  color: var(--danger);
  font-size: 0.875rem;
}

.duplicate-list {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 0.875rem;
}

.empty-state,
.loading {
  color: var(--muted);
  text-align: center;
  padding: 48px 20px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--muted);
}

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

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

.organization-totals {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.organization-filters {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.organization-filters .search-field {
  min-width: 220px;
}

.col-actions {
  min-width: 220px;
  width: 220px;
  white-space: nowrap;
}

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

.org-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.section-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  backdrop-filter: blur(10px) saturate(180%);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.section-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

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

.help-search-wrap {
  margin-bottom: 16px;
}

.help-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.help-search-input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.help-category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
}

.help-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.help-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-article-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s;
}

.help-article-list li:hover {
  color: var(--accent);
}

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

.support-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.support-tab {
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.support-tab:hover {
  color: var(--text);
}

.support-tab-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 12px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.ticket-messages {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-message {
  padding: 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
}

.ticket-message--original {
  border-left: 3px solid var(--accent);
}

.ticket-message--staff {
  border-left: 3px solid var(--success);
  background: var(--success-bg);
}

.ticket-message--customer {
  border-left: 3px solid var(--muted);
}

.ticket-message-author {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 0.85rem;
}

.ticket-message-text {
  margin: 0 0 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.ticket-message-time {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.priority-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.priority-critical {
  background: var(--danger-bg);
  color: var(--danger);
}

.priority-high {
  background: var(--warning-bg);
  color: var(--warning);
}

.priority-normal {
  background: var(--bg-subtle);
  color: var(--muted);
}

.priority-feature {
  background: var(--accent-light);
  color: var(--accent-hover);
}

.app-footer {
  padding: 20px 24px;
  text-align: center;
  border-top: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

.app-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

.app-footer-links a,
.app-footer-links nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.app-footer-links a:hover,
.app-footer-links nav a:hover {
  color: var(--accent);
}

.app-footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.section-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-card-body > * {
  min-width: 0;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.autocomplete {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  z-index: 20;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
}

.autocomplete-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.autocomplete-item:hover,
.autocomplete-item-active {
  background: var(--accent-light);
}

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

.autocomplete-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.input-auto {
  background: var(--border-light);
}

.nepali-date-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nepali-date-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.day-stepper {
  display: flex;
  gap: 8px;
}

.day-btn {
  flex: 1;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.day-btn:hover {
  background: var(--border-light);
}

.day-btn:active {
  background: var(--border);
}

.date-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.daily-date-picker {
  min-width: 280px;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.daily-grid > * {
  min-width: 0;
}

.daily-section h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.daily-section-form {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.daily-section-form .transaction-form h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.daily-section-form .form-note {
  margin-bottom: 12px;
}

.landing-home-link {
  text-decoration: none;
  color: inherit;
}

.landing-home-link:hover h1 {
  color: var(--accent);
}

.landing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

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

.landing-brand h1 {
  margin: 0 0 4px;
  font-size: 2.75rem;
  background: linear-gradient(135deg, var(--accent) 0%, #00705f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.landing-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.landing-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

.landing-cta {
  font-size: 1rem;
  padding: 12px 24px;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
  text-decoration: none;
}

.landing-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.landing-cta.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.landing-cta.btn-secondary:hover {
  background: var(--border-light);
}

.landing-hero {
  text-align: center;
  margin-bottom: 56px;
  padding: 48px 28px 36px;
  background: linear-gradient(135deg, var(--accent-light) 0%, #f4f9f9 100%);
  border-radius: var(--radius);
  border: 1px solid #c7d2fe;
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.12), transparent 40%),
              radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.08), transparent 40%);
  pointer-events: none;
}

.landing-hero > * {
  position: relative;
}

.landing-hero-badge {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #c7d2fe;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.landing-hero h2 {
  margin: 0 0 12px;
  font-size: 2.4rem;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.landing-hero p {
  margin: 0 auto 24px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.landing-hero-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-hero-visual {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.landing-hero-preview {
  width: 100%;
  max-width: 860px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}

.landing-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #f4f9f9 0%, #e3eef3 100%);
  border-bottom: 1px solid var(--border);
}

.landing-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.landing-preview-dot-red {
  background: #fca5a5;
}

.landing-preview-dot-yellow {
  background: #fcd34d;
}

.landing-preview-dot-green {
  background: #86efac;
}

.landing-preview-title {
  margin-left: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.landing-preview-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 18px;
}

.landing-preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-preview-line {
  height: 10px;
  border-radius: 999px;
  background: #b8d0e0;
}

.landing-preview-line-short {
  width: 65%;
}

.landing-preview-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-preview-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.landing-preview-card {
  height: 56px;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, var(--accent-light) 0%, #e6f7f6 100%);
  border: 1px solid #c7d2fe;
}

.landing-preview-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-preview-row {
  height: 12px;
  border-radius: 999px;
  background: #e3eef3;
}

.landing-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.landing-highlight {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.landing-highlight h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.landing-highlight p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.landing-footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  border-top: 1px solid var(--border);
}

.landing-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #c7d2fe;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.landing-hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.landing-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  animation: float-orb 8s ease-in-out infinite alternate;
}

.landing-hero-orb--one {
  width: 260px;
  height: 260px;
  background: #01aba8;
  top: -60px;
  left: -40px;
  animation-delay: 0s;
}

.landing-hero-orb--two {
  width: 220px;
  height: 220px;
  background: #00705f;
  bottom: -40px;
  right: -20px;
  animation-delay: 1.5s;
}

.landing-hero-orb--three {
  width: 180px;
  height: 180px;
  background: #a78bfa;
  top: 40%;
  left: 55%;
  animation-delay: 3s;
}

@keyframes float-orb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(20px, -24px) scale(1.08);
  }
}

.landing-hero-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 60%);
  transform: translate(calc(var(--mouse-x, 0) - 170px), calc(var(--mouse-y, 0) - 170px));
  pointer-events: none;
  transition: transform 120ms ease-out;
}

.landing-hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.landing-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 90px;
}

.landing-hero-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.landing-hero-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.landing-highlight {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.landing-highlight:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.landing-highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--accent-light);
  border: 1px solid #c7d2fe;
  margin-bottom: 10px;
}

.landing-highlight-icon-inner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

.landing-highlight {
  animation: fade-up 420ms ease-out both;
}

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

.landing-hero,
.landing-highlights,
.landing-footer {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
  will-change: opacity, transform;
}

.landing-hero.is-visible,
.landing-highlights.is-visible,
.landing-footer.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-preview-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-light) 0%, #e6f7f6 100%);
  border: 1px solid #c7d2fe;
}

.landing-preview-card-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(99, 102, 241, 0.12) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 500ms ease;
}

.landing-preview-card--active .landing-preview-card-glow {
  transform: translateX(100%);
}

.landing-preview-card-line {
  position: absolute;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.25);
  transition: transform 300ms ease, opacity 300ms ease;
  opacity: 0.7;
}

.landing-preview-card-line--title {
  width: 55%;
  height: 10px;
  top: 18px;
  left: 12px;
}

.landing-preview-card-line--amount {
  width: 38%;
  height: 10px;
  top: 34px;
  left: 12px;
}

.landing-preview-card-line--muted {
  width: 28%;
  height: 10px;
  top: 50px;
  left: 12px;
}

.landing-preview-card--active .landing-preview-card-line {
  transform: translateX(4px);
  opacity: 1;
}

.landing-highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(120deg, transparent 30%, rgba(99, 102, 241, 0.06) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 500ms ease;
  pointer-events: none;
}

.landing-highlight:hover::before {
  transform: translateX(100%);
}

@media (max-width: 640px) {
  .landing {
    padding: 32px 16px 56px;
  }

  .landing-hero {
    padding: 28px 18px 24px;
  }

  .landing-hero h2 {
    font-size: 1.7rem;
  }

  .landing-preview-body {
    grid-template-columns: 1fr;
  }

  .landing-preview-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-highlights {
    grid-template-columns: 1fr;
  }

  .landing-hero-orb--one {
    width: 160px;
    height: 160px;
    top: -40px;
    left: -30px;
  }

  .landing-hero-orb--two {
    width: 140px;
    height: 140px;
    bottom: -30px;
    right: -20px;
  }

  .landing-hero-orb--three {
    width: 120px;
    height: 120px;
  }

  .landing-hero-glow {
    width: 220px;
    height: 220px;
    transform: translate(calc(var(--mouse-x, 0) - 110px), calc(var(--mouse-y, 0) - 110px));
  }

  .landing-hero-stats {
    gap: 20px;
    margin-top: 22px;
  }

  .landing-hero-stat-value {
    font-size: 1.15rem;
  }

  .landing-hero-stat-label {
    font-size: 0.7rem;
  }
}

.report-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.report-tab {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font: inherit;
  font-weight: 500;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.report-tab:hover {
  border-color: var(--accent);
}

.report-tab-active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.report-tab-active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.ledger-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.ledger-accounts,
.ledger-detail {
  min-width: 0;
}

.ledger-accounts h3,
.ledger-detail h3 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
}

.ledger-account-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.ledger-account-btn {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface);
  font: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ledger-account-btn span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ledger-account-btn span:last-child {
  flex-shrink: 0;
}

.ledger-account-btn:hover {
  background: var(--border-light);
  border-color: #cbd5e1;
}

.ledger-account-btn-active {
  background: var(--accent-light);
  border-color: #c7d2fe;
}

.ledger-account-btn-active:hover {
  background: #e0e7ff;
  border-color: #c7d2fe;
}

.ledger-entry-row-clickable {
  cursor: pointer;
}

.report-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.report-columns > * {
  min-width: 0;
}

.report-columns--stacked {
  grid-template-columns: 1fr;
}

.report-columns .report-summary-panel {
  grid-column: 1 / -1;
}

.report-summary-panel h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
}

.report-net-result {
  margin: 0;
  font-size: 1.1rem;
}

.ledger-filters {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.ledger-filters .form-field {
  min-width: 160px;
}

.ledger-filters .form-field input[type="date"] {
  min-width: 160px;
}

.date-filter-clear {
  margin-bottom: 10px;
}

.entry-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.entry-type-income {
  background: var(--success-bg);
  color: #065f46;
}

.entry-type-expense {
  background: var(--danger-bg);
  color: #991b1b;
}

.coa-setup-panel {
  margin-bottom: 20px;
  border: 1px solid #c7d2fe;
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.coa-setup-panel h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.coa-setup-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.875rem;
}

.coa-system-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #c7d2fe;
  color: #3730a3;
}

.coa-row-inactive {
  opacity: 0.6;
}

.coa-active-field .coa-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.account-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.account-type-asset {
  background: var(--accent-light);
  color: var(--accent);
}

.account-type-liability {
  background: var(--warning-bg);
  color: #b45309;
}

.account-type-equity {
  background: var(--accent-light);
  color: var(--accent);
}

.account-type-income {
  background: var(--success-bg);
  color: #065f46;
}

.account-type-expense {
  background: var(--danger-bg);
  color: #b91c1c;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
}

.badge-role-owner {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-role-accountant {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-role-staff {
  background: var(--success-bg);
  color: #065f46;
}

.badge-role-viewer {
  background: #fef3c7;
  color: #92400e;
}

.badge-role-developer {
  background: #ede9fe;
  color: #6d28d9;
}

.badge-status-draft {
  background: #e3eef3;
  color: #475569;
  border: 1px solid #b8d0e0;
}

.badge-status-filed {
  background: var(--warning-bg);
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-status-paid {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

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

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  background: var(--border-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.2s ease;
}

.data-table tbody tr:hover {
  background: rgba(238,242,255,0.6);
}

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



  .not-found {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    min-height: 60vh;
  }

  .not-found-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 48px;
    align-items: center;
    max-width: 960px;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 48px;
  }

  .not-found-visual {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .not-found-receipt {
    position: relative;
    width: 320px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9f9 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    overflow: hidden;
    font-size: 0.9rem;
    padding-bottom: 36px;
    clip-path: polygon(
      0% 0%, 100% 0%, 100% calc(100% - 16px),
      95% 100%, 90% calc(100% - 16px), 85% 100%,
      80% calc(100% - 16px), 75% 100%, 70% calc(100% - 16px),
      65% 100%, 60% calc(100% - 16px), 55% 100%,
      50% calc(100% - 16px), 45% 100%, 40% calc(100% - 16px),
      35% 100%, 30% calc(100% - 16px), 25% 100%,
      20% calc(100% - 16px), 15% 100%, 10% calc(100% - 16px),
      5% 100%, 0% 100%
    );
    animation: receipt-print 420ms ease-out;
    transform-origin: top center;
  }

  @keyframes receipt-print {
    from { transform: scaleY(0.4) translateY(-12px); opacity: 0; }
    to { transform: scaleY(1) translateY(0); opacity: 1; }
  }

  .not-found-receipt-stamp {
    position: absolute;
    top: 38%;
    right: 8%;
    font-family: monospace;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 0.15em;
    color: #c0392b;
    border: 3px solid #c0392b;
    border-radius: 6px;
    padding: 4px 14px;
    transform: rotate(-14deg) scale(1.4);
    opacity: 0;
    mix-blend-mode: multiply;
    animation: stamp-down 180ms ease-out 480ms forwards;
  }

  @keyframes stamp-down {
    0%   { opacity: 0; transform: rotate(-14deg) scale(2.2); }
    70%  { opacity: 0.85; transform: rotate(-14deg) scale(1.3); }
    100% { opacity: 0.85; transform: rotate(-14deg) scale(1.45); }
  }

  .not-found-receipt-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(180deg, #f4f9f9 0%, #e3eef3 100%);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
  }

  .not-found-receipt-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
  }

  .not-found-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
  }

  .not-found-receipt-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .not-found-row {
    display: grid;
    grid-template-columns: 2fr 0.6fr 1fr;
    gap: 10px;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
  }

  .not-found-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    font-weight: 500;
  }

  .not-found-row-muted {
    color: var(--muted);
    animation: row-fade 260ms ease-out both;
    animation-delay: var(--row-delay, 0ms);
  }

  @keyframes row-fade {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
  }

  .not-found-row-highlight {
    color: var(--text);
    font-weight: 600;
  }

  .not-found-row-total {
    color: var(--text);
    font-weight: 700;
    font-size: 0.85rem;
  }

  .not-found-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
  }

  .not-found-receipt-footer {
    padding: 10px 18px 16px;
    border-top: 1px dashed var(--border);
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .not-found-recalculate {
    margin-top: 8px;
    border: 1px dashed currentColor;
    background: none;
    font: inherit;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: transform 150ms ease, opacity 150ms ease;
  }

  .not-found-recalculate:hover {
    opacity: 1;
    transform: rotate(-2deg);
  }

  .not-found-text {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .not-found-text h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
  }

  .not-found-text p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 420px;
  }

  .not-found-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
  }

  .not-found-row-ticking span:last-child {
    font-variant-numeric: tabular-nums;
    animation: tick-pulse 1s ease-in-out infinite;
  }

  @keyframes tick-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
  }

  .not-found-receipt-barcode {
    height: 24px;
    margin: 10px 0 4px;
    background: repeating-linear-gradient(
      90deg,
      currentColor 0px, currentColor 2px,
      transparent 2px, transparent 4px,
      currentColor 4px, currentColor 5px,
      transparent 5px, transparent 9px
    );
    opacity: 0.55;
  }

  .not-found-scrap {
    position: absolute;
    bottom: 40px;
    left: 50%;
    width: 6px;
    height: 10px;
    background: currentColor;
    opacity: 0.6;
    border-radius: 1px;
    animation: scrap-fly 650ms ease-out forwards;
  }

  @keyframes scrap-fly {
    from {
      transform: translate(0, 0) rotate(0deg);
      opacity: 0.6;
    }
    to {
      transform: translate(var(--x), -34px) rotate(var(--rot));
      opacity: 0;
    }
  }

  @media (prefers-reduced-motion: reduce) {
   .not-found-receipt,
   .not-found-row-muted,
   .not-found-receipt-stamp,
   .not-found-row-ticking span:last-child,
   .not-found-scrap {
      animation: none !important;
      opacity: 1 !important;
      transform: none !important;
    }
  }

  @media (max-width: 860px) {
   .not-found-card {
      grid-template-columns: 1fr;
      justify-items: center;
      text-align: center;
      padding: 28px 20px;
    }

   .not-found-text p {
      max-width: 100%;
    }

   .not-found-actions {
      justify-content: center;
    }
  }

.table-empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .ledger-layout {
    grid-template-columns: 200px 1fr;
  }

  .report-columns {
    grid-template-columns: 1fr;
  }

  .daily-grid {
    grid-template-columns: 1fr;
  }

  .account-type-badge {
    padding: 2px 6px;
    font-size: 0.7rem;
  }
}

.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.hide-mobile {
  display: none;
}

.chart-container {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chart-panel {
  min-width: 0;
}

.chart-panel-narrow {
  grid-column: span 1;
}

.chart-screen-notice {
  grid-column: 1 / -1;
  color: #dc2626;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  margin: 0;
  display: none;
}

.chart-tooltip {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.ledger-search-field {
  min-width: 100%;
}

.taskbar-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.taskbar-mobile-toggle svg {
  display: block;
}

.taskbar-nav-open {
  display: flex !important;
}

@media (max-width: 768px) {
  .report-columns {
    grid-template-columns: 1fr;
  }

  .daily-grid {
    grid-template-columns: 1fr;
  }

  .landing-preview-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .ledger-account-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .account-type-badge {
    padding: 2px 8px;
    font-size: 0.7rem;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 20px;
  }

  .modal-card {
    padding: 24px 20px;
  }

  .login-card,
  .signup-card {
    padding: 24px 20px;
    max-width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions {
    width: 100%;
  }

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

  .chart-screen-notice {
    display: block;
  }

  .ledger-layout {
    grid-template-columns: 1fr;
  }

  .ledger-accounts {
    max-height: 40vh;
  }

  .ledger-account-list {
    max-height: calc(40vh - 50px);
  }

  .ledger-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-preview-body {
    grid-template-columns: 1fr;
  }

  .landing-preview-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-preview-sidebar {
    display: none;
  }

  .nepali-date-fields {
    grid-template-columns: 1fr;
  }

  .day-stepper {
    flex-wrap: wrap;
  }

  .search-field input,
  .search-field select {
    min-width: 100%;
  }

  .organization-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions {
    flex-direction: column;
  }

  .policy-header {
    flex-wrap: wrap;
  }

  .aging-table-desktop {
    display: none;
  }

  .aging-cards-mobile {
    display: block;
  }
}

@media (max-width: 640px) {
  .app-main {
    padding: 16px;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td,
  .transaction-table th,
  .transaction-table td {
    padding: 8px 10px;
  }

  .hide-mobile {
    display: none;
  }

  .aging-card {
    padding: 12px;
    gap: 8px;
  }

  .aging-card-org {
    font-size: 0.85rem;
  }

  .aging-card-outstanding {
    font-size: 0.85rem;
  }

  .aging-card-meta {
    font-size: 0.75rem;
    gap: 12px;
  }

  .aging-card-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .aging-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .aging-card-label {
    font-size: 0.7rem;
  }

  .aging-card-value {
    font-size: 0.8rem;
  }

  .taskbar-nav {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 200;
  }

  .taskbar-nav-open {
    display: flex !important;
  }

  .taskbar-link,
  .taskbar-link-group {
    width: 100%;
    border-radius: var(--radius-xs);
    padding: 10px 12px;
  }

  .taskbar-link-icon {
    display: inline-flex;
  }

  .taskbar-mobile-toggle {
    display: inline-flex;
  }

  .taskbar-fy {
    display: none;
  }

  .page-actions {
    width: 100%;
    gap: 8px;
  }

  .page-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .daily-date-picker {
    min-width: 100%;
  }

  .section-card {
    padding: 16px;
  }

  .panel {
    padding: 18px;
  }

  .panel-narrow {
    max-width: 100%;
  }

  .page-centered {
    margin: 16px auto;
    padding: 0 16px;
  }

  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-value {
    font-size: 1rem;
  }

  .pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .pagination-controls {
    justify-content: center;
  }

  .not-found-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 24px 16px;
  }

  .not-found-visual {
    display: none;
  }

  .landing {
    padding: 24px 16px 48px;
  }

  .landing-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
  }

  .landing-hero {
    padding: 24px 16px;
  }

  .landing-hero h2 {
    font-size: 1.5rem;
  }

  .landing-hero p {
    font-size: 0.95rem;
  }

  .landing-brand h1 {
    font-size: 1.75rem;
  }

  .landing-preview-body {
    grid-template-columns: 1fr;
  }

  .landing-preview-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .select-company-grid {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 16px;
  }

  .modal-card {
    padding: 20px 16px;
  }

  .login-card,
  .signup-card {
    padding: 20px 16px;
    max-width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions {
    width: 100%;
  }

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

  .report-columns {
    grid-template-columns: 1fr;
  }

  .ledger-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-preview-body {
    grid-template-columns: 1fr;
  }

  .landing-preview-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-preview-sidebar {
    display: none;
  }

  .nepali-date-fields {
    grid-template-columns: 1fr;
  }

  .day-stepper {
    flex-wrap: wrap;
  }

  .search-field input,
  .search-field select {
    min-width: 100%;
  }

  .organization-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions {
    flex-direction: column;
  }

  .policy-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .landing-preview-cards {
    grid-template-columns: 1fr;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .summary-card-row {
    grid-template-columns: 1fr;
  }

  .not-found-card {
    padding: 16px 12px;
  }

  .landing-brand h1 {
    font-size: 1.5rem;
  }

  .landing-hero h2 {
    font-size: 1.3rem;
  }

  .ledger-account-btn {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .ledger-accounts {
    max-height: 35vh;
  }

  .ledger-account-list {
    max-height: calc(35vh - 40px);
  }

  .account-type-badge {
    padding: 1px 6px;
    font-size: 0.65rem;
  }
}

@media (max-width: 375px) {
  .page-title {
    font-size: 1.1rem;
  }

  .landing-hero h2 {
    font-size: 1.3rem;
  }

  .transaction-table th,
  .transaction-table td {
    padding: 6px 8px;
  }

  .aging-card {
    padding: 10px;
    gap: 6px;
  }

  .aging-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .aging-card-right {
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .aging-card-outstanding {
    font-size: 0.8rem;
  }

  .aging-card-badge {
    margin-top: 0;
  }

  .aging-card-org {
    font-size: 0.8rem;
  }

  .aging-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .aging-card-label {
    font-size: 0.65rem;
  }

  .aging-card-value {
    font-size: 0.75rem;
  }

  .aging-card-btn {
    padding: 8px 10px;
    font-size: 0.75rem;
  }
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-bar .input {
  min-width: 160px;
  flex: 1 1 auto;
}

.input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

.input::placeholder {
  color: #94a3b8;
}

.audit-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}

.audit-search-row {
  position: relative;
}

.audit-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.audit-filters .input-full {
  width: 100%;
  padding-left: 40px;
  font-size: 0.95rem;
}

.audit-filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  align-items: end;
}

.audit-filter-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 120px;
  flex-shrink: 0;
}

.detail-value {
  text-align: right;
  word-break: break-word;
  flex: 1 1 auto;
}

.table-cell-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.code-old {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.code-new {
  background: var(--success-bg);
  color: var(--success);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.json-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 4px 0 0;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: var(--bg-subtle);
}

.audit-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}

.audit-search-row {
  width: 100%;
}

.audit-filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}

.audit-filter-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.audit-table {
  table-layout: auto;
}

.audit-table th {
  white-space: nowrap;
}

.audit-cell-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.audit-cell-event {
  font-size: 0.8rem;
  color: var(--muted);
}

.audit-cell-changes {
  white-space: nowrap;
}

.audit-no-changes {
  color: var(--muted);
  font-style: italic;
}

.audit-record {
  font-weight: 500;
  color: var(--text);
}

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

.audit-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.audit-badge-success {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.audit-badge-warning {
  background: var(--warning-bg);
  color: #b45309;
  border: 1px solid #fde68a;
}

.audit-badge-danger {
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.audit-badge-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.audit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.audit-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-display);
}

.audit-modal-subtitle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.audit-modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.audit-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.audit-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.audit-detail-item-wide {
  grid-column: 1 / -1;
}

.audit-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.audit-detail-value {
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-word;
}

.audit-changes-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audit-section-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.audit-changes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audit-change-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.audit-change-field {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.audit-change-values {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.audit-change-arrow {
  color: var(--muted);
  font-size: 0.85rem;
}

.audit-code-old {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  border: 1px solid #fecaca;
}

.audit-code-new {
  background: var(--success-bg);
  color: #065f46;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  border: 1px solid #a7f3d0;
}

.audit-json-details {
  margin-top: 4px;
}

.audit-json-summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  user-select: none;
}

.audit-json-summary:hover {
  color: var(--accent-hover);
}

.audit-json-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.audit-json-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 12px;
  overflow-x: auto;
}

.audit-json-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}

.audit-json-block pre {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-card-audit {
  max-width: 680px;
}

.import-upload {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.import-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  background: var(--bg-subtle);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.import-dropzone:hover,
.import-dropzone-active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.import-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.import-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  color: var(--accent);
}

.import-dropzone-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.import-dropzone-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.import-file-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background: var(--accent-light);
  border: 1px solid #c7d2fe;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}

.import-file-remove {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  line-height: 0;
  transition: color 0.15s;
}

.import-file-remove:hover {
  color: var(--danger);
}

.column-mapping {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mapping-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mapping-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--border-light);
  border-bottom: 1px solid var(--border);
}

.mapping-header > div {
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.mapping-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
}

.mapping-row:last-child {
  border-bottom: none;
}

.mapping-source {
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-light);
  display: flex;
  align-items: center;
}

.mapping-source input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
}

.mapping-row select {
  border: none;
  border-radius: 0;
  background: transparent;
}

.mapping-row select:focus {
  box-shadow: none;
  border-radius: 0;
}

.mapping-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mapping-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mapping-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--border-light);
  color: var(--muted);
  border: 1px solid var(--border);
}

.mapping-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.import-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.stat-valid {
  color: var(--success);
}

.stat-warning {
  color: #b45309;
}

.stat-error {
  color: var(--danger);
}

.preview-errors {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.preview-errors summary {
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--bg-subtle);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}

.preview-errors summary::-webkit-details-marker {
  display: none;
}

.preview-errors summary:hover {
  background: var(--border-light);
}

.preview-errors summary::after {
  content: '▾';
  font-size: 0.75rem;
  margin-left: auto;
  transition: transform 0.2s;
}

.preview-errors[open] summary::after {
  transform: rotate(180deg);
}

.error-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.error-item {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  font-size: 0.875rem;
}

.error-item strong {
  color: #991b1b;
  font-weight: 600;
}

.error-item ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.error-item li {
  margin-bottom: 3px;
  color: #991b1b;
}

.error-item li.warning {
  color: #b45309;
}

.import-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--border-light);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-gradient);
  transition: width 300ms ease-out;
}

.progress-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.import-result {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.import-result h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

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

.result-success {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  border: 1px solid #a7f3d0;
}

.result-error {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border: 1px solid #fecaca;
}

.result-success h3 {
  color: #065f46;
}

.result-error h3 {
  color: #991b1b;
}

.result-stats .stat {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(226, 232, 240, 0.9);
}

.import-help {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.import-help strong {
  color: var(--text);
}

.import-help ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.import-help li {
  margin-bottom: 3px;
}

@media (max-width: 768px) {
  .preview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mapping-header,
  .mapping-row {
    grid-template-columns: 1fr;
  }

  .mapping-source {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .mapping-row select {
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .preview-stats {
    grid-template-columns: 1fr;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }
}


