:root {
  color-scheme: light;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: #f8fafc;
  --foreground: #171717;
  --card: #ffffff;
  --card-elevated: #ffffff;
  --popover: #ffffff;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --input: #e4e4e7;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-soft: #fff7ed;
  --accent-foreground: #ffffff;
  --secondary: #f4f4f5;
  --secondary-hover: #e4e4e7;
  --destructive: #dc2626;
  --destructive-hover: #b91c1c;
  --destructive-button: #dc2626;
  --destructive-button-hover: #b91c1c;
  --destructive-button-foreground: #ffffff;
  --destructive-ring: rgba(220, 38, 38, 0.28);
  --ring: rgba(249, 115, 22, 0.28);
  --shadow: 0 1px 2px rgba(24, 24, 27, 0.04), 0 10px 30px rgba(24, 24, 27, 0.045);
  --shadow-soft: 0 1px 2px rgba(24, 24, 27, 0.05), 0 4px 14px rgba(24, 24, 27, 0.025);
  --radius-card: 16px;
  --radius-control: 11px;
  --radius-pill: 999px;
  --radius: var(--radius-card);
  --radius-sm: var(--radius-control);
  --navbar-height: 64px;
  --row-hover: #fafafa;
  --priority-row: #fff1f2;
  --hot-row: #fff8ed;
  --overdue-row: #fff1f2;
  --bs-body-bg: var(--background);
  --bs-body-color: var(--foreground);
  --bs-border-color: var(--border);
  --bs-link-color: var(--accent);
  --bs-link-hover-color: var(--accent-hover);
  --bs-primary: var(--accent);
  --bs-primary-rgb: 249, 115, 22;
}

/* Design Polish v2: shared visual language for the existing Jinja UI. */
.ui-icon {
  display: inline-block;
  flex: 0 0 auto;
  height: 17px;
  stroke-width: 2;
  vertical-align: middle;
  width: 17px;
}

.icon-flip-x {
  transform: scaleX(-1);
}

.navbar .nav-link {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.navbar .nav-link .ui-icon {
  color: var(--muted-foreground);
  height: 16px;
  transition: color 140ms ease;
  width: 16px;
}

.navbar .nav-link:hover .ui-icon,
.navbar .nav-link:focus-visible .ui-icon,
.navbar .nav-link.active .ui-icon {
  color: currentColor;
}

.content-card,
.card,
.modal-content,
.mobile-list-card {
  border-radius: var(--radius-card);
}

.content-card,
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 98%, var(--foreground) 2%), var(--card));
  border-color: color-mix(in srgb, var(--border) 88%, transparent);
}

[data-theme="dark"] .content-card,
[data-theme="dark"] .card,
[data-theme="dark"] .mobile-list-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 96%, white 4%), var(--card));
  border-color: color-mix(in srgb, var(--border) 92%, transparent);
}

a .content-card:hover,
.clickable-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05), 0 12px 34px rgba(24, 24, 27, 0.065);
  transform: none;
}

.content-card-header,
.card-header {
  align-items: center;
  background: transparent;
  display: flex;
  gap: 9px;
  min-height: 54px;
  padding: 17px 21px;
}

.content-card-header .ui-icon,
.card-header .ui-icon {
  color: var(--muted-foreground);
}

.content-card-body,
.card-body {
  padding: 22px;
}

.metric-card {
  height: 100%;
  min-height: 118px;
}

.metric-card .content-card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  position: relative;
}

.metric-card-icon {
  align-items: center;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--muted-foreground);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 34px;
}

.metric-card-icon .ui-icon {
  height: 16px;
  width: 16px;
}

.metric-label {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
  max-width: calc(100% - 46px);
}

.metric-value {
  color: var(--foreground);
  font-size: 27px;
  font-weight: 750;
  line-height: 1.1;
}

.metric-value-sm {
  font-size: 17px;
  line-height: 1.3;
}

.btn,
.form-control,
.form-select,
.file-control,
.alert,
.nav-tabs,
.nav-pills,
.page-link {
  border-radius: var(--radius-control);
}

.btn {
  min-height: 40px;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.btn:hover,
.btn:active {
  transform: none;
}

.btn-sm {
  min-height: 35px;
}

.btn:focus-visible,
.text-action:focus-visible,
.nav-link:focus-visible,
.page-link:focus-visible,
.clickable-row:focus-visible,
.back-link:focus-visible {
  box-shadow: 0 0 0 3px var(--ring) !important;
  outline: none;
}

.btn:disabled,
.btn.disabled,
.form-control:disabled,
.form-select:disabled {
  cursor: not-allowed;
  filter: none;
  opacity: 0.48;
}

.badge {
  border-radius: var(--radius-pill);
  padding: 5px 9px;
}

.table > :not(caption) > * > * {
  border-bottom-color: color-mix(in srgb, var(--border) 78%, transparent);
}

.table tbody tr,
.clickable-row {
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.clickable-row:hover > * {
  background-color: color-mix(in srgb, var(--row-hover) 88%, var(--card));
}

.nav-tabs,
.nav-pills {
  border-color: color-mix(in srgb, var(--border) 82%, transparent);
  gap: 3px;
  padding: 4px;
}

.nav-tabs .nav-link,
.nav-pills .nav-link {
  align-items: center;
  border-radius: calc(var(--radius-control) - 2px);
  display: inline-flex;
  min-height: 36px;
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  box-shadow: var(--shadow-soft);
}

.pagination {
  gap: 5px;
}

.page-link {
  align-items: center;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  min-width: 38px;
}

.page-link .ui-icon {
  height: 15px;
  width: 15px;
}

.page-item.active .page-link {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.back-link {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  gap: 6px;
  padding: 5px 7px 5px 3px;
}

.back-link .ui-icon {
  height: 16px;
  width: 16px;
}

.theme-toggle {
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--border);
}

.mobile-nav-panel,
.modal,
.dropdown-menu {
  transition-duration: 170ms;
}

@media (max-width: 700px) {
  .mobile-nav-panel {
    border-radius: 16px 0 0 16px;
  }

  .navbar .nav-link {
    width: 100%;
  }

  .metric-card {
    min-height: 108px;
  }

  .content-card-body,
  .card-body {
    padding: 18px;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --background: #0b0b0c;
  --foreground: #fafafa;
  --card: #141416;
  --card-elevated: #1a1a1d;
  --popover: #1a1a1d;
  --muted: #1e1e22;
  --muted-foreground: #a1a1aa;
  --border: #2b2b30;
  --border-strong: #45454d;
  --input: #3a3a41;
  --accent: #fb923c;
  --accent-hover: #fdba74;
  --accent-soft: rgba(251, 146, 60, 0.12);
  --accent-foreground: #111113;
  --secondary: #202024;
  --secondary-hover: #2b2b30;
  --destructive: #f87171;
  --destructive-hover: #fca5a5;
  --destructive-button: #ef4444;
  --destructive-button-hover: #dc2626;
  --destructive-button-foreground: #ffffff;
  --destructive-ring: rgba(248, 113, 113, 0.34);
  --ring: rgba(251, 146, 60, 0.32);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.28);
  --row-hover: #1d1d21;
  --priority-row: rgba(244, 63, 94, 0.055);
  --hot-row: rgba(251, 146, 60, 0.04);
  --overdue-row: rgba(248, 113, 113, 0.05);
  --bs-body-bg: var(--background);
  --bs-body-color: var(--foreground);
  --bs-border-color: var(--border);
  --bs-link-color: var(--accent);
  --bs-link-hover-color: var(--accent-hover);
}

* {
  letter-spacing: 0;
}

html {
  min-height: 100%;
  overflow-x: clip;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

.text-muted {
  color: var(--muted-foreground) !important;
}

.text-danger {
  color: var(--destructive) !important;
}

.text-success {
  color: #15803d !important;
}

[data-theme="dark"] .text-success {
  color: #86efac !important;
}

.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-nav {
  gap: 16px;
  margin: 0 auto;
  max-width: 1200px;
  padding-left: 16px;
  padding-right: 16px;
}

.navbar-brand {
  color: var(--foreground);
  font-size: 15px;
  font-weight: 700;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--foreground);
}

.navbar-toggler {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: none !important;
  padding: 6px 8px;
}

.navbar-nav {
  gap: 4px;
}

.nav-link {
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-link:hover,
.nav-link:focus {
  background: var(--muted);
  color: var(--foreground);
}

.navbar-text {
  color: var(--muted-foreground);
  font-size: 13px;
}

.app-shell {
  margin: 0 auto;
  max-width: 1200px;
  padding: 28px 16px 48px;
}

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

.page-header form {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-title {
  color: var(--foreground);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.18;
  margin: 0;
}

.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--foreground);
  font-weight: 700;
  letter-spacing: 0;
}

.h3 {
  font-size: 28px;
  line-height: 1.15;
}

.h4 {
  font-size: 22px;
}

.h5 {
  font-size: 18px;
}

.h6 {
  font-size: 15px;
}

.content-card,
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--foreground);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

a .content-card:hover,
.clickable-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.content-card-header,
.card-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 650;
  padding: 18px 20px;
}

.content-card-body,
.card-body {
  padding: 20px;
}

.row.g-3 {
  --bs-gutter-x: 16px;
  --bs-gutter-y: 16px;
}

.btn {
  --bs-btn-disabled-opacity: 0.48;
  align-items: center;
  border-radius: var(--radius-sm);
  box-shadow: none !important;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  padding: 0 14px;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
}

.btn-lg {
  min-height: 44px;
  padding: 0 18px;
}

.btn-primary {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-color: var(--accent-foreground);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-hover-color: var(--accent-foreground);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
  --bs-btn-active-color: var(--accent-foreground);
  --bs-btn-disabled-bg: var(--accent);
  --bs-btn-disabled-border-color: var(--accent);
  --bs-btn-disabled-color: var(--accent-foreground);
}

.btn-secondary,
.btn-danger-trigger {
  --bs-btn-bg: var(--secondary);
  --bs-btn-border-color: var(--border);
  --bs-btn-color: var(--foreground);
  --bs-btn-hover-bg: var(--accent-soft);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-hover-color: var(--accent);
  --bs-btn-active-bg: var(--accent-soft);
  --bs-btn-active-border-color: var(--accent);
  --bs-btn-active-color: var(--accent);
  --bs-btn-disabled-bg: var(--secondary);
  --bs-btn-disabled-border-color: var(--border);
  --bs-btn-disabled-color: var(--foreground);
}

.btn-nav {
  --bs-btn-hover-bg: var(--muted);
  --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-hover-color: var(--foreground);
  --bs-btn-active-bg: var(--secondary-hover);
  --bs-btn-active-border-color: var(--border-strong);
  --bs-btn-active-color: var(--foreground);
}

.btn-danger-confirm {
  --bs-btn-bg: var(--destructive-button);
  --bs-btn-border-color: var(--destructive-button);
  --bs-btn-color: var(--destructive-button-foreground);
  --bs-btn-hover-bg: var(--destructive-button-hover);
  --bs-btn-hover-border-color: var(--destructive-button-hover);
  --bs-btn-hover-color: var(--destructive-button-foreground);
  --bs-btn-active-bg: var(--destructive-button-hover);
  --bs-btn-active-border-color: var(--destructive-button-hover);
  --bs-btn-active-color: var(--destructive-button-foreground);
  --bs-btn-disabled-bg: var(--destructive-button);
  --bs-btn-disabled-border-color: var(--destructive-button);
  --bs-btn-disabled-color: var(--destructive-button-foreground);
}

.btn-danger-confirm:focus-visible {
  box-shadow: 0 0 0 3px var(--destructive-ring) !important;
}

.btn-icon {
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-color: var(--muted-foreground);
  --bs-btn-hover-bg: var(--muted);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-hover-color: var(--foreground);
  --bs-btn-active-bg: var(--secondary-hover);
  --bs-btn-active-border-color: transparent;
  --bs-btn-active-color: var(--foreground);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: transparent;
  --bs-btn-disabled-color: var(--muted-foreground);
  min-width: 40px;
  padding-left: 0;
  padding-right: 0;
}

.btn-icon.btn-sm {
  min-width: 35px;
}

.text-action {
  border-radius: 6px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.text-action:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.theme-toggle {
  min-width: 68px;
}

[data-theme="light"] .theme-toggle-light,
[data-theme="dark"] .theme-toggle-dark {
  display: none;
}

.form-label {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}

.form-control,
.form-select {
  background-color: var(--card);
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
  box-shadow: none !important;
  color: var(--foreground);
  font-size: 14px;
  min-height: 40px;
  padding: 9px 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.form-control-sm,
.form-select-sm {
  font-size: 13px;
  min-height: 34px;
  padding: 6px 10px;
}

textarea.form-control {
  line-height: 1.5;
  min-height: 112px;
}

.form-control::placeholder {
  color: var(--muted-foreground);
}

.form-control:hover,
.form-select:hover {
  border-color: var(--border-strong);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring) !important;
  color: var(--foreground);
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
  background-color: var(--muted);
  color: var(--muted-foreground);
  opacity: 1;
}

.form-check-input {
  background-color: var(--card);
  border-color: var(--border-strong);
  box-shadow: none !important;
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.form-check-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring) !important;
}

.table-responsive {
  overflow-x: auto;
}

.content-card:has(.desktop-table),
.content-card:has(.sticky-table) {
  overflow: visible;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--foreground);
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: var(--row-hover);
  --bs-table-hover-color: var(--foreground);
  color: var(--foreground);
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  background: transparent;
  border-bottom-color: var(--border);
  color: inherit;
  padding: 14px 16px;
  vertical-align: middle;
}

.table-sm > :not(caption) > * > * {
  padding: 13px 16px;
}

.table thead th {
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

@media (min-width: 701px) {
  .desktop-table thead th,
  .sticky-table thead th {
    background: var(--card-elevated);
    box-shadow: 0 1px 0 var(--border), 0 6px 16px rgba(24, 24, 27, 0.05);
    position: sticky;
    top: calc(var(--navbar-height) - 1px);
    z-index: 8;
  }

  [data-theme="dark"] .desktop-table thead th,
  [data-theme="dark"] .sticky-table thead th {
    box-shadow: 0 1px 0 var(--border), 0 8px 18px rgba(0, 0, 0, 0.24);
  }
}

.table tbody tr {
  transition: background-color 130ms ease;
}

.table-hover > tbody > tr:hover > * {
  background-color: var(--row-hover);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover > * {
  background-color: var(--row-hover);
}

.dashboard-list-row {
  transition: background-color 150ms ease;
}

.dashboard-list-row:hover {
  background-color: var(--row-hover);
}

.dashboard-item-link {
  color: var(--foreground);
  text-decoration: none;
  transition: color 150ms ease;
}

.dashboard-list-row:hover .dashboard-item-link,
.dashboard-item-link:focus-visible,
.dashboard-show-all {
  color: var(--accent);
}

.hot-row > * {
  background-color: var(--hot-row) !important;
}

.priority-row > * {
  background-color: var(--priority-row) !important;
}

.priority-row > :first-child {
  box-shadow: inset 3px 0 0 #e11d48;
}

.priority-row:hover > * {
  background-color: color-mix(in srgb, var(--priority-row) 76%, var(--row-hover)) !important;
}

.hot-row > :first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}

.hot-row:hover > * {
  background-color: color-mix(in srgb, var(--hot-row) 76%, var(--row-hover)) !important;
}

.overdue-row > * {
  background-color: var(--overdue-row) !important;
}

.overdue-row > :first-child {
  box-shadow: inset 3px 0 0 #ef4444;
}

.overdue-row:hover > * {
  background-color: color-mix(in srgb, var(--overdue-row) 76%, var(--row-hover)) !important;
}

.table tbody tr td.text-center.text-muted.py-4,
.empty-state {
  color: var(--muted-foreground) !important;
  font-size: 14px;
  padding: 36px 20px !important;
}

.badge {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  gap: 4px;
  line-height: 1;
  min-height: 24px;
  padding: 5px 9px;
  vertical-align: middle;
}

.badge + .badge {
  margin-left: 4px;
}

.badge-stack {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1;
  vertical-align: middle;
}

.badge-stack .badge {
  margin-left: 0;
}

.badge-status-new,
.text-bg-primary {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
  color: #3730a3 !important;
}

.badge-status-work,
.text-bg-info {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

.badge-status-review {
  background: #fff7ed !important;
  border-color: #fed7aa !important;
  color: #c2410c !important;
}

.badge-status-done,
.text-bg-success {
  background: #ecfdf5 !important;
  border-color: #bbf7d0 !important;
  color: #15803d !important;
}

.badge-status-cancelled {
  background: color-mix(in srgb, var(--muted) 92%, var(--foreground) 8%);
  border: 1px solid var(--border-strong);
  color: var(--muted-foreground);
}

.contact-list .detail-row {
  align-items: center;
}

.contact-value,
.contact-actions {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  min-width: 0;
}

.copy-button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 7px;
}

.copy-button .ui-icon {
  height: 15px;
  width: 15px;
}

.copy-result-toast {
  max-width: min(360px, calc(100vw - 32px));
  width: max-content;
}

.copy-result-toast .toast-body {
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
}

.admin-actions-grid {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.action-section-card {
  background: color-mix(in srgb, var(--muted) 48%, var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
}

.action-section-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 14px;
}

.action-section-form {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.action-fields-grid {
  margin-bottom: 16px;
}

.deadline-days-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.deadline-days-input {
  max-width: 140px;
}

.action-confirmation {
  align-items: flex-start;
  display: flex;
  gap: 7px;
  padding-left: 0;
}

.action-confirmation .form-check-input {
  flex: 0 0 auto;
  margin: 3px 0 0;
}

.action-confirmation .form-check-label {
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.4;
}

.action-section-footer {
  margin-top: auto;
}

.executor-comment-section {
  background: color-mix(in srgb, var(--muted) 34%, var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  margin-top: 16px;
  padding: 16px 18px;
}

.executor-comment-value {
  color: var(--foreground);
  font-size: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 575.98px) {
  .contact-list .detail-row {
    align-items: flex-start;
  }

  .contact-value {
    flex-wrap: wrap;
  }

  .action-section-card,
  .executor-comment-section {
    padding: 14px;
  }
}

.text-bg-warning {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #a16207 !important;
}

.text-bg-danger {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
  color: #be123c !important;
}

.text-bg-secondary {
  background: var(--muted) !important;
  border-color: var(--border) !important;
  color: var(--muted-foreground) !important;
}

[data-theme="dark"] .badge-status-new,
[data-theme="dark"] .text-bg-primary {
  background: rgba(99, 102, 241, 0.18) !important;
  border-color: rgba(129, 140, 248, 0.28) !important;
  color: #c7d2fe !important;
}

[data-theme="dark"] .badge-status-work,
[data-theme="dark"] .text-bg-info {
  background: rgba(59, 130, 246, 0.16) !important;
  border-color: rgba(96, 165, 250, 0.28) !important;
  color: #bfdbfe !important;
}

[data-theme="dark"] .badge-status-review {
  background: rgba(249, 115, 22, 0.16) !important;
  border-color: rgba(251, 146, 60, 0.3) !important;
  color: #fed7aa !important;
}

[data-theme="dark"] .badge-status-done,
[data-theme="dark"] .text-bg-success {
  background: rgba(34, 197, 94, 0.16) !important;
  border-color: rgba(74, 222, 128, 0.28) !important;
  color: #bbf7d0 !important;
}

[data-theme="dark"] .text-bg-warning {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
  color: #fde68a !important;
}

[data-theme="dark"] .text-bg-danger {
  background: rgba(244, 63, 94, 0.16) !important;
  border-color: rgba(251, 113, 133, 0.28) !important;
  color: #fecdd3 !important;
}

.nav-tabs,
.nav-pills {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.nav-tabs {
  border-bottom: 1px solid var(--border);
}

.nav-tabs .nav-item,
.nav-pills .nav-item {
  margin: 0;
}

.nav-tabs .nav-link,
.nav-pills .nav-link {
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  min-height: 34px;
  padding: 8px 12px;
}

.nav-tabs .nav-link:hover,
.nav-pills .nav-link:hover {
  background: color-mix(in srgb, var(--card) 70%, transparent);
  color: var(--foreground);
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
  background: var(--card);
  box-shadow: var(--shadow-soft);
  color: var(--foreground);
}

.pagination {
  align-items: center;
  gap: 4px;
}

.page-link {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm) !important;
  color: var(--muted-foreground);
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0 10px;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.page-link:hover {
  background: var(--muted);
  border-color: var(--border);
  color: var(--foreground);
}

.page-link:focus {
  box-shadow: 0 0 0 3px var(--ring);
}

.page-item.active .page-link {
  background: var(--foreground);
  border-color: var(--foreground);
  color: var(--background);
}

.page-item.disabled .page-link {
  background: transparent;
  border-color: transparent;
  color: color-mix(in srgb, var(--muted-foreground) 45%, transparent);
  pointer-events: none;
}

.alert {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: var(--foreground);
  padding: 14px 16px;
}

.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.alert-success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #14532d;
}

.alert-danger,
.alert-error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #854d0e;
}

[data-theme="dark"] .alert-info {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.26);
  color: #bfdbfe;
}

[data-theme="dark"] .alert-success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(74, 222, 128, 0.26);
  color: #bbf7d0;
}

[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-error {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(251, 113, 133, 0.26);
  color: #fecdd3;
}

[data-theme="dark"] .alert-warning {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(251, 191, 36, 0.26);
  color: #fde68a;
}

.dropdown-menu,
.modal-content,
.toast,
.tooltip-inner {
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(24, 24, 27, 0.16);
  color: var(--foreground);
}

.dropdown-item {
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-size: 13px;
  margin: 2px 4px;
  padding: 8px 10px;
  width: auto;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--muted);
  color: var(--foreground);
}

.modal-header,
.modal-footer,
.toast-header {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

.modal.fade .modal-dialog {
  transform: translateY(8px) scale(0.985);
  transition: transform 160ms ease-out;
}

.modal.show .modal-dialog {
  transform: none;
}

.tooltip-inner {
  font-size: 12px;
  padding: 8px 10px;
}

.spinner-border,
.spinner-grow {
  color: var(--accent);
}

.placeholder,
.skeleton {
  animation: skeleton-pulse 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, var(--muted), var(--secondary-hover), var(--muted));
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.loader {
  animation: loader-spin 800ms linear infinite;
  border: 2px solid var(--border);
  border-radius: 999px;
  border-top-color: var(--accent);
  display: inline-block;
  height: 18px;
  width: 18px;
}

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

.avatar-placeholder {
  align-items: center;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--foreground);
  display: inline-flex;
  font-weight: 700;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.detail-list {
  display: grid;
  gap: 11px;
  margin: 0;
}

.detail-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 34%) 1fr;
}

.detail-label {
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
}

.detail-value {
  color: var(--foreground);
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  border-left: 2px solid var(--border);
  padding-left: 14px;
  position: relative;
}

.timeline-item::before {
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 50%;
  content: "";
  height: 9px;
  left: -5.5px;
  position: absolute;
  top: 5px;
  width: 9px;
}

.timeline-time {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.back-link {
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  display: inline-flex;
  font-size: 13px;
  font-weight: 650;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.back-link:hover {
  background: var(--muted);
  border-color: var(--border-strong);
  color: var(--foreground);
  transform: translateY(-1px);
}

.info-icon {
  align-items: center;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  cursor: help;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  margin-left: 4px;
  width: 18px;
}

.btn-close {
  filter: none;
  opacity: 0.58;
}

[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%);
}

::selection {
  background: var(--accent-soft);
  color: var(--foreground);
}

@media (max-width: 900px) {
  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header form {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .app-shell {
    padding-top: 20px;
  }

  .content-card-body,
  .card-body {
    padding: 16px;
  }

  .content-card-header,
  .card-header {
    padding: 14px 16px;
  }

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

  .nav-tabs,
  .nav-pills {
    display: flex;
    overflow-x: auto;
    width: 100%;
  }
}

/* UI polish sprint overrides */
.mobile-nav-head,
.mobile-nav-backdrop {
  display: none;
}

.mobile-user-block {
  align-items: center;
  display: flex;
  gap: 12px;
}

.nav-user-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.logout-form {
  margin: 0;
}

.mobile-nav-trigger {
  align-items: center;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.mobile-nav-trigger span {
  background: var(--foreground);
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 20px;
}

.nav-link.active {
  background: var(--muted);
  color: var(--foreground);
}

.theme-toggle {
  min-width: 38px;
  padding: 0 10px;
}

.theme-toggle svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 16px;
}

.theme-toggle-text {
  display: none;
}

[data-theme="light"] .theme-icon-sun,
[data-theme="dark"] .theme-icon-moon {
  display: none;
}

.btn-take {
  --bs-btn-bg: transparent;
  --bs-btn-border-color: color-mix(in srgb, var(--accent) 52%, var(--border));
  --bs-btn-color: var(--accent);
  --bs-btn-hover-bg: var(--accent-soft);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-hover-color: var(--accent-hover);
  --bs-btn-active-bg: var(--accent-soft);
  --bs-btn-active-border-color: var(--accent);
  --bs-btn-active-color: var(--accent-hover);
  min-width: 76px;
}

[data-theme="dark"] .btn-take {
  --bs-btn-border-color: rgba(251, 146, 60, 0.45);
  --bs-btn-hover-bg: rgba(251, 146, 60, 0.12);
}

.table-responsive.desktop-table {
  overflow-x: visible;
}

.table-main-text {
  font-weight: 600;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.order-table,
.available-projects-table,
.my-projects-table,
.finance-table {
  table-layout: fixed;
  width: 100%;
}

.table .col-id {
  width: 46px;
}

.table .col-product {
  width: 82px;
}

.table .col-client {
  width: 112px;
}

.table .col-money {
  width: 70px;
}

.table .col-status {
  width: 176px;
}

.table .col-executor {
  width: 190px;
}

.table .col-date {
  width: 88px;
}

.table .col-action {
  min-width: 116px;
  width: 116px;
}

.table .col-action .btn {
  min-width: 96px;
  width: auto;
}

.order-table td:last-child,
.order-table th:last-child {
  overflow: visible;
  white-space: nowrap;
}

.order-table td:not(:last-child) {
  overflow: hidden;
}

.order-table th:not(:last-child) {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.order-table thead th,
.available-projects-table thead th,
.my-projects-table thead th {
  color: color-mix(in srgb, var(--foreground) 76%, var(--muted-foreground));
  font-size: 12px;
  padding-bottom: 14px;
  padding-top: 14px;
}

.order-table .badge-stack {
  flex-wrap: nowrap;
}

.order-table .executor-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-table .small.text-muted,
.available-projects-table .small.text-muted,
.my-projects-table .small.text-muted {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-table > :not(caption) > * > *,
.available-projects-table > :not(caption) > * > *,
.my-projects-table > :not(caption) > * > * {
  padding-left: 12px;
  padding-right: 12px;
}

.order-table > :not(caption) > * > * {
  padding-left: 10px;
  padding-right: 10px;
}

.available-projects-table .col-money {
  width: 130px;
}

.available-projects-table .col-date {
  width: 190px;
}

.available-projects-table .col-action {
  width: 96px;
}

.available-projects-table .col-action .btn {
  min-width: 76px;
  width: 76px;
}

.wait-cell {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.priority-row > *,
.hot-row > *,
.overdue-row > * {
  background-color: transparent !important;
}

.priority-row > :first-child,
.priority-card {
  box-shadow: inset 3px 0 0 #e11d48;
}

.hot-row > :first-child,
.hot-card {
  box-shadow: inset 3px 0 0 #f59e0b;
}

.overdue-row > :first-child,
.overdue-card {
  box-shadow: inset 3px 0 0 #ef4444;
}

.hot-row:hover > * {
  background-color: var(--hot-row) !important;
}

.priority-row:hover > * {
  background-color: var(--priority-row) !important;
}

.overdue-row:hover > * {
  background-color: var(--overdue-row) !important;
}

.mobile-card-list {
  display: none;
}

.empty-state {
  align-items: center;
  background: transparent;
  color: var(--muted-foreground) !important;
  display: flex;
  justify-content: center;
  min-height: 92px;
  padding: 22px !important;
  text-align: center;
}

.mobile-list-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  padding: 14px;
}

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

.mobile-card-title {
  color: var(--foreground);
  font-weight: 700;
}

.mobile-card-subtitle {
  color: var(--muted-foreground);
  font-size: 13px;
  margin-top: 2px;
}

.mobile-card-money {
  font-size: 15px;
  font-weight: 800;
  text-align: right;
}

.mobile-card-meta {
  display: grid;
  gap: 8px;
}

.mobile-card-meta > div {
  display: grid;
  gap: 2px;
}

.mobile-card-meta span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.mobile-card-meta strong {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.mobile-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mobile-card-badges.badge-stack {
  display: inline-flex;
}

.finance-mobile-card .mobile-card-top {
  align-items: center;
}

.form-card {
  max-width: 850px;
}

.profile-card {
  max-width: 760px;
}

.telegram-link-panel {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-width: 100%;
  overflow: hidden;
  padding: 14px;
}

.telegram-link-value {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--bs-font-monospace);
  font-size: 12px;
  overflow-wrap: anywhere;
  padding: 9px 10px;
  word-break: break-word;
}

.telegram-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.telegram-test-card {
  max-width: 720px;
}

.telegram-test-section {
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.profile-card-head {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.profile-avatar {
  align-items: center;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--foreground);
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.profile-name {
  color: var(--foreground);
  font-size: 18px;
  font-weight: 800;
}

.profile-meta {
  color: var(--muted-foreground);
  font-size: 13px;
  margin-top: 2px;
}

.file-control {
  align-items: center;
  background: var(--card-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.file-control.has-file {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border-strong));
}

.btn-file {
  margin: 0;
}

.file-name {
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-selection-status {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-width: 0;
}

.file-selected-indicator {
  align-items: center;
  color: var(--success-foreground, #15803d);
  display: none;
  flex: 0 0 auto;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.file-selected-indicator .icon {
  height: 15px;
  width: 15px;
}

.file-control.has-file .file-selected-indicator {
  display: inline-flex;
}

.file-control.has-file .file-name {
  color: var(--foreground);
}

.form-hint {
  color: var(--muted-foreground);
  font-size: 12px;
  margin-bottom: 10px;
}

.page-link {
  height: 38px;
  min-width: 38px;
}

.pagination {
  gap: 6px;
}

@media (max-width: 1180px) {
  .order-table,
  .available-projects-table,
  .my-projects-table,
  .finance-table {
    font-size: 13px;
  }

  .order-table > :not(caption) > * > *,
  .available-projects-table > :not(caption) > * > *,
  .my-projects-table > :not(caption) > * > *,
  .finance-table > :not(caption) > * > * {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 700px) {
  body.mobile-nav-open {
    overflow: hidden;
  }

  .mobile-nav-trigger {
    display: inline-flex;
  }

  .mobile-nav-backdrop {
    background: rgba(0, 0, 0, 0.35);
    display: block;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 160ms ease;
    z-index: 35;
  }

  .mobile-nav-panel {
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: -18px 0 60px rgba(0, 0, 0, 0.18);
    display: flex !important;
    flex-direction: column;
    gap: 18px;
    height: 100vh;
    max-width: 340px;
    padding: 16px;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(105%);
    transition: transform 180ms ease;
    width: min(86vw, 340px);
    z-index: 40;
  }

  .mobile-nav-open .mobile-nav-panel {
    transform: translateX(0);
  }

  .mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-head {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    padding-bottom: 14px;
  }

  .mobile-nav-title {
    color: var(--foreground);
    font-weight: 800;
  }

  .mobile-nav-subtitle {
    color: var(--muted-foreground);
    font-size: 13px;
    margin-top: 2px;
  }

  .mobile-nav-close {
    font-size: 22px;
    min-width: 38px;
  }

  .navbar-nav {
    display: grid;
    gap: 6px;
    width: 100%;
  }

  .nav-link {
    min-height: 40px;
    padding: 10px 12px;
  }

  .mobile-user-block {
    align-items: stretch;
    display: grid;
    gap: 10px;
  }

  .nav-user-actions {
    align-items: stretch;
    border-left: 0;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 10px;
    margin-left: 0;
    margin-top: auto;
    padding-left: 0;
    padding-top: 14px;
  }

  .theme-toggle {
    justify-content: flex-start;
    width: 100%;
  }

  .theme-toggle-text {
    display: inline;
  }

  [data-theme="light"] .theme-toggle-light-text,
  [data-theme="dark"] .theme-toggle-dark-text {
    display: none;
  }

  .logout-form .btn {
    width: 100%;
  }

  .desktop-table {
    display: none;
  }

  .mobile-card-list {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .content-card:has(.mobile-card-list) {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .page-header form {
    display: grid !important;
    width: 100%;
  }

  .page-header .form-control,
  .page-header .form-select,
  .page-header .btn {
    width: 100%;
  }

  .form-card,
  .profile-card {
    max-width: none;
  }

  .file-control {
    align-items: stretch;
    display: grid;
  }

  .btn-file {
    width: 100%;
  }

  .pagination {
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .page-link {
    height: 40px;
    min-width: 40px;
  }
}

/* Final precedence layer for Design Polish v2. */
.content-card,
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 98%, var(--foreground) 2%), var(--card));
  border-color: color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: var(--radius-card);
}

[data-theme="dark"] .content-card,
[data-theme="dark"] .card,
[data-theme="dark"] .mobile-list-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 96%, white 4%), var(--card));
  border-color: color-mix(in srgb, var(--border) 92%, transparent);
}

.content-card-header,
.card-header {
  align-items: center;
  background: transparent;
  display: flex;
  gap: 9px;
  min-height: 54px;
  padding: 17px 21px;
}

.content-card-body,
.card-body {
  padding: 22px;
}

.btn,
.form-control,
.form-select,
.file-control,
.alert,
.nav-tabs,
.nav-pills,
.page-link {
  border-radius: var(--radius-control);
}

.btn {
  min-height: 40px;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.btn:hover,
.btn:active {
  transform: none;
}

.btn-sm {
  min-height: 35px;
}

.badge {
  border-radius: var(--radius-pill);
  padding: 5px 9px;
}

.nav-tabs,
.nav-pills {
  border-color: color-mix(in srgb, var(--border) 82%, transparent);
  gap: 3px;
  padding: 4px;
}

.nav-tabs .nav-link,
.nav-pills .nav-link {
  border-radius: calc(var(--radius-control) - 2px);
  min-height: 36px;
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  box-shadow: var(--shadow-soft);
}

.page-link {
  height: 38px;
  min-width: 38px;
}

.mobile-list-card,
.modal-content {
  border-radius: var(--radius-card);
}

@media (max-width: 700px) {
  .content-card-body,
  .card-body {
    padding: 18px;
  }

  .mobile-nav-panel {
    border-radius: 16px 0 0 16px;
  }

  .nav-tabs,
  .nav-pills {
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
  }

  .nav-tabs .nav-link,
  .nav-pills .nav-link {
    font-size: 12px;
    padding-left: 9px;
    padding-right: 9px;
    white-space: nowrap;
  }
}
