:root {
  --ink: #14213d;
  --muted: #667085;
  --line: #d7dde8;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --brand: #0f766e;
  --brand-2: #1d4ed8;
  --gold: #b7791f;
  --danger: #b42318;
  --ok: #047857;
  --warn: #c2410c;
  --shadow: 0 10px 30px rgba(20, 33, 61, .09);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 7px;
  padding: 10px 13px;
  background: var(--brand);
  color: white;
  cursor: pointer;
  min-height: 38px;
}
button.secondary { background: #eef4ff; color: #1849a9; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.danger { background: #fef3f2; color: #b42318; border: 1px solid #fda29b; }
button.logout-btn { background: #fee4e2; color: #b42318; border: 1px solid #fda29b; }
button.logout-btn:hover { background: #fff1f0; color: #912018; }
button.export-excel { background: #dcfae6; color: #067647; border: 1px solid #75e0a7; }
button.export-pdf { background: #fef3f2; color: #b42318; border: 1px solid #fda29b; }
button.new-blue { background: #eff8ff; color: #175cd3; border: 1px solid #84caff; }
button.user-add-button {
  background: #175cd3;
  color: #fff;
  border: 1px solid #175cd3;
  box-shadow: 0 10px 22px rgba(23, 92, 211, .22);
  font-weight: 800;
}
button.user-add-button:hover { background: #1849a9; }
button.clear-filters { background: #fef0c7; color: #7a4b0b; border: 1px solid #fdb022; }
button.back-btn { background: #f2f4f7; color: #344054; border: 1px solid #d0d5dd; }
button.back-btn:hover { background: #e4e7ec; }
button.notify-btn {
  background: #fff7e6;
  color: #7a4b0b;
  border: 1px solid #fdb022;
  position: relative;
}
button.notify-btn span {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #b42318;
  color: #fff;
  font-size: 11px;
  margin-left: 4px;
}
button.compact-top { min-height: 36px; padding: 8px 11px; }
button.backup-create, button.backup-download, button.backup-sync, .backup-restore {
  min-width: 150px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 700;
}
button.backup-create { background: #eff8ff; color: #175cd3; border: 1px solid #84caff; }
button.backup-download { background: #dcfae6; color: #067647; border: 1px solid #75e0a7; }
button.backup-sync { background: #2563eb; color: #ffffff; border: 1px solid #1d4ed8; box-shadow: 0 10px 20px rgba(37, 99, 235, .18); }
button.backup-sync:hover { background: #1d4ed8; border-color: #1e40af; }
.backup-restore { background: #fef0c7; color: #7a4b0b; border: 1px solid #fdb022; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [contenteditable="true"]:focus-visible {
  outline: 3px solid rgba(29,78,216,.24);
  outline-offset: 2px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
}
textarea { min-height: 86px; resize: vertical; }
label { display: grid; gap: 6px; color: #344054; font-size: 13px; font-weight: 650; }
.backup-reminder-banner {
  margin: 12px 18px 0;
  padding: 12px 14px;
  border: 1px solid #fdb022;
  border-left: 5px solid #f97316;
  border-radius: 8px;
  background: #fffbeb;
  color: #7a4b0b;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  box-shadow: 0 10px 24px rgba(122, 75, 11, .08);
}
.backup-reminder-banner strong {
  font-weight: 800;
  color: #9a3412;
}
.backup-reminder-banner span {
  color: #92400e;
  font-size: 13px;
  flex: 1 1 260px;
}
.backup-reminder-banner .backup-create {
  min-width: 138px;
  min-height: 36px;
  padding: 8px 12px;
}
.backup-settings {
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafc;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(15,118,110,.92), rgba(29,78,216,.82)),
    url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1800&q=80") center/cover;
}
.login-card {
  width: min(460px, 100%);
  background: rgba(255,255,255,.96);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.logo {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
}
h1, h2, h3 { margin: 0; }
h1 { font-size: 28px; line-height: 1.08; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
.badge-sadique {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(183,121,31,.35);
  color: #7a4b0b;
  background: #fff7e6;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}
.badge-sadique::before { content: "CA"; font-size: 10px; background: #f7d489; padding: 3px 5px; border-radius: 999px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.client-master-head { align-items: stretch; flex-wrap: wrap; }
.client-master-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 360px;
}
.client-master-search input {
  width: min(520px, 100%);
  min-height: 42px;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); font-weight: 700; }
.shell { display: grid; grid-template-columns: 284px 1fr; min-height: 100vh; }
.sidebar {
  background: #111827;
  color: white;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.side-brand { padding: 4px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 10px; }
.app-badge {
  display: grid;
  gap: 4px;
  color: #fff;
  background: linear-gradient(135deg, rgba(15,118,110,.55), rgba(29,78,216,.35));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 12px;
}
.app-badge strong { font-size: 18px; line-height: 1.1; }
.app-badge span { font-size: 14px; color: #e5e7eb; font-weight: 700; }
.app-badge em { font-size: 12px; color: #cbd5e1; font-style: normal; }
.nav { display: grid; gap: 3px; }
.nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #d1d5db;
  border-radius: 7px;
  padding: 9px 10px;
}
.nav button.active, .nav button:hover { background: rgba(255,255,255,.1); color: white; }
.admin-nav { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.nav-label { color: #98a2b3; font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 8px 10px; }
.side-user { margin-top: 18px; padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.14); color: #d1d5db; display: grid; gap: 3px; font-size: 12px; }
.main { min-width: 0; }
.topbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 14px 18px;
}
.content { padding: 18px; display: grid; gap: 18px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(20,33,61,.04);
  padding: 16px;
}
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0,1fr)); }
.kpi {
  border-left: 5px solid var(--brand);
  min-height: 96px;
}
.kpi strong { display: block; font-size: 25px; margin-top: 8px; }
.kpi:nth-child(2n) { border-color: var(--brand-2); }
.kpi:nth-child(3n) { border-color: var(--gold); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar > input, .toolbar > select { max-width: 260px; }
.filter-panel { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fbfcfe; }
.q-filter-grid label { min-width: 140px; }
.q-filter-grid input, .q-filter-grid select { min-width: 135px; }
.q-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 8px;
  overflow-x: auto;
}
.q-tabs button {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  white-space: normal;
  text-align: left;
}
.q-tabs button.active {
  background: #e6fffb;
  border-color: var(--brand);
  color: #0f766e;
  box-shadow: inset 0 0 0 1px rgba(15,118,110,.25);
}
.q-tabs button:nth-child(1) { background: #eff8ff; border-color: #84caff; color: #175cd3; }
.q-tabs button:nth-child(2) { background: #f4f3ff; border-color: #bdb4fe; color: #5925dc; }
.q-tabs button:nth-child(3) { background: #f0fdf9; border-color: #5fe9d0; color: #0f766e; }
.q-tabs button:nth-child(4) { background: #eef4ff; border-color: #84adff; color: #3538cd; }
.q-tabs button:nth-child(5) { background: #ecfdf3; border-color: #75e0a7; color: #027a48; }
.q-tabs button:nth-child(6) { background: #f0fdf4; border-color: #86efac; color: #15803d; }
.q-tabs button:nth-child(7) { background: #fef3f2; border-color: #fda29b; color: #b42318; }
.q-tabs button:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(20,33,61,.08); }
.q-tabs button.active { border-width: 2px; box-shadow: 0 8px 18px rgba(20,33,61,.14); }
.q-tabs strong {
  min-width: 30px;
  text-align: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #1849a9;
  padding: 4px 8px;
}
.dashboard-home { gap: 18px; }
.dashboard-cards { margin-bottom: 10px; }
.audit-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 8px;
  overflow-x: auto;
}
.audit-tabs button {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}
.audit-tabs button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(20,33,61,.08);
}
.audit-tabs button.active {
  border-width: 2px;
  box-shadow: 0 8px 18px rgba(20,33,61,.13);
}
.audit-tabs strong {
  min-width: 30px;
  text-align: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,.72);
}
.audit-tabs button:nth-child(1) { background: #eff8ff; border-color: #84caff; color: #175cd3; }
.audit-tabs button:nth-child(2) { background: #ecfeff; border-color: #67e8f9; color: #0e7490; }
.audit-tabs button:nth-child(3) { background: #ecfdf3; border-color: #75e0a7; color: #027a48; }
.audit-tabs button:nth-child(4) { background: #f2f4f7; border-color: #d0d5dd; color: #344054; }
.audit-tabs button:nth-child(5) { background: #eef4ff; border-color: #84adff; color: #3538cd; }
.audit-tabs button:nth-child(6) { background: #fef7c3; border-color: #fde272; color: #854a0e; }
.audit-tabs button:nth-child(7) { background: #f4f3ff; border-color: #bdb4fe; color: #5925dc; }
.audit-tabs button:nth-child(8) { background: #fff4ed; border-color: #fd853a; color: #c2410c; }
.audit-tabs button:nth-child(9) { background: #fef0c7; border-color: #fdb022; color: #7a4b0b; }
.audit-tabs button:nth-child(10) { background: #fff1f3; border-color: #fda4af; color: #be123c; }
.audit-tabs button:nth-child(11) { background: #f0fdf9; border-color: #5fe9d0; color: #0f766e; }
.audit-tabs button:nth-child(12) { background: #fef3f2; border-color: #fda29b; color: #b42318; }
.audit-tabs button:nth-child(13) { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.audit-tabs button:nth-child(14) { background: #f8fafc; border-color: #cbd5e1; color: #475467; }
.engagement-search-head {
  align-items: stretch;
  flex-wrap: wrap;
}
.engagement-search {
  flex: 1 1 360px;
}
.engagement-search input {
  flex: 1 1 320px;
}
.audit-search-strip {
  flex: 0 1 720px;
}
.audit-search-strip input#audit-search,
.other-search-strip input#other-search {
  flex: 0 1 280px;
  max-width: 320px;
}
.other-search-strip {
  flex: 0 1 720px;
}
.inline-period {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  font-size: 13px;
  font-weight: 600;
  color: #344054;
  white-space: nowrap;
}
.inline-period select {
  min-height: 42px;
  min-width: 150px;
}
.inline-period input[type="date"] {
  min-height: 42px;
  width: 142px;
}
.other-tabs {
  grid-template-columns: repeat(auto-fill, minmax(138px, 138px));
  align-items: stretch;
}
.other-tabs button {
  width: 138px;
  min-height: 58px;
  height: 58px;
  padding: 9px 10px;
}
.other-tabs button span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.other-tabs button strong {
  flex: 0 0 auto;
}
.task-tabs, .perf-tabs { grid-template-columns: repeat(8, minmax(128px, 1fr)); }
.task-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)) !important;
  overflow-x: visible;
  width: 100%;
}
.task-dashboard button {
  min-width: 0;
  min-height: 72px;
  padding: 12px 14px;
}
.task-dashboard button span {
  white-space: normal;
  line-height: 1.2;
}
.task-dashboard button strong {
  font-size: clamp(22px, 3vw, 30px);
}
.audit-filter-panel {
  gap: 8px;
}
.audit-filter-row {
  display: grid;
  gap: 8px;
  align-items: end;
}
.audit-filter-row.main-row {
  grid-template-columns: minmax(130px, 1.2fr) minmax(100px, .8fr) repeat(6, minmax(112px, 1fr));
}
.audit-filter-row.date-row {
  grid-template-columns: repeat(4, minmax(140px, 180px)) minmax(120px, max-content);
  justify-content: start;
}
.audit-filter-row input,
.audit-filter-row select {
  min-width: 0;
}
.audit-filter-row .clear-filters {
  height: 38px;
  align-self: end;
}
@media (max-width: 1180px) {
  .audit-filter-row.main-row,
  .audit-filter-row.date-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}
.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #eef2ff;
  overflow: hidden;
  margin-bottom: 4px;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #84caff;
}
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; max-height: 68vh; }
table { width: 100%; border-collapse: collapse; min-width: 900px; background: white; table-layout: fixed; }
th, td { padding: 10px 11px; border-bottom: 1px solid #edf0f5; text-align: left; vertical-align: top; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
th { position: sticky; top: 0; background: #f8fafc; z-index: 1; color: #344054; }
th[data-q-sort], th[data-p-sort] { cursor: pointer; }
.pro-table tbody tr:nth-child(even) { background: #fbfcff; }
.pro-table tbody tr:hover { background: #f0f9ff; }
.pro-table th, .pro-table td { min-width: 110px; }
.quotation-table th:first-child, .quotation-table td:first-child { min-width: 58px; width: 58px; text-align: center; }
.quotation-table th:nth-child(2), .quotation-table td:nth-child(2) { min-width: 210px; width: 210px; }
.quotation-table th:last-child, .quotation-table td:last-child { min-width: 150px; width: 150px; }
.pro-table .row { gap: 6px; align-items: flex-start; }
.pro-table button { min-height: 30px; padding: 7px 9px; font-size: 12px; }
.amount { text-align: right; }
.date-cell, .status-cell { text-align: center; }
.actions { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.actions button[data-mark-billed],
.actions button[data-fee-receipt],
.actions button[data-mark-received],
.actions button[data-mark-not-received] {
  background: #0f766e !important;
  color: #ffffff !important;
  border: 1px solid #0f766e !important;
  font-weight: 800 !important;
  opacity: 1 !important;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .22);
}
.actions button[data-mark-billed]:hover,
.actions button[data-fee-receipt]:hover,
.actions button[data-mark-received]:hover,
.actions button[data-mark-not-received]:hover {
  background: #115e59 !important;
  border-color: #115e59 !important;
}
.pagination { padding: 4px 2px; }
.section-heading { font-size: 15px; color: #344054; margin: 0; }
.action-strip button { min-height: 40px; }
.priority { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 800; }
.priority.low { background: #f2f4f7; color: #475467; }
.priority.normal { background: #eff8ff; color: #175cd3; }
.priority.high { background: #fff4ed; color: #c2410c; }
.priority.urgent { background: #fef3f2; color: #b42318; }
.overdue-row { box-shadow: inset 4px 0 0 #f04438; }
.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2ff;
  color: #3730a3;
  white-space: nowrap;
}
.status.green { background: #ecfdf3; color: #027a48; }
.status.orange { background: #fff4ed; color: #c2410c; }
.status.red { background: #fef3f2; color: #b42318; }
.status.blue { background: #eff8ff; color: #175cd3; }
.status.grey { background: #f2f4f7; color: #475467; }
.status.dark { background: #344054; color: #ffffff; }
.field-error { color: var(--danger); font-size: 12px; font-weight: 700; min-height: 16px; }
.period-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.rich-text {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  background: white;
  overflow: auto;
}
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow: auto; }
.tabs button {
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: 32px 16px;
  overflow: auto;
}
.modal-card {
  width: min(1120px, 100%);
  background: white;
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.compact-modal-card {
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
}
.modal-back { justify-self: start; }
.compact-form-grid { gap: 10px 12px; }
.permission-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}
.permission-box h3 { margin-bottom: 8px; }
.permission-group {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #edf0f5;
}
.permission-group:first-of-type { border-top: 0; }
.permission-group > div { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.check-row {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  font-size: 12px;
}
.check-row input { width: auto; }
.modal-actions {
  position: sticky;
  bottom: -18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.85), #fff 45%);
}
.modal-actions button { min-width: 128px; min-height: 40px; }
.my-task-edit-form {
  width: min(900px, calc(100vw - 32px));
  padding-bottom: 0;
}
.task-edit-header {
  position: sticky;
  top: -18px;
  z-index: 6;
  padding: 0 0 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.task-edit-header h2 {
  font-size: 20px;
  margin: 0;
}
.task-edit-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 12px;
  border: 1.5px solid #cbd5e1;
}
.task-edit-table th,
.task-edit-table td {
  border: 1px solid #d8e0ea;
  padding: 8px 10px;
  vertical-align: middle;
  font-size: 14px;
}
.task-edit-table th {
  width: 140px;
  color: #9f1239;
  background: #fff1f4;
  font-weight: 700;
  text-align: left;
}
.task-edit-table td {
  color: #171a21;
  font-weight: 500;
  background: #fff;
}
.task-edit-inputs select,
.task-edit-inputs input,
.task-edit-inputs textarea {
  width: 100%;
  min-height: 36px;
  margin: 0;
  font-size: 14px;
}
.task-edit-inputs textarea {
  resize: vertical;
  min-height: 58px;
}
.task-edit-lines {
  margin-top: 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.task-edit-lines .between {
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #d8e0ea;
}
.task-edit-lines h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #171a21;
}
.task-line-table {
  padding: 8px 10px 10px;
}
.my-task-edit-form .pending-line-row {
  display: grid;
  grid-template-columns: 44px minmax(220px, 1fr) 92px;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #eef2f7;
}
.my-task-edit-form .pending-line-row:last-child {
  border-bottom: 0;
}
.my-task-edit-form .pending-line-sn {
  display: inline-grid;
  place-items: center;
  height: 32px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
}
.my-task-edit-form .pending-line-row input {
  margin: 0;
  min-height: 34px;
}
.task-edit-actions {
  bottom: -18px;
  z-index: 7;
  margin-top: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .task-edit-table,
  .task-edit-table tbody,
  .task-edit-table tr,
  .task-edit-table th,
  .task-edit-table td {
    display: block;
    width: 100%;
  }
  .task-edit-table tr {
    border-bottom: 1px solid #d8e0ea;
  }
  .task-edit-table th {
    border-bottom: 0;
    padding-bottom: 4px;
  }
  .task-edit-table td {
    padding-top: 4px;
  }
  .my-task-edit-form .pending-line-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .my-task-edit-form .pending-line-row button {
    grid-column: 2;
    width: max-content;
  }
}
.user-form-header {
  position: sticky;
  top: -18px;
  z-index: 5;
  padding: 0 0 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.user-form-header .row {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user-form-header button {
  min-height: 38px;
  white-space: nowrap;
}
.user-modal-actions {
  z-index: 4;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 0 2px;
  justify-content: flex-end;
  gap: 10px;
}
.user-save-visible,
.user-modal-actions #save-user,
.user-form-header #save-user-top {
  background: var(--fineasy-pink) !important;
  border-color: var(--fineasy-pink) !important;
  color: #fff !important;
  font-weight: 700;
  min-width: 132px;
  opacity: 1 !important;
  visibility: visible !important;
}
.billing-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  margin-top: 2px;
  background: #ffffff;
}
.billing-modal-actions button {
  min-width: 120px;
  min-height: 40px;
  font-weight: 800;
}
.billing-modal-actions #save-billing {
  background: #0f766e !important;
  border: 1px solid #0f766e !important;
  color: #ffffff !important;
}
.billing-modal-actions #save-billing:hover {
  background: #115e59 !important;
  border-color: #115e59 !important;
}
.completed-status-form {
  width: min(640px, calc(100vw - 32px));
  padding-bottom: 0;
}
.completed-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--fineasy-pink);
  border-radius: 8px;
  background: #f8fafc;
  color: #171a21;
  font-size: 13px;
}
.completed-status-summary strong {
  font-size: 15px;
  color: #111827;
}
.completed-status-summary span {
  color: #475569;
  font-weight: 600;
}
.completed-status-actions {
  z-index: 25;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.completed-status-actions #save-completed-status {
  background: #0f766e !important;
  border: 1px solid #0f766e !important;
  color: #ffffff !important;
  font-weight: 800;
  min-width: 140px;
  opacity: 1 !important;
  visibility: visible !important;
}
.completed-status-actions #save-completed-status:hover {
  background: #115e59 !important;
  border-color: #115e59 !important;
}
.pending-lines {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}
.pending-line-row {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.pending-line-sn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: #344054;
  font-weight: 700;
}
.pending-line-row input,
.pending-line-row select {
  min-width: 0;
}
.wrap-cell {
  white-space: pre-line;
  min-width: 160px;
}
.task-overdue-row {
  background: #fff1f2 !important;
}
.task-aged-row {
  background: #fffbeb !important;
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #111827;
  color: white;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 30;
}
.notification-panel {
  position: fixed;
  top: 72px;
  right: 18px;
  width: min(420px, calc(100vw - 28px));
  max-height: 72vh;
  overflow: auto;
  z-index: 18;
  box-shadow: var(--shadow);
}
.notification-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.notification-item.read { opacity: .65; background: #f8fafc; }
.notification-item p { margin: 6px 0; }
.chat-module {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 260px;
  gap: 14px;
  min-height: calc(100vh - 132px);
}
.chat-sidebar,
.chat-main,
.chat-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(20, 33, 61, .07);
  min-width: 0;
}
.chat-sidebar {
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
}
.chat-sidebar-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.chat-sidebar-head h2 {
  margin: 0;
  font-size: 20px;
}
.chat-sidebar-head span {
  font-size: 12px;
  color: var(--muted);
}
.chat-search {
  min-height: 38px;
}
.chat-status-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}
.chat-conversation-list {
  overflow: auto;
  display: grid;
  gap: 7px;
  align-content: start;
}
.chat-conversation {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  text-align: left;
  background: #f8fafc;
  color: #172033;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px;
}
.chat-conversation.active,
.chat-conversation:hover {
  background: #eef4ff;
  border-color: #84caff;
}
.chat-conversation strong,
.chat-conversation em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-conversation em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.chat-conversation small {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.chat-conversation b,
.nav-badge {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eb1946;
  color: #fff;
  font-size: 11px;
  padding: 0 6px;
}
.nav-badge {
  margin-left: auto;
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}
.chat-thread {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.chat-thread-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.chat-thread-head h2,
.chat-thread-head p {
  margin: 0;
}
.chat-thread-head h2 {
  font-size: 18px;
}
.chat-thread-head p {
  font-size: 12px;
  color: var(--muted);
}
.pinned-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  font-size: 12px;
}
.pinned-strip span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-message-list {
  padding: 14px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, #f8fafc, #fff);
}
.chat-date-sep {
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
}
.chat-bubble {
  width: min(74%, 680px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(20, 33, 61, .05);
}
.chat-bubble.mine {
  align-self: flex-end;
  background: #eaf5ff;
  border-color: #bfdbfe;
}
.chat-bubble.theirs {
  align-self: flex-start;
}
.chat-bubble.important {
  border-color: #f59e0b;
  background: #fffbeb;
}
.chat-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.chat-bubble p {
  margin: 7px 0;
  white-space: pre-wrap;
  line-height: 1.45;
}
.chat-bubble p em {
  color: var(--muted);
  font-size: 11px;
}
.chat-reply-ref {
  margin-top: 7px;
  padding: 6px 8px;
  border-left: 3px solid #84caff;
  background: rgba(255,255,255,.7);
  font-size: 12px;
}
.chat-attachments {
  display: grid;
  gap: 6px;
}
.chat-attachments > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 7px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: rgba(255,255,255,.75);
}
.chat-attachments span {
  color: var(--muted);
  font-size: 12px;
}
.chat-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.chat-message-actions button {
  min-height: 26px;
  padding: 4px 7px;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #344054;
  font-size: 11px;
}
.chat-message-actions span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.chat-composer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-composer textarea {
  min-height: 42px;
  max-height: 130px;
}
.chat-info {
  padding: 14px;
  overflow: auto;
}
.chat-info h3,
.chat-info h4 {
  margin: 0 0 10px;
}
.chat-info h4 {
  margin-top: 18px;
  font-size: 13px;
}
.chat-info-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.chat-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
}
.chat-person em {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-style: normal;
}
.chat-picker-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  margin-bottom: 12px;
}
.chat-empty {
  padding: 18px;
  color: var(--muted);
}
.simple-chat-panel {
  max-width: 980px;
}
.simple-chat-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px auto;
  gap: 12px;
  align-items: end;
}
.simple-chat-panel .chat-thread {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.simple-chat-composer {
  grid-template-columns: 1fr;
  align-items: stretch;
}
.chat-message-send-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.chat-message-send-row #send-chat-message {
  min-width: 110px;
  min-height: 92px;
}
.chat-message-entry textarea {
  min-height: 92px;
}
.chat-attach-section {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px dashed #84caff;
  border-radius: 9px;
  background: #eff8ff;
}
.chat-attach-section strong {
  color: #175cd3;
  font-size: 13px;
}
@media (max-width: 1180px) {
  .chat-module {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .chat-info {
    display: none;
  }
}
@media (max-width: 760px) {
  .chat-module {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .chat-sidebar,
  .chat-main {
    min-height: 360px;
  }
  .chat-bubble {
    width: 92%;
  }
  .chat-composer {
    grid-template-columns: 1fr auto;
  }
  .simple-chat-controls,
  .simple-chat-composer,
  .chat-message-send-row {
    grid-template-columns: 1fr;
  }
  .chat-message-send-row #send-chat-message {
    min-height: 42px;
  }
  .chat-composer input,
  .chat-composer textarea {
    grid-column: 1 / -1;
  }
}
.hidden { display: none !important; }
.mobile-menu { display: none; }
.chart {
  height: 210px;
  display: flex;
  gap: 10px;
  align-items: end;
  padding-top: 22px;
}
.bar {
  flex: 1;
  min-width: 42px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  position: relative;
}
.bar span { position: absolute; bottom: 100%; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 800; }
.bar em { position: absolute; top: 100%; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; color: var(--muted); padding-top: 5px; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 284px; transform: translateX(-105%); transition: .2s; z-index: 15; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }
  .grid.two, .grid.three, .grid.four, .grid.five { grid-template-columns: 1fr; }
  .chat-grid { grid-template-columns: 1fr; }
  .permission-group { grid-template-columns: 1fr; }
  .modal-actions { justify-content: stretch; }
  .modal-actions button { flex: 1; }
  .pending-line-row { grid-template-columns: 1fr; }
  .backup-actions { width: 100%; }
  button.backup-create, button.backup-download, button.backup-sync, .backup-restore { flex: 1 1 150px; }
}
@media print {
  .sidebar, .topbar, .toast, .modal button, .no-print { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  .panel { box-shadow: none; border: 0; }
}

/* Fineasy premium theme */
:root {
  --ink: #171A21;
  --muted: #667085;
  --line: #E4E7EC;
  --bg: #F5F6F8;
  --panel: #FFFFFF;
  --brand: #EB1946;
  --brand-hover: #D9143D;
  --brand-soft: #FFF0F3;
  --sidebar: #111318;
  --sidebar-2: #1B1E25;
  --danger: #DC2626;
  --ok: #16A34A;
  --warn: #F59E0B;
  --blue: #2563EB;
  --purple: #7C3AED;
  --shadow: 0 14px 38px rgba(17, 19, 24, .08);
}
body {
  font-family: Inter, Manrope, Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
button {
  border-radius: 8px;
  min-height: 40px;
  font-weight: 650;
  background: var(--brand);
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
button:hover { background: var(--brand-hover); }
button.secondary,
button.ghost,
button.back-btn,
button.export-excel,
button.export-pdf,
button.clear-filters,
button.backup-create,
button.backup-download,
button.backup-sync,
.backup-restore {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.secondary:hover,
button.ghost:hover,
button.back-btn:hover,
button.export-excel:hover,
button.export-pdf:hover,
button.clear-filters:hover,
button.backup-create:hover,
button.backup-download:hover,
button.backup-sync:hover,
.backup-restore:hover {
  background: #F9FAFB;
  border-color: #D0D5DD;
}
button.backup-sync {
  background: var(--blue) !important;
  color: #fff !important;
  border-color: var(--blue) !important;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
}
button.backup-sync:hover {
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}
button.new-blue,
.new-blue {
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
}
button.new-blue:hover,
.new-blue:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid #FCA5A5;
}
button.danger:hover { background: #FEF2F2; }
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: 3px solid rgba(235, 25, 70, .18);
  border-color: var(--brand);
}
input, select, textarea, .rich-text {
  border-color: #D0D5DD;
  border-radius: 8px;
  min-height: 40px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(235, 25, 70, .10);
}
label {
  color: #344054;
  font-size: 12.5px;
  font-weight: 650;
}
.shell {
  grid-template-columns: 292px 1fr;
  background: var(--bg);
}
.shell.sidebar-collapsed { grid-template-columns: 84px 1fr; }
.sidebar {
  background: var(--sidebar);
  padding: 18px 12px;
  border-right: 1px solid rgba(255,255,255,.06);
}
.side-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  border-bottom: 0;
}
.app-badge {
  background: var(--sidebar-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
}
.fineasy-logo,
.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--brand);
  color: #fff;
  font-weight: 850;
  letter-spacing: 0;
}
.app-badge strong { font-size: 15px; line-height: 1.15; }
.app-badge span { font-size: 12px; color: #EAECF0; font-weight: 600; }
.app-badge em,
.brand-badge {
  width: fit-content;
  color: #FCE7EC;
  background: rgba(235,25,70,.14);
  border: 1px solid rgba(235,25,70,.28);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-style: normal;
}
.sidebar-collapse {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
  color: #D0D5DD;
  margin-bottom: 10px;
}
.sidebar-collapse:hover { background: rgba(255,255,255,.06); }
.nav-section { margin-top: 12px; }
.nav-label {
  color: #98A2B3;
  letter-spacing: .04em;
  font-size: 10.5px;
  padding: 8px 10px;
}
.nav { gap: 4px; }
.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: 10px;
  color: #D0D5DD;
  position: relative;
}
.nav button:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.nav button.active {
  background: rgba(235,25,70,.14);
  color: #fff;
}
.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: var(--brand);
}
.nav button.active .nav-icon { color: var(--brand); }
.nav-icon {
  width: 24px;
  display: inline-grid;
  place-items: center;
  color: #EAECF0;
  font-size: 16px;
}
.shell.sidebar-collapsed .sidebar { overflow: visible; }
.shell.sidebar-collapsed .app-badge {
  justify-content: center;
  padding: 10px;
}
.shell.sidebar-collapsed .app-badge > div,
.shell.sidebar-collapsed .nav-label,
.shell.sidebar-collapsed .nav-text,
.shell.sidebar-collapsed .side-user span,
.shell.sidebar-collapsed .side-user strong {
  display: none;
}
.shell.sidebar-collapsed .nav button { justify-content: center; padding: 10px; }
.shell.sidebar-collapsed .side-user { padding: 10px 4px; }
.topbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 460px) auto;
  gap: 16px;
  align-items: center;
  min-height: 72px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
}
.page-context h1 {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
}
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.global-search input {
  background: #F9FAFB;
}
.topbar-actions { justify-content: flex-end; flex-wrap: nowrap; }
.quick-add { position: relative; }
.quick-add-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 10;
}
.quick-add-menu.open { display: grid; gap: 6px; }
.quick-add-menu button {
  background: #fff;
  color: var(--ink);
  border: 1px solid transparent;
  text-align: left;
  justify-content: flex-start;
}
.quick-add-menu button:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: #FFD6DF;
}
.user-chip {
  border-left: 1px solid var(--line);
  padding-left: 12px;
  min-width: 110px;
}
.content { padding: 22px; gap: 20px; }
.panel, .filter-panel, .chat-box, .permission-box, .notification-item {
  border-radius: 14px;
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 1px 2px rgba(17,19,24,.04), 0 10px 28px rgba(17,19,24,.04);
}
.panel { padding: 18px; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
h3, .section-heading { font-size: 18px; font-weight: 650; color: var(--ink); }
.q-tabs, .audit-tabs {
  grid-template-columns: repeat(7, minmax(148px, 1fr));
  gap: 10px;
}
.q-tabs button,
.audit-tabs button {
  min-height: 82px;
  display: grid;
  align-content: space-between;
  border-radius: 14px;
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line);
  border-left: 4px solid #CBD5E1;
  box-shadow: 0 1px 2px rgba(17,19,24,.04);
}
.q-tabs button strong,
.audit-tabs button strong {
  justify-self: start;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}
.q-tabs button span,
.audit-tabs button span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}
.q-tabs button:hover,
.audit-tabs button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(17,19,24,.10);
}
.q-tabs button.active,
.audit-tabs button.active {
  border-color: var(--brand) !important;
  border-left-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(235,25,70,.12), 0 10px 24px rgba(17,19,24,.08);
}
.q-tabs button:nth-child(1), .audit-tabs button:nth-child(1) { border-left-color: var(--brand); }
.q-tabs button:nth-child(2), .audit-tabs button:nth-child(2) { border-left-color: #64748B; }
.q-tabs button:nth-child(3), .audit-tabs button:nth-child(3) { border-left-color: #2563EB; }
.q-tabs button:nth-child(4), .audit-tabs button:nth-child(4) { border-left-color: #F59E0B; }
.q-tabs button:nth-child(5), .audit-tabs button:nth-child(5) { border-left-color: #7C3AED; }
.q-tabs button:nth-child(6), .audit-tabs button:nth-child(6) { border-left-color: #DC2626; }
.q-tabs button:nth-child(7), .audit-tabs button:nth-child(7) { border-left-color: #16A34A; }
.filter-panel {
  padding: 14px;
  background: #fff;
}
.audit-filter-row.main-row {
  grid-template-columns: minmax(130px, 1.15fr) minmax(100px, .85fr) repeat(5, minmax(116px, 1fr)) minmax(86px,.7fr);
}
.audit-filter-row.date-row {
  grid-template-columns: repeat(4, minmax(140px, 180px)) minmax(118px, max-content);
}
.table-wrap {
  border-radius: 12px;
  border-color: var(--line);
  background: #fff;
}
th {
  background: #F8FAFC;
  color: #344054;
  font-weight: 700;
}
th, td {
  border-bottom-color: #EEF2F6;
  font-size: 13px;
}
.pro-table tbody tr:nth-child(even) { background: #FCFCFD; }
.pro-table tbody tr:hover { background: #FFF8FA; }
.status, .priority {
  font-weight: 700;
  border-radius: 999px;
}
.status.green { background: #DCFCE7; color: #166534; }
.status.orange { background: #FEF3C7; color: #92400E; }
.status.red { background: #FEE2E2; color: #991B1B; }
.status.blue { background: #DBEAFE; color: #1E40AF; }
.status.grey { background: #F1F5F9; color: #475569; }
.progress span, .bar { background: var(--brand); }
.tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.modal {
  background: rgba(17,19,24,.54);
  backdrop-filter: blur(4px);
}
.modal-card {
  border-radius: 14px;
  border: 1px solid var(--line);
}
.toast {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
}
.login {
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 520px);
  place-items: stretch;
  padding: 0;
  background: #fff;
}
.login-brand-panel {
  position: relative;
  display: grid;
  align-content: center;
  gap: 36px;
  padding: clamp(32px, 6vw, 72px);
  background: var(--sidebar);
  color: #fff;
  overflow: hidden;
}
.login-brand-panel::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -160px;
  border: 1px solid rgba(235,25,70,.28);
  border-radius: 50%;
}
.brand-mark.executive { margin: 0; position: relative; z-index: 1; }
.login-logo-wrap {
  display: flex;
  align-items: center;
  width: min(360px, 100%);
  padding: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
  overflow: hidden;
}
.login-logo-image {
  display: block;
  width: 100%;
  max-height: 112px;
  object-fit: contain;
}
.brand-mark.executive h1 { font-size: 28px; }
.brand-mark.executive p { margin: 5px 0 0; color: #D0D5DD; }
.login-statement { position: relative; z-index: 1; max-width: 560px; }
.login-statement h2 { font-size: clamp(28px, 3.7vw, 44px); line-height: 1.08; }
.login-statement p { color: #D0D5DD; font-size: 17px; line-height: 1.55; }
.login-card {
  align-self: center;
  justify-self: center;
  box-shadow: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px;
}
.remember-row { min-width: 0; justify-content: flex-start; }
.secure-note { border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 1180px) {
  .topbar { grid-template-columns: 1fr; align-items: stretch; }
  .topbar-actions { justify-content: flex-start; flex-wrap: wrap; }
  .global-search { max-width: none; }
}
@media (max-width: 980px) {
  .shell, .shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .sidebar { background: var(--sidebar); }
  .topbar { position: sticky; top: 0; }
  .login { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 42vh; }
}
@media (max-width: 640px) {
  .content { padding: 14px; }
  .q-tabs, .audit-tabs { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .task-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .task-dashboard button { min-height: 64px; padding: 10px; }
  .task-dashboard button span { font-size: 12px; }
  .task-dashboard button strong { font-size: 22px; }
  .topbar-left, .topbar-actions { gap: 8px; }
  .page-context h1 { font-size: 21px; }
  .login-brand-panel { min-height: 34vh; }
  .login-card { width: calc(100% - 28px); padding: 24px; }
}

/* Fineasy typography refinements */
body,
input,
select,
textarea,
table {
  font-family: Inter, Manrope, Segoe UI, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
}
label,
th,
td {
  font-size: 14px;
  font-weight: 500;
}
button,
.tabs button,
.q-tabs button span,
.audit-tabs button span,
.section-heading,
h3 {
  font-size: 14px;
  font-weight: 600;
}
.page-context h1,
h1 {
  font-size: 27px;
  font-weight: 700;
}
h2 {
  font-size: 22px;
  font-weight: 700;
}
.section-heading,
h3 {
  font-size: 19px;
}
.q-tabs button strong,
.audit-tabs button strong,
.kpi strong {
  font-size: 32px;
  font-weight: 700;
}
.small,
.breadcrumb,
.muted,
.field-error,
.status,
.priority {
  font-size: 12.5px;
}
.topbar {
  grid-template-columns: auto 1fr;
}
.topbar-actions {
  justify-content: flex-end;
}
.topbar-actions button,
.topbar-actions .compact-top,
.notify-btn {
  font-size: 14px;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 12px;
}
.breadcrumb,
.global-search {
  display: none !important;
}
.app-badge {
  gap: 10px;
}
.app-badge strong {
  font-size: 17px;
  font-weight: 700;
}
.app-badge em {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
}
.nav-label {
  font-size: 10px;
  font-weight: 600;
}
.nav button {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 500;
}
.nav-icon {
  width: 20px;
  font-size: 13px;
}
.side-user {
  font-size: 12px;
}
.app-badge {
  background: transparent;
  border: 0;
  padding: 10px 8px 18px;
}
.app-badge strong {
  color: #171A21;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}
.app-badge em {
  color: #EB1946;
  background: transparent;
  border: 0;
  padding: 0;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
}
.sidebar .app-badge strong { color: #FFFFFF; }
.sidebar .app-badge strong {
  font-size: 21px;
  white-space: nowrap;
  line-height: 1.05;
}
.user-profile-btn {
  min-width: 42px;
}
.top-chat-btn,
.top-shortcuts-btn,
.top-notify-btn {
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  min-height: 40px !important;
  padding: 9px 14px !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.12);
}
.top-chat-btn {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border-color: #1d4ed8;
}
.top-chat-btn:hover { background: linear-gradient(135deg, #0891b2, #1d4ed8); }
.top-shortcuts-btn {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: #6d28d9;
}
.top-shortcuts-btn:hover { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.top-notify-btn {
  background: linear-gradient(135deg, #f97316, #eb1946);
  border-color: #c2143a;
}
.top-notify-btn:hover { background: linear-gradient(135deg, #ea580c, #d9143d); }
.top-notify-btn span {
  background: #ffffff !important;
  color: #eb1946 !important;
}
.top-new-quote,
.top-new-file {
  min-width: 118px;
  box-shadow: 0 8px 18px rgba(235, 25, 70, 0.16);
}
.top-new-file {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}
.compact-quote-form .grid.three {
  gap: 12px;
}
.quote-modal-actions {
  align-items: center;
}
.quote-inline-actions {
  display: flex;
  justify-content: flex-end;
  padding: 2px 0 4px;
}
.quote-inline-actions .quote-modal-actions {
  width: 100%;
  justify-content: flex-end;
  gap: 10px;
}
.quote-inline-actions button {
  min-width: 118px;
  min-height: 38px;
}
.quote-modal-actions #create-q-new {
  background: #eef4ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.quote-edit-section {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 10px;
  background: #fbfcfe;
}
.quote-edit-section h3 {
  margin: 0;
  font-size: 14px;
}
.quote-edit-table-wrap {
  margin-top: 8px;
  max-height: none;
}
.quote-edit-table {
  min-width: 0 !important;
  table-layout: auto;
}
.quote-edit-table input {
  min-height: 34px;
  font-size: 12.5px;
}
.quote-vat-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin: 4px 0 10px;
}
.quote-vat-summary > div {
  border: 1px solid #E4E7EC;
  border-radius: 10px;
  background: #FFFFFF;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}
.quote-vat-summary span {
  color: #667085;
  font-size: 12px;
  font-weight: 500;
}
.quote-vat-summary strong {
  color: #171A21;
  font-size: 18px;
  font-weight: 700;
}
.quote-vat-summary .quote-vat-total {
  border-color: #EB1946;
  background: #FFF5F7;
}
.quote-vat-summary .quote-vat-total span {
  color: #B81538;
}
.quote-vat-summary .quote-vat-total strong {
  color: #EB1946;
  font-size: 21px;
}
@media (max-width: 760px) {
  .quote-vat-summary {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1180px) {
  .topbar { grid-template-columns: 1fr; }
  .topbar-actions { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .quote-inline-actions .quote-modal-actions {
    justify-content: stretch;
  }
  .quote-inline-actions button {
    flex: 1 1 140px;
  }
}

/* Premium Fineasy data table system */
.table-card-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin: 4px 0 0;
  border: 1px solid #E4E7EC;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(17,19,24,.04);
}
.table-card-title {
  display: grid;
  gap: 2px;
}
.table-card-title strong {
  color: #171A21;
  font-size: 15px;
  font-weight: 700;
}
.table-card-title span {
  color: #667085;
  font-size: 12px;
}
.table-card-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.table-card-controls input,
.table-card-controls select {
  width: auto;
  min-width: 150px;
  height: 36px;
  font-size: 13px;
}
.table-card-controls button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}
.table-column-panel {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 8px;
  border-top: 1px solid #EEF2F6;
}
.hidden-col { display: none !important; }
.table-wrap {
  border-radius: 0 0 14px 14px;
  border: 1px solid #E4E7EC;
  background: #FFFFFF;
  box-shadow: 0 14px 32px rgba(17,19,24,.06);
  max-height: 68vh;
}
.table-wrap:not([data-enhanced]) {
  border-radius: 14px;
}
.pro-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  min-width: 1120px;
}
.pro-table thead th,
table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #F8F9FB;
  color: #344054;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .015em;
  text-transform: none;
  padding: 12px 14px;
  white-space: nowrap;
  border-bottom: 1px solid #E4E7EC;
}
.pro-table th[data-q-sort]::after,
.pro-table th[data-p-sort]::after {
  content: "↕";
  color: #98A2B3;
  font-size: 11px;
  margin-left: 5px;
}
.pro-table tbody td,
table tbody td {
  height: 52px;
  padding: 12px 14px;
  color: #171A21;
  font-size: 14px;
  font-weight: 500;
  vertical-align: middle;
  border-bottom: 1px solid #EEF2F6;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pro-table tbody tr {
  transition: background .16s ease, box-shadow .16s ease;
}
.pro-table tbody tr:nth-child(even) { background: #FCFCFD; }
.pro-table tbody tr:hover {
  background: #FFF5F7;
  box-shadow: inset 3px 0 0 #EB1946;
}
.pro-table td:first-child,
.pro-table th:first-child {
  text-align: center;
  width: 64px;
  min-width: 64px;
}
.pro-table th:nth-child(2),
.pro-table td:nth-child(2) {
  min-width: 190px;
}
.pro-table th:last-child,
.pro-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: inherit;
  min-width: 142px;
  box-shadow: -1px 0 0 #E4E7EC;
}
.sticky-engagement-wrap {
  position: relative;
  height: clamp(360px, 58vh, 720px);
  max-height: calc(100vh - 240px);
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  isolation: isolate;
}
.sticky-engagement-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}
.audit-engagement-table { min-width: 1444px; }
.other-engagement-table { min-width: 1444px; }
.audit-freeze-wrap,
.other-freeze-wrap {
  height: clamp(500px, 68vh, 780px) !important;
  max-height: calc(100vh - 180px) !important;
}
.audit-engagement-table thead th,
.other-engagement-table thead th {
  height: 40px;
  padding: 8px 9px;
  font-size: 12.5px;
}
.audit-engagement-table tbody td,
.other-engagement-table tbody td {
  height: 41px;
  padding: 7px 9px;
  line-height: 1.22;
  font-size: 13px;
}
.audit-engagement-table th:last-child,
.audit-engagement-table td:last-child,
.other-engagement-table th:last-child,
.other-engagement-table td:last-child {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
}
.audit-engagement-table .actions,
.other-engagement-table .actions {
  gap: 4px;
  flex-wrap: nowrap;
}
.audit-engagement-table .actions button,
.other-engagement-table .actions button {
  min-height: 30px;
  padding: 6px 7px;
  font-size: 11.5px;
}
.other-engagement-table th,
.other-engagement-table td { box-sizing: border-box; min-width: 0 !important; vertical-align: middle; }
.other-engagement-table th:nth-child(1), .other-engagement-table td:nth-child(1) { width: 64px !important; min-width: 64px !important; max-width: 64px !important; text-align: center; }
.other-engagement-table th:nth-child(2), .other-engagement-table td:nth-child(2) { width: 220px !important; min-width: 220px !important; max-width: 220px !important; text-align: left; }
.other-engagement-table th:nth-child(3), .other-engagement-table td:nth-child(3) { width: 105px !important; min-width: 105px !important; max-width: 105px !important; text-align: center; }
.other-engagement-table th:nth-child(4), .other-engagement-table td:nth-child(4) { width: 150px !important; min-width: 150px !important; max-width: 150px !important; text-align: left; }
.other-engagement-table th:nth-child(5), .other-engagement-table td:nth-child(5) { width: 75px !important; min-width: 75px !important; max-width: 75px !important; text-align: center; }
.other-engagement-table th:nth-child(6), .other-engagement-table td:nth-child(6) { width: 110px !important; min-width: 110px !important; max-width: 110px !important; text-align: center; }
.other-engagement-table th:nth-child(7), .other-engagement-table td:nth-child(7) { width: 115px !important; min-width: 115px !important; max-width: 115px !important; text-align: left; }
.other-engagement-table th:nth-child(8), .other-engagement-table td:nth-child(8) { width: 125px !important; min-width: 125px !important; max-width: 125px !important; text-align: left; }
.other-engagement-table th:nth-child(9), .other-engagement-table td:nth-child(9) { width: 110px !important; min-width: 110px !important; max-width: 110px !important; text-align: center; }
.other-engagement-table th:nth-child(10), .other-engagement-table td:nth-child(10) { width: 95px !important; min-width: 95px !important; max-width: 95px !important; text-align: center; }
.other-engagement-table th:nth-child(11), .other-engagement-table td:nth-child(11) { width: 125px !important; min-width: 125px !important; max-width: 125px !important; text-align: center; }
.other-engagement-table th:nth-child(12), .other-engagement-table td:nth-child(12) { width: 150px !important; min-width: 150px !important; max-width: 150px !important; }
.other-engagement-table td:nth-child(2) strong,
.other-engagement-table td:nth-child(4) { white-space: normal; overflow-wrap: anywhere; }
.other-engagement-table td:nth-child(7),
.other-engagement-table td:nth-child(8) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.other-engagement-table .actions {
  justify-content: center;
  white-space: nowrap;
}
.completed-engagement-table { min-width: 1458px; }
.fee-pending-table { min-width: 1099px; }
.fee-workflow-table { min-width: 1434px; }
.fee-received-table { min-width: 1249px; }
.pending-table { min-width: 1152px; }
.client-master-table { min-width: 1554px; }
.client-master-freeze-wrap {
  height: clamp(500px, 68vh, 780px) !important;
  max-height: calc(100vh - 180px) !important;
}
.client-master-table thead th {
  height: 38px;
  padding: 7px 8px !important;
  font-size: 12px !important;
  line-height: 1.2;
  vertical-align: middle;
}
.client-master-table tbody td {
  height: 40px;
  padding: 6px 8px !important;
  font-size: 12.5px !important;
  line-height: 1.25;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}
.client-master-table .small,
.client-master-table .muted {
  font-size: 11.5px;
}
.client-master-table th:last-child,
.client-master-table td:last-child {
  position: static !important;
  right: auto !important;
  z-index: auto !important;
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  box-shadow: none;
}
.client-master-table th:nth-child(2),
.client-master-table td:nth-child(2) {
  white-space: normal;
}
.client-master-table th:nth-child(1),
.client-master-table td:nth-child(1),
.client-master-table th:nth-child(3),
.client-master-table td:nth-child(3),
.client-master-table th:nth-child(9),
.client-master-table td:nth-child(9),
.client-master-table th:nth-child(11),
.client-master-table td:nth-child(11) {
  text-align: center;
}
.client-master-table td:nth-child(8),
.client-master-table th:nth-child(8) {
  text-align: left;
}
.client-master-table td:last-child {
  white-space: nowrap;
}
.client-master-table td:last-child .actions,
.client-master-table td:last-child.row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 5px;
}
.client-master-table td:last-child button {
  min-height: 28px;
  padding: 5px 7px;
  font-size: 11px;
}
.freeze-header-clone {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 60;
  overflow: hidden;
  width: 100%;
  background: #EEF2F6;
  border-bottom: 1px solid #D0D5DD;
  box-shadow: 0 3px 8px rgba(17,24,39,.10);
}
.freeze-header-table {
  margin: 0;
  pointer-events: none;
}
.freeze-header-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 62 !important;
  height: 46px;
  background: #EEF2F6 !important;
  border-bottom: 1px solid #D0D5DD;
}
.freeze-header-table thead th.freeze-left-head {
  position: sticky !important;
  z-index: 70 !important;
  background: #E4E7EC !important;
}
.sticky-engagement-table > thead.native-freeze-head {
  display: none;
}
.sticky-engagement-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 12;
  background: #EEF2F6;
  box-shadow: 0 2px 0 #D0D5DD, 0 4px 10px rgba(17,24,39,.08);
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-engagement-table th:first-child,
.sticky-engagement-table td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 8 !important;
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  background: #FFFFFF;
  background-clip: padding-box;
  box-shadow: 1px 0 0 #D0D5DD;
}
.sticky-engagement-table th:nth-child(2),
.sticky-engagement-table td:nth-child(2) {
  position: sticky !important;
  left: 64px !important;
  z-index: 7 !important;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  background: #FFFFFF;
  background-clip: padding-box;
  box-shadow: 1px 0 0 #D0D5DD, 8px 0 12px -12px rgba(17,24,39,.38);
}
.sticky-engagement-table th:first-child,
.sticky-engagement-table td:first-child,
.sticky-engagement-table th:nth-child(2),
.sticky-engagement-table td:nth-child(2) {
  transform-origin: left center;
  backface-visibility: hidden;
}
.sticky-engagement-table thead th:first-child {
  z-index: 16 !important;
  background: #E4E7EC !important;
}
.sticky-engagement-table thead th:nth-child(2) {
  z-index: 15 !important;
  background: #E4E7EC !important;
}
.sticky-engagement-table tbody tr:nth-child(even) td:first-child,
.sticky-engagement-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #FCFCFD;
}
.sticky-engagement-table tbody tr:hover td:first-child,
.sticky-engagement-table tbody tr:hover td:nth-child(2) {
  background: #FFF5F7;
}
.sticky-engagement-table td,
.sticky-engagement-table th {
  box-sizing: border-box;
}
.sticky-engagement-table th:last-child,
.sticky-engagement-table td:last-child {
  position: sticky !important;
  right: 0 !important;
  z-index: 9 !important;
  min-width: 220px;
  background: #FFFFFF;
  background-clip: padding-box;
  box-shadow: -1px 0 0 #D0D5DD, -8px 0 12px -12px rgba(17,24,39,.38);
}
.completed-engagement-table th:last-child,
.completed-engagement-table td:last-child {
  min-width: 160px;
  width: 160px;
}
.completed-engagement-table .actions {
  gap: 5px;
  flex-wrap: nowrap;
}
.completed-engagement-table .actions button {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 11.5px;
  white-space: nowrap;
}
.completed-engagement-table thead th {
  height: 38px;
  padding: 7px 8px !important;
  font-size: 12px !important;
  line-height: 1.2;
  vertical-align: middle;
}
.completed-engagement-table tbody td {
  height: 42px;
  padding: 6px 8px !important;
  font-size: 12.5px !important;
  line-height: 1.25;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}
.completed-engagement-table th:nth-child(1),
.completed-engagement-table td:nth-child(1),
.completed-engagement-table th:nth-child(3),
.completed-engagement-table td:nth-child(3),
.completed-engagement-table th:nth-child(5),
.completed-engagement-table td:nth-child(5),
.completed-engagement-table th:nth-child(6),
.completed-engagement-table td:nth-child(6),
.completed-engagement-table th:nth-child(7),
.completed-engagement-table td:nth-child(7),
.completed-engagement-table th:nth-child(10),
.completed-engagement-table td:nth-child(10) {
  text-align: center;
}
.fee-workflow-table th:last-child,
.fee-workflow-table td:last-child {
  min-width: 170px;
  width: 170px;
}
.fee-workflow-table .actions {
  flex-wrap: nowrap;
}
.fee-workflow-table .actions button {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 12px;
  white-space: nowrap;
}
.fee-received-table th:last-child,
.fee-received-table td:last-child {
  min-width: 170px;
  width: 170px;
}
.fee-pending-table th:last-child,
.fee-pending-table td:last-child {
  min-width: 120px;
  width: 120px;
}
.fee-received-table .actions {
  gap: 5px;
  align-items: center;
  flex-wrap: nowrap;
}
.fee-pending-table .actions {
  gap: 5px;
  align-items: center;
  flex-wrap: nowrap;
}
.fee-received-table thead th,
.fee-pending-table thead th {
  height: 36px;
  padding: 7px 8px !important;
  font-size: 12px !important;
  line-height: 1.2;
  vertical-align: middle;
}
.fee-received-table tbody td,
.fee-pending-table tbody td {
  height: 40px;
  padding: 6px 8px !important;
  font-size: 12.5px !important;
  line-height: 1.25;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}
.fee-received-table th:nth-child(1),
.fee-received-table td:nth-child(1),
.fee-received-table th:nth-child(3),
.fee-received-table td:nth-child(3),
.fee-received-table th:nth-child(4),
.fee-received-table td:nth-child(4),
.fee-received-table th:nth-child(7),
.fee-received-table td:nth-child(7),
.fee-received-table th:nth-child(9),
.fee-received-table td:nth-child(9),
.fee-pending-table th:nth-child(1),
.fee-pending-table td:nth-child(1),
.fee-pending-table th:nth-child(3),
.fee-pending-table td:nth-child(3),
.fee-pending-table th:nth-child(4),
.fee-pending-table td:nth-child(4),
.fee-pending-table th:nth-child(7),
.fee-pending-table td:nth-child(7),
.fee-pending-table th:nth-child(9),
.fee-pending-table td:nth-child(9) {
  text-align: center;
}
.fee-received-table th:nth-child(8),
.fee-received-table td:nth-child(8),
.fee-pending-table th:nth-child(8),
.fee-pending-table td:nth-child(8) {
  text-align: right;
  white-space: nowrap;
}
.fee-received-table .actions button,
.fee-pending-table .actions button {
  min-height: 28px;
  padding: 5px 7px;
  font-size: 11px;
  white-space: nowrap;
}
.completed-received-head {
  align-items: center;
  gap: 10px;
}
.completed-received-controls {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.completed-received-controls input[type="text"],
.completed-received-controls > input {
  width: min(320px, 100%);
  min-height: 40px;
}
.completed-received-controls .date-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  font-size: 12px;
  font-weight: 600;
  color: #344054;
}
.completed-received-controls .date-inline input {
  min-height: 40px;
  width: 142px;
}
.sticky-engagement-table thead th:last-child {
  z-index: 18 !important;
  background: #E4E7EC !important;
}
.sticky-engagement-table tbody tr:nth-child(even) td:last-child {
  background: #FCFCFD;
}
.sticky-engagement-table tbody tr:hover td:last-child {
  background: #FFF5F7;
}
.audit-engagement-table th:last-child,
.audit-engagement-table td:last-child,
.other-engagement-table th:last-child,
.other-engagement-table td:last-child {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
}
.client-master-table th:last-child,
.client-master-table td:last-child {
  position: static !important;
  right: auto !important;
  z-index: auto !important;
  width: 140px !important;
  min-width: 140px !important;
  max-width: 140px !important;
  background: inherit !important;
  box-shadow: none !important;
}
.client-master-table thead th:last-child {
  background: #EEF2F6 !important;
  z-index: 20 !important;
}
.pro-table thead th:last-child {
  z-index: 18;
  background: #E4E7EC;
}
.pro-table th:first-child,
.pro-table td:first-child,
.pro-table th:nth-child(2),
.pro-table td:nth-child(2),
.pro-table th:last-child,
.pro-table td:last-child,
.sticky-engagement-table th:first-child,
.sticky-engagement-table td:first-child,
.sticky-engagement-table th:nth-child(2),
.sticky-engagement-table td:nth-child(2),
.sticky-engagement-table th:last-child,
.sticky-engagement-table td:last-child,
.freeze-header-table th:first-child,
.freeze-header-table th:nth-child(2),
.freeze-header-table th:last-child {
  position: static !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  z-index: auto !important;
  box-shadow: none !important;
}
.pro-table thead th,
.sticky-engagement-table thead th,
.freeze-header-table thead th {
  position: sticky !important;
  top: 0 !important;
}
.pending-table th:last-child,
.pending-table td:last-child {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
}
.pending-table th:nth-child(2),
.pending-table td:nth-child(2) {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
}
.pending-freeze-wrap {
  height: clamp(500px, 68vh, 780px) !important;
  max-height: calc(100vh - 180px) !important;
}
.pending-table thead th {
  height: 36px;
  padding: 7px 8px !important;
  font-size: 12px !important;
  line-height: 1.2;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}
.pending-table tbody td {
  height: 40px;
  padding: 6px 8px !important;
  font-size: 12.5px !important;
  line-height: 1.25;
  vertical-align: middle;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.pending-table th:nth-child(1),
.pending-table td:nth-child(1),
.pending-table th:nth-child(3),
.pending-table td:nth-child(3),
.pending-table th:nth-child(4),
.pending-table td:nth-child(4),
.pending-table th:nth-child(6),
.pending-table td:nth-child(6),
.pending-table th:nth-child(9),
.pending-table td:nth-child(9) {
  text-align: center;
}
.pending-table .actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 4px;
}
.pending-table .actions button {
  min-height: 28px;
  padding: 5px 7px;
  font-size: 11px;
  white-space: nowrap;
}
.pro-table strong {
  font-weight: 700;
  color: #171A21;
}
.pro-table .small,
.pro-table .muted {
  color: #667085;
  font-size: 12.5px;
  font-weight: 400;
}
.amount,
.pro-table .amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.date-cell,
.status-cell {
  text-align: center;
}
.actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.actions button,
.pro-table button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
  border-radius: 7px;
  white-space: nowrap;
}
.user-management-table {
  min-width: 1728px;
  table-layout: fixed;
}
.user-management-table th:last-child,
.user-management-table td:last-child {
  min-width: 500px !important;
  width: 500px !important;
}
.user-management-table .user-actions {
  justify-content: flex-start;
  gap: 7px;
}
.user-management-table .user-edit-action {
  background: #175cd3 !important;
  color: #ffffff !important;
  border-color: #175cd3 !important;
  font-weight: 800;
}
.density-compact td { height: 42px; padding-top: 8px; padding-bottom: 8px; }
.density-spacious td { height: 62px; padding-top: 16px; padding-bottom: 16px; }
.status {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}
.status.green { background: #DCFCE7; color: #166534; }
.status.orange { background: #FEF3C7; color: #92400E; }
.status.red { background: #FEE2E2; color: #991B1B; }
.status.blue { background: #DBEAFE; color: #1E40AF; }
.status.grey { background: #F1F5F9; color: #475569; }
.status.dark { background: #E5E7EB; color: #374151; }
.priority.low { background: #F1F5F9; color: #475569; }
.priority.normal { background: #DBEAFE; color: #1E40AF; }
.priority.high { background: #FFEDD5; color: #9A3412; }
.priority.urgent { background: #FEE2E2; color: #991B1B; }
.overdue-row {
  box-shadow: inset 3px 0 0 #DC2626;
}
.pagination {
  padding: 10px 2px 2px;
  color: #667085;
}
.pagination button {
  min-height: 34px;
}
.pro-table td[colspan].muted,
.pro-table .muted[colspan] {
  text-align: center;
  height: 120px;
  color: #667085;
  background: #FFFFFF;
  font-size: 14px;
}
@media (max-width: 760px) {
  .table-card-toolbar {
    align-items: stretch;
  }
  .table-card-controls,
  .table-card-controls input,
  .table-card-controls select,
  .table-card-controls button {
    width: 100%;
  }
  .table-wrap {
    max-height: none;
  }
  .pro-table {
    min-width: 900px;
  }
}

/* Quotation tracker tab shading and action colours */
.quotation-page .section-heading {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 13px;
  border: 1px solid #ffd6df;
  border-radius: 10px;
  background: #fff0f3;
  color: var(--fineasy-pink);
  font-weight: 700;
}

.quotation-page .q-tabs {
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #f8f9fb;
}

.quotation-page .q-tabs button {
  box-shadow: 0 10px 22px rgba(23, 26, 33, 0.06);
  min-height: 68px;
  padding: 10px 12px;
}

.quotation-page .q-tabs button span {
  font-size: 12.5px;
  line-height: 1.2;
}

.quotation-page .q-tabs button strong {
  font-size: 24px;
  line-height: 1;
}

.quotation-page .q-tabs button:nth-child(1) {
  background: #fff0f3 !important;
  border-color: #ffd6df !important;
}

.quotation-page .q-tabs button:nth-child(2) {
  background: #eef4ff !important;
  border-color: #c7d7fe !important;
}

.quotation-page .q-tabs button:nth-child(3) {
  background: #ecfdf3 !important;
  border-color: #abefc6 !important;
}

.quotation-page .q-tabs button:nth-child(4) {
  background: #fff7ed !important;
  border-color: #fed7aa !important;
}

.quotation-page .q-tabs button.active {
  border-color: var(--fineasy-pink) !important;
  box-shadow: 0 14px 28px rgba(235, 25, 70, 0.14);
}

.quotation-table thead th {
  background: #e5e7eb !important;
  color: #111827 !important;
  border-bottom: 2px solid #9ca3af !important;
  font-weight: 800 !important;
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -2px 0 rgba(17, 24, 39, 0.12);
}

.quotation-table thead th:nth-child(2n) {
  background: #f3f4f6 !important;
}

.quotation-table thead th:first-child {
  border-top-left-radius: 10px;
}

.quotation-table thead th:last-child {
  border-top-right-radius: 10px;
  background: #e5e7eb !important;
}

.quotation-table tbody td:nth-child(2) strong {
  font-size: 13px;
  line-height: 1.25;
}

.quotation-table tbody td:nth-child(2) .small,
.quotation-table tbody td:nth-child(2) .muted {
  font-size: 11.5px;
  line-height: 1.2;
}

.quotation-table tbody td {
  font-size: 12.5px !important;
  line-height: 1.25;
}

.quotation-table tbody td .status {
  font-size: 11.5px;
}

.quotation-table {
  table-layout: fixed;
  min-width: 1480px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  overflow: hidden;
}

.quotation-table th,
.quotation-table td {
  vertical-align: middle;
  border-right: 1px solid #d0d5dd !important;
  border-bottom: 1px solid #d0d5dd !important;
}

.quotation-table th {
  white-space: normal;
  line-height: 1.2;
}

.quotation-table tbody td {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.quotation-table th:last-child,
.quotation-table td:last-child {
  border-right: 0 !important;
}

.quotation-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.quotation-table tbody tr:nth-child(even) {
  background: #fcfcfd;
}

.quotation-table tbody tr:hover {
  background: #fff5f7;
}

.quotation-table th:nth-child(1),
.quotation-table td:nth-child(1) {
  width: 54px;
  min-width: 54px;
}

.quotation-table th:nth-child(2),
.quotation-table td:nth-child(2) {
  width: 190px;
  min-width: 190px;
}

.quotation-table th:nth-child(3),
.quotation-table td:nth-child(3),
.quotation-table th:nth-child(5),
.quotation-table td:nth-child(5),
.quotation-table th:nth-child(10),
.quotation-table td:nth-child(10),
.quotation-table th:nth-child(12),
.quotation-table td:nth-child(12) {
  width: 92px;
  min-width: 92px;
  text-align: center;
}

.quotation-table th:nth-child(4),
.quotation-table td:nth-child(4) {
  width: 165px;
  min-width: 165px;
}

.quotation-table th:nth-child(6),
.quotation-table td:nth-child(6) {
  width: 125px;
  min-width: 125px;
}

.quotation-table th:nth-child(7),
.quotation-table td:nth-child(7) {
  width: 118px;
  min-width: 118px;
}

.quotation-table th:nth-child(8),
.quotation-table td:nth-child(8) {
  width: 112px;
  min-width: 112px;
  text-align: right;
}

.quotation-table th:nth-child(9),
.quotation-table td:nth-child(9) {
  width: 118px;
  min-width: 118px;
  text-align: center;
}

.quotation-table th:nth-child(11),
.quotation-table td:nth-child(11) {
  width: 118px;
  min-width: 118px;
  text-align: center;
}

.quotation-table th:nth-child(13),
.quotation-table td:nth-child(13) {
  width: 160px;
  min-width: 160px;
}

.quotation-table td:nth-child(3),
.quotation-table td:nth-child(5),
.quotation-table td:nth-child(7),
.quotation-table td:nth-child(8),
.quotation-table td:nth-child(9),
.quotation-table td:nth-child(10),
.quotation-table td:nth-child(11),
.quotation-table td:nth-child(12),
.quotation-table td:nth-child(13) {
  white-space: nowrap;
}

.quotation-action-strip {
  justify-content: flex-end;
  margin-top: 4px;
}

button.sample-action,
button[id^="download-sample"] {
  background: #fff0f3 !important;
  border-color: #ffd6df !important;
  color: var(--fineasy-pink) !important;
}

button.import-action,
button[id^="import-"]:not(#import-history) {
  background: #eef4ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

button.export-excel {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

button.export-pdf {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
}

button.new-blue {
  background: var(--fineasy-pink) !important;
  border-color: var(--fineasy-pink) !important;
  color: #ffffff !important;
}

button.back-btn {
  background: #eef4ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

button.back-btn:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
}

.quotation-page .table-card-title {
  display: none;
}

.quotation-page .table-card-toolbar {
  justify-content: flex-end;
}

.quotation-page .table-card-controls {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  overflow-x: auto;
}

.quotation-page .table-card-controls input.table-search {
  min-width: 150px;
  max-width: 170px;
  height: 34px;
  font-size: 12.5px;
}

.quotation-page .table-card-controls select.table-density {
  min-width: 112px;
  height: 34px;
  font-size: 12.5px;
}

.quotation-page .table-card-controls button {
  min-width: auto;
  min-height: 34px;
  white-space: nowrap;
  padding-inline: 10px;
  font-size: 12.5px;
}

.quotation-page .filter-panel .section-heading {
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 8px;
}

.quotation-page .q-filter-grid {
  gap: 8px;
}

.quotation-page .q-filter-grid label {
  font-size: 12px;
  gap: 4px;
}

.quotation-page .q-filter-grid input,
.quotation-page .q-filter-grid select {
  height: 34px;
  font-size: 12.5px;
  padding: 7px 9px;
}

.quotation-page .filter-panel {
  padding: 10px;
}

.page-context h1.page-title-quotations {
  font-size: 20px;
}

/* Shared panel table tuning to match Quotation Tracker */
.panel .table-card-title {
  display: none;
}

.panel .table-card-toolbar {
  justify-content: flex-end;
  padding: 8px 0;
}

.panel .table-card-controls {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  overflow-x: auto;
}

.panel .table-card-controls input.table-search {
  min-width: 150px;
  max-width: 180px;
  height: 34px;
  font-size: 12.5px;
}

.panel .table-card-controls select.table-density {
  min-width: 112px;
  height: 34px;
  font-size: 12.5px;
}

.panel .table-card-controls button {
  min-width: auto;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12.5px;
  white-space: nowrap;
}

.panel .table-wrap table.pro-table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  overflow: hidden;
}

.panel .pro-table thead th {
  background: #fff0f3 !important;
  color: #9f1239 !important;
  border-right: 1px solid #d0d5dd !important;
  border-bottom: 1px solid #fda4af !important;
  line-height: 1.2;
  white-space: normal;
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -2px 0 rgba(235, 25, 70, 0.16);
}

.panel .pro-table thead th:nth-child(2n) {
  background: #fff7fa !important;
}

.panel .pro-table tbody td {
  border-right: 1px solid #d0d5dd !important;
  border-bottom: 1px solid #d0d5dd !important;
  font-size: 12.5px;
  line-height: 1.25;
  vertical-align: middle;
}

.panel .pro-table th:last-child,
.panel .pro-table td:last-child {
  border-right: 0 !important;
}

.panel .pro-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.panel .filter-panel .section-heading {
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 8px;
}

.panel .filter-panel label {
  font-size: 12px;
  gap: 4px;
}

.panel .filter-panel input,
.panel .filter-panel select {
  height: 34px;
  font-size: 12.5px;
  padding: 7px 9px;
}

/* Navigation refresh and persistent top actions */
.shell {
  grid-template-columns: 260px minmax(0, 1fr);
}

.shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, #111318 0%, #171a21 100%) !important;
  padding: 14px 10px !important;
  overflow-x: hidden;
}

.side-brand.app-badge {
  display: block;
  padding: 12px 10px 14px !important;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .app-badge strong {
  color: #ffffff;
  display: block;
  font-size: 18px;
  line-height: 1.14;
  font-weight: 700;
  white-space: normal;
}

.sidebar .app-badge em {
  display: block;
  margin-top: 5px;
  color: #ffb4c4;
  font-size: 12px;
  font-weight: 500;
}

.sidebar-collapse {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  min-height: 38px;
  border-radius: 10px;
  padding: 8px 10px;
}

.nav-section,
.admin-nav {
  margin-top: 12px;
}

.nav-label {
  padding: 8px 10px 6px !important;
  color: #98a2b3 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav {
  gap: 5px;
}

.nav button {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  gap: 10px;
  color: #d0d5dd !important;
  border: 1px solid transparent;
  overflow: hidden;
}

.nav button:hover {
  background: rgba(255, 255, 255, .07) !important;
  border-color: rgba(255, 255, 255, .08);
  color: #ffffff !important;
}

.nav button.active {
  background: #fff0f3 !important;
  border-color: #ffd6df !important;
  color: #9f1239 !important;
  box-shadow: 0 8px 20px rgba(235, 25, 70, .16);
}

.nav button.active .nav-icon {
  color: #eb1946 !important;
}

.nav-icon {
  flex: 0 0 22px;
  width: 22px;
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
}

.nav-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell.sidebar-collapsed .side-brand.app-badge {
  min-height: 42px;
  padding: 10px 4px !important;
}

.shell.sidebar-collapsed .app-badge > div,
.shell.sidebar-collapsed .nav-label,
.shell.sidebar-collapsed .nav-text,
.shell.sidebar-collapsed .side-user span,
.shell.sidebar-collapsed .side-user strong {
  display: none !important;
}

.shell.sidebar-collapsed .sidebar-collapse,
.shell.sidebar-collapsed .nav button {
  justify-content: center;
  padding: 8px !important;
}

.shell.sidebar-collapsed .nav-icon {
  margin: 0;
}

.topbar {
  grid-template-columns: minmax(180px, 1fr) auto !important;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 12px 18px !important;
}

.topbar-left {
  min-width: 0;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end !important;
  align-items: center;
  flex-wrap: wrap !important;
  gap: 8px;
  min-width: 0;
}

.module-action-title {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.top-new-quote,
.top-new-client,
.top-new-engagement,
.quick-add > .compact-top {
  min-width: 126px;
  min-height: 40px !important;
  padding: 9px 14px !important;
  border-radius: 10px;
  white-space: nowrap;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.top-new-quote {
  background: linear-gradient(135deg, #ff4f73, #eb1946) !important;
  border-color: #b81235 !important;
  box-shadow: 0 10px 22px rgba(235, 25, 70, .24);
}

.top-new-quote:hover {
  background: linear-gradient(135deg, #f43f5e, #d9143d) !important;
  border-color: #b81235 !important;
}

.top-new-client {
  background: linear-gradient(135deg, #38bdf8, #2563eb) !important;
  border: 1px solid #1d4ed8 !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .24);
}

.top-new-client:hover {
  background: linear-gradient(135deg, #0ea5e9, #1d4ed8) !important;
  border-color: #1e40af !important;
}

.top-new-engagement {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
  border: 1px solid #5b21b6 !important;
  box-shadow: 0 10px 22px rgba(109, 40, 217, .24);
}

.top-new-engagement:hover {
  background: linear-gradient(135deg, #7c3aed, #581c87) !important;
  border-color: #4c1d95 !important;
}

.quick-add > .compact-top {
  background: linear-gradient(135deg, #22c55e, #15803d) !important;
  border-color: #15803d !important;
  box-shadow: 0 10px 22px rgba(21, 128, 61, .22);
}

.quick-add > .compact-top:hover {
  background: linear-gradient(135deg, #16a34a, #166534) !important;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr !important;
    align-items: stretch;
  }
  .topbar-actions {
    justify-content: flex-start !important;
  }
}

@media (max-width: 640px) {
  .top-new-quote,
  .top-new-client {
    flex: 1 1 150px;
  }
}

.topbar {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  overflow: visible !important;
  height: auto !important;
  gap: 10px 14px !important;
}

.topbar-left {
  flex: 1 1 220px;
}

.topbar-actions {
  flex: 1 1 560px;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  overflow: visible !important;
}

.topbar-actions button,
.topbar-actions .compact-top,
.topbar-actions .notify-btn {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .topbar-actions {
    flex-basis: 100%;
    justify-content: flex-start !important;
  }
}

@media (max-width: 560px) {
  .topbar-actions button,
  .topbar-actions .compact-top,
  .topbar-actions .notify-btn {
    flex: 1 1 148px;
  }
}

.topbar-actions #top-new-quote,
.topbar-actions #top-new-quote:visited,
.topbar-actions #top-new-quote:focus,
.topbar-actions #top-new-quote:focus-visible {
  background: linear-gradient(135deg, #eb1946, #be123c) !important;
  border: 1px solid #9f1239 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(235, 25, 70, .28) !important;
}

.topbar-actions #top-new-quote:hover,
.topbar-actions #top-new-quote:active {
  background: linear-gradient(135deg, #fb3f68, #9f1239) !important;
  border-color: #881337 !important;
  color: #ffffff !important;
}

.topbar-actions #top-new-engagement,
.topbar-actions #top-new-engagement:visited,
.topbar-actions #top-new-engagement:focus,
.topbar-actions #top-new-engagement:focus-visible {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
  border: 1px solid #5b21b6 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(109, 40, 217, .24) !important;
}

.topbar-actions #top-new-engagement:hover,
.topbar-actions #top-new-engagement:active {
  background: linear-gradient(135deg, #7c3aed, #581c87) !important;
  border-color: #4c1d95 !important;
  color: #ffffff !important;
}

.topbar-actions #notification-toggle,
.topbar-actions #notification-toggle:visited,
.topbar-actions #notification-toggle:focus,
.topbar-actions #notification-toggle:focus-visible {
  background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
  border: 1px solid #c2410c !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(234, 88, 12, .24) !important;
}

.topbar-actions #notification-toggle:hover,
.topbar-actions #notification-toggle:active {
  background: linear-gradient(135deg, #fb923c, #c2410c) !important;
  border-color: #9a3412 !important;
  color: #ffffff !important;
}

.topbar-actions #notification-toggle span {
  background: #ffffff !important;
  color: #ea580c !important;
}

.discard-confirm {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: rgba(23, 26, 33, .42);
}

.discard-card {
  width: min(420px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(23, 26, 33, .22);
  padding: 18px;
}

.discard-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #171a21;
}

.discard-card p {
  margin: 0 0 16px;
  color: #475467;
  font-size: 14px;
}

/* Global scroll safety: keep every page, table, and modal reachable. */
html,
body,
#app {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

body.modal-open {
  overflow: hidden;
}

.shell {
  min-height: 100dvh;
  align-items: start;
}

.main {
  min-width: 0;
  min-height: 100dvh;
  overflow: visible;
}

.content {
  min-width: 0;
  overflow: visible;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.sidebar {
  max-height: 100dvh;
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.side-user {
  position: sticky;
  bottom: 0;
  background: var(--sidebar);
  z-index: 2;
}

.table-wrap,
.sticky-engagement-wrap,
.audit-freeze-wrap,
.other-freeze-wrap,
.client-master-freeze-wrap,
.workflow-freeze-wrap,
.pending-freeze-wrap {
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  max-width: 100%;
  max-height: min(72dvh, calc(100dvh - 180px)) !important;
  min-height: 0;
}

.sticky-engagement-wrap,
.audit-freeze-wrap,
.other-freeze-wrap,
.client-master-freeze-wrap,
.workflow-freeze-wrap,
.pending-freeze-wrap {
  height: min(72dvh, calc(100dvh - 180px)) !important;
}

.pro-table,
.sticky-engagement-table {
  max-width: none;
}

.pro-table thead th,
.sticky-engagement-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 8 !important;
}

.pro-table th:first-child,
.pro-table td:first-child,
.pro-table th:nth-child(2),
.pro-table td:nth-child(2),
.pro-table th:last-child,
.pro-table td:last-child,
.sticky-engagement-table th:first-child,
.sticky-engagement-table td:first-child,
.sticky-engagement-table th:nth-child(2),
.sticky-engagement-table td:nth-child(2),
.sticky-engagement-table th:last-child,
.sticky-engagement-table td:last-child {
  position: static !important;
  left: auto !important;
  right: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

.modal {
  align-items: start;
  place-items: start center;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: clamp(10px, 3vh, 28px) 14px;
  -webkit-overflow-scrolling: touch;
}

.modal-card {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.compact-modal-card {
  max-height: calc(100dvh - 28px) !important;
}

.modal-card .table-wrap {
  max-height: min(58dvh, 520px) !important;
}

.modal-actions,
.billing-modal-actions,
.user-form-header {
  position: sticky;
  z-index: 20;
  background: #fff;
}

.modal-actions,
.billing-modal-actions {
  bottom: 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.user-form-header {
  top: 0;
}

select,
input[type="date"] {
  touch-action: manipulation;
}

@media (max-width: 900px) {
  .shell,
  .shell.sidebar-collapsed {
    min-height: 100dvh;
  }

  .sidebar {
    max-height: 100dvh;
  }

  .topbar {
    max-height: none;
  }

  .table-wrap,
  .sticky-engagement-wrap,
  .audit-freeze-wrap,
  .other-freeze-wrap,
  .client-master-freeze-wrap,
  .workflow-freeze-wrap,
  .pending-freeze-wrap {
    height: min(68dvh, calc(100dvh - 160px)) !important;
    max-height: min(68dvh, calc(100dvh - 160px)) !important;
  }

  .modal {
    padding: 8px;
  }

  .modal-card {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

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

  .user-form-header-actions,
  .user-modal-actions {
    width: 100%;
  }

  .user-form-header-actions button,
  .user-modal-actions button {
    flex: 1 1 140px;
  }
}

/* User Management modal: keep Save visible while scrolling long permission forms. */
.modal-card:has(.user-form) {
  padding: 0 !important;
  max-height: calc(100dvh - 28px) !important;
  overflow: hidden !important;
}

.user-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 18px 0;
  scrollbar-gutter: stable;
}

.user-form-body,
.user-form .permission-box {
  flex: 0 0 auto;
}

.user-form .permission-box {
  margin-bottom: 88px;
}

.user-form-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  margin: -16px -18px 12px;
  padding: 14px 18px 12px !important;
  background: #fff !important;
  box-shadow: 0 1px 0 var(--line), 0 10px 18px rgba(15, 23, 42, .06);
}

.user-modal-actions {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 60 !important;
  margin: 12px -18px 0;
  padding: 12px 18px max(14px, env(safe-area-inset-bottom)) !important;
  background: #fff !important;
  box-shadow: 0 -1px 0 var(--line), 0 -12px 20px rgba(15, 23, 42, .08);
}

.user-save-visible,
.user-modal-actions #save-user,
.user-form-header #save-user-top {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 40px;
  background: var(--fineasy-pink, #eb1946) !important;
  border: 1px solid var(--fineasy-pink, #eb1946) !important;
  color: #fff !important;
  font-weight: 800;
  opacity: 1 !important;
  visibility: visible !important;
}

.user-modal-actions #save-user.form-invalid,
.user-form-header #save-user-top.form-invalid {
  background: #9aa4b2 !important;
  border-color: #9aa4b2 !important;
  color: #fff !important;
  cursor: pointer;
  opacity: 1 !important;
}

.reset-password-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.reset-password-actions button {
  flex: 0 1 auto;
  min-width: 118px;
}
.reset-password-actions .reset-save-visible {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 118px !important;
  background: #175cd3 !important;
  border-color: #175cd3 !important;
  color: #ffffff !important;
  font-weight: 800;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Keep the left navigation fixed while pages, tables, and forms scroll. */
@media (min-width: 981px) {
  .shell,
  .shell.sidebar-collapsed {
    display: block !important;
    min-height: 100dvh;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    z-index: 30 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .main {
    margin-left: 260px !important;
    width: calc(100% - 260px) !important;
    min-height: 100dvh;
  }

  .shell.sidebar-collapsed .sidebar {
    width: 76px !important;
  }

  .shell.sidebar-collapsed .main {
    margin-left: 76px !important;
    width: calc(100% - 76px) !important;
  }
}

@media (max-width: 980px) {
  .main {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* Engagement tables: keep the header fixed, but do not freeze horizontal columns.
   This keeps headings and values aligned across Audit, Other, Pending, Fee, and Completed views. */
.sticky-engagement-wrap .freeze-header-clone {
  display: none !important;
}
.sticky-engagement-table > thead.native-freeze-head {
  display: table-header-group !important;
}
.sticky-engagement-table th:first-child,
.sticky-engagement-table th:nth-child(2),
.sticky-engagement-table th:last-child,
.pro-table.sticky-engagement-table th:last-child {
  left: auto !important;
  right: auto !important;
}
.sticky-engagement-table td:first-child,
.sticky-engagement-table td:nth-child(2),
.sticky-engagement-table td:last-child,
.pro-table.sticky-engagement-table td:last-child {
  position: static !important;
  left: auto !important;
  right: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}
.sticky-engagement-table th:last-child,
.pro-table.sticky-engagement-table th:last-child {
  z-index: 20 !important;
}

/* Main dashboard: one consistent card system for Quotation, Audit, and Other Engagement sections. */
.dashboard-home {
  gap: 16px !important;
}
.dashboard-home > h2 {
  margin: 8px 0 0;
  font-size: 19px;
  font-weight: 700;
}
.dashboard-home .dashboard-cards,
.dashboard-home .audit-tabs,
.dashboard-home .other-tabs {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 10px !important;
  overflow: visible !important;
  width: 100%;
  margin-bottom: 4px;
}
.dashboard-home .q-tabs button,
.dashboard-home .audit-tabs button,
.dashboard-home .other-tabs button {
  width: auto !important;
  min-width: 0 !important;
  height: 84px !important;
  min-height: 84px !important;
  padding: 10px 12px !important;
  display: grid !important;
  align-content: space-between !important;
  gap: 6px !important;
  border-radius: 10px !important;
  border: 1px solid #D0D5DD !important;
  border-left: 4px solid #CBD5E1 !important;
  background: #FFFFFF !important;
  color: #171A21 !important;
  box-shadow: 0 1px 2px rgba(17,19,24,.04) !important;
  text-align: left !important;
}
.dashboard-home .q-tabs button span,
.dashboard-home .audit-tabs button span,
.dashboard-home .other-tabs button span {
  display: block !important;
  min-height: 28px;
  color: #667085 !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  font-weight: 650 !important;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-home .q-tabs button strong,
.dashboard-home .audit-tabs button strong,
.dashboard-home .other-tabs button strong {
  justify-self: start !important;
  min-width: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #101828 !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}
.dashboard-home .q-tabs button:hover,
.dashboard-home .audit-tabs button:hover,
.dashboard-home .other-tabs button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17,19,24,.08) !important;
}
.dashboard-home .q-tabs button:nth-child(1),
.dashboard-home .audit-tabs button:nth-child(1),
.dashboard-home .other-tabs button:nth-child(1) { border-left-color: #EB1946 !important; }
.dashboard-home .q-tabs button:nth-child(2),
.dashboard-home .audit-tabs button:nth-child(2),
.dashboard-home .other-tabs button:nth-child(2) { border-left-color: #64748B !important; }
.dashboard-home .q-tabs button:nth-child(3),
.dashboard-home .audit-tabs button:nth-child(3),
.dashboard-home .other-tabs button:nth-child(3) { border-left-color: #2563EB !important; }
.dashboard-home .q-tabs button:nth-child(4),
.dashboard-home .audit-tabs button:nth-child(4),
.dashboard-home .other-tabs button:nth-child(4) { border-left-color: #F59E0B !important; }
.dashboard-home .q-tabs button:nth-child(5),
.dashboard-home .audit-tabs button:nth-child(5),
.dashboard-home .other-tabs button:nth-child(5) { border-left-color: #7C3AED !important; }
.dashboard-home .q-tabs button:nth-child(6),
.dashboard-home .audit-tabs button:nth-child(6),
.dashboard-home .other-tabs button:nth-child(6) { border-left-color: #DC2626 !important; }
.dashboard-home .q-tabs button:nth-child(7),
.dashboard-home .audit-tabs button:nth-child(7),
.dashboard-home .other-tabs button:nth-child(7) { border-left-color: #16A34A !important; }
@media (max-width: 760px) {
  .dashboard-home .dashboard-cards,
  .dashboard-home .audit-tabs,
  .dashboard-home .other-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Uniform dashboard cards across main and module pages. */
.dashboard-cards,
.audit-tabs,
.other-tabs,
.module-dashboard-cards,
.task-dashboard,
.perf-tabs {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
  overflow: visible !important;
  width: 100% !important;
}

.dashboard-cards button,
.audit-tabs button,
.other-tabs button,
.module-dashboard-cards button,
.task-dashboard button,
.perf-tabs button {
  width: auto !important;
  min-width: 0 !important;
  height: 84px !important;
  min-height: 84px !important;
  padding: 10px 12px !important;
  display: grid !important;
  align-content: space-between !important;
  gap: 6px !important;
  border-radius: 10px !important;
  text-align: left !important;
}

.dashboard-cards button span,
.audit-tabs button span,
.other-tabs button span,
.module-dashboard-cards button span,
.task-dashboard button span,
.perf-tabs button span {
  display: block !important;
  min-height: 28px !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.15 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.dashboard-cards button strong,
.audit-tabs button strong,
.other-tabs button strong,
.module-dashboard-cards button strong,
.task-dashboard button strong,
.perf-tabs button strong {
  justify-self: start !important;
  min-width: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

@media (max-width: 760px) {
  .dashboard-cards,
  .audit-tabs,
  .other-tabs,
  .module-dashboard-cards,
  .task-dashboard,
  .perf-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.module-dashboard-cards {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
}

.module-dashboard-cards button {
  box-sizing: border-box !important;
  height: 84px !important;
  min-height: 84px !important;
  max-height: 84px !important;
}
