/* LedgerLane — flat operational theme */
:root {
  --rm-bg: #f3f4f6;
  --rm-surface: #ffffff;
  --rm-surface-elevated: #ffffff;
  --rm-border: #e4e6ea;
  --rm-text: #1c2128;
  --rm-text-muted: #5e6872;
  --rm-accent: #0f6e56;
  --rm-accent-hover: #0c5946;
  --rm-accent-soft: rgba(15, 110, 86, 0.1);
  --rm-success: #0f6e56;
  --rm-success-soft: rgba(15, 110, 86, 0.1);
  --rm-nav-bg: #1c2128;
  --rm-nav-text: #f7f8f9;
  --rm-shadow: none;
  --rm-shadow-lg: none;
  --rm-radius-sm: 6px;
  --rm-radius: 8px;
  --rm-radius-lg: 10px;
  --rm-font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --rm-ease: cubic-bezier(0.2, 0, 0, 1);
  --rm-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --rm-dur: 180ms;
  --rm-dur-page: 240ms;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--rm-font);
  background: var(--rm-bg);
  color: var(--rm-text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Layout: sidebar + main */
.layout-with-sidebar {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 220px;
  min-width: 220px;
  height: 100vh;
  max-height: 100vh;
  position: sticky;
  top: 0;
  background: var(--rm-nav-bg);
  color: var(--rm-nav-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--rm-dur-page) var(--rm-ease), min-width var(--rm-dur-page) var(--rm-ease);
}
.sidebar-header {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 4.5rem;
}
.sidebar-brand {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--rm-nav-text);
  text-decoration: none;
  padding: 1.5rem 1.25rem;
  display: block;
  transition: opacity 0.15s;
}
.sidebar-collapse-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--rm-radius-sm);
  background: transparent;
  color: rgba(248, 250, 252, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--rm-nav-text);
}
.sidebar-collapse-btn .bi {
  font-size: 1.1rem;
}
.sidebar-brand:hover {
  color: var(--rm-nav-text);
  opacity: 0.9;
}
.sidebar-nav {
  padding: 1rem 0.75rem;
  flex: 1;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  color: rgba(248, 250, 252, 0.85);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--rm-radius-sm);
  transition: background var(--rm-dur) var(--rm-ease), color var(--rm-dur) var(--rm-ease);
  margin-bottom: 0.2rem;
}
.sidebar-link:hover {
  color: var(--rm-nav-text);
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-link.active {
  background: var(--rm-accent);
  color: #fff;
}
.sidebar-icon {
  font-size: 1.2rem;
  opacity: 0.9;
  width: 1.25em;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-section {
  padding: 0 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-section-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(248, 250, 252, 0.5);
  padding: 0.75rem 1rem 0.35rem;
  margin-bottom: 0.2rem;
}
.sidebar-link-external {
  margin-bottom: 0.2rem;
}
.sidebar-icon-external {
  margin-left: auto;
  font-size: 0.85rem;
  opacity: 0.6;
}
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}
.sidebar-account {
  margin-bottom: 0.75rem;
}
.sidebar-account-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(248, 250, 252, 0.5);
  margin-bottom: 0.25rem;
}
.sidebar-user {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.95);
  padding: 0 0.25rem;
}
.sidebar-user-meta {
  display: block;
  font-size: 0.8rem;
  color: rgba(248, 250, 252, 0.6);
  margin-top: 0.15rem;
  padding: 0 0.25rem;
}
.sidebar-link-logout {
  color: rgba(248, 250, 252, 0.7);
  font-size: 0.9rem;
}
.sidebar-link-logout:hover {
  color: #fca5a5;
}

/* Collapsed sidebar (desktop only) */
@media (min-width: 992px) {
body.sidebar-collapsed .sidebar {
  width: 72px;
  min-width: 72px;
}
body.sidebar-collapsed .sidebar-header {
  padding: 0 0.5rem;
  justify-content: center;
  gap: 0.25rem;
}
body.sidebar-collapsed .sidebar-brand {
  flex-grow: 0;
  padding: 1rem 0.25rem;
  font-size: 0;
  text-align: center;
  min-width: 0;
}
body.sidebar-collapsed .sidebar-brand::before {
  content: 'L';
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
body.sidebar-collapsed .sidebar-nav .sidebar-link,
body.sidebar-collapsed .sidebar-section .sidebar-link {
  justify-content: center;
  padding: 0.75rem;
}
body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .sidebar-icon-external,
body.sidebar-collapsed .sidebar-account,
body.sidebar-collapsed .sidebar-user-meta {
  display: none !important;
}
body.sidebar-collapsed .sidebar-link {
  font-size: 0;
}
body.sidebar-collapsed .sidebar-icon {
  margin: 0;
  font-size: 1.35rem;
}
body.sidebar-collapsed .sidebar-section {
  padding: 0 0.5rem 1rem;
}
body.sidebar-collapsed .sidebar-section .sidebar-link {
  margin-bottom: 0.2rem;
}
body.sidebar-collapsed .sidebar-footer {
  padding: 0.75rem 0.5rem;
}
body.sidebar-collapsed .sidebar-link-logout {
  justify-content: center;
  padding: 0.75rem;
  font-size: 0;
}
body.sidebar-collapsed .sidebar-link-logout .bi {
  font-size: 1.25rem;
  margin: 0 !important;
}
}

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--rm-bg);
  position: relative;
}
.main-content-inner {
  flex: 1;
  padding: 1.1rem 1.35rem 1.75rem;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

/* Navbar (kept for any standalone use) */
.navbar-ledgerlane {
  background: var(--rm-nav-bg) !important;
  box-shadow: var(--rm-shadow);
  padding: 0.6rem 0;
}
.navbar-ledgerlane .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--rm-nav-text) !important;
}
.navbar-ledgerlane .nav-link {
  color: rgba(248, 250, 252, 0.9) !important;
  font-weight: 500;
  padding: 0.4rem 0.75rem !important;
  border-radius: var(--rm-radius-sm);
}
.navbar-ledgerlane .nav-link:hover {
  color: var(--rm-nav-text) !important;
  background: rgba(255, 255, 255, 0.08);
}
.navbar-ledgerlane .navbar-text {
  color: rgba(248, 250, 252, 0.85) !important;
  font-size: 0.9rem;
}

/* Cards */
.card-ledgerlane {
  background: var(--rm-surface);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  box-shadow: none;
  overflow: hidden;
}
.card-ledgerlane .card-header {
  background: transparent;
  border-bottom: 1px solid var(--rm-border);
  font-weight: 600;
  color: var(--rm-text);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
}
.card-ledgerlane .card-body {
  padding: 1.25rem;
}

/* Buttons */
.btn-ledgerlane-primary,
.btn-ledgerlane-success,
.btn-outline-ledgerlane {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-ledgerlane-primary {
  background: var(--rm-accent);
  border-color: var(--rm-accent);
  color: #fff;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--rm-radius-sm);
}
.btn-ledgerlane-primary:hover {
  background: var(--rm-accent-hover);
  border-color: var(--rm-accent-hover);
  color: #fff;
}
.btn-ledgerlane-success {
  background: var(--rm-success);
  border-color: var(--rm-success);
  color: #fff;
  font-weight: 600;
  border-radius: var(--rm-radius-sm);
}
.btn-ledgerlane-success:hover {
  background: #047857;
  border-color: #047857;
  color: #fff;
}
.btn-outline-ledgerlane {
  border: 1px solid var(--rm-border);
  color: var(--rm-text);
  font-weight: 500;
  border-radius: var(--rm-radius-sm);
  background: var(--rm-surface);
}
.btn-outline-ledgerlane:hover {
  background: var(--rm-bg);
  border-color: var(--rm-text-muted);
  color: var(--rm-text);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group:last-child {
  margin-bottom: 0;
}
.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--rm-text);
  margin-bottom: 0.4rem;
}
.form-label + .form-control,
.form-label + .form-select {
  margin-top: 0;
}
.form-control,
.form-select {
  display: block;
  width: 100%;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--rm-text);
  background: var(--rm-surface);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius-sm);
  padding: 0.6rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control::placeholder {
  color: var(--rm-text-muted);
  opacity: 0.85;
}
.form-control:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled) {
  border-color: var(--rm-text-muted);
}
.form-control:focus,
.form-select:focus {
  outline: 0;
  border-color: var(--rm-accent);
  box-shadow: 0 0 0 3px var(--rm-accent-soft);
}
.form-control:disabled,
.form-select:disabled {
  background: var(--rm-bg);
  color: var(--rm-text-muted);
  cursor: not-allowed;
}
.form-control-sm {
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
}
.form-select option {
  padding: 0.25rem;
}
/* File input */
.form-control[type="file"] {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.form-control[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--rm-accent);
  background: var(--rm-accent-soft);
  border: 0;
  border-radius: var(--rm-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.form-control[type="file"]::file-selector-button:hover {
  background: rgba(13, 148, 136, 0.2);
}
/* Inline / filter forms */
.form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.form-inline .form-control,
.form-inline .form-select {
  width: auto;
  min-width: 0;
}
.form-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--rm-text-muted);
  margin-top: 0.35rem;
}
.form-upload .form-group {
  margin-bottom: 1.25rem;
}
.form-upload .form-group:last-of-type {
  margin-bottom: 1rem;
}
.form-upload .btn-link-sm {
  font-size: 0.85rem;
  color: var(--rm-accent);
  text-decoration: none;
  font-weight: 500;
}
.form-upload .btn-link-sm:hover {
  color: var(--rm-accent-hover);
  text-decoration: underline;
}
.form-upload-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}
.form-login-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

/* Alerts */
.alert {
  border-radius: var(--rm-radius-sm);
  border: none;
}
.alert-login-error {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--rm-radius-sm);
}
.alert-login-error .bi {
  flex-shrink: 0;
  font-size: 1.1rem;
}
.alert-success {
  display: flex;
  align-items: center;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.alert-success .bi {
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.breadcrumb-item a {
  color: var(--rm-text-muted);
  text-decoration: none;
}
.breadcrumb-item a:hover {
  color: var(--rm-accent);
}
.breadcrumb-item.active {
  color: var(--rm-text);
}

/* Page titles */
.page-title {
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--rm-text);
  margin-bottom: 0.5rem;
}
.page-subtitle {
  color: var(--rm-text-muted);
  font-size: 0.95rem;
}

/* Session detail: header */
.session-header {
  padding-bottom: 0.25rem;
}
.session-header-main {
  flex: 1 1 auto;
  min-width: 0;
}
.session-header-meta {
  font-size: 0.875rem;
  color: var(--rm-text-muted);
}
.session-header-period {
  font-variant-numeric: tabular-nums;
}
.session-header-sep {
  opacity: 0.6;
  user-select: none;
}
.session-header-actions {
  flex-shrink: 0;
}
.session-status-pill {
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
}
.session-status-pill-draft {
  background: var(--rm-bg);
  color: var(--rm-text-muted);
  border: 1px solid var(--rm-border);
}
.session-status-pill-imported {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.session-status-pill-reconciled {
  background: var(--rm-success-soft);
  color: var(--rm-success);
  border: 1px solid rgba(5, 150, 105, 0.35);
}

/* Session list (dashboard) */
/* Session list (dashboard) */
.session-list {
  padding: 0.5rem 0;
}
.session-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
  min-height: 4rem;
  border-bottom: 1px solid var(--rm-border);
  transition: background 0.15s ease;
}
.session-list-item:last-child {
  border-bottom: none;
}
.session-list-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.85rem 0;
  text-decoration: none;
  color: var(--rm-text);
  transition: background 0.15s ease;
  border-radius: var(--rm-radius-sm);
  margin: 0 -0.5rem 0 -0.25rem;
  padding-left: 0.75rem;
  padding-right: 0.5rem;
}
.session-list-link:hover {
  background: var(--rm-bg);
  color: var(--rm-text);
}
.session-list-link:hover .session-list-chevron {
  color: var(--rm-accent);
  transform: translateX(3px);
}
.session-list-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rm-bg);
  color: var(--rm-text-muted);
  border-radius: var(--rm-radius-sm);
  font-size: 1.1rem;
}
.session-list-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.session-list-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--rm-text);
  display: block;
}
.session-list-meta {
  font-size: 0.8rem;
  color: var(--rm-text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.session-list-meta-sep {
  opacity: 0.6;
  user-select: none;
}
.session-list-period {
  font-variant-numeric: tabular-nums;
}
.session-list-created {
  font-variant-numeric: tabular-nums;
}
.session-list-status {
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}
.session-list-status-draft {
  background: var(--rm-bg);
  color: var(--rm-text-muted);
  border: 1px solid var(--rm-border);
}
.session-list-status-imported {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.session-list-status-reconciled {
  background: var(--rm-success-soft);
  color: var(--rm-success);
  border: 1px solid rgba(5, 150, 105, 0.35);
}
.session-list-chevron {
  flex-shrink: 0;
  color: var(--rm-border);
  font-size: 0.9rem;
  transition: color var(--rm-dur) var(--rm-ease), transform var(--rm-dur) var(--rm-ease);
}
.session-list-delete {
  flex-shrink: 0;
  margin: 0;
}
.session-list-delete-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--rm-text-muted);
  border-radius: var(--rm-radius-sm);
  transition: background 0.15s, color 0.15s ease;
}
.session-list-delete-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}
.session-list-empty {
  list-style: none;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.session-list-empty-icon {
  font-size: 2.5rem;
  color: var(--rm-border);
  display: block;
  margin-bottom: 0.75rem;
}
.session-list-empty-text {
  font-weight: 600;
  color: var(--rm-text);
  margin: 0 0 0.25rem 0;
}
.session-list-empty-subtext {
  font-size: 0.9rem;
}

/* Upload cards */
.upload-card {
  border: 1px dashed var(--rm-border);
  border-radius: var(--rm-radius-lg);
  background: var(--rm-surface);
  transition: border-color 0.2s, background 0.2s;
}
.upload-card:hover {
  border-color: var(--rm-accent);
  background: var(--rm-accent-soft);
}
.upload-card .upload-done {
  color: var(--rm-success);
  font-weight: 500;
  font-size: 0.9rem;
}
.upload-card .column-mapping-label {
  font-size: 0.8rem;
  color: var(--rm-text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

/* Tabs (results) */
.nav-tabs-ledgerlane {
  border: 1px solid var(--rm-border);
  border-bottom: none;
  border-radius: var(--rm-radius) var(--rm-radius) 0 0;
  background: var(--rm-surface);
  gap: 0;
  padding: 0 0.35rem;
}
.nav-tabs-ledgerlane .nav-link {
  border: none;
  color: var(--rm-text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0;
  margin-bottom: 0;
  border-bottom: 2px solid transparent;
  transition: color var(--rm-dur) var(--rm-ease), border-color var(--rm-dur) var(--rm-ease), background var(--rm-dur) var(--rm-ease);
}
.nav-tabs-ledgerlane .nav-link:hover {
  color: var(--rm-text);
  background: var(--rm-bg);
}
.nav-tabs-ledgerlane .nav-link.active {
  color: var(--rm-accent);
  background: var(--rm-surface);
  border-bottom: 2px solid var(--rm-accent);
}

/* Results tabs: horizontal scroll on small screens */
.nav-tabs-results-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin-bottom: -1px;
}
.nav-tabs-results-wrap::-webkit-scrollbar {
  height: 4px;
}
.nav-tabs-results {
  flex-wrap: nowrap;
  min-width: min-content;
}
.nav-tabs-results .nav-item {
  flex-shrink: 0;
}

.review-rules-help summary {
  cursor: pointer;
  list-style: none;
}
.review-rules-help summary::-webkit-details-marker { display: none; }
.review-rules-help summary:hover { color: var(--rm-accent); }
.review-rules-help[open] summary { margin-bottom: 0.25rem; }

/* Empty table state */
.table-empty-state .bi {
  color: var(--rm-border);
  opacity: 0.9;
}

/* Tables */
.table-ledgerlane {
  margin: 0;
}
.table-ledgerlane thead th {
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rm-text-muted);
  border-bottom: 1px solid var(--rm-border);
  padding: 0.55rem 0.85rem;
  background: #f7f8f9;
}
.table-ledgerlane tbody td {
  padding: 0.5rem 0.85rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--rm-border);
  font-size: 0.9rem;
}
.table-ledgerlane tbody tr:last-child td {
  border-bottom: none;
}
.table-ledgerlane tbody tr:hover {
  background: var(--rm-bg);
}
.table-sort-link {
  color: var(--rm-text-muted);
  font-weight: 600;
}
.table-sort-link:hover {
  color: var(--rm-accent);
}
.table-toolbar {
  min-height: 2.75rem;
}

/* Login page: centered layout, use available space */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(60vh, 520px);
  width: 100%;
}
.login-page-inner {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.login-card-wrapper {
  width: 100%;
}
.login-card-wrapper .card-ledgerlane .card-header .bi {
  font-size: 1.15rem;
  opacity: 0.9;
}
.input-group-phone .input-group-text {
  background: var(--rm-bg);
  border: 1px solid var(--rm-border);
  border-right: none;
  color: var(--rm-text-muted);
  font-weight: 500;
  border-radius: var(--rm-radius-sm) 0 0 var(--rm-radius-sm);
}
.input-group-phone .form-control {
  border-radius: 0 var(--rm-radius-sm) var(--rm-radius-sm) 0;
}
/* Password visibility toggle */
.password-toggle-wrapper {
  position: relative;
  display: block;
}
.password-toggle-wrapper .form-control {
  padding-right: 2.75rem;
}
.password-toggle-btn {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.35rem 0.5rem;
  color: var(--rm-text-muted);
  cursor: pointer;
  border-radius: var(--rm-radius-sm);
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.password-toggle-btn:hover {
  color: var(--rm-text);
  background: var(--rm-bg);
}
.password-toggle-btn:focus {
  outline: 0;
  color: var(--rm-accent);
}
.password-toggle-btn i {
  font-size: 1.15rem;
  display: block;
}

.form-login .form-group {
  margin-bottom: 1.25rem;
}
.form-login .form-group:last-of-type {
  margin-bottom: 1rem;
}
.form-login .btn {
  margin-top: 0.25rem;
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
}
.form-login .btn i {
  font-size: 1.1em;
}

/* Create session form */
.create-session-form .form-control {
  max-width: 320px;
}
.create-session-form .btn {
  border-radius: var(--rm-radius-sm);
  font-weight: 600;
}

/* Action bar */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Actions step: card grid */
.step-block-lead {
  font-size: 0.95rem;
  margin-bottom: 0;
}
.step-block-actions {
  max-width: 100%;
}
/* Tutorial page */
.tutorial-step {
  position: relative;
  padding-left: 0.25rem;
}
.tutorial-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--rm-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.tutorial-step-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--rm-text);
}
.tutorial-figure {
  margin: 1rem 0;
}
.tutorial-img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  box-shadow: var(--rm-shadow);
}
.tutorial-steps .card-body p + .tutorial-figure {
  margin-top: 0.75rem;
}

/* Upload loader (replaces shimmer in upload cards) */
.upload-loader {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding: 2rem 1.5rem;
  text-align: center;
}
.upload-loader-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--rm-border);
  border-top-color: var(--rm-accent);
  border-radius: 50%;
  animation: process-loader-spin 0.8s linear infinite;
  margin-bottom: 1.25rem;
}
.upload-loader-text {
  font-weight: 600;
  color: var(--rm-text);
}
.upload-loader-subtext {
  margin-top: 0.35rem;
}

/* Reconcile loader */
.reconcile-loader {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 2rem 1.5rem;
  background: var(--rm-accent-soft);
  border: 1px solid var(--rm-accent);
  border-radius: var(--rm-radius-lg);
  text-align: center;
}
.reconcile-loader-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(13, 148, 136, 0.25);
  border-top-color: var(--rm-accent);
  border-radius: 50%;
  animation: process-loader-spin 0.8s linear infinite;
  margin-bottom: 1.25rem;
}
.reconcile-loader-text {
  font-weight: 600;
  color: var(--rm-text);
}
.reconcile-loader-subtext {
  margin-top: 0.35rem;
}

@keyframes process-loader-spin {
  to { transform: rotate(360deg); }
}

.actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 576px) {
  .actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.action-card {
  background: var(--rm-surface);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--rm-dur) var(--rm-ease), transform var(--rm-dur) var(--rm-ease);
  min-height: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.action-card:hover {
  color: inherit;
}
form.action-card {
  padding: 0;
}
.action-card-hit {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 1.25rem;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.action-card:focus-visible,
.action-card-hit:focus-visible {
  outline: 2px solid var(--rm-accent);
  outline-offset: 2px;
}
.action-card:active,
.action-card:has(.action-card-hit:active) {
  transform: scale(0.99);
}
.action-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.action-card:hover {
  border-color: var(--rm-text-muted);
  transform: translateY(-1px);
}
.action-card-primary {
  border-color: var(--rm-accent);
  background: var(--rm-accent-soft);
}
.action-card-primary:hover {
  border-color: var(--rm-accent-hover);
}
.action-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--rm-radius-sm);
  background: var(--rm-bg);
  color: var(--rm-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.action-card-primary .action-card-icon {
  background: var(--rm-accent);
  color: #fff;
}
.action-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--rm-text);
}
.action-card-desc {
  font-size: 0.875rem;
  color: var(--rm-text-muted);
  margin: 0;
  line-height: 1.45;
  flex: 1;
  min-height: 2.5rem;
}
/* Button row: same position in every card – fixed size, right-aligned, same top padding */
.action-card-form {
  margin-top: auto;
  padding-top: 0.75rem;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}
.action-card-body > .btn {
  margin-top: auto;
  padding-top: 0.75rem;
  align-self: flex-end;
}
.action-card .btn {
  width: 7rem;
  min-width: 7rem;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0 0.75rem;
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  line-height: 1;
  text-align: center;
}
/* Match <button> to <a>: reset browser/Bootstrap defaults so icon+text center like Results */
.action-card button.btn {
  font-family: inherit;
}
.action-card button.btn i {
  margin: 0;
  line-height: 1;
}
.action-card .btn i {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.action-card-form .btn {
  margin-top: 0;
  padding-top: 0;
}

/* Step back navigation */
.step-back-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.step-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rm-accent);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--rm-radius-sm);
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.step-back-link:hover {
  color: var(--rm-accent-hover);
  background: var(--rm-accent-soft);
}
.step-back-link-secondary {
  color: var(--rm-text-muted);
}
.step-back-link-secondary:hover {
  color: var(--rm-text);
  background: var(--rm-bg);
}

/* Empty state */
.empty-state {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--rm-text-muted);
  font-size: 0.95rem;
}

/* Session detail: step flow */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.steps-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.steps-list-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--rm-border);
  color: var(--rm-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--rm-dur) var(--rm-ease), color var(--rm-dur) var(--rm-ease), transform var(--rm-dur) var(--rm-ease);
}
.steps-list-item-done .steps-list-num {
  background: var(--rm-border);
  color: var(--rm-text-muted);
}
.steps-list-label {
  font-weight: 500;
  color: var(--rm-text-muted);
  font-size: 0.9rem;
}
.steps-list-item-done .steps-list-label {
  color: var(--rm-text);
}
.steps-list-item-active .steps-list-num {
  background: var(--rm-accent);
  color: #fff;
}
.steps-list-item-active .steps-list-label {
  color: var(--rm-text);
  font-weight: 600;
}
.steps-list-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}
.steps-list-link:hover {
  color: inherit;
}
.steps-list-connector {
  width: 2rem;
  height: 2px;
  background: var(--rm-border);
  margin: 0 0.5rem;
}

.step-block {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.step-block-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.step-block-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--rm-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-block-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--rm-text);
}
.step-block-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rm-accent);
}

/* Mobile header (visible only on small screens) */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.25rem;
  background: var(--rm-nav-bg);
  color: var(--rm-nav-text);
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1030;
  box-shadow: var(--rm-shadow);
}
.mobile-header-brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--rm-nav-text);
  text-decoration: none;
}
.mobile-header-brand:hover {
  color: var(--rm-nav-text);
  opacity: 0.9;
}
.mobile-header-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--rm-nav-text);
  border-radius: var(--rm-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.mobile-header-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.mobile-header-menu-btn .bi {
  font-size: 1.5rem;
}
.mobile-header-menu-btn .sidebar-open-show {
  display: none;
}

/* Sidebar backdrop (mobile) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1020;
  opacity: 0;
  transition: opacity 0.2s ease;
}
body.sidebar-open .sidebar-backdrop {
  display: block;
  opacity: 1;
}

/* Sidebar: responsive — drawer on mobile */
@media (max-width: 991px) {
  .mobile-header {
    display: flex;
  }
  .main-content {
    padding-top: 3.25rem;
  }
  .main-content-inner {
    padding: 1rem 1rem 1.5rem;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    min-width: 280px;
    max-width: 85vw;
    height: 100vh;
    z-index: 1025;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .sidebar-brand {
    font-size: 1.15rem;
    padding: 1.25rem 1rem;
  }
}

/* Small phones */
@media (max-width: 575px) {
  .main-content-inner {
    padding: 0.75rem 0.75rem 1.25rem;
  }
  .page-title {
    font-size: 1.35rem;
  }
  .login-page {
    min-height: min(50vh, 400px);
    padding: 0 0.5rem;
  }
  .login-page-inner {
    padding: 0 0.25rem;
  }
}

/* Dashboard: create session form stacks on mobile */
@media (max-width: 575px) {
  .create-session-form {
    flex-direction: column;
    align-items: stretch;
  }
  .create-session-form .form-control {
    max-width: none;
    min-width: 0;
  }
  .create-session-form .btn {
    margin-left: 0;
    margin-top: 0;
  }
}

/* Session list item: stack title and delete on very small screens */
@media (max-width: 575px) {
  .session-list-item {
    flex-wrap: wrap;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .session-list-link {
    flex: 1 1 100%;
    min-width: 0;
  }
  .session-list-delete {
    margin-left: auto;
  }
}

/* Session detail: column mapping full width on small screens */
@media (max-width: 575px) {
  .step-block .row.g-2 .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Session header and steps: tighter on mobile */
@media (max-width: 575px) {
  .session-header {
    gap: 0.75rem;
  }
  .session-header-meta {
    gap: 0.5rem;
  }
  .steps-list {
    gap: 0.25rem;
  }
  .steps-list-connector {
    width: 1rem;
    margin: 0 0.25rem;
  }
  .steps-list-label {
    font-size: 0.85rem;
  }
}

/* Action cards: full width on mobile (already 1 col below 576px) */
@media (max-width: 575px) {
  .action-card .btn {
    width: auto;
    min-width: 0;
  }
}

/* Tables: ensure horizontal scroll on small screens */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 575px) {
  .table-ledgerlane thead th,
  .table-ledgerlane tbody td {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Alerts: wrap long text */
.alert {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Results filter form: stack on mobile */
@media (max-width: 575px) {
  .form-inline.mb-4 .form-control,
  .form-inline.mb-4 .form-select {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .form-inline.mb-4 .btn {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

/* Pagination */
.pagination-nav-wrap {
  width: 100%;
  min-width: 0;
}
.pagination-ledgerlane {
  --bs-pagination-color: var(--rm-text);
  --bs-pagination-bg: var(--rm-surface);
  --bs-pagination-border-color: var(--rm-border);
  --bs-pagination-hover-color: var(--rm-accent);
  --bs-pagination-hover-bg: var(--rm-accent-soft);
  --bs-pagination-hover-border-color: var(--rm-border);
  --bs-pagination-active-bg: var(--rm-accent);
  --bs-pagination-active-border-color: var(--rm-accent);
  --bs-pagination-disabled-bg: var(--rm-surface);
  --bs-pagination-disabled-color: var(--rm-text-muted);
  gap: 0.2rem;
  flex-wrap: wrap;
  display: flex;
  justify-content: center;
}
.pagination-ledgerlane .page-item {
  flex-shrink: 0;
}
.pagination-ledgerlane .page-link {
  border-radius: var(--rm-radius-sm);
  padding: 0.4rem 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.pagination-ledgerlane .page-item.active .page-link {
  color: #fff;
}
.pagination-ledgerlane .page-link:hover {
  color: var(--rm-accent);
}
.pagination-ledgerlane .page-item.disabled .page-link {
  cursor: default;
  pointer-events: none;
}

.results-segment {
  display: inline-flex;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius-sm);
  overflow: hidden;
  background: var(--rm-surface);
}
.results-segment a {
  padding: 0.45rem 0.9rem;
  color: var(--rm-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--rm-dur) var(--rm-ease), color var(--rm-dur) var(--rm-ease);
}
.results-segment a + a {
  border-left: 1px solid var(--rm-border);
}
.results-segment a:hover {
  color: var(--rm-text);
  background: var(--rm-bg);
}
.results-segment a.is-active {
  background: var(--rm-accent-soft);
  color: var(--rm-accent-hover);
}
.results-tab-count {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0 0.4rem;
  min-width: 1.35rem;
  height: 1.15rem;
  border-radius: 999px;
  background: var(--rm-bg);
  color: var(--rm-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nav-tabs-ledgerlane .nav-link.active .results-tab-count {
  background: var(--rm-accent-soft);
  color: var(--rm-accent);
}
.results-table {
  min-width: 40rem;
}
.results-col-journal {
  width: 7.5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.results-col-side {
  width: 5.5rem;
}
.results-col-date {
  width: 7rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.results-col-amount {
  width: 11rem;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.results-amount {
  font-weight: 600;
}
.results-desc {
  max-width: 36rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.results-ref {
  display: block;
  margin-top: 0.15rem;
  color: var(--rm-text-muted);
  font-size: 0.8rem;
  font-weight: 400;
}
.results-side {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rm-text-muted);
}
.results-side-bank {
  color: var(--rm-accent);
}
.results-dir {
  margin-left: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rm-text-muted);
}
.results-pair td {
  background: var(--rm-surface);
  transition: background var(--rm-dur) var(--rm-ease);
}
.results-pair:hover td {
  background: var(--rm-bg);
}
.results-pair .results-pair-top td {
  border-bottom: none;
  padding-bottom: 0.3rem;
}
.results-pair .results-pair-bottom td {
  border-top: none;
  padding-top: 0.3rem;
}
.results-reason {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--rm-text-muted);
  font-size: 0.8rem;
  max-width: 14rem;
  white-space: normal;
}
.review-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--rm-bg);
}
.review-card {
  background: var(--rm-surface);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  overflow: hidden;
}
.review-ledger,
.review-option-main {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.review-ledger {
  grid-template-columns: 4.5rem 5.5rem 6.5rem minmax(0, 1fr) auto;
  padding: 0.75rem 0.9rem;
  background: #f7f8f9;
}
.review-prompt {
  margin: 0;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  color: var(--rm-text-muted);
  border-bottom: 1px solid var(--rm-border);
}
.review-options {
  list-style: none;
  margin: 0;
  padding: 0;
}
.review-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  border-top: 1px solid var(--rm-border);
}
.review-option:first-child {
  border-top: none;
}
.review-option-main {
  grid-template-columns: 4.5rem 6.5rem minmax(0, 1fr) auto;
  flex: 1;
}
.review-journal,
.review-date,
.review-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.9rem;
}
.review-amount {
  text-align: right;
}
.review-desc {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}
.review-why {
  font-size: 0.8rem;
  color: var(--rm-text-muted);
  white-space: nowrap;
}
.review-why.is-wide {
  color: #9a3412;
}
.review-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.review-actions .btn {
  min-height: 2.25rem;
}
@media (max-width: 767px) {
  .review-ledger,
  .review-option-main {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .review-option {
    flex-direction: column;
    align-items: stretch;
  }
  .review-actions {
    justify-content: flex-end;
  }
}
.results-pair-actions {
  width: 12rem;
  text-align: right;
  vertical-align: middle;
}
.results-pair-actions .btn {
  min-height: 2.25rem;
}

/* ========== Skeleton / Shimmer loading ========== */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--rm-border) 0%,
    #e2e8f0 20%,
    #f1f5f9 40%,
    #e2e8f0 60%,
    #f1f5f9 80%,
    var(--rm-border) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--rm-radius-sm);
}
.skeleton-line {
  height: 1rem;
  margin-bottom: 0.5rem;
}
.skeleton-line.skeleton-title {
  height: 1.75rem;
  width: 60%;
  margin-bottom: 0.75rem;
}
.skeleton-line.skeleton-subtitle {
  height: 0.95rem;
  width: 45%;
  margin-bottom: 1rem;
}
.skeleton-card {
  height: 4rem;
  margin-bottom: 0.75rem;
  border-radius: var(--rm-radius);
}
.skeleton-table-row {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rm-border);
}
.skeleton-table-cell {
  flex: 1;
  height: 1rem;
  min-width: 0;
}
.skeleton-breadcrumb {
  height: 0.9rem;
  width: 8rem;
  margin-bottom: 1.25rem;
}
.skeleton-overlay {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 100;
  background: var(--rm-bg);
  padding: 1.5rem 2rem 2rem;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--rm-dur) var(--rm-ease), visibility var(--rm-dur) var(--rm-ease);
}
.skeleton-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.skeleton-overlay .skeleton-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Motion: page changes, press, and loaders */
@view-transition {
  navigation: auto;
}

.sidebar {
  view-transition-name: app-sidebar;
}
.mobile-header {
  view-transition-name: app-mobile-header;
}
.main-content-inner {
  view-transition-name: app-page;
}

::view-transition-old(app-page) {
  animation: vt-page-out 140ms var(--rm-ease) both;
}
::view-transition-new(app-page) {
  animation: vt-page-in var(--rm-dur-page) var(--rm-ease-out) both;
}
::view-transition-group(app-sidebar),
::view-transition-group(app-mobile-header) {
  animation-duration: 0s;
}

@keyframes vt-page-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@keyframes vt-page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes row-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes alert-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes loader-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.btn {
  transition: background-color var(--rm-dur) var(--rm-ease), border-color var(--rm-dur) var(--rm-ease), color var(--rm-dur) var(--rm-ease), transform 120ms var(--rm-ease);
}
.btn:active:not(:disabled):not(.btn-close) {
  transform: scale(0.98);
}
.sidebar-link:active {
  transform: scale(0.98);
}

.main-content > .alert {
  margin: 0.75rem 1.35rem 0;
  animation: alert-in 0.28s var(--rm-ease-out) both;
}

.upload-loader.is-visible,
.reconcile-loader.is-visible {
  display: flex;
  animation: loader-in 0.22s var(--rm-ease-out);
}

.steps-list-label {
  transition: color var(--rm-dur) var(--rm-ease);
}
.steps-list-item-active .steps-list-num {
  transform: none;
}

@supports not (view-transition-name: none) {
  .main-content-inner {
    animation: page-enter 0.28s var(--rm-ease-out) both;
  }
  .session-list-item,
  .action-card,
  .step-block {
    animation: row-in 0.32s var(--rm-ease-out) both;
  }
  .session-list-item:nth-child(2),
  .action-card:nth-child(2) { animation-delay: 30ms; }
  .session-list-item:nth-child(3),
  .action-card:nth-child(3) { animation-delay: 60ms; }
  .session-list-item:nth-child(4) { animation-delay: 90ms; }
  .session-list-item:nth-child(5) { animation-delay: 120ms; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
