.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions .ghost {
  padding: 7px 9px;
}

.period-actions {
  min-width: 165px;
  white-space: nowrap;
}

.period-actions .danger {
  padding: 7px 9px;
}

.filing-actions {
  min-width: 205px;
  white-space: nowrap;
}

.security-note {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #dce6ea;
  border-radius: 10px;
  background: #f6fafb;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.password-toggle {
  justify-self: start;
  padding: 0;
  margin-top: 2px;
}

.mobile-menu-close,
.mobile-menu-overlay {
  display: none;
}

/* Permission-filtered sidebar accordion. */
.sidebar nav {
  min-height: 0;
  padding: 10px 12px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(189, 208, 216, 0.34) transparent;
  scrollbar-gutter: stable;
}

.sidebar nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar nav::-webkit-scrollbar-thumb {
  background: rgba(189, 208, 216, 0.34);
  border-radius: 999px;
}

.nav-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 0;
}

.nav-heading {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: #e9f0f3;
  color: #20313a;
  font-size: 10px;
  letter-spacing: 1.15px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.nav-heading:hover { background: #f4f8fa; color: #101c22; }
.nav-section.expanded .nav-heading { background: #dff5ef; color: #075f53; box-shadow: inset 3px 0 #00a88f; }
.nav-heading-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(16,56,75,.09); font-size: 10px; letter-spacing: 0; }
.nav-heading-label { min-width: 0; overflow-wrap: anywhere; }
.nav-chevron { justify-self: end; font-size: 20px; font-weight: 500; line-height: 1; transform: rotate(0); transition: transform .16s ease; }
.nav-section.expanded .nav-chevron { transform: rotate(90deg); }
.sidebar .nav-heading:focus-visible { outline: 3px solid #63d7c6; outline-offset: 2px; }

.nav-children {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .18s ease, opacity .14s ease;
}
.nav-section.expanded .nav-children { grid-template-rows: 1fr; opacity: 1; }
.nav-children-inner { min-height: 0; overflow: hidden; padding: 0; }
.nav-section.expanded .nav-children-inner { padding: 4px 0 2px; }
.nav-children .nav-item { min-height: 36px; margin: 1px 0; padding: 8px 10px 8px 18px; }

.nav-item-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sidebar .nav-item:focus-visible {
  outline: 2px solid #63d7c6;
  outline-offset: -2px;
}

@media (max-width: 850px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body.mobile-menu-open { overflow: hidden; overscroll-behavior: none; touch-action: none; }
  body.mobile-menu-open .main { overflow: hidden; }
  .menu-btn { width: 44px; height: 44px; }
  body.mobile-menu-open #menuBtn {
    position: fixed;
    z-index: 82;
    top: max(12px, env(safe-area-inset-top));
    left: min(calc(86vw + 4px), 364px);
    background: #fff;
    box-shadow: 0 8px 22px rgba(5,35,49,.22);
  }
  .sidebar {
    width: min(86vw, 360px);
    z-index: 81;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    touch-action: pan-y;
    will-change: transform;
  }
  .sidebar .brand { padding-right: 68px; }
  .mobile-menu-close {
    position: absolute;
    z-index: 83;
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.26);
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-menu-close:focus-visible { outline: 3px solid #63d7c6; outline-offset: 2px; }
  .mobile-menu-close-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(7, 20, 28, .52);
    backdrop-filter: blur(1px);
    touch-action: none;
  }
  .mobile-menu-overlay[hidden] { display: none; }
  .nav-heading { min-height: 48px; padding-block: 9px; }
  .nav-children .nav-item { min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-heading, .nav-chevron, .nav-children { transition: none; }
}

.team-member-nav {
  padding-top: 5px;
}

/* Existing top-bar identity control with the single secure logout action. */
.user-menu {
  position: relative;
  flex: 0 0 auto;
}

.user-chip {
  font: inherit;
  text-align: left;
}

.user-chip:focus-visible {
  outline: 3px solid rgba(0, 168, 143, 0.22);
  outline-offset: 2px;
}

.user-menu-chevron {
  margin-left: auto;
  color: #64748b;
  font-size: 15px;
  transition: transform 0.16s ease;
}

.user-chip[aria-expanded="true"] .user-menu-chevron {
  transform: rotate(180deg);
}

.user-profile-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 35, 46, 0.18);
}

.user-profile-menu[hidden] {
  display: none;
}

.user-profile-summary {
  display: grid;
  gap: 2px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
}

.user-profile-summary b {
  color: var(--ink);
  font-size: 12px;
}

.user-profile-summary small {
  color: var(--muted);
  font-size: 10px;
}

.user-profile-menu > button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.user-profile-menu > button:hover,
.user-profile-menu > button:focus-visible {
  background: #fff0f1;
  color: #b53138;
  outline: 0;
}

.workspace-switches { display: grid; gap: 4px; padding: 9px 2px 6px; border-bottom: 1px solid var(--line); }
.workspace-switches[hidden], .workspace-switches a[hidden] { display: none; }
.workspace-switches > small { padding: 2px 8px 4px; color: #70838c; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.workspace-switches a { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 9px; color: var(--ink); font-size: 11px; font-weight: 800; text-decoration: none; }
.workspace-switches a span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #e7f6f2; color: #087b69; font-size: 8px; font-weight: 900; }
.workspace-switches a:hover, .workspace-switches a:focus-visible { background: #edf8f5; color: #087b69; outline: 0; }
.workspace-switches a[aria-current="page"] { background: #f3f6f7; color: #26363e; }

@media (max-width: 720px) {
  .user-menu-chevron {
    display: none;
  }

  .user-profile-menu {
    width: 205px;
  }
}

/* Filing Comparisons — shared Fineasy dashboard, filter and table language. */
.fc-control-panel,.fc-dashboard,.fc-table-card{margin-top:16px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(18,45,58,.06)}
.fc-control-panel{padding:16px}.fc-primary-filters{display:grid;grid-template-columns:1fr 120px 1.2fr auto 1.2fr 1fr;gap:10px;align-items:end}.fc-primary-filters .field{min-width:0}.fc-primary-filters select,.fc-filter-grid input,.fc-filter-grid select{width:100%}.fc-swap{display:grid;place-items:center;gap:2px;height:48px;min-width:78px;border:1px solid #b9d9d2;border-radius:11px;background:#eefaf7;color:#007d69;font-size:18px;font-weight:900}.fc-swap span{font-size:8px}.fc-more{margin-top:12px;border-top:1px dashed #d9e3e6;padding-top:10px}.fc-more summary,.fc-columns summary{cursor:pointer;color:#008f79;font-weight:800}.fc-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}.fc-control-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:13px}.fc-columns{position:relative}.fc-columns>div{position:absolute;z-index:15;top:28px;left:0;display:grid;grid-template-columns:repeat(2,150px);gap:7px;padding:12px;border:1px solid var(--line);border-radius:11px;background:#fff;box-shadow:0 16px 35px rgba(18,42,52,.15)}.fc-columns:not([open])>div{display:none}.fc-columns label{font-size:10px;font-weight:700}.fc-validation{padding:9px;background:#fff0f0;color:#a9252f;font-weight:800}.fc-summary-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:16px}.fc-summary-card{position:relative;display:grid;gap:6px;min-height:103px;padding:15px;text-align:left;border:1px solid color-mix(in srgb,var(--tone,#2c72e8) 30%,#dbe4e8);border-radius:14px;background:linear-gradient(145deg,#fff,color-mix(in srgb,var(--tone,#2c72e8) 8%,#fff));box-shadow:0 7px 18px rgba(20,45,58,.06);overflow:hidden}.fc-summary-card::after{content:"";position:absolute;inset:auto 0 0;height:4px;background:var(--tone,#2c72e8)}.fc-summary-card:hover,.fc-summary-card.active{transform:translateY(-2px);border-color:var(--tone,#2c72e8)}.fc-summary-card small{color:#405761;font-size:10px;font-weight:800}.fc-summary-card b{color:#101820;font:800 25px Manrope}.fc-summary-card span{color:var(--tone,#2c72e8);font-size:9px;font-weight:800}.tone-0{--tone:#2d6cdf}.tone-1{--tone:#7b4ce2}.tone-2{--tone:#008c78}.tone-3{--tone:#00a6be}.tone-4{--tone:#de7a00}.tone-5{--tone:#d93b47}.fc-dashboard{padding:18px}.fc-dashboard h2{margin:2px 0}.fc-dashboard-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:14px}.fc-dashboard-grid article{display:grid;gap:5px;padding:13px;border:1px solid #dce6e9;border-radius:12px;background:#f8fafb}.fc-dashboard-grid small{color:#617680;font-size:9px;font-weight:800;text-transform:uppercase}.fc-dashboard-grid b{font:800 17px Manrope}.fc-dashboard-grid span{color:#617680;font-size:9px}.fc-chart-wrap{height:270px;margin-top:17px}.fc-table-card{overflow:visible}.fc-table-card>.table-scroll{max-height:58vh;border-radius:16px 16px 0 0}.fc-table{width:100%;min-width:1350px;border-collapse:separate;border-spacing:0}.fc-table th{position:sticky;z-index:3;top:0;padding:11px 10px;background:#f0f3f4;color:#111719;font-size:9px;text-transform:uppercase;letter-spacing:.03em}.fc-table td{padding:10px;border-top:1px solid #e1e7ea;font-size:10px;vertical-align:middle}.fc-table tbody tr:nth-child(even){background:#fafcfc}.fc-table td small{display:block;color:#627680;margin-top:4px}.fc-table .number-cell{text-align:right;font-variant-numeric:tabular-nums}.fc-table .good{color:#00836d}.fc-table .bad{color:#bd2935}.fc-badge{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eef2f4;color:#52656f;font-size:8px;font-weight:900;white-space:nowrap}.fc-high,.fc-significant-increase,.fc-potential-anomaly,.fc-missing-in-comparison,.fc-filing-not-completed{background:#fee7e9;color:#ad2230}.fc-moderate,.fc-moderate-increase,.fc-moderate-decrease,.fc-changed-to-nil-return,.fc-changed-from-nil-return{background:#fff1d5;color:#925800}.fc-new-client,.fc-information,.fc-filing-status-changed{background:#e5edff;color:#3159b8}.fc-low,.fc-no-material-change,.fc-significant-decrease{background:#e1f5ee;color:#08765f}.fc-pagination{display:flex;justify-content:space-between;align-items:center;padding:12px 15px;border-top:1px solid var(--line)}.fc-preview-summary{display:grid;grid-template-columns:repeat(8,1fr);gap:8px;margin:12px 0}.fc-preview-summary>div{padding:10px;border:1px solid var(--line);border-radius:10px;background:#f7fafb}.fc-preview-summary small{display:block;min-height:25px;color:#607681;font-size:8px;font-weight:800;text-transform:uppercase}.fc-preview-summary b{font:800 18px Manrope}.fc-preview-table{max-height:48vh}.fc-client-view{display:grid;gap:16px}.fc-client-view section{padding-top:14px;border-top:1px solid var(--line)}.fc-client-chart{height:280px}.fc-review-history{display:grid;gap:4px;padding:11px;border:1px solid var(--line);border-radius:10px;margin-top:8px}.fc-review-history span{color:var(--muted);font-size:9px}.fc-review-history p{margin:3px 0}

/* Scanning KPI cards use the same compact, single-row dashboard rhythm on desktop. */
.scanning-cards{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.scanning-card{min-width:0;min-height:108px;padding:14px}.scanning-card small{min-height:30px;font-size:9.5px}.scanning-card strong{font-size:29px}.scanning-card span{display:block;margin-top:7px;color:#52656f;font-size:10px;font-weight:800}
@media(max-width:1280px){.fc-primary-filters{grid-template-columns:repeat(3,1fr)}.fc-filter-grid{grid-template-columns:repeat(3,1fr)}.fc-summary-grid{grid-template-columns:repeat(3,1fr)}.fc-dashboard-grid{grid-template-columns:repeat(3,1fr)}.scanning-cards{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.fc-primary-filters,.fc-filter-grid,.fc-summary-grid,.fc-dashboard-grid,.fc-preview-summary{grid-template-columns:1fr}.fc-swap{width:100%}.fc-pagination{align-items:stretch;flex-direction:column;gap:9px}.fc-columns>div{position:static;grid-template-columns:1fr 1fr}.scanning-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Action columns size to their contents instead of reserving table space. */
.data-table .column-actions,
.data-table .column-action {
  width: 1%;
  min-width: max-content;
  max-width: none;
  white-space: nowrap;
}

.period-actions,
.filing-actions {
  min-width: 0;
  width: max-content;
}

.row-actions {
  width: max-content;
  flex-wrap: nowrap;
}

.backup-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  overflow: hidden;
  margin-bottom: 18px;
}

.backup-restore-note {
  margin: 0 0 18px;
}

/* Registration Index */
.ri-summary-grid{display:grid;grid-template-columns:repeat(8,minmax(138px,1fr));gap:12px;margin:18px 0}.ri-summary-card{position:relative;min-height:112px;padding:16px;border:1px solid color-mix(in srgb,var(--ri-tone) 32%,#dce4e8);border-bottom:4px solid var(--ri-tone);border-radius:16px;background:linear-gradient(145deg,#fff,color-mix(in srgb,var(--ri-tone) 5%,#fff));text-align:left;box-shadow:0 8px 24px rgba(15,23,42,.05);cursor:pointer}.ri-summary-card small{display:block;color:#52606b;font-size:11px;font-weight:800;letter-spacing:.04em}.ri-summary-card b{display:block;margin-top:14px;color:#0d1b2a;font:800 28px/1 Manrope,sans-serif}.ri-summary-card.active{box-shadow:0 0 0 3px color-mix(in srgb,var(--ri-tone) 22%,transparent)}
.ri-filter-panel{margin-bottom:16px;padding:18px;border:1px solid #dbe3e7;border-radius:16px;background:#fff}.ri-filter-panel .panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.ri-filter-panel .panel-head h2{margin:0;color:#111827;font-size:17px}.ri-filter-panel .panel-head span{color:#64748b;font-size:13px}.ri-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:12px;margin-top:14px}.ri-filter-grid label,.ri-form-grid label,.ri-credentials label{display:grid;gap:6px;color:#405568;font-size:11px;font-weight:800;letter-spacing:.02em}.ri-filter-grid input,.ri-filter-grid select,.ri-form-grid input,.ri-form-grid select,.ri-form-grid textarea,.ri-credentials input{min-width:0;width:100%;border:1px solid #cedbe2;border-radius:10px;background:#fff;padding:11px 12px;color:#111827;font:500 14px DM Sans,sans-serif}.ri-filter-actions{justify-content:flex-start;margin-top:12px}.fc-columns{position:relative}.fc-columns summary{padding:8px 12px;border:1px solid #d4dfe4;border-radius:9px;cursor:pointer;font-weight:700;list-style:none}.fc-columns>div{position:absolute;right:0;z-index:30;width:240px;max-height:360px;overflow:auto;padding:12px;border:1px solid #d4dfe4;border-radius:12px;background:#fff;box-shadow:0 18px 45px rgba(15,23,42,.2)}.fc-columns label{display:flex;gap:8px;padding:6px;font-size:12px}.fc-columns input{width:auto}
.ri-table-card{overflow:visible}.ri-table-wrap{max-height:58vh;overflow:auto}.ri-table{min-width:1280px}.ri-table th{position:sticky;top:0;z-index:3;white-space:nowrap}.ri-table td{max-width:250px;vertical-align:middle}.ri-table .ri-sn{width:44px;min-width:44px;max-width:44px;padding-left:8px;padding-right:8px;text-align:center}.ri-client-cell{display:grid;gap:3px;min-width:220px}.ri-client-cell b{color:#111827}.ri-client-cell small{color:#718096}.ri-password-mask{font-family:ui-monospace,monospace;letter-spacing:.16em}.ri-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-top:1px solid #e2e8ed}.ri-pagination>div{display:flex;align-items:center;gap:8px}.ri-pagination select{padding:8px;border:1px solid #d5e0e5;border-radius:8px}.ri-actions{position:relative}.ri-actions summary{display:grid;place-items:center;width:36px;height:34px;border:1px solid #d4dfe4;border-radius:9px;cursor:pointer;font-size:20px;list-style:none}.ri-actions>div{position:fixed;right:26px;z-index:200;display:grid;min-width:210px;padding:7px;border:1px solid #d8e1e6;border-radius:12px;background:#fff;box-shadow:0 20px 50px rgba(15,23,42,.24)}.ri-actions button{padding:9px 11px;border:0;border-radius:7px;background:#fff;text-align:left;font-weight:650}.ri-actions button:hover{background:#f2f7f8}.ri-actions button.danger{color:#b4232d}
.ri-modal-open .modal-card{overflow:hidden}.ri-form-modal{width:min(1060px,96vw);max-height:94vh}.ri-form-modal #modalBody{max-height:90vh;overflow:auto}.ri-modal-title{padding-bottom:12px}.ri-modal-title h2{margin:2px 0}.ri-form-section{margin-bottom:14px;padding:16px;border:1px solid #dce5e9;border-radius:14px;background:#fff}.ri-form-section h3{margin:0 0 14px;color:#111827;font-size:15px}.ri-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.ri-form-grid .full{grid-column:1/-1}.ri-form-grid textarea{min-height:88px;resize:vertical}.ri-password-input{display:grid;grid-template-columns:1fr auto}.ri-password-input input{border-radius:10px 0 0 10px}.ri-password-input button{border:1px solid #cedbe2;border-left:0;border-radius:0 10px 10px 0;background:#f4f7f8;padding:0 12px;font-weight:700}.ri-sticky-actions{position:sticky;bottom:0;z-index:5;margin:0 -1px;padding:13px 4px;background:rgba(255,255,255,.96);border-top:1px solid #dce5e9}.ri-duplicate-result{display:grid;gap:4px;padding:12px;border:1px solid #f5b8bd;border-radius:10px;background:#fff4f5;color:#8f1d28}.ri-duplicate-result[hidden]{display:none}.ri-credentials{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.ri-import-summary{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:14px 0}.ri-import-summary div{padding:11px;border:1px solid #dce5e9;border-radius:10px;background:#f8fafb}.ri-import-summary small,.ri-import-summary b{display:block}.ri-import-summary b{font-size:19px}.ri-import-table{max-height:48vh;margin-top:12px}.picker-results{display:grid;gap:8px;margin-top:14px;max-height:48vh;overflow:auto}.picker-results button{display:grid;gap:4px;padding:12px;border:1px solid #dce5e9;border-radius:10px;background:#fff;text-align:left}.picker-results button:hover{border-color:#00a68c;background:#f2fbf9}
@media(max-width:1300px){.ri-summary-grid{grid-template-columns:repeat(4,1fr)}.ri-filter-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.ri-summary-grid{grid-template-columns:repeat(2,1fr)}.ri-filter-grid,.ri-form-grid,.ri-credentials{grid-template-columns:1fr}.ri-form-grid .full{grid-column:auto}.ri-import-summary{grid-template-columns:repeat(2,1fr)}.ri-filter-panel .panel-head,.ri-pagination{align-items:stretch;flex-direction:column}.ri-actions>div{right:12px;left:12px;min-width:0}.ri-summary-card{min-height:96px}.ri-table-wrap{max-height:62vh}}

/* Add New Index: compact, modern two-row client identification. */
.ri-modern-form .ri-client-picker{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px;color:#405568;font-size:11px;font-weight:800}.ri-index-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:13px}.ri-index-row label,.ri-index-remarks{display:grid;gap:6px;color:#405568;font-size:11px;font-weight:800;letter-spacing:.02em}.ri-index-row input,.ri-index-row select,.ri-index-remarks textarea{min-width:0;width:100%;border:1px solid #cedbe2;border-radius:10px;background:#fff;padding:11px 12px;color:#111827;font:500 14px DM Sans,sans-serif}.ri-index-row-primary{grid-template-columns:minmax(220px,1.45fr) repeat(3,minmax(135px,1fr))}.ri-modern-form .ri-duplicate-result{margin-top:2px}.ri-index-remarks{width:min(430px,100%);margin:0 0 14px;padding:0 2px}.ri-index-remarks textarea{min-height:68px;resize:vertical}
@media(max-width:900px){.ri-index-row,.ri-index-row-primary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.ri-index-row,.ri-index-row-primary{grid-template-columns:1fr}.ri-modern-form .ri-client-picker{align-items:stretch;flex-direction:column}.ri-index-remarks{width:100%}}

.backup-summary > div {
  display: grid;
  gap: 5px;
  padding: 18px;
}

.backup-summary small,
.backup-summary span {
  color: var(--muted);
  font-size: 11px;
}

.backup-register .data-table {
  width: 100%;
  table-layout: fixed;
}

.backup-register .data-table th,
.backup-register .data-table td {
  min-width: 0;
  overflow-wrap: anywhere;
}

.backup-register .column-backup { width: 26%; }
.backup-register .column-type { width: 8%; }
.backup-register .column-status { width: 10%; }
.backup-register .column-created { width: 15%; }
.backup-register .column-rows,
.backup-register .column-files,
.backup-register .column-size { width: 7%; text-align: center; }
.backup-register .column-actions { width: 7%; min-width: 64px; text-align: center; }
.backup-register .action-menu { display: inline-block; text-align: left; }
.backup-register .action-menu a {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.backup-register .action-menu a:hover { background: #f4f6f7; }
.backup-summary{overflow:hidden;border:1px solid #c7dde3;border-top:4px solid #078f83;border-radius:15px;background:linear-gradient(125deg,#fff,#eefaf8);box-shadow:0 10px 26px rgba(20,45,58,.07)}.backup-summary>div{position:relative;min-height:104px;background:rgba(255,255,255,.72)}.backup-summary>div:after{content:"";position:absolute;right:18px;top:18px;width:34px;height:34px;border-radius:10px;background:#e3f6f2;box-shadow:inset 0 0 0 1px #bfe6df}.backup-summary b{color:#112334;font:800 18px Manrope,sans-serif}.backup-summary small{color:#078576;font-weight:900;letter-spacing:.65px;text-transform:uppercase}.backup-restore-note{border-color:#cbdce4;border-left:4px solid #173d67;border-radius:12px;background:#f7fafc;box-shadow:0 6px 18px rgba(20,45,58,.04)}.backup-register{overflow:hidden;border:1px solid #cbdce4;border-top:3px solid #173d67;border-radius:14px;box-shadow:0 8px 24px rgba(20,45,58,.06)}.backup-register .data-table thead th{background:#123957;color:#fff}.backup-register .data-table tbody tr:nth-child(even){background:#f8fbfc}.backup-register .data-table tbody tr:hover{background:#eef8f6}.backup-register .column-backup{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px}

@media (max-width: 900px) {
  .backup-register .data-table { width: max-content; table-layout: auto; }
  .backup-register .data-table th,
  .backup-register .data-table td { min-width: 92px; }
}

@media (max-width: 650px) {
  .backup-summary {
    grid-template-columns: 1fr;
  }
}

/* Proposals & Contracts */
.pc-page { display: grid; gap: 18px; width: 100%; min-width: 0; }
.pc-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; gap: 15px; }
.pc-dashboard-card { width: 100%; color: var(--ink); text-align: left; font: inherit; }
.pc-dashboard-card label { pointer-events: none; }
.pc-summary-card { position: relative; display: grid; gap: 5px; min-height: 96px; padding: 12px 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 8px 24px rgba(18, 31, 39, .05); }
.pc-summary-card::after { content: ""; position: absolute; inset: auto -24px -34px auto; width: 92px; height: 92px; border-radius: 50%; background: currentColor; opacity: .07; }
.pc-summary-card span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.pc-summary-card strong { font-size: 27px; line-height: 1; }
.pc-summary-card small { color: inherit; font-size: 11px; font-weight: 700; }
.pc-summary-card:hover, .pc-summary-card:focus-visible { border-color: currentColor; transform: translateY(-1px); }
.pc-summary-card.blue { color: #2161c2; background: #f5f8ff; }
.pc-summary-card.green { color: #087f68; background: #f2fcf9; }
.pc-summary-card.gold { color: #936711; background: #fffbef; }
.pc-summary-card.purple { color: #7137b8; background: #faf6ff; }
.pc-summary-card.red { color: #b53138; background: #fff6f6; }
.pc-summary-card.amber, .pc-summary-card.orange, .pc-summary-card.gold { color: #936711; background: #fffbef; }
.pc-summary-card.teal, .pc-summary-card.green { color: #087f68; background: #f2fcf9; }
.pc-summary-card.slate { color: #4f6170; background: #f4f7f8; }
.pc-register { width: 100%; min-width: 0; padding: 0; overflow: visible; }
.pc-tabs { display: flex; flex-wrap: nowrap !important; gap: 7px; padding: 10px 14px; overflow-x: auto; border-bottom: 1px solid #dce5ec; scrollbar-width: thin; }
.pc-tabs button { display: inline-flex; align-items: center; gap: 6px; min-width: max-content; min-height: 34px; padding: 7px 12px; border: 1px solid #cbd7e2; border-radius: 8px; background: #f4f7f9; color: #334c60; font-size: 12px; font-weight: 800; line-height: 1; }
.pc-tabs button span { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #e5ebf0; color: #52677a; font-size: 10px; }
.pc-tabs button:hover { border-color: #94b6d7; background: #edf5fb; }
.pc-tabs button:focus-visible, .pc-filter-panel button:focus-visible, .pc-more-filters summary:focus-visible { outline: 3px solid rgba(22, 133, 190, .24); outline-offset: 2px; }
.pc-tabs button.active { border-color: #4a91c8; background: #e7f4fb; color: #0c4d76; box-shadow: inset 0 0 0 1px rgba(74,145,200,.08); }
.pc-tabs button.active span { background: #cfe9f7; color: #0c5d8d; }
.pc-filter-panel { margin: 0; padding: 17px 18px 15px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 4px 12px rgba(18,31,39,.035); }
.pc-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.pc-filter-head > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pc-filter-head h2 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 800; }
.pc-filter-head small { padding: 4px 8px; border-radius: 999px; background: #eef3f5; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.pc-filter-head > span { color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.pc-filter-grid { display: grid; gap: 10px; align-items: end; }
.pc-primary-filter-grid { grid-template-columns: minmax(175px,1.3fr) minmax(84px,.58fr) minmax(88px,.62fr) minmax(128px,.9fr) minmax(86px,.58fr) minmax(108px,.72fr) minmax(108px,.72fr) auto; }
.pc-advanced-filter-grid { grid-template-columns: repeat(6,minmax(145px,1fr)); padding-top: 11px; }
.pc-filter-grid .field { min-width: 0; }
.pc-filter-grid .field label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .2px; line-height: 1.1; }
.pc-filter-grid input, .pc-filter-grid select { width: 100%; min-width: 0; min-height: 38px; height: 38px; padding-inline: 10px; border: 1px solid #cbd8e2; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; box-shadow: none; }
.pc-filter-grid input::placeholder { color: #7b8996; opacity: 1; }
.pc-filter-grid input:hover, .pc-filter-grid select:hover { border-color: #9eb6c9; }
.pc-filter-grid input:focus, .pc-filter-grid select:focus { outline: 0; border-color: #3486bc; box-shadow: 0 0 0 3px rgba(52,134,188,.14); }
.pc-filter-buttons { display: flex; align-items: center; gap: 8px; }
.pc-filter-actions { display: flex; align-items: end; justify-content: flex-start; gap: 8px; min-width: 0; white-space: nowrap; }
.pc-filter-buttons button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 88px; min-height: 38px; padding: 0 11px; border: 1px solid; border-radius: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 5px rgba(18,31,39,.05); }
.pc-filter-buttons svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pc-apply-filter { border-color: #087da7 !important; background: linear-gradient(145deg,#168caf,#087895) !important; color: #fff !important; }
.pc-apply-filter:hover { border-color: #056987 !important; background: linear-gradient(145deg,#0f7d9f,#066e8b) !important; }
.pc-clear-filter { border-color: #c3d0da !important; background: #edf2f5 !important; color: #29465c !important; }
.pc-clear-filter:hover { border-color: #aabcc9 !important; background: #e2e9ee !important; }
.pc-more-filters { margin-top: 11px; }
.pc-more-filters > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; list-style: none; cursor: pointer; border: 1px solid #c8d7e2; border-radius: 8px; background: #edf4f8; color: #31566f; font-size: 11px; font-weight: 800; user-select: none; }
.pc-more-filters > summary::-webkit-details-marker { display: none; }
.pc-more-filters > summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .16s ease; }
.pc-more-filters[open] > summary svg { transform: rotate(180deg); }
.pc-more-filters > summary:hover { border-color: #9db8ca; background: #e4eff5; }
.pc-more-filter-toggle{display:inline-flex;align-items:center;justify-content:center;align-self:end;gap:6px;min-height:38px;padding:0 11px;border:1px solid #c8d7e2;border-radius:8px;background:#edf4f8;color:#31566f;font-size:11px;font-weight:800;white-space:nowrap}.pc-more-filter-toggle svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;transition:transform .16s ease}.pc-more-filter-toggle[aria-expanded="true"] svg{transform:rotate(180deg)}.pc-more-filter-toggle:hover{border-color:#9db8ca;background:#e4eff5}.pc-advanced-filter-grid[hidden]{display:none!important}
.pc-table-scroll { width: 100%; min-width: 0; max-height: min(58vh, 620px); overflow: auto; }
.pc-table { width: 100%; min-width: 1380px; table-layout: fixed; }
.pc-table th:first-child, .pc-table td:first-child { width: 42px; min-width: 42px; text-align: center; }
.pc-table th:nth-child(2), .pc-table td:nth-child(2) { width: 175px; }
.pc-table th:nth-child(3), .pc-table td:nth-child(3) { width: 70px; }
.pc-table th:nth-child(4), .pc-table td:nth-child(4) { width: 250px; white-space: normal; }
.pc-table th:nth-child(5), .pc-table td:nth-child(5) { width: 85px; }
.pc-table th:nth-child(6), .pc-table td:nth-child(6) { width: 155px; white-space: normal; }
.pc-table th:nth-child(7), .pc-table td:nth-child(7) { width: 90px; }
.pc-table th:nth-child(8), .pc-table td:nth-child(8) { width: 78px; }
.pc-table th:nth-child(9), .pc-table td:nth-child(9) { width: 140px; }
.pc-table th:nth-child(10), .pc-table td:nth-child(10) { width: 140px; white-space: normal; }
.pc-table th:nth-child(11), .pc-table td:nth-child(11) { width: 95px; }
.pc-table th:last-child, .pc-table td:last-child { width: 55px; min-width: 55px; }
.pc-table td small { display: block; margin-top: 3px; color: var(--muted); }
.pc-table thead { position: sticky; top: 0; z-index: 2; }
.pc-table thead th { font-size: 11px; font-weight: 800; color: var(--ink); letter-spacing: .25px; }
.pc-template-form textarea { min-height: 96px; resize: vertical; }
.inline-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pc-action-menu > summary { width: 40px; min-width: 40px; font-size: 17px; letter-spacing: 2px; }
.pc-status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; background: #edf2f4; color: #4d626c; font-size: 10px; font-weight: 800; white-space: nowrap; }
.pc-status::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.pc-draft { background: #f0f2f4; color: #5e6870; }
.pc-issued, .pc-awaiting-signature { background: #eaf2ff; color: #285fb5; }
.pc-accepted, .pc-active, .pc-signed { background: #e3f8f1; color: #087d67; }
.pc-rejected, .pc-terminated, .pc-cancelled, .pc-expired { background: #feecee; color: #b53138; }
.pc-on-hold { background: #fff4d7; color: #936711; }
.pc-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pc-pagination div { display: flex; gap: 8px; }
.pc-form-shell { display: grid; gap: 14px; }
.pc-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.pc-form-head h2, .pc-view h2 { margin: 2px 0 4px; }
.pc-draft-chip { padding: 7px 11px; border-radius: 999px; background: #eef2f4; color: #53646d; font-size: 11px; font-weight: 800; }
.pc-document-form { display: grid; gap: 14px; }
.pc-form-section { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pc-form-section > h3 { margin: 0 0 15px; color: var(--ink); font-size: 15px; }
.pc-source-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-proposal-client-grid { display: grid; grid-template-columns: .7fr 1.7fr .9fr 1.15fr 1.15fr 1fr; gap: 10px; align-items: end; }
.pc-proposal-info-grid { display: grid; grid-template-columns: .85fr 1.15fr .8fr 1.25fr 1.8fr 1.15fr; gap: 10px; align-items: end; }
.pc-commercial-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.pc-commercial-grid.pc-commercial-simple { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pc-clause-options { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 16px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafb; }
.pc-clause-options > b { flex: 0 0 100%; color: var(--ink); }
.pc-clause-options label { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 650; }
.pc-proposal-client-grid .field, .pc-proposal-info-grid .field, .pc-commercial-grid .field { min-width: 0; }
.pc-proposal-client-grid input, .pc-proposal-client-grid select, .pc-proposal-info-grid input, .pc-proposal-info-grid select, .pc-commercial-grid input, .pc-commercial-grid select { width: 100%; }
.pc-intro-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pc-intro-head h3 { margin: 0; font-size: 15px; }
#pcIntroLine { min-height: 92px; }
.pc-selected-client { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #f3f7f8; color: var(--muted); }
.pc-selected-client b { color: var(--ink); }
.pc-editor > summary { cursor: pointer; }
.pc-editor > summary span { display: grid; gap: 3px; }
.pc-editor > summary small { color: var(--muted); font-weight: 400; }
.pc-editor[open] > summary { margin-bottom: 16px; }
.pc-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pc-service-selector { display: grid; gap: 10px; }
.pc-service-item { display: grid; grid-template-columns: minmax(180px,1fr) 180px minmax(260px,2fr) 150px; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafb; }
.pc-service-item[hidden] { display: none; }
.pc-service-item > div { display: grid; gap: 3px; }
.pc-service-item small { color: var(--muted); }
.pc-service-item textarea { min-height: 64px; resize: vertical; }
.pc-service-price-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.pc-service-pricing { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr repeat(2,minmax(90px,.65fr)) 1fr minmax(80px,.55fr) 1fr 1.2fr; gap: 8px; }
.pc-service-pricing input, .pc-service-pricing select { width: 100%; min-width: 0; }
.pc-sticky-actions { position: sticky; z-index: 4; bottom: -18px; margin: 0 -18px -18px; padding: 13px 18px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.pc-picker-search { display: flex; gap: 8px; margin: 14px 0; }
.pc-picker-search input { flex: 1; }
.pc-picker-overlay { position: fixed; z-index: 2400; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(12, 27, 34, .58); }
.pc-picker-card { width: min(62vw, 920px); max-height: calc(100vh - 48px); overflow: auto; padding: 22px; border-radius: 16px; background: #fff; box-shadow: 0 28px 70px rgba(8, 24, 31, .28); }
.pc-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.pc-picker-head h2 { margin: 0 0 4px; }
.pc-picker-results > .empty { min-height: 118px; }
.pc-picker-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 118px; color: var(--muted); }
.pc-mini-spinner { width: 20px; height: 20px; border: 3px solid #d9e2e6; border-top-color: var(--teal); border-radius: 50%; animation: spin .75s linear infinite; }
.pc-picker-list { display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.pc-picker-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-align: left; }
.pc-picker-row:hover, .pc-picker-row:focus-visible { border-color: #00a98f; background: #f2fbf9; }
.pc-picker-row span { display: grid; gap: 4px; }
.pc-picker-row small { color: var(--muted); }
.pc-client-picker-table { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.pc-client-picker-header, .pc-client-picker-row { display: grid; grid-template-columns: minmax(190px, 2fr) minmax(90px, .8fr) minmax(100px, .9fr) minmax(82px, .7fr) minmax(120px, 1fr) 70px; gap: 10px; align-items: center; padding: 10px 12px; }
.pc-client-picker-header { position: sticky; top: 0; z-index: 1; background: #f2f5f6; color: #405763; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.pc-client-picker-row { border-top: 1px solid var(--line); font-size: 11px; }
.pc-client-picker-row small { display: block; margin-top: 3px; color: var(--muted); }
.pc-client-status { display: inline-flex; width: max-content; padding: 4px 7px; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 800; }
.pc-client-status.active { background: #e3f8f1; color: #087d67; }
.pc-client-status.inactive { background: #feecee; color: #a52f39; }
.pc-view { display: grid; gap: 17px; }
.pc-view .detail-header { display: flex; justify-content: space-between; gap: 20px; }
.pc-view .detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pc-view .detail-grid > div { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.pc-view .detail-grid small { color: var(--muted); }
.pc-view .detail-section { padding-top: 14px; border-top: 1px solid var(--line); }

@media (max-width: 1320px) {
  .pc-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .pc-primary-filter-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .pc-advanced-filter-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .pc-filter-actions { width: 100%; }
  .pc-filter-actions .pc-filter-buttons { width: auto; flex: 1; }
  .pc-filter-actions .pc-filter-buttons button { flex: 1; }
  .pc-filter-actions .pc-more-filter-toggle { width: auto; flex: 0 0 auto; }
  .pc-picker-card { width: min(82vw, 920px); }
  .pc-proposal-client-grid, .pc-proposal-info-grid, .pc-commercial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pc-service-item { grid-template-columns: 1fr 180px; }
  .pc-service-item textarea { grid-column: 1 / -1; }
  .pc-service-pricing { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .pc-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-summary-card { min-height: 104px; }
  .pc-filter-panel { padding: 15px 14px; }
  .pc-filter-head { align-items: flex-start; }
  .pc-filter-head > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .pc-primary-filter-grid, .pc-advanced-filter-grid { grid-template-columns: 1fr; }
  .pc-filter-actions { display: grid; grid-template-columns: 1fr; }
  .pc-filter-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .pc-filter-buttons button { width: 100%; min-width: 0; }
  .pc-more-filter-toggle { width: 100%; }
  .pc-more-filters > summary { width: 100%; justify-content: center; }
  .pc-pagination, .pc-form-head, .pc-view .detail-header { align-items: stretch; flex-direction: column; }
  .pc-view .detail-grid { grid-template-columns: 1fr 1fr; }
  .pc-picker-search { flex-direction: column; }
  .pc-picker-overlay { padding: 10px; }
  .pc-picker-card { width: 100%; max-height: calc(100vh - 20px); padding: 16px; }
  .pc-client-picker-header { display: none; }
  .pc-client-picker-row { grid-template-columns: 1fr auto; }
  .pc-client-picker-row > span:not(:first-child):not(:last-child) { display: none; }
  .pc-proposal-client-grid, .pc-proposal-info-grid, .pc-commercial-grid { grid-template-columns: 1fr; }
  .pc-service-item { grid-template-columns: 1fr; }
  .pc-service-item textarea { grid-column: auto; }
  .pc-service-pricing { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .pc-summary-grid, .pc-view .detail-grid { grid-template-columns: 1fr; }
  .pc-filter-head { gap: 8px; }
  .pc-filter-head > span { font-size: 11px; }
}

/* Modern top-right controls and notification centre. */
.topbar .notification {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid #101820;
  border-radius: 14px;
  background: linear-gradient(145deg, #252b30, #0f1214);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 24, 32, .18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.topbar .notification svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar .notification:hover { transform: translateY(-2px); background: linear-gradient(145deg, #343b41, #121517); box-shadow: 0 12px 26px rgba(15, 24, 32, .24); }
.topbar .notification:focus-visible { outline: 3px solid rgba(0, 168, 143, .25); outline-offset: 3px; }
.topbar .notification > i { right: 8px; top: 7px; width: 8px; height: 8px; border: 2px solid #111416; background: #ff3b47; }
.topbar .notification-count { right: -7px; top: -7px; min-width: 21px; height: 21px; border-color: #fff; font-size: 9px; line-height: 15px; }

.topbar .user-chip {
  min-width: 218px;
  min-height: 54px;
  padding: 6px 12px 6px 7px;
  border: 1px solid #d7e2e6;
  border-radius: 17px;
  background: linear-gradient(135deg, #fff 52%, #f1f8f6);
  box-shadow: 0 9px 24px rgba(22, 50, 61, .10);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.topbar .user-chip:hover, .topbar .user-chip[aria-expanded="true"] { transform: translateY(-1px); border-color: #9fd8cd; box-shadow: 0 13px 30px rgba(22, 50, 61, .15); }
.topbar .avatar-wrap .avatar { width: 43px; height: 43px; background: linear-gradient(145deg, #e2f7f1, #b8e9dc); box-shadow: inset 0 0 0 1px rgba(0, 143, 121, .10), 0 4px 12px rgba(0, 125, 105, .16); }
.topbar .user-meta b { font-size: 13.5px; }
.topbar .user-meta small { color: #526773; font-size: 10.5px; }
.user-profile-menu { width: 246px; padding: 10px; border-radius: 16px; border-color: #dce5e9; box-shadow: 0 22px 55px rgba(15, 35, 46, .20); }
.user-profile-summary { padding: 11px 12px 13px; border: 0; border-radius: 11px; background: linear-gradient(135deg, #f3faf8, #f8fafb); }
.user-profile-summary b { font: 800 13px Manrope; }
.user-profile-summary small { margin-top: 3px; font-weight: 700; }

.notification-modal { width: min(760px, 100%); padding: 0; overflow: hidden; }
.notification-center { background: #fff; }
.notification-head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.fineasy-notification-toasts{position:fixed;z-index:10050;right:18px;top:86px;display:grid;gap:10px;width:min(390px,calc(100vw - 32px));pointer-events:none}.fineasy-notification-toast{pointer-events:auto;display:grid;gap:6px;padding:16px;border:1px solid #b7d9d2;border-left:5px solid var(--teal);border-radius:15px;background:#fff;box-shadow:0 18px 48px rgba(10,31,42,.2);animation:fineasyToastIn .2s ease}.fineasy-notification-toast small{color:var(--teal);font-size:10px;font-weight:900;letter-spacing:.09em}.fineasy-notification-toast b{font-size:15px}.fineasy-notification-toast p{margin:0;color:var(--muted);line-height:1.45}.fineasy-notification-toast>div{display:flex;gap:8px;justify-content:flex-end;margin-top:4px}@keyframes fineasyToastIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}@media(max-width:640px){.fineasy-notification-toasts{top:74px;right:12px;width:calc(100vw - 24px)}}
.notification-center-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 24px 26px 20px; border-bottom: 1px solid #e5ebee; background: linear-gradient(135deg, #fff 50%, #eef8f5); }
.notification-center-head h2 { margin: 2px 0 4px; }
.notification-center-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; }
.notification-hero-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #111719; color: #fff; box-shadow: 0 9px 22px rgba(17, 23, 25, .20); }
.notification-hero-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-unread-pill { padding: 6px 10px; border-radius: 999px; background: #e6f7f2; color: #087b69; font-size: 10px; font-weight: 800; }
.notification-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 26px 10px; }
.notification-toolbar b { font: 800 12px Manrope; }
.notification-toolbar button { padding: 7px 10px; }
.notification-center .todo-notifications { max-height: min(54vh, 520px); gap: 9px; padding: 2px 26px 18px; scrollbar-width: thin; }
.notification-center .todo-notifications article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; min-height: 66px; padding: 11px 12px; border-color: #e2e8eb; border-radius: 13px; background: #fff; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.notification-center .todo-notifications article:hover { transform: translateY(-1px); border-color: #bcded7; box-shadow: 0 8px 20px rgba(24, 52, 63, .08); }
.notification-center .todo-notifications article.unread { border-left: 4px solid var(--teal); background: linear-gradient(100deg, #f0fbf8, #fff 55%); }
.notification-item-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #edf2f4; color: #617680; font-weight: 900; }
.unread .notification-item-icon { background: #dff6ef; color: #008b76; }
.notification-content { display: grid; gap: 3px; min-width: 0; padding: 0 !important; border: 0; background: transparent; text-align: left; }
.notification-content b { color: #17252c; font-size: 12px; line-height: 1.45; white-space: normal; }
.notification-content small { margin-top: 4px; font-size: 9.5px; }
.notification-read-action { align-self: center; border: 0; border-radius: 8px; background: #111719; color: #fff; padding: 7px 9px; font-size: 9px; font-weight: 800; }
.notification-read-state { align-self: center; color: #7b8e97; font-size: 9px; font-weight: 800; }
.notification-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 26px; border-top: 1px solid #e5ebee; background: #f8fafb; }
.notification-footer small { color: var(--muted); font-size: 9.5px; }

/* Dark data-exchange and template utility buttons across the application. */
a[data-api-download], button#pcExportExcel, button#pcExportPdf, button#pcTemplates, button#importClients, button#importPopulation, button#downloadPopulationSample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0f1417;
  background: linear-gradient(145deg, #252b30, #111416);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 5px 13px rgba(17, 20, 22, .14);
}
a[data-api-download]:hover, button#pcExportExcel:hover, button#pcExportPdf:hover, button#pcTemplates:hover, button#importClients:hover, button#importPopulation:hover, button#downloadPopulationSample:hover { border-color: #303a40; background: linear-gradient(145deg, #343b41, #171b1e); color: #fff; transform: translateY(-1px); }
a[data-api-download]:focus-visible, button#pcExportExcel:focus-visible, button#pcExportPdf:focus-visible, button#pcTemplates:focus-visible, button#importClients:focus-visible, button#importPopulation:focus-visible, button#downloadPopulationSample:focus-visible { outline: 3px solid rgba(0, 168, 143, .24); outline-offset: 2px; }
button#downloadPopulationSample:disabled, button#importPopulation:disabled { opacity: .45; box-shadow: none; transform: none; cursor: not-allowed; }

@media (max-width: 720px) {
  .topbar .user-chip { min-width: 0; min-height: 48px; }
  .notification-center-head { grid-template-columns: auto 1fr; padding: 20px; }
  .notification-unread-pill { grid-column: 2; justify-self: start; }
  .notification-toolbar, .notification-center .todo-notifications, .notification-footer { padding-inline: 20px; }
}
/* Unified notification centre, desktop alerts, and internal team chat. */
.chat-topbar-button{position:relative}.notification-centre-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.notification-centre-head h2{margin:2px 0}.unified-notification-list{max-height:58vh;overflow:auto}.notification-category{display:block;color:#008f7a;font-weight:800;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}.desktop-alert-status{padding:16px;border:1px solid #dce5e9;border-left:4px solid #00a890;border-radius:12px;background:#f6fbfa;margin:16px 0}.desktop-alert-status p{margin:5px 0}.desktop-alert-master{display:flex;gap:20px;flex-wrap:wrap;padding:14px 0}.desktop-category-grid{border:1px solid #dce5e9;border-radius:12px;padding:16px;display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:10px}.desktop-category-grid legend{font-weight:800;padding:0 8px}.desktop-category-grid label{display:flex;align-items:center;gap:9px}.alert-device-list{margin-top:20px}.alert-device-list>div,.chat-member-management>div{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #e6ecef}.alert-device-list span,.chat-member-management span{display:flex;flex-direction:column}.chat-modal .modal-card{max-width:1180px;padding:0;overflow:hidden}.chat-shell{height:min(760px,82vh);display:grid;grid-template-columns:330px minmax(0,1fr);background:#fff}.chat-sidebar{border-right:1px solid #dfe6e9;display:flex;flex-direction:column;min-height:0;background:#f8fafb}.chat-sidebar header{display:flex;align-items:center;justify-content:space-between;padding:22px 18px 12px}.chat-sidebar h2{margin:0}.chat-search{margin:0 14px 12px;border:1px solid #d7e1e5;border-radius:10px;background:#fff;display:flex;align-items:center;padding:0 10px}.chat-search input{border:0;background:transparent;width:100%;padding:11px;outline:0}.chat-sidebar>div{overflow-y:auto;padding:0 8px 14px}.chat-conversation{width:100%;border:0;background:transparent;border-radius:11px;padding:10px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;text-align:left;gap:10px;cursor:pointer;color:#14242d}.chat-conversation:hover,.chat-conversation.active{background:#e9f5f2}.chat-conversation span:nth-child(2){min-width:0;display:flex;flex-direction:column}.chat-conversation b,.chat-conversation small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-conversation small{color:#6b7880;margin-top:3px}.chat-conversation i{font-style:normal;background:#ef2837;color:#fff;border-radius:20px;min-width:20px;padding:3px 6px;text-align:center;font-size:11px}.chat-avatar{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:#dff5ef;color:#007d6d;font-weight:800;flex:none}.chat-main{display:flex;flex-direction:column;min-width:0;min-height:0}.chat-main-head{height:68px;padding:12px 18px;border-bottom:1px solid #dfe6e9;display:flex;align-items:center;gap:11px}.chat-main-head>span{display:flex;flex-direction:column}.chat-main-head>button{margin-left:auto}.chat-messages{flex:1;overflow-y:auto;padding:20px;background:#f4f7f8}.chat-message{width:fit-content;max-width:min(72%,620px);border-radius:14px;padding:10px 13px;margin:7px 0;box-shadow:0 1px 2px #10242b12}.chat-message p{white-space:pre-wrap;margin:3px 0;line-height:1.45}.chat-message small{display:block;text-align:right;opacity:.68}.chat-message.theirs{background:#fff;border-bottom-left-radius:4px}.chat-message.mine{background:#d8f2eb;margin-left:auto;border-bottom-right-radius:4px}.chat-date-separator{text-align:center;margin:16px 0}.chat-date-separator span{font-size:11px;background:#e1e8eb;padding:5px 10px;border-radius:20px;color:#53636c}.chat-composer{border-top:1px solid #dfe6e9;padding:12px;display:flex;gap:10px;align-items:flex-end}.chat-composer textarea{flex:1;min-height:44px;max-height:120px;resize:vertical;border:1px solid #ccdadd;border-radius:12px;padding:11px 13px;font:inherit}.chat-empty,.chat-empty-large{text-align:center;color:#73818a;padding:24px}.chat-empty-large{margin:auto}.chat-empty-large b{display:block;color:#17252d;font-size:18px}.chat-member-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:50vh;overflow:auto}.chat-member-picker label{border:1px solid #dce5e9;border-radius:10px;padding:10px;display:grid;grid-template-columns:auto 40px minmax(0,1fr);align-items:center;gap:9px}.chat-member-picker label>span:last-child{display:flex;flex-direction:column;min-width:0}.chat-member-picker small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eyebrow{font-size:11px;font-weight:800;color:#008f7a;letter-spacing:.1em;margin:0;text-transform:uppercase}
@media(max-width:760px){.desktop-category-grid,.chat-member-picker{grid-template-columns:1fr}.chat-modal .modal-card{inset:0;width:100%;height:100%;max-height:none;border-radius:0}.chat-shell{height:100vh;grid-template-columns:1fr}.chat-sidebar{display:none}.chat-shell:not(.conversation-open) .chat-sidebar{display:flex}.chat-shell:not(.conversation-open) .chat-main{display:none}.chat-message{max-width:88%}.notification-centre-head{flex-direction:column}.desktop-alert-master{flex-direction:column;gap:10px}}

/* Exact Main CR reconciliation dashboard. */
.ri-reconciliation-modal .modal-card{width:min(1540px,97vw);max-width:none;max-height:94vh}.ri-recon-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.ri-recon-head h2{margin:3px 0}.ri-recon-head p{margin:4px 0;color:#5d6c74}.ri-recon-head>div:last-child{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.ri-recon-cards{display:grid;grid-template-columns:repeat(8,minmax(130px,1fr));gap:10px;margin:18px 0}.ri-recon-cards button{text-align:left;border:1px solid #d7e1e5;border-bottom:4px solid #008f79;border-radius:13px;background:#fff;padding:13px;min-height:105px}.ri-recon-cards button:hover{background:#f3faf8;transform:translateY(-1px)}.ri-recon-cards small,.ri-recon-cards span{display:block;color:#52656f}.ri-recon-cards b{display:block;font-size:25px;margin:9px 0;color:#111719}.ri-recon-cards span{font-size:11px;font-weight:700}.ri-recon-filter{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px;padding:14px;border:1px solid #dce5e9;border-radius:13px;background:#f8fafb}.ri-recon-filter label{font-size:11px;font-weight:800;color:#48606c}.ri-recon-filter input,.ri-recon-filter select{width:100%;margin-top:5px}.ri-recon-filter .form-actions{margin:0;align-self:end;justify-content:flex-start}.ri-recon-count{text-align:right;font-weight:700;color:#52656f}.ri-recon-table{max-height:48vh;border:1px solid #dce5e9;border-radius:12px;overflow:auto}.ri-recon-table table{min-width:1650px}.ri-recon-table th{position:sticky;top:0;z-index:2;color:#111719}.ri-recon-table td{vertical-align:top}.ri-recon-table td>small,.ri-recon-table td>span+small{display:block;margin-top:5px;color:#657781}.ri-recon-status{display:inline-block;padding:5px 8px;border-radius:99px;font-size:11px;font-weight:800}.ri-recon-status.green{background:#ddf7ef;color:#007d69}.ri-recon-status.amber{background:#fff1cf;color:#8a5a00}.ri-recon-status.red{background:#fde5e7;color:#a5232d}.ri-recon-status.purple{background:#efe6ff;color:#6e3ac5}.ri-name-difference{display:inline-block;border-radius:99px;background:#e8f1ff;color:#245db8;padding:4px 8px;font-weight:800}.ri-branches{margin-top:6px}.ri-branches summary{color:#008f79;font-weight:800;cursor:pointer}.ri-branches span{display:block;padding-top:5px;color:#52656f}
@media(max-width:1100px){.ri-recon-cards{grid-template-columns:repeat(4,minmax(140px,1fr))}.ri-recon-filter{grid-template-columns:repeat(3,minmax(150px,1fr))}}
@media(max-width:720px){.ri-recon-head{display:block}.ri-recon-head>div:last-child{justify-content:flex-start;margin-top:12px}.ri-recon-cards{grid-template-columns:repeat(2,minmax(130px,1fr))}.ri-recon-filter{grid-template-columns:1fr}}
.crm-nav-icon{display:block;width:22px;height:22px;border-radius:7px}.nav-heading-icon .crm-nav-icon{width:24px;height:24px}.nav-item .crm-nav-icon{width:20px;height:20px}
.crm-inward-review{display:grid;gap:14px}.crm-inward-review>.panel-head{padding:14px;border:1px solid #c9e2e5;border-radius:14px;background:linear-gradient(135deg,#f4fbff,#f1fff8)}.crm-inward-review>.panel-head p{margin:4px 0;color:var(--muted)}
