:root {
  --teal: #18a66a;
  --teal-dark: #0e7a4d;
  --teal-soft: #e7f7ef;
  --orange: #ff5a1f;
  --orange-dark: #d9410f;
  --orange-soft: #fff0e8;
  --ink: #111827;
  --ink-2: #161b22;
  --ink-3: #0c1016;
  --muted: #6b7280;
  --faint: #f2f4f7;
  --line: #e2e7ee;
  --card: #ffffff;
  --good: #15a66a;
  --good-soft: #e7f7ef;
  --warn: #b35a13;
  --warn-soft: #fff3e8;
  --bad: #b42318;
  --bad-soft: #feeceb;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  font-family: Inter, "Aptos", "Segoe UI", Arial, sans-serif;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f3f5f8;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 440px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 90, 31, 0.24), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f7f8fb 47%, #111827 47.2%, #0b0f15 100%);
}

.auth-brand {
  padding: 56px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 72px;
}

.brand-mark {
  width: fit-content;
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
  position: relative;
  padding-left: 44px;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 4px solid var(--orange);
  border-right-color: var(--blue);
  border-bottom-color: var(--teal);
  transform: translateY(-50%) rotate(-18deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  transform: translateY(-50%);
}

.brand-lockup {
  width: fit-content;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.brand-logo {
  display: block;
  width: 118px;
  height: auto;
  object-fit: contain;
}

.brand-sub {
  color: var(--muted);
  margin: 0;
  font-weight: 600;
  text-align: center;
  width: 100%;
}

.auth-copy {
  max-width: 620px;
  margin-top: 0;
}

.auth-copy h1 {
  font-size: 42px;
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: 0;
  max-width: 560px;
  font-weight: 760;
}

.auth-copy h1 strong {
  color: var(--orange);
}

.auth-copy p {
  color: #4b5563;
  font-size: 16px;
  line-height: 1.65;
  max-width: 540px;
}

.auth-panel {
  margin: 24px;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 4px solid var(--orange);
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.24);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  color: var(--orange);
  background: var(--orange-soft);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-panel h2,
.page-title h1 {
  margin: 14px 0 6px;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 760;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

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

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #485466;
  font-weight: 600;
}

.field-group {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: #485466;
  font-weight: 600;
}

.field-label {
  display: block;
}

.readonly-field {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: #f7f9fb;
  color: var(--ink);
  font-weight: 700;
}

.checkbox-list {
  display: grid;
  gap: 6px;
  max-height: 170px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.checkbox-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  font-weight: 500;
}

.checkbox-item input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.select-all-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff8f4;
}

.permission-toggle {
  display: inline-grid;
  grid-template-columns: 18px;
  justify-items: center;
  align-items: center;
  gap: 4px;
  min-width: 44px;
  font-size: 10px;
  line-height: 1;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}

.permission-toggle input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.permission-toggle span {
  font-size: 0;
  width: 0;
  height: 0;
  overflow: hidden;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.primary,
.secondary,
.ghost,
.danger {
  border: 0;
  border-radius: 6px;
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 650;
}

.primary {
  background: var(--orange);
  color: #fff;
}

.primary:hover {
  background: var(--orange-dark);
}

.secondary {
  background: var(--ink);
  color: #fff;
}

.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid #d4d9e2;
}

.danger {
  background: var(--bad);
  color: #fff;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--orange);
  font-weight: 650;
  padding: 0;
}

.auth-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.otp-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.otp-row input {
  height: 50px;
  text-align: center;
  font-size: 20px;
  font-weight: 650;
}

.notice,
.error,
.success {
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.notice {
  background: var(--orange-soft);
  color: #8b3b10;
  border: 1px solid #f2c5a9;
}

.error {
  background: var(--bad-soft);
  color: #7b1b12;
  border: 1px solid #f1b8b2;
}

.success {
  background: var(--good-soft);
  color: #0b5827;
  border: 1px solid #a4e7b8;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  background: #0e1117;
  color: #fff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #202733;
}

.sidebar-head {
  padding: 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-head strong {
  display: block;
  font-size: 20px;
  position: relative;
  padding-left: 36px;
}

.sidebar-head strong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  border-right-color: var(--blue);
  border-bottom-color: var(--teal);
  transform: translateY(-50%) rotate(-18deg);
}

.sidebar-logo {
  display: block;
  width: 112px;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 6px 8px;
}

.sidebar-head span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  display: block;
  margin-top: 8px;
}

.nav-group {
  padding: 12px 0;
}

.nav-label {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 18px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  padding: 11px 22px;
  text-align: left;
  border-left: 3px solid transparent;
  font-weight: 600;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(255, 90, 31, 0.12);
  border-left-color: var(--orange);
}

.nav-icon {
  width: 20px;
  text-align: center;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 18px;
}

.user-pill {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  padding: 14px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title h1 {
  margin: 0 0 2px;
  font-weight: 760;
  color: var(--ink);
}

.top-actions,
.row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.inline-controls {
  display: grid;
  gap: 8px;
  min-width: 180px;
  max-width: 100%;
}

.inline-controls select {
  min-height: 34px;
  padding: 7px 9px;
}

.table-input {
  min-width: 110px;
  min-height: 34px;
  padding: 7px 9px;
}

.content {
  padding: 22px 26px 36px;
  background: #f3f5f8;
  min-width: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card,
.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
  min-width: 0;
}

.kpi-card {
  padding: 17px;
  position: relative;
  overflow: hidden;
}

.kpi-card.clickable {
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}

.kpi-card.clickable:hover,
.kpi-card.clickable:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent, var(--orange));
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.1);
  outline: none;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 4px;
  background: var(--accent, var(--orange));
}

.kpi-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.kpi-value {
  margin: 12px 0 4px;
  font-size: 25px;
  font-weight: 760;
  color: #101828;
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
}

.kpi-note {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: #7b8494;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge.good {
  background: var(--good-soft);
  color: var(--good);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.badge.info {
  background: var(--blue-soft);
  color: var(--blue);
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.partner-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  background:
    radial-gradient(circle at 92% 14%, rgba(255, 90, 31, 0.24), transparent 28%),
    linear-gradient(135deg, #111827, #0b0f15);
  color: #fff;
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 14px;
  border-bottom: 3px solid var(--orange);
}

.welcome-panel h2 {
  margin: 14px 0 8px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 760;
}

.welcome-panel .muted {
  color: rgba(255, 255, 255, 0.72);
  max-width: 620px;
}

.welcome-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 16px;
}

.welcome-card .mini-row {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.approval-history {
  margin-top: 14px;
}

.partner-sections .card {
  min-height: 260px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.docs-hero {
  margin-bottom: 14px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.docs-menu {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.docs-menu-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 6px 8px;
}

.docs-menu a {
  color: #374151;
  text-decoration: none;
  font-weight: 650;
  padding: 8px 9px;
  border-radius: 6px;
  border-left: 3px solid transparent;
}

.docs-menu a:hover {
  background: var(--orange-soft);
  color: var(--orange-dark);
  border-left-color: var(--orange);
}

.docs-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.docs-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
  scroll-margin-top: 92px;
}

.docs-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

.docs-section h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.docs-section p {
  margin: 0 0 12px;
  color: #4b5563;
  max-width: 900px;
}

.docs-section ul {
  margin: 0;
  padding-left: 20px;
  color: #4b5563;
}

.docs-section li + li {
  margin-top: 8px;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.docs-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafb;
}

.docs-workflow {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff;
}

.docs-workflow + .docs-workflow {
  margin-top: 14px;
}

.docs-workflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.docs-workflow-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.docs-workflow-head span {
  flex: 0 0 auto;
  max-width: 260px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
}

.docs-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
}

.docs-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.docs-steps span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.docs-steps p {
  margin: 4px 0 0;
  color: #374151;
  line-height: 1.45;
}

.docs-result {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 14px;
  line-height: 1.45;
}

.docs-result strong {
  color: #14532d;
}

.action-card {
  min-height: 104px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 8px;
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}

.action-card:hover {
  border-color: var(--orange);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.action-card span {
  font-weight: 700;
}

.action-card small {
  color: var(--muted);
  line-height: 1.45;
}

.admin-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.admin-summary h2 {
  margin: 10px 0 4px;
  font-size: 24px;
  line-height: 1.22;
  font-weight: 760;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 10px;
}

.deal-review-stats {
  grid-template-columns: repeat(4, minmax(96px, 1fr));
}

.admin-stats div {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.admin-stats strong {
  display: block;
  font-size: 23px;
  font-weight: 760;
  color: var(--ink);
}

.admin-stats span {
  color: var(--muted);
  font-size: 12px;
}

.card {
  padding: 16px;
}

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

.card-header > div {
  min-width: 0;
}

.card h2,
.card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 720;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12.75px;
}

.deal-table-wrap table {
  min-width: 1460px;
}

.permission-table table {
  min-width: 1180px;
  table-layout: fixed;
}

.permission-table th:first-child,
.permission-table td:first-child {
  width: 300px;
}

.permission-col {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.permission-table th.permission-col {
  padding: 11px 8px;
  font-size: 11px;
}

.permission-table td.permission-col {
  vertical-align: middle;
  padding: 10px 8px;
}

.permission-cell {
  display: inline-block;
  max-width: 190px;
  color: #374151;
  font-size: 12px;
  line-height: 1.45;
}

th,
td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: break-word;
}

th {
  color: #556070;
  background: #f8fafb;
  font-size: 12px;
  white-space: nowrap;
}

td select,
td input {
  min-width: 130px;
}

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

td .inline-controls {
  width: 210px;
}

.activity-list,
.resource-list {
  display: grid;
  gap: 10px;
}

.activity-item,
.resource-item,
.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  min-width: 0;
}

.activity-item > *,
.resource-item > *,
.mini-row > * {
  min-width: 0;
}

.resource-item,
.mini-row {
  flex-wrap: wrap;
}

.activity-item:last-child,
.resource-item:last-child,
.mini-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.small {
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.25);
  padding: 20px;
}

.wide-modal {
  width: min(1080px, 100%);
}

.modal h2 {
  margin: 0 0 6px;
}

.decision-modal {
  width: min(560px, 100%);
}

.compact-form {
  margin: 14px 0;
}

.nested-card {
  box-shadow: none;
}

.decision-note {
  margin-top: 5px;
  color: #475467;
  font-size: 12px;
  line-height: 1.45;
  background: #f8fafb;
  border-left: 3px solid var(--orange);
  padding: 6px 8px;
  border-radius: 4px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.detail-grid div,
.detail-message {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.detail-grid span,
.detail-message span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-message p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
  white-space: pre-wrap;
}

.profile-list {
  display: grid;
  gap: 0;
}

.profile-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.profile-list div:last-child {
  border-bottom: 0;
}

.profile-list span {
  color: var(--muted);
  font-size: 12px;
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.report-long-text {
  min-width: 260px;
  max-width: 520px;
  white-space: normal;
  line-height: 1.45;
  color: #374151;
}

.report-column-filter-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 10px;
}

.report-column-filter-head strong {
  color: var(--ink);
}

.report-column-filter-head button {
  margin-left: auto;
  width: auto;
}

.report-column-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.report-column-filters label {
  gap: 5px;
  font-size: 11px;
}

.report-column-filters input,
.report-column-filters select {
  min-height: 36px;
  padding: 8px;
  font-size: 13px;
}

.report-register-card {
  padding: 14px;
}

.report-register-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-register-table {
  min-width: 1900px;
  font-size: 13px;
}

.report-register-table th {
  padding: 10px 9px;
  background: #f3f6fa;
  color: #263142;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.report-register-table td {
  padding: 10px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.report-register-table th:last-child,
.report-register-table td:last-child {
  border-right: 0;
}

.report-register-table tbody tr:last-child td {
  border-bottom: 0;
}

.tick-cell {
  text-align: center;
  color: var(--green);
  font-weight: 850;
}

.directory-filters {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.deal-review-filters {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.audit-filters {
  grid-template-columns: minmax(180px, 280px);
}

.directory-filters button,
.deal-review-filters button {
  width: auto;
  min-width: 96px;
  align-self: end;
}

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

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
}

.timeline-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}

.timeline-head span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-item p {
  margin: 6px 0;
  color: #374151;
  white-space: pre-wrap;
}

.next-action {
  display: inline-grid;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--ink);
}

.next-action span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  background: #f8fafb;
  border-radius: 8px;
  border: 1px dashed var(--line);
}

@media (max-width: 980px) {
  .auth-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 28px;
    min-height: 310px;
    gap: 36px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  .content {
    padding: 16px;
  }

  .auth-panel {
    margin: 0;
    border-radius: 0;
  }

  .sidebar {
    position: static;
  }

  .nav-item {
    min-height: 42px;
  }

  .kpi-grid,
  .partner-kpis,
  .grid-2,
  .grid-3,
  .docs-layout,
  .docs-grid,
  .welcome-panel,
  .quick-actions,
  .report-filters,
  .directory-filters,
  .admin-summary,
  .admin-stats,
  .two {
    grid-template-columns: 1fr;
  }

  .admin-summary {
    gap: 12px;
  }

  .docs-menu {
    position: static;
  }

  .table-wrap {
    margin-inline: -4px;
    padding-bottom: 4px;
  }

  table {
    min-width: 860px;
  }
}

@media (max-width: 640px) {
  .auth-copy h1 {
    font-size: 34px;
  }

  .topbar,
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .card {
    padding: 12px;
  }

  .primary,
  .secondary,
  .ghost,
  .danger {
    width: 100%;
    justify-content: center;
  }

  .row-actions {
    width: 100%;
  }

  .row-actions > button,
  .row-actions > .primary,
  .row-actions > .ghost,
  .row-actions > .danger {
    flex: 1 1 140px;
  }

  .modal {
    padding: 14px;
    max-height: 92vh;
  }

  table {
    min-width: 760px;
  }
}
