@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Cairo:wght@400;500;600;700&display=swap");
/* CreditFlow v96 */
:root {
  --bg: #f6f7f4;
  --bg-soft: #f1f4f1;
  --surface: #ffffff;
  --surface-alt: #fbfcfb;
  --surface-muted: #eef2ee;
  --line: #dde5de;
  --line-soft: rgba(12, 54, 38, 0.06);
  --ink: #12271e;
  --ink-soft: #5f7069;
  --green-950: #0a261c;
  --green-900: #0f3d2e;
  --green-800: #195642;
  --green-700: #237257;
  --green-100: #edf5f0;
  --gold-500: #c6a15b;
  --gold-100: #f6efdf;
  --success: #2b8a63;
  --success-soft: #ebf7f1;
  --red-500: #c96762;
  --red-soft: #fff0ef;
  --shadow-xl: 0 26px 72px rgba(17, 37, 29, 0.08);
  --shadow-lg: 0 18px 42px rgba(17, 37, 29, 0.07);
  --shadow-md: 0 12px 28px rgba(17, 37, 29, 0.055);
  --shadow-sm: 0 8px 18px rgba(17, 37, 29, 0.035);
  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --input-height: 56px;
  --sidebar-width: 314px;
  --transition: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-page-title: clamp(2rem, 2.35vw, 2.55rem);
  --font-section-header: 1.4375rem;
  --font-subheader: 1.125rem;
  --font-body: 0.95rem;
  --font-small: 0.8125rem;
  --font-button: 0.925rem;
  --font-table-head: 0.78rem;
  --font-table-body: 0.9rem;
}

/* Proposal header and typography final polish */

.proposal-preview-shell,
.proposal-preview-shell * {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}

.proposal-preview-shell {
  gap: 14px;
}

.proposal-preview-header {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 16px;
  padding: 22px 26px 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: none;
}

.proposal-preview-header::before,
.proposal-preview-header::after {
  display: none;
}

.proposal-header-aside {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 82px;
}

.proposal-preview-logo-shell {
  width: 136px;
  min-width: 136px;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.proposal-preview-logo {
  width: auto;
  height: 78px;
  max-width: 136px;
}

.proposal-bank-copy {
  display: none !important;
}

.proposal-header-copy {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-items: center;
  text-align: center;
}

.proposal-preview-shell[dir="rtl"] .proposal-header-copy,
.proposal-preview-shell[dir="rtl"] .proposal-brand,
.proposal-preview-shell[dir="rtl"] .proposal-preview-header strong {
  text-align: center;
}

.proposal-brand {
  margin: 0;
  color: #0f3d2e;
  font-family: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.46rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.proposal-preview-shell[dir="rtl"] .proposal-brand,
.proposal-preview-shell[dir="rtl"] .proposal-preview-header strong,
.proposal-preview-shell[dir="rtl"] .proposal-preview-card-title,
.proposal-preview-shell[dir="rtl"] .proposal-preview-detail-label,
.proposal-preview-shell[dir="rtl"] .proposal-preview-detail-value,
.proposal-preview-shell[dir="rtl"] .proposal-preview-bullet-item,
.proposal-preview-shell[dir="rtl"] .proposal-preview-copy p {
  font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}

.proposal-preview-header strong {
  margin: 0;
  color: #5f7069;
  font-family: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  max-width: 24ch;
}

.proposal-pill {
  visibility: hidden;
  min-width: 140px;
  height: 1px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.proposal-preview-grid {
  margin-top: 10px;
  gap: 14px;
}

.proposal-preview-card {
  min-height: 222px;
  padding: 18px;
  border-radius: 18px;
}

.proposal-preview-card.is-wide {
  min-height: 142px;
}

.proposal-preview-card-title {
  font-size: 1rem;
  line-height: 1.28;
}

.proposal-preview-detail-label {
  font-size: 0.82rem;
  line-height: 1.45;
}

.proposal-preview-detail-value,
.proposal-preview-bullet-item,
.proposal-preview-copy p {
  font-size: 0.96rem;
  line-height: 1.5;
}

.proposal-preview-detail-list li {
  padding: 9px 0 11px;
}

@media (max-width: 900px) {
  .proposal-preview-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 20px 20px 18px;
  }

  .proposal-header-aside {
    justify-content: center;
  }

  .proposal-pill {
    display: none;
  }
}

@media (max-width: 480px) {
  .proposal-preview-logo {
    height: 68px;
    max-width: 118px;
  }

  .proposal-brand {
    font-size: 1.18rem;
  }

  .proposal-preview-header strong {
    font-size: 0.9rem;
    max-width: none;
  }
}

/* Proposal final header cleanup */

.proposal-preview-shell {
  gap: 12px;
}

.proposal-preview-header {
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  gap: 12px;
  padding: 18px 24px;
  background-color: #0f3d2e !important;
  background-image: none !important;
  border: 0;
  border-radius: 18px;
}

.proposal-preview-header::before,
.proposal-preview-header::after {
  display: none !important;
}

.proposal-header-aside {
  min-height: 78px;
}

.proposal-preview-logo-shell {
  width: 132px;
  min-width: 132px;
  min-height: 78px;
}

.proposal-preview-logo {
  height: 74px !important;
  max-width: 132px;
}

.proposal-brand {
  color: #ffffff;
  font-size: 1.42rem;
  line-height: 1.12;
}

.proposal-preview-header strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  line-height: 1.32;
  max-width: 22ch;
}

.proposal-preview-card {
  min-height: 214px;
  padding: 16px 18px;
}

.proposal-preview-card.is-wide {
  min-height: 136px;
}

.proposal-preview-card-head {
  margin-bottom: 12px;
}

.proposal-preview-detail-list li {
  padding: 8px 0 10px;
}

.proposal-preview-detail-label {
  color: #51645c;
}

.proposal-preview-detail-value,
.proposal-preview-bullet-item,
.proposal-preview-copy p {
  color: #13281f;
}

@media (max-width: 900px) {
  .proposal-preview-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px 18px 16px;
  }
}

@media (max-width: 480px) {
  .proposal-preview-logo {
    height: 66px;
    max-width: 116px;
  }

  .proposal-brand {
    font-size: 1.12rem;
  }

  .proposal-preview-header strong {
    font-size: 0.88rem;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(198, 161, 91, 0.09), transparent 17%),
    linear-gradient(180deg, #fcfdfa 0%, #f4f6f3 100%);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--font-body);
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

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

button {
  appearance: none;
}

input,
select,
textarea {
  outline: none;
}

code {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--green-900);
  font-size: 0.88em;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  align-items: stretch;
  padding: clamp(16px, 2vw, 24px);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f8f6 0%, #f3f5f1 100%);
}

.auth-card {
  width: min(1280px, 100%);
  min-height: calc(100vh - clamp(32px, 4vw, 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(340px, 0.96fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(11, 77, 59, 0.08);
  border-radius: 34px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(14, 35, 28, 0.10);
}

.auth-brand {
  align-items: center;
  gap: 16px;
  padding-bottom: 0;
}

.auth-panel {
  position: relative;
}

.auth-panel-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: clamp(28px, 5vw, 64px);
  background: #ffffff;
}

.auth-copy h2,
.auth-copy p {
  margin: 0;
}

.auth-copy h2 {
  max-width: 11ch;
  color: #10271f;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.auth-copy p {
  max-width: 42ch;
  margin-top: 12px;
  color: #587067;
  font-size: 1rem;
  line-height: 1.62;
  font-weight: 500;
}

.auth-form {
  display: grid;
  gap: 18px;
  max-width: 470px;
}

.auth-error {
  min-height: 24px;
  margin-top: 2px;
  color: #b75450;
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-field {
  gap: 10px;
}

.auth-field span {
  color: #18382c;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-field input {
  height: 64px;
  border-radius: 18px;
  border: 1px solid rgba(12, 70, 54, 0.13);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 500;
  color: #133127;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.auth-field input::placeholder {
  color: #98aaa3;
  font-weight: 400;
}

.auth-field input:focus {
  border-color: rgba(11, 77, 59, 0.45);
  box-shadow:
    0 0 0 4px rgba(11, 77, 59, 0.08),
    0 10px 22px rgba(11, 77, 59, 0.07);
  transform: translateY(-1px);
}

.auth-submit {
  min-height: 64px;
  margin-top: 6px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #0b4d3b 0%, #0f6a52 100%);
  box-shadow: 0 18px 34px rgba(11, 77, 59, 0.18);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    filter var(--transition);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 36px rgba(11, 77, 59, 0.22);
  filter: saturate(1.02);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:focus-visible {
  box-shadow:
    0 0 0 4px rgba(11, 77, 59, 0.12),
    0 18px 34px rgba(11, 77, 59, 0.18);
}

.auth-panel-hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 34px;
  padding: clamp(28px, 4.5vw, 52px);
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.16), transparent 30%),
    radial-gradient(circle at 8% 92%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #0b4d3b 0%, #073b2d 100%);
  color: #ffffff;
}

.auth-hero-orb {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
}

.auth-hero-orb-one {
  top: 11%;
  right: 9%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.24) 0%, rgba(212, 175, 55, 0.04) 58%, transparent 76%);
}

.auth-hero-orb-two {
  bottom: 8%;
  left: -6%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.02) 58%, transparent 74%);
}

.auth-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 82%);
  pointer-events: none;
}

.auth-hero-copy,
.auth-feature-list {
  position: relative;
  z-index: 1;
}

.auth-hero-kicker {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth-hero-copy h3 {
  max-width: 14ch;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 3.3vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.auth-hero-copy p:last-child {
  max-width: 40ch;
  margin: 16px 0 0;
  color: rgba(244, 248, 246, 0.86);
  font-size: 1rem;
  line-height: 1.68;
}

.auth-feature-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f6faf8;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.55;
}

.auth-feature-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4af37 0%, #e4c96b 100%);
  box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.11);
}

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

.auth-demo-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-alt);
  box-shadow: var(--shadow-sm);
}

.auth-demo-card strong {
  font-size: var(--font-body);
  font-weight: 600;
}

.auth-demo-card span {
  color: var(--ink-soft);
  font-size: var(--font-small);
}

.page-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  gap: 30px;
  padding: 26px;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 24, 19, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 25;
}

.sidebar-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: relative;
  z-index: 30;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: calc(100vh - 48px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 250, 249, 0.99)),
    radial-gradient(circle at top left, rgba(198, 161, 91, 0.06), transparent 24%);
  box-shadow: var(--shadow-lg);
}

.brand-block {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding-bottom: 8px;
}

.brand-copy h1,
.brand-copy p,
.title-block h2,
.title-block p,
.card-head h3,
.card-head p,
.hero h3,
.hero p,
.rule-card h2,
.rule-card p,
.support-card p {
  margin: 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  object-fit: contain;
  object-position: center;
}

.sidebar-kicker {
  color: var(--green-900);
  font-size: 1.3125rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-copy h1 {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(15, 61, 46, 0.03);
  border-radius: 18px;
  background: transparent;
  color: var(--ink-soft);
  font-size: var(--font-button);
  cursor: pointer;
  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.nav-button:hover,
.nav-button.active {
  background: #ffffff;
  color: var(--green-900);
  border-color: rgba(15, 61, 46, 0.09);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.nav-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-muted);
  color: var(--green-700);
  font-size: var(--font-small);
  font-weight: 700;
  flex: 0 0 auto;
}

.nav-button.active .nav-icon {
  background: var(--green-100);
  color: var(--green-900);
}

.nav-button span:last-child {
  font-size: var(--font-button);
  font-weight: 600;
  line-height: 1.28;
  text-align: left;
  letter-spacing: -0.01em;
}

.rule-card,
.support-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-alt);
}

.rule-card {
  margin-top: auto;
}

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

.rule-card h2 {
  font-size: var(--font-subheader);
  line-height: 1.2;
  font-weight: 600;
}

.rule-card ul {
  display: grid;
  gap: 11px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: var(--font-body);
  line-height: 1.65;
}

.support-title {
  color: var(--green-900);
  font-size: 1rem;
  font-weight: 600;
}

.support-copy {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: var(--font-body);
}

.workspace {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.title-block h2 {
  font-size: var(--font-page-title);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.title-block p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.55;
}

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

.search-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 19px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(244, 247, 244, 0.95);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-shell:focus-within {
  border-color: rgba(15, 61, 46, 0.2);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 61, 46, 0.06);
}

.search-icon {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink-soft);
  border-radius: 50%;
  position: relative;
  opacity: 0.7;
  flex: 0 0 auto;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink-soft);
  transform: rotate(45deg);
}

.search-shell input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink);
}

.search-shell input::placeholder {
  color: #8a9792;
}

.field {
  display: grid;
  gap: 9px;
}

.field span {
  color: #53655e;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.field input,
.field select {
  height: var(--input-height);
  padding: 0 18px;
}

.field textarea {
  min-height: 124px;
  padding: 16px 18px;
  resize: vertical;
  line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(15, 61, 46, 0.22);
  box-shadow: 0 0 0 4px rgba(15, 61, 46, 0.07);
  background: #fcfffd;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8b9793;
}

.field-compact {
  min-width: 190px;
}

.month-field select {
  background: var(--bg-soft);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px 9px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.user-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 700;
}

.user-chip strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.user-chip span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: var(--font-small);
}

.meta-strip {
  padding: 0 6px;
}

#managerDashboardContent,
#salesDashboardContent {
  display: grid;
  gap: 20px;
}

.subtle-text {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.68;
}

.panel {
  display: none;
  gap: 20px;
}

.panel.active {
  display: grid;
}

.card {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(15, 35, 26, 0.065);
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 30px;
  background:
    radial-gradient(circle at top right, rgba(198, 161, 91, 0.11), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #fcfcfb 100%);
}

.hero-copy {
  max-width: 760px;
}

.hero h3 {
  font-size: clamp(2rem, 2.7vw, 2.35rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.hero .subtle-text {
  margin-top: 12px;
  max-width: 620px;
}

.hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #e8ece8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-900);
  font-size: var(--font-small);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.badge-soft {
  background: var(--green-100);
  border-color: transparent;
}

.kpi-grid,
.dashboard-grid,
.module-grid,
.form-grid,
.mini-stats,
.pipeline-kpi-grid,
.result-grid,
.simple-list,
.stage-list {
  display: grid;
  gap: 20px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
}

.module-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.dbr-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dbr-form-note {
  margin-top: 16px;
}

.dbr-summary-card #dsrStatus {
  margin-top: 4px;
}

#dsrStatus[data-tone="success"] {
  color: #0b6b44;
}

#dsrStatus[data-tone="warning"] {
  color: #a06a14;
}

#dsrStatus[data-tone="danger"] {
  color: #b34444;
}

.panel[data-panel="dbr-dsr"] .result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dbr-result-card .value {
  font-size: 1.34rem;
}

.upload-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.pipeline-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

#salesTargetGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-two {
  grid-column: span 2;
}

.kpi-card {
  min-height: 184px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(249, 250, 249, 1)),
    radial-gradient(circle at top right, rgba(198, 161, 91, 0.08), transparent 22%);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card p,
.kpi-card h3 {
  margin: 0;
}

.kpi-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.kpi-card h3 {
  margin-top: 14px;
  font-size: clamp(2.15rem, 2.5vw, 2.65rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.kpi-foot {
  color: var(--green-800);
  font-size: var(--font-small);
  font-weight: 600;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.card-head h3 {
  font-size: var(--font-section-header);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.card-head .subtle-text {
  margin-top: 7px;
}

.table-wrap {
  min-width: 0;
  overflow: auto;
  border-radius: 20px;
  background: #ffffff;
}

.premium-table {
  border: 1px solid rgba(19, 40, 31, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(19, 40, 31, 0.06);
  font-size: var(--font-table-body);
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #fbfcfb 0%, #f6f8f6 100%);
  color: #71827c;
  font-size: var(--font-table-head);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
}

tbody tr:nth-child(even) {
  background: rgba(246, 248, 246, 0.78);
}

tbody tr:hover {
  background: rgba(237, 245, 240, 0.92);
}

tbody tr:last-child td {
  border-bottom: none;
}

.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stage-item,
.result-card,
.simple-item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.result-card,
.simple-item {
  box-shadow: var(--shadow-sm);
}

.stage-item {
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfb 100%);
}

.stage-item strong,
.result-card strong,
.simple-item strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}

.stage-item span,
.result-card .note,
.simple-item span {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: var(--font-body);
}

.result-card .value {
  margin-top: 12px;
  font-size: 1.52rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--green-900);
}

.progress-track {
  margin-top: 14px;
  height: 8px;
  border-radius: 999px;
  background: #edf1ee;
  overflow: hidden;
}

.progress-track > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-700), var(--gold-500));
}

.upload-box {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1.5px dashed #d9e0db;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.upload-box.drag-active {
  border-color: rgba(15, 61, 46, 0.28);
  background: var(--green-100);
  box-shadow: inset 0 0 0 1px rgba(15, 61, 46, 0.06);
}

.upload-button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 22px;
  border-radius: 20px;
  background: var(--surface-alt);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Share & Sign */

.share-sign-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
}

.share-sign-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.share-summary-value {
  font-size: 1.16rem !important;
  line-height: 1.18 !important;
}

.share-link-field input[readonly] {
  background: #fbfcfb;
  color: var(--green-900);
  font-weight: 600;
}

.share-sign-button-row {
  flex-wrap: wrap;
}

#shareSignStatus[data-tone="success"],
#sharePortalStatus[data-tone="success"] {
  color: #0b6b44;
}

#shareSignStatus[data-tone="danger"],
#sharePortalStatus[data-tone="danger"] {
  color: #b34444;
}

.share-check-item {
  padding: 16px 18px;
}

.share-portal {
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 20%),
    linear-gradient(180deg, #f7f8f6 0%, #eef2ef 100%);
}

.share-portal-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.share-portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(19, 40, 31, 0.06);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.share-portal-body {
  display: grid;
  gap: 18px;
}

.share-public-card {
  gap: 18px;
}

.share-proposal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

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

.share-upload-slot {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px dashed rgba(11, 77, 59, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.share-upload-slot.drag-active {
  border-color: rgba(11, 77, 59, 0.34);
  background: #f3f7f4;
  box-shadow: inset 0 0 0 1px rgba(11, 77, 59, 0.05);
}

.share-upload-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.share-upload-head strong {
  display: block;
  margin-bottom: 4px;
}

.share-upload-head span:last-child {
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.share-upload-progress {
  height: 7px;
  border-radius: 999px;
  background: #edf1ee;
  overflow: hidden;
}

.share-upload-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-700), var(--gold-500));
}

.share-upload-actions {
  gap: 10px;
}

.share-upload-button {
  position: relative;
  overflow: hidden;
}

.share-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.share-signature-shell {
  display: grid;
  gap: 14px;
}

.share-signature-canvas {
  width: 100%;
  min-height: 220px;
  border: 1px solid rgba(19, 40, 31, 0.08);
  border-radius: 20px;
  background: #ffffff;
  touch-action: none;
}

.share-signature-preview {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(19, 40, 31, 0.06);
  border-radius: 18px;
  background: #fbfcfb;
}

.share-signature-preview img {
  max-width: 280px;
  width: 100%;
  border: 1px solid rgba(19, 40, 31, 0.06);
  border-radius: 14px;
  background: #ffffff;
}

.upload-visual {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.upload-cloud {
  width: 28px;
  height: 18px;
  position: relative;
  border-radius: 999px;
  background: var(--green-100);
}

.upload-cloud::before,
.upload-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--green-100);
}

.upload-cloud::before {
  width: 16px;
  height: 16px;
  left: 2px;
  top: -8px;
}

.upload-cloud::after {
  width: 18px;
  height: 18px;
  right: 1px;
  top: -10px;
}

.upload-button span {
  color: var(--green-900);
  font-size: 1rem;
  font-weight: 600;
}

.upload-button small {
  max-width: 320px;
  color: var(--ink-soft);
  font-size: var(--font-body);
}

.upload-status-block {
  display: grid;
  gap: 8px;
}

.button-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: var(--font-button);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

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

.button-primary {
  background: linear-gradient(180deg, #15513d 0%, #0f3d2e 100%);
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(15, 61, 46, 0.16);
}

.button-primary:hover {
  background: linear-gradient(180deg, #1a5d46 0%, #14513c 100%);
}

.button-secondary {
  background: #ffffff;
  color: var(--green-900);
  border-color: rgba(15, 61, 46, 0.11);
}

.button-secondary:hover {
  box-shadow: var(--shadow-sm);
  background: #fbfcfb;
}

.proposal-preview-shell {
  display: grid;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfb 100%);
}

.proposal-preview-shell[dir="rtl"] {
  text-align: right;
}

.proposal-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #163f31 0%, #0f3d2e 100%);
  color: #ffffff;
}

.proposal-header-copy {
  max-width: min(72%, 560px);
}

.proposal-header-aside {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.proposal-preview-logo-shell {
  min-width: 104px;
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.proposal-preview-logo {
  width: 64px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.proposal-brand {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--font-small);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.proposal-preview-header strong {
  display: block;
  margin-top: 10px;
  font-size: 1.26rem;
  line-height: 1.32;
  font-weight: 600;
}

.proposal-preview-shell[dir="rtl"] .proposal-preview-header {
  text-align: right;
}

.proposal-preview-shell[dir="rtl"] .proposal-header-aside {
  justify-items: start;
}

.proposal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: var(--font-small);
  font-weight: 600;
}

.proposal-preview-shell[dir="rtl"] .result-card,
.proposal-preview-shell[dir="rtl"] .result-card .value,
.proposal-preview-shell[dir="rtl"] .result-card .note {
  text-align: right;
}

.result-card-accent {
  background: linear-gradient(180deg, #fbf4e8 0%, #f7efe1 100%);
  border-color: rgba(198, 161, 91, 0.24);
}

.proposal-detail-list,
.proposal-bullet-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.proposal-detail-list {
  display: grid;
  gap: 12px;
}

.proposal-detail-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(19, 40, 31, 0.08);
}

.proposal-detail-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.proposal-detail-list span {
  display: block;
  color: var(--ink-soft);
  font-size: var(--font-small);
}

.proposal-detail-list strong {
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-900);
}

.proposal-bullet-list {
  display: grid;
  gap: 8px;
}

.proposal-bullet-list li {
  position: relative;
  padding-inline-start: 18px;
  color: var(--ink);
}

.proposal-bullet-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold-500);
}

.proposal-copy-block {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.proposal-copy-block p {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: var(--font-small);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip-booked {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(43, 138, 99, 0.14);
}

.status-chip-average {
  background: var(--gold-100);
  color: #9a6f1f;
  border-color: rgba(198, 161, 91, 0.18);
}

.status-chip-end {
  background: var(--green-100);
  color: var(--green-900);
  border-color: rgba(15, 61, 46, 0.1);
}

.status-chip-booked-minus,
.status-chip-refer,
.status-chip-default {
  background: #f4f5f5;
  color: #66766f;
  border-color: transparent;
}

.status-chip-cancel {
  background: var(--red-soft);
  color: var(--red-500);
  border-color: rgba(201, 103, 98, 0.12);
}

.empty-state {
  padding: 28px !important;
  text-align: center;
  color: var(--ink-soft);
  font-size: var(--font-body);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--green-900);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

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

.sidebar-toggle {
  flex-direction: column;
}

.sidebar-toggle span,
.sidebar-close span {
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.sidebar-toggle span {
  width: 18px;
  height: 2px;
}

.sidebar-close {
  position: relative;
  background: var(--surface-alt);
}

.sidebar-close span {
  position: absolute;
  width: 16px;
  height: 2px;
}

.sidebar-close span:first-child {
  transform: rotate(45deg);
}

.sidebar-close span:last-child {
  transform: rotate(-45deg);
}

/* Global rhythm and shared component polish */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--green-950);
  letter-spacing: -0.028em;
  line-height: 1.18;
}

p {
  margin: 0;
}

.auth-copy h2,
.title-block h2 {
  font-size: var(--font-page-title);
  font-weight: 700;
}

.hero-copy h3,
.card-head h3 {
  font-size: var(--font-section-header);
  font-weight: 650;
}

.proposal-preview-header strong,
.support-title,
.rule-card-head strong {
  font-size: var(--font-subheader);
  font-weight: 650;
}

.title-block p,
.hero-copy p,
.card-head p,
.meta-strip p,
.field span,
.support-copy,
.rule-card li,
.simple-item p,
.simple-item span,
.upload-status-block p {
  line-height: 1.55;
}

.page-shell {
  gap: 22px;
  padding: 22px;
}

.workspace {
  gap: 18px;
}

.panel {
  gap: 22px;
}

.panel.active {
  display: grid;
}

.panel > * + * {
  margin-top: 0;
}

.module-grid,
.dashboard-grid,
.upload-grid {
  gap: 22px;
}

.kpi-grid,
.pipeline-kpi-grid,
.result-grid,
.mini-stats,
.stage-list,
.simple-list {
  gap: 16px;
}

.topbar {
  padding: 20px 22px;
  border-radius: 24px;
}

.topbar-left,
.topbar-center,
.topbar-right {
  gap: 18px;
}

.title-block {
  gap: 5px;
}

.title-block p {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.sidebar-panel {
  padding: 26px 22px 22px;
}

.brand-block {
  gap: 14px;
}

.brand-copy {
  gap: 2px;
}

.brand-copy h1 {
  font-size: 1.4rem;
  font-weight: 700;
}

.sidebar-kicker {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  gap: 8px;
}

.nav-group {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background var(--transition), border-color var(--transition);
}

.nav-group-toggle {
  justify-content: flex-start;
  background: transparent;
  color: var(--ink-soft);
  border-color: rgba(15, 61, 46, 0.03);
  box-shadow: none;
}

.nav-caret {
  margin-left: auto;
  width: 11px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition), opacity var(--transition);
  opacity: 0.92;
}

.nav-group.expanded .nav-caret {
  transform: rotate(225deg);
}

.nav-group-menu {
  display: grid;
  gap: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0.72;
  transition: max-height var(--transition), opacity var(--transition);
}

.nav-group.expanded .nav-group-menu {
  max-height: 420px;
  opacity: 1;
  margin-top: 4px;
  padding: 8px;
  border-radius: 18px;
  background: #f3f7f4;
  border: 1px solid rgba(11, 77, 59, 0.06);
}

.nav-group-menu .nav-sub-button {
  min-height: 54px;
  margin-left: 0;
  width: 100%;
  padding: 10px 13px;
  border-color: transparent;
  background: #f7f8f6;
  box-shadow: none;
}

.nav-group.group-active .nav-group-toggle,
.nav-group-toggle.active {
  background: var(--green-700);
  color: #ffffff;
  border-color: rgba(11, 77, 59, 0.22);
  box-shadow: var(--shadow-sm);
}

.nav-group.group-active .nav-group-toggle .nav-icon,
.nav-group-toggle.active .nav-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nav-group.group-active .nav-group-toggle .nav-caret,
.nav-group-toggle.active .nav-caret {
  border-right-color: currentColor;
  border-bottom-color: currentColor;
  opacity: 1;
}

.nav-group.group-active,
.nav-group.expanded {
  background: transparent;
  box-shadow: none;
}

.nav-group-toggle:hover {
  background: rgba(11, 77, 59, 0.88);
  color: #ffffff;
  border-color: rgba(11, 77, 59, 0.2);
  box-shadow: var(--shadow-sm);
}

.nav-group-toggle:hover .nav-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nav-group-toggle:hover .nav-caret {
  opacity: 1;
}

.nav-button {
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 18px;
  align-items: center;
}

.nav-button span:last-child {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.nav-icon {
  width: 38px;
  height: 38px;
  font-size: 0.76rem;
  font-weight: 700;
}

.nav-sub-button .nav-icon {
  width: 34px;
  height: 34px;
}

.nav-sub-button:hover,
.nav-sub-button.active {
  background: #ffffff;
  border-color: rgba(11, 77, 59, 0.08);
}

.nav-sub-button.active {
  border-left: 3px solid var(--green-700);
  padding-left: 10px;
}

.rule-card,
.support-card,
.card,
.hero,
.auth-card {
  border-radius: 24px;
}

.card,
.hero {
  padding: 24px;
  border: 1px solid rgba(15, 61, 46, 0.08);
  box-shadow: var(--shadow-md);
}

.card-head {
  gap: 14px;
  margin-bottom: 18px;
}

.hero {
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hero-copy {
  display: grid;
  gap: 8px;
}

.hero-copy h3 {
  max-width: 16ch;
}

.hero-meta {
  gap: 10px;
}

.meta-strip {
  padding: 0 2px;
}

.subtle-text {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.field {
  gap: 8px;
}

.field span {
  color: #476055;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.field input,
.field select,
.field textarea,
.search-shell,
.upload-button {
  border-radius: 16px;
}

.field input,
.field select,
.field textarea {
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 61, 46, 0.12);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.search-shell:hover {
  border-color: rgba(15, 61, 46, 0.2);
}

.field textarea {
  min-height: 124px;
  resize: vertical;
}

.field-compact span,
.month-field span {
  margin-bottom: 1px;
}

.search-shell {
  min-height: var(--input-height);
  padding: 0 18px;
  background: rgba(248, 250, 248, 0.96);
  border: 1px solid rgba(15, 61, 46, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.search-shell input {
  font-size: 0.95rem;
}

.button-row {
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: var(--font-button);
  font-weight: 650;
  letter-spacing: -0.01em;
  box-shadow: none;
}

.button-primary {
  background: linear-gradient(180deg, #175643 0%, #0f3d2e 100%);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(15, 61, 46, 0.14);
}

.button-primary:hover {
  box-shadow: 0 14px 28px rgba(15, 61, 46, 0.18);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 61, 46, 0.12);
}

.button-secondary:hover {
  border-color: rgba(15, 61, 46, 0.18);
  background: #ffffff;
}

.user-chip {
  min-height: 56px;
  padding: 8px 12px 8px 8px;
  border-radius: 18px;
  border: 1px solid rgba(15, 61, 46, 0.08);
  background: rgba(255, 255, 255, 0.92);
  gap: 12px;
}

.user-chip strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 650;
  color: var(--green-950);
}

.user-chip span {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.user-avatar {
  width: 38px;
  height: 38px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(15, 61, 46, 0.06);
}

.kpi-card,
.result-card,
.stage-item,
.simple-item {
  border-radius: 20px;
  border: 1px solid rgba(15, 61, 46, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 252, 250, 0.98) 100%);
  box-shadow: var(--shadow-sm);
}

.kpi-card,
.result-card {
  padding: 20px 18px;
}

.kpi-card .label,
.result-card .label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

.kpi-card .value,
.result-card .value {
  margin-top: 10px;
  font-size: clamp(1.55rem, 1.9vw, 2rem);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--green-950);
}

.kpi-card .meta,
.result-card .meta {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.stage-item,
.simple-item {
  padding: 16px 18px;
}

.stage-item strong,
.simple-item strong {
  font-size: 0.95rem;
  font-weight: 650;
}

.stage-item span,
.simple-item span {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.table-wrap {
  border-radius: 20px;
  border: 1px solid rgba(15, 61, 46, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #f9fbf9 0%, #f1f5f1 100%);
  color: #426257;
  font-size: var(--font-table-head);
  font-weight: 700;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

th,
td {
  padding: 15px 16px;
  vertical-align: middle;
}

tbody td {
  font-size: var(--font-table-body);
  color: var(--ink);
  border-top: 1px solid rgba(15, 61, 46, 0.06);
}

tbody tr:nth-child(even) td {
  background: rgba(246, 248, 246, 0.7);
}

tbody tr:hover td {
  background: rgba(237, 245, 240, 0.72);
}

th.number,
td.number,
tbody td.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.status-chip,
.badge,
.proposal-pill {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.badge {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
}

.upload-box {
  padding: 24px;
  border-radius: 24px;
  border: 1.5px dashed rgba(15, 61, 46, 0.18);
  background: linear-gradient(180deg, rgba(250, 252, 250, 0.96) 0%, rgba(244, 247, 243, 0.96) 100%);
}

.upload-button {
  min-height: 236px;
  padding: 22px;
  gap: 16px;
}

.upload-button strong {
  font-size: 1.04rem;
  font-weight: 650;
}

.upload-button small {
  font-size: 0.87rem;
  color: var(--ink-soft);
}

.proposal-preview-shell {
  gap: 20px;
}

.proposal-preview-header {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 24px;
}

.proposal-header-copy {
  display: grid;
  gap: 6px;
}

.proposal-brand {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.proposal-preview-header strong {
  line-height: 1.2;
  max-width: 20ch;
}

.proposal-preview-grid {
  gap: 16px;
}

.proposal-preview-grid .result-card,
.proposal-preview-grid .proposal-preview-card {
  min-height: 100%;
}

.proposal-detail-list,
.proposal-bullet-list {
  margin: 0;
  padding-inline-start: 18px;
}

.proposal-copy-block p + p {
  margin-top: 8px;
}

.dashboard-export-row {
  justify-content: flex-end;
}

.agent-performance-export-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.agent-performance-export-actions .button {
  min-height: 40px;
  padding-inline: 14px;
  flex: 0 0 auto;
}

#agentPerformanceExportStatus {
  margin: -6px 0 12px;
  min-height: 22px;
}

@media (max-width: 1260px) {
  .page-shell {
    gap: 18px;
    padding: 18px;
  }

  .workspace,
  .panel,
  .module-grid,
  .dashboard-grid,
  .upload-grid {
    gap: 18px;
  }

  .card,
  .hero,
  .topbar {
    padding: 22px;
  }
}

@media (max-width: 920px) {
  .auth-copy h2,
  .title-block h2 {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
  }

  .auth-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-panel-hero {
    min-height: 340px;
    order: -1;
  }

  .auth-panel-form {
    gap: 28px;
  }

  .hero-copy h3,
  .card-head h3 {
    font-size: 1.22rem;
  }

  .page-shell {
    padding: 16px;
  }

  .topbar,
  .card,
  .hero,
  .sidebar-panel,
  .upload-box {
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 12px;
  }

  .auth-card {
    border-radius: 26px;
  }

  .auth-panel-hero,
  .auth-panel-form {
    padding: 24px 20px;
  }

  .auth-hero-copy h3 {
    max-width: 11ch;
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .auth-copy h2 {
    max-width: none;
    font-size: clamp(1.9rem, 8vw, 2.45rem);
  }

  .auth-copy p,
  .auth-hero-copy p:last-child {
    font-size: 0.95rem;
  }

  .auth-field input,
  .auth-submit {
    min-height: 60px;
    height: 60px;
  }
}

/* Proposal module reference styling */

.proposal-preview-shell {
  gap: 18px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(15, 61, 46, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
}

.proposal-preview-header {
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #054f2d 0%, #0a5b36 56%, #034b2a 100%);
  position: relative;
  overflow: hidden;
}

.proposal-preview-header::before,
.proposal-preview-header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.proposal-preview-header::before {
  width: 260px;
  height: 260px;
  right: -72px;
  top: -118px;
  background: rgba(255, 255, 255, 0.045);
}

.proposal-preview-header::after {
  width: 164px;
  height: 164px;
  right: -12px;
  top: -58px;
  background: rgba(255, 255, 255, 0.04);
}

.proposal-header-aside,
.proposal-header-copy,
.proposal-pill {
  position: relative;
  z-index: 1;
}

.proposal-header-aside {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-items: initial;
}

.proposal-preview-logo-shell {
  min-width: 118px;
  min-height: 82px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.proposal-preview-logo {
  width: 104px;
  height: auto;
  max-width: none;
  object-fit: contain;
}

.proposal-bank-copy {
  display: grid;
  gap: 2px;
}

.proposal-bank-name,
.proposal-bank-name-alt {
  margin: 0;
  color: #ffffff;
  line-height: 1.1;
}

.proposal-bank-name {
  font-size: 1.1rem;
  font-weight: 500;
}

.proposal-bank-name-alt {
  font-size: 0.94rem;
  opacity: 0.94;
}

.proposal-header-copy {
  display: grid;
  gap: 6px;
  flex: 1;
}

.proposal-brand {
  color: #ffffff;
  opacity: 1;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
}

.proposal-preview-header strong {
  margin-top: 0;
  color: #d8ac3d;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.25;
  max-width: 28ch;
}

.proposal-pill {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: #d4a223;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.proposal-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.proposal-preview-card {
  min-height: 248px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(19, 40, 31, 0.08);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 37, 29, 0.035);
}

.proposal-preview-card.is-accent {
  background: linear-gradient(180deg, #fbf4e8 0%, #f9f1e2 100%);
}

.proposal-preview-card.is-wide {
  grid-column: 1 / -1;
  min-height: 154px;
}

.proposal-preview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.proposal-preview-shell[dir="rtl"] .proposal-preview-card-head {
  flex-direction: row-reverse;
}

.proposal-preview-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #0d5d36;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.proposal-preview-card.is-accent .proposal-preview-icon {
  background: #d4a223;
}

.proposal-preview-card-title {
  flex: 1;
  color: #0f3d2e;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.proposal-preview-shell[dir="rtl"] .proposal-preview-card-title {
  text-align: right;
}

.proposal-preview-detail-list,
.proposal-preview-bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.proposal-preview-detail-list {
  display: grid;
  gap: 0;
}

.proposal-preview-detail-list li {
  padding: 10px 0 12px;
  border-bottom: 1px solid rgba(19, 40, 31, 0.08);
}

.proposal-preview-detail-list li:first-child {
  padding-top: 0;
}

.proposal-preview-detail-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.proposal-preview-detail-label {
  display: block;
  color: #425b50;
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.proposal-preview-detail-value {
  display: block;
  color: #13281f;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.proposal-preview-bullet-list {
  display: grid;
  gap: 8px;
}

.proposal-preview-bullet-item {
  position: relative;
  padding-inline-start: 20px;
  color: #13281f;
  font-size: 0.96rem;
  line-height: 1.45;
}

.proposal-preview-bullet-item::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0d5d36;
}

.proposal-preview-copy {
  display: grid;
  gap: 8px;
}

.proposal-preview-copy p {
  margin: 0;
  color: #13281f;
  font-size: 0.96rem;
  line-height: 1.55;
}

.proposal-preview-shell[dir="rtl"] .proposal-preview-grid {
  direction: rtl;
}

.proposal-preview-shell[dir="rtl"] .proposal-preview-card,
.proposal-preview-shell[dir="rtl"] .proposal-preview-copy p,
.proposal-preview-shell[dir="rtl"] .proposal-preview-detail-label,
.proposal-preview-shell[dir="rtl"] .proposal-preview-detail-value,
.proposal-preview-shell[dir="rtl"] .proposal-preview-bullet-item {
  text-align: right;
}

.proposal-preview-shell[dir="rtl"] .proposal-preview-bullet-item {
  padding-inline-start: 0;
  padding-inline-end: 20px;
}

.proposal-preview-shell[dir="rtl"] .proposal-preview-bullet-item::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

@media (max-width: 920px) {
  .proposal-preview-header {
    align-items: flex-start;
  }

  .proposal-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .proposal-header-aside,
  .proposal-preview-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .proposal-pill {
    align-self: flex-start;
  }

  .proposal-brand {
    font-size: 1.42rem;
  }
}

@media (max-width: 1400px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1260px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 16px auto 16px 16px;
    width: min(var(--sidebar-width), calc(100vw - 32px));
    transform: translateX(calc(-100% - 12px));
    transition: transform var(--transition);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-panel {
    min-height: calc(100vh - 32px);
  }

  .workspace {
    min-width: 0;
  }

  .icon-button,
  .sidebar-close {
    display: inline-flex;
  }

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

  .topbar-right {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .dashboard-grid,
  .module-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }
}

@media (max-width: 920px) {
  .incentive-form-grid,
  .incentive-summary-grid,
  .incentive-milestones {
    grid-template-columns: 1fr;
  }

  .incentive-progress-head,
  .incentive-progress-metrics,
  .incentive-progress-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .dbr-form-grid,
  .panel[data-panel="dbr-dsr"] .result-grid,
  .emi-form-grid,
  .panel[data-panel="emi"] .result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .emi-calculator-card,
  .emi-summary-card {
    padding: 22px;
  }

  .emi-result-card .value {
    font-size: 1.2rem;
  }

  .panel[data-panel="emi"] table {
    min-width: 680px;
  }
}

@media (max-width: 920px) {
  .page-shell {
    padding: 16px;
    gap: 16px;
  }

  .hero,
  .proposal-preview-header {
    flex-direction: column;
  }

  .hero-meta {
    justify-content: flex-start;
  }

  .topbar-left,
  .topbar-right {
    flex-wrap: wrap;
  }

  .form-grid,
  .mini-stats,
  .pipeline-kpi-grid,
  #salesTargetGrid,
  .auth-demo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .card,
  .hero,
  .topbar {
    padding: 18px;
  }

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

  .field-compact,
  .month-field,
  .search-shell {
    width: 100%;
  }

  .button {
    flex: 1 1 auto;
  }

  th,
  td {
    padding: 13px 14px;
  }
}

/* Proposal preview responsiveness and customer-facing header */

.proposal-preview-shell {
  overflow: hidden;
}

.proposal-preview-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.proposal-preview-frame {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
}

.proposal-preview-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border-radius: 20px;
  background: linear-gradient(90deg, #024d2c 0%, #055a34 54%, #024828 100%);
  overflow: visible;
  position: relative;
}

.proposal-preview-header::before {
  content: "";
  position: absolute;
  inset: 12px 24px auto auto;
  width: 180px;
  height: 180px;
  border: 10px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.proposal-preview-header::after {
  content: "";
  position: absolute;
  inset: 42px 54px auto auto;
  width: 112px;
  height: 112px;
  border: 8px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.proposal-header-aside {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.proposal-preview-logo-shell {
  min-width: 130px;
  width: 130px;
  min-height: 60px;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
}

.proposal-preview-logo {
  width: 130px;
  max-width: 130px;
  height: auto;
  display: block;
}

.proposal-bank-copy {
  display: grid;
  gap: 3px;
}

.proposal-bank-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
}

.proposal-bank-name-alt {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
}

.proposal-bank-name-alt.is-hidden {
  display: none !important;
}

.proposal-brand {
  color: #ffffff;
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
}

.proposal-header-copy {
  width: 100%;
  position: relative;
  z-index: 1;
}

.proposal-preview-header strong {
  color: #d4a223;
  font-size: 0.98rem;
  font-weight: 600;
  max-width: 42ch;
  display: block;
  line-height: 1.35;
  text-align: center;
}

.proposal-pill {
  background: #d4a223;
  color: #ffffff;
  box-shadow: none;
  align-self: center;
  position: relative;
  z-index: 1;
}

.proposal-preview-grid {
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.proposal-preview-card {
  min-height: 236px;
}

.proposal-preview-card.is-wide {
  min-height: 148px;
}

.proposal-preview-detail-value,
.proposal-preview-copy p,
.proposal-preview-bullet-item {
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 1366px) {
  .proposal-preview-frame {
    max-width: 900px;
  }
}

@media (max-width: 900px) {
  .proposal-preview-header {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 22px;
  }

  .proposal-preview-grid {
    grid-template-columns: 1fr;
  }

  .proposal-preview-card,
  .proposal-preview-card.is-wide {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .proposal-preview-frame {
    max-width: 100%;
  }

  .proposal-preview-logo-shell,
  .proposal-preview-logo {
    width: 116px;
    min-width: 116px;
    max-width: 116px;
  }

  .proposal-brand {
    font-size: 1.24rem;
  }

  .proposal-preview-header strong {
    font-size: 0.92rem;
  }

  .proposal-preview-card {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .proposal-preview-shell {
    padding: 14px;
  }

  .proposal-preview-frame {
    min-width: 0;
  }

  .proposal-preview-header {
    align-items: flex-start;
    gap: 12px;
    padding: 18px 18px 16px;
  }

  .proposal-header-aside,
  .proposal-preview-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .proposal-brand,
  .proposal-preview-header strong {
    text-align: left;
  }

  .proposal-preview-logo-shell,
  .proposal-preview-logo {
    width: 108px;
    min-width: 108px;
    max-width: 108px;
  }

  .proposal-bank-name {
    font-size: 0.94rem;
  }

  .proposal-bank-name-alt {
    font-size: 0.82rem;
  }

  .proposal-brand {
    font-size: 1.1rem;
  }

  .proposal-preview-header strong {
    font-size: 0.88rem;
    max-width: none;
  }

  .proposal-pill {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.84rem;
  }

  .proposal-preview-detail-label {
    font-size: 0.8rem;
  }

  .proposal-preview-detail-value,
  .proposal-preview-copy p,
  .proposal-preview-bullet-item {
    font-size: 0.92rem;
  }

  #generatePdfButton,
  #downloadPdfButton {
    min-height: 50px;
  }

  .panel[data-panel="proposal"] .button-row {
    flex-direction: column;
  }
}

/* Dashboard command center */
.dashboard-hero-card {
  padding: 32px 34px;
  border-color: rgba(11, 77, 59, 0.08);
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
}

.dashboard-hero-copy {
  display: grid;
  gap: 12px;
}

.dashboard-kicker {
  margin: 0;
  color: var(--green-800);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dashboard-hero-card h3 {
  margin: 0;
  max-width: 12ch;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-kpi-card {
  min-height: 192px;
  gap: 18px;
  padding: 22px 22px 20px;
  border-color: rgba(11, 77, 59, 0.08);
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.08), transparent 20%),
    linear-gradient(180deg, #ffffff 0%, #fdfdfc 100%);
}

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

.dashboard-kpi-top p {
  max-width: 14ch;
}

.dashboard-trend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.dashboard-trend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.dashboard-trend-positive {
  color: #126d44;
  background: rgba(18, 109, 68, 0.1);
}

.dashboard-trend-warning {
  color: #9a6b0f;
  background: rgba(198, 161, 91, 0.18);
}

.dashboard-trend-negative {
  color: #b04848;
  background: rgba(176, 72, 72, 0.1);
}

.dashboard-trend-neutral,
.dashboard-trend-info,
.dashboard-trend-soft,
.dashboard-trend-strong {
  color: #557169;
  background: rgba(85, 113, 105, 0.11);
}

.dashboard-command-grid,
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.dashboard-quick-actions-card,
.dashboard-pipeline-overview-card,
.dashboard-performance-card,
.dashboard-activity-card,
.dashboard-pipeline-detail-card,
.dashboard-leaderboard-card,
.dashboard-chart-card {
  border-color: rgba(11, 77, 59, 0.08);
}

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

.quick-action-card {
  min-height: 158px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(11, 77, 59, 0.08);
  border-radius: 22px;
  background: #ffffff;
  color: var(--green-900);
  text-align: left;
  box-shadow: 0 10px 24px rgba(15, 61, 46, 0.045);
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.quick-action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 77, 59, 0.18);
  box-shadow: 0 18px 34px rgba(15, 61, 46, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfa 100%);
}

.quick-action-card strong {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.28;
}

.quick-action-card span:last-child {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.quick-action-card-export {
  cursor: default;
}

.quick-action-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(11, 77, 59, 0.08);
  color: var(--green-900);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.dashboard-export-row .button {
  min-width: 0;
  flex: 1;
}

.dashboard-export-status {
  margin-top: 14px;
}

.emi-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.emi-form-note {
  margin-top: 16px;
}

.emi-summary-card #emiStatus {
  margin-top: 4px;
}

.emi-result-card .value {
  font-size: 1.34rem;
}

.panel[data-panel="emi"] .result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel[data-panel="emi"] .table-wrap {
  overflow-x: auto;
}

.panel[data-panel="emi"] table {
  min-width: 760px;
}

.pipeline-workflow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.workflow-stage {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(11, 77, 59, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.workflow-stage strong {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--green-900);
}

.workflow-stage-label,
.workflow-stage-value {
  font-size: 0.86rem;
}

.workflow-stage-label {
  color: #5d736c;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workflow-stage-value {
  color: var(--ink-soft);
}

.workflow-stage-warning {
  border-color: rgba(198, 161, 91, 0.28);
}

.workflow-stage-positive,
.workflow-stage-strong {
  border-color: rgba(22, 109, 68, 0.16);
}

.dashboard-stage-summary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(11, 77, 59, 0.08);
}

.dashboard-stage-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-stage-summary-head h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-900);
}

.dashboard-stage-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stage-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(11, 77, 59, 0.08);
  border-radius: 18px;
  background: #ffffff;
}

.stage-list-item strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-900);
}

.dashboard-analytics-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-chart-card,
.dashboard-leaderboard-card {
  min-height: 100%;
}

.dashboard-chart-wide {
  grid-column: span 6;
}

.dashboard-chart-card {
  grid-column: span 3;
}

.dashboard-leaderboard-card {
  grid-column: span 12;
}

.chart-surface {
  min-height: 260px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 18px;
  border: 1px solid rgba(11, 77, 59, 0.06);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
}

.chart-empty-state {
  margin: auto;
  color: var(--ink-soft);
  font-size: 0.94rem;
  text-align: center;
}

.trend-chart {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  align-items: end;
  gap: 14px;
}

.trend-chart-item {
  display: grid;
  gap: 10px;
}

.trend-chart-value,
.trend-chart-label {
  font-size: 0.82rem;
}

.trend-chart-value {
  color: var(--green-900);
  font-weight: 700;
}

.trend-chart-bar-track {
  height: 152px;
  display: flex;
  align-items: end;
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7faf8 0%, #eef4f0 100%);
}

.trend-chart-bar-track i {
  width: 100%;
  display: block;
  border-radius: 14px;
  background: linear-gradient(180deg, #d4af37 0%, #0b4d3b 100%);
}

.trend-chart-label {
  color: var(--ink-soft);
}

.comparison-stack,
.performance-bars,
.distribution-chart {
  width: 100%;
  display: grid;
  gap: 14px;
}

.comparison-item,
.performance-bar-row,
.distribution-item,
.activity-item {
  display: grid;
  align-items: center;
  gap: 12px;
}

.comparison-item {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 1.2fr) auto;
}

.comparison-copy strong,
.performance-bar-copy strong,
.distribution-copy strong,
.activity-copy strong {
  display: block;
  color: var(--green-900);
  font-size: 0.95rem;
  font-weight: 700;
}

.comparison-copy span,
.performance-bar-copy span,
.distribution-copy span,
.activity-copy p,
.activity-meta {
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.5;
}

.comparison-meter,
.performance-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #ecf2ee;
  overflow: hidden;
}

.comparison-meter-fill,
.performance-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.comparison-meter-green,
.performance-bar-track i {
  background: linear-gradient(90deg, #0b4d3b 0%, #2f7d63 100%);
}

.comparison-meter-gold {
  background: linear-gradient(90deg, #d4af37 0%, #c18f12 100%);
}

.comparison-meter-soft {
  background: linear-gradient(90deg, #8fb4a6 0%, #5e8e7e 100%);
}

.comparison-value,
.performance-bar-value {
  color: var(--green-900);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
}

.performance-bar-row {
  grid-template-columns: minmax(0, 1fr) minmax(100px, 1.4fr) auto;
}

.distribution-chart {
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
}

.distribution-donut {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 43%, transparent 44%),
    conic-gradient(#0b4d3b 0 38%, #d4af37 38% 64%, #7fa394 64% 84%, #dfe8e2 84% 100%);
  box-shadow: inset 0 0 0 1px rgba(11, 77, 59, 0.06);
}

.distribution-donut-core {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 61, 46, 0.05);
}

.distribution-donut-core strong {
  color: var(--green-900);
  font-size: 1.3rem;
  font-weight: 700;
}

.distribution-donut-core span {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.distribution-list {
  display: grid;
  gap: 12px;
}

.distribution-item {
  grid-template-columns: auto minmax(0, 1fr);
}

.distribution-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 4px;
}

.distribution-dot-1 { background: #0b4d3b; }
.distribution-dot-2 { background: #d4af37; }
.distribution-dot-3 { background: #7fa394; }
.distribution-dot-4 { background: #dfe8e2; }

.compact-table table {
  min-width: 0;
}

.dashboard-activity-list {
  display: grid;
  gap: 12px;
}

.dashboard-activity-empty {
  padding: 22px 0;
  color: var(--ink-soft);
  text-align: center;
}

.activity-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 15px 16px;
  border: 1px solid rgba(11, 77, 59, 0.08);
  border-radius: 18px;
  background: #ffffff;
}

.activity-tone {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.activity-tone-success { background: #19784b; }
.activity-tone-warning { background: #d4af37; }
.activity-tone-danger { background: #bd5a47; }

.activity-copy p {
  margin: 4px 0 0;
}

.achievement-cell {
  min-width: 140px;
  display: grid;
  gap: 10px;
}

.achievement-label {
  color: var(--green-900);
  font-size: 0.84rem;
  font-weight: 700;
}

.progress-track-compact {
  margin-top: 0;
  height: 7px;
}

.dashboard-performance-card td,
.dashboard-leaderboard-card td {
  white-space: nowrap;
}

.dashboard-performance-card td:last-child {
  white-space: normal;
}

.dashboard-performance-card td:first-child,
.dashboard-leaderboard-card td:nth-child(2),
.dashboard-activity-card,
.dashboard-pipeline-detail-card td:nth-child(2),
.dashboard-pipeline-detail-card td:nth-child(3),
.dashboard-pipeline-detail-card td:nth-child(4) {
  white-space: normal;
}

@media (max-width: 1440px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-workflow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-chart-wide,
  .dashboard-chart-card {
    grid-column: span 6;
  }
}

@media (max-width: 1180px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-command-grid,
  .dashboard-bottom-grid,
  .distribution-chart {
    grid-template-columns: 1fr;
  }

  .dashboard-activity-card {
    order: 2;
  }

  .dashboard-performance-card {
    order: 1;
  }

  .distribution-donut {
    margin: 0 auto;
  }
}

@media (max-width: 920px) {
  .dashboard-hero-card {
    padding: 28px 24px;
  }

  .dashboard-kpi-grid,
  .pipeline-workflow,
  .dashboard-stage-list,
  .quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-chart-wide,
  .dashboard-chart-card,
  .dashboard-leaderboard-card {
    grid-column: span 12;
  }

  .dashboard-analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .dashboard-kpi-grid,
  .pipeline-workflow,
  .dashboard-stage-list,
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-card,
  .dashboard-command-grid,
  .dashboard-bottom-grid,
  .dashboard-analytics-grid {
    gap: 16px;
  }

  .dashboard-kpi-card,
  .quick-action-card,
  .workflow-stage,
  .chart-surface,
  .activity-item {
    padding-left: 16px;
    padding-right: 16px;
  }

  .comparison-item,
  .performance-bar-row,
  .activity-item {
    grid-template-columns: 1fr;
  }

  .comparison-value,
  .performance-bar-value,
  .activity-meta {
    text-align: left;
  }
}

/* Simplified management dashboard */
#managerDashboardContent {
  gap: 18px;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-kpi-card-compact {
  min-height: 150px;
  gap: 10px;
  padding: 18px 18px 16px;
  border-color: rgba(11, 77, 59, 0.08);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 61, 46, 0.045);
}

.dashboard-kpi-card-compact p {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-kpi-card-compact h3 {
  margin-top: 6px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.dashboard-kpi-card-compact .kpi-foot {
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dashboard-management-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.dashboard-performance-card,
.dashboard-leaderboard-card {
  min-height: 100%;
}

.dashboard-performance-card .card-head,
.dashboard-leaderboard-card .card-head {
  margin-bottom: 16px;
}

.dashboard-performance-card .table-wrap,
.dashboard-leaderboard-card .table-wrap {
  border-radius: 18px;
}

/* Incentive calculator */
.incentive-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.incentive-form-note {
  margin-top: 16px;
}

.incentive-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.incentive-summary-card-item .value {
  font-size: 1.36rem;
}

.incentive-progress-shell {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(15, 61, 46, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(250, 252, 250, 0.98) 0%, rgba(244, 248, 245, 0.98) 100%);
}

.incentive-progress-head,
.incentive-progress-metrics,
.incentive-progress-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.incentive-progress-head strong,
.incentive-progress-metrics strong {
  display: block;
  color: var(--green-950);
  font-size: 0.98rem;
  font-weight: 700;
}

.incentive-progress-head span,
.incentive-progress-metrics span,
.incentive-progress-foot span {
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.incentive-progress-track {
  margin-top: 0;
  height: 10px;
}

.incentive-progress-track > i {
  background: linear-gradient(90deg, #c96762 0%, #cf9e28 52%, #166d44 100%);
}

.incentive-progress-success {
  background: linear-gradient(90deg, #1f8a58 0%, #166d44 100%) !important;
}

.incentive-progress-warning {
  background: linear-gradient(90deg, #d4a223 0%, #bf8e1c 100%) !important;
}

.incentive-progress-danger {
  background: linear-gradient(90deg, #c96762 0%, #b34444 100%) !important;
}

.incentive-milestones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.incentive-milestone {
  padding: 14px 12px;
  border: 1px solid rgba(15, 61, 46, 0.08);
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
}

.incentive-milestone strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green-950);
  font-size: 0.96rem;
  font-weight: 700;
}

.incentive-milestone span {
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.4;
}

.incentive-milestone.is-unlocked {
  border-color: rgba(22, 109, 68, 0.18);
  background: rgba(22, 109, 68, 0.06);
}

.incentive-row-success td {
  background: rgba(11, 77, 59, 0.06);
}

.incentive-row-warning td {
  background: rgba(212, 175, 55, 0.08);
}

.incentive-row-danger td {
  background: rgba(179, 68, 68, 0.07);
}

#incentiveStatus[data-tone="success"] {
  color: #0b6b44;
}

#incentiveStatus[data-tone="warning"] {
  color: #9a6f1f;
}

#incentiveStatus[data-tone="danger"] {
  color: #b34444;
}

.incentive-cases-table {
  min-width: 920px;
}

/* Profit dashboard */
.profit-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.profit-kpi-card[data-tone="success"] {
  border-color: rgba(43, 138, 99, 0.18);
}

.profit-kpi-card[data-tone="warning"] {
  border-color: rgba(212, 175, 55, 0.22);
}

.profit-kpi-card[data-tone="danger"] {
  border-color: rgba(201, 103, 98, 0.2);
}

#profitStatus[data-tone="success"] {
  color: #0b6b44;
}

#profitStatus[data-tone="danger"] {
  color: #b34444;
}

#profitStatus[data-tone="warning"] {
  color: #9a6f1f;
}

.profit-table-card .table-wrap {
  border-radius: 18px;
}

.profit-ytd-card .table-wrap {
  border-radius: 18px;
}

.profit-ytd-table {
  min-width: 1280px;
}

.profit-ytd-table th,
.profit-ytd-table td {
  padding: 12px 14px;
}

.profit-ytd-table th {
  white-space: nowrap;
}

.profit-ytd-table td {
  white-space: nowrap;
}

.profit-ytd-table td:nth-child(3) {
  min-width: 220px;
  white-space: normal;
}

.profit-ytd-not-joined {
  color: var(--ink-500);
  font-weight: 600;
  font-style: italic;
}

.profit-ytd-total-row td {
  background: rgba(11, 77, 59, 0.05);
  border-top: 1px solid rgba(11, 77, 59, 0.08);
}

.profit-achievement-cell {
  min-width: 180px;
}

.profit-achievement-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.profit-progress-bar {
  background: var(--green-700);
}

.profit-progress-success {
  background: linear-gradient(90deg, #0b6b44, #2b8a63);
}

.profit-progress-warning {
  background: linear-gradient(90deg, #d4af37, #c9951a);
}

.profit-progress-danger {
  background: linear-gradient(90deg, #c96762, #b34444);
}

.agent-achievement-cell {
  min-width: 180px;
  display: grid;
  gap: 8px;
}

.agent-achievement-meta {
  display: grid;
  gap: 2px;
}

.agent-achievement-percent {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.agent-achievement-remaining {
  color: var(--ink-500);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.25;
}

.agent-achievement-track {
  height: 8px;
  background: #edf1ee;
}

.agent-achievement-bar {
  background: var(--green-700);
}

.agent-achievement-cell[data-tone="success"] .agent-achievement-percent {
  color: #0b6b44;
}

.agent-achievement-cell[data-tone="success"] .agent-achievement-bar {
  background: linear-gradient(90deg, #0b6b44, #2b8a63);
}

.agent-achievement-cell[data-tone="warning"] .agent-achievement-percent {
  color: #b88910;
}

.agent-achievement-cell[data-tone="warning"] .agent-achievement-bar {
  background: linear-gradient(90deg, #d4af37, #c9951a);
}

.agent-achievement-cell[data-tone="danger"] .agent-achievement-percent {
  color: #b34444;
}

.agent-achievement-cell[data-tone="danger"] .agent-achievement-bar {
  background: linear-gradient(90deg, #c96762, #b34444);
}

@media (max-width: 1280px) {
  .profit-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .profit-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .profit-kpi-grid {
    grid-template-columns: 1fr;
  }

  .profit-achievement-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.dashboard-performance-card table,
.dashboard-leaderboard-card table {
  min-width: 0;
}

.dashboard-performance-card th,
.dashboard-performance-card td,
.dashboard-leaderboard-card th,
.dashboard-leaderboard-card td {
  padding: 14px 16px;
}

.dashboard-performance-card td:first-child,
.dashboard-leaderboard-card td:nth-child(2) {
  white-space: normal;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4f0;
  color: var(--green-900);
  font-size: 0.82rem;
  font-weight: 700;
}

.rank-1 {
  background: rgba(212, 175, 55, 0.2);
  color: #8b6710;
}

.rank-2 {
  background: rgba(11, 77, 59, 0.12);
}

.rank-3 {
  background: rgba(127, 163, 148, 0.18);
}

@media (max-width: 1320px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .dashboard-management-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-performance-card th,
  .dashboard-performance-card td,
  .dashboard-leaderboard-card th,
  .dashboard-leaderboard-card td {
    padding: 12px 14px;
  }
}

/* Final responsive portal audit */

.table-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

@media (max-width: 1366px) {
  .page-shell {
    gap: 22px;
    padding: 20px;
  }

  .topbar {
    padding: 20px 22px;
  }

  .card,
  .sidebar-panel {
    border-radius: 24px;
  }
}

@media (max-width: 768px) {
  .page-shell {
    padding: 14px;
    gap: 14px;
  }

  .sidebar {
    inset: 12px auto 12px 12px;
    width: min(var(--sidebar-width), calc(100vw - 24px));
  }

  .sidebar-panel {
    min-height: calc(100vh - 24px);
    padding: 18px;
    gap: 16px;
  }

  .brand-block {
    gap: 12px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .sidebar-kicker {
    font-size: 1.08rem;
  }

  .brand-copy h1 {
    font-size: 0.84rem;
    line-height: 1.3;
  }

  .nav-button {
    min-height: 48px;
    padding: 12px 13px;
  }

  .topbar {
    gap: 14px;
    padding: 18px;
  }

  .topbar-left,
  .topbar-center,
  .topbar-right {
    width: 100%;
    min-width: 0;
  }

  .topbar-left,
  .topbar-right {
    justify-content: flex-start;
  }

  .title-block {
    min-width: 0;
  }

  .title-block h2 {
    font-size: clamp(1.45rem, 6vw, 1.95rem);
    line-height: 1.08;
  }

  .title-block p {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .search-shell,
  .month-field,
  .user-chip {
    width: 100%;
    min-width: 0;
  }

  .search-shell input {
    min-width: 0;
  }

  .user-chip {
    justify-content: flex-start;
    padding: 10px 12px;
  }

  .user-avatar {
    width: 40px;
    height: 40px;
  }

  .panel {
    gap: 14px;
  }

  .card,
  .hero,
  .topbar {
    padding: 18px 16px;
  }

  .card-head {
    gap: 10px;
    margin-bottom: 16px;
  }

  .card-head h3 {
    font-size: 1.22rem;
  }

  .card-head .subtle-text,
  .subtle-text {
    line-height: 1.55;
  }

  .kpi-grid,
  .dashboard-kpi-grid,
  .profit-kpi-grid,
  .mini-stats,
  .pipeline-kpi-grid,
  .result-grid,
  .dashboard-management-grid,
  .dashboard-grid,
  .module-grid,
  .upload-grid,
  .form-grid,
  #salesTargetGrid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .kpi-card,
  .dashboard-kpi-card-compact,
  .profit-kpi-card {
    min-height: 132px;
    padding: 16px;
  }

  .kpi-card h3,
  .dashboard-kpi-card-compact h3 {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
  }

  .field {
    gap: 8px;
  }

  .field input,
  .field select,
  .field textarea,
  .search-shell,
  .upload-button,
  .button,
  .icon-button {
    min-height: 48px;
  }

  .field textarea {
    min-height: 132px;
  }

  .button-row {
    gap: 10px;
  }

  .button-row .button {
    width: 100%;
    justify-content: center;
  }

  .table-wrap {
    margin-inline: -2px;
    border-radius: 18px;
  }

  table {
    min-width: 680px;
  }

  th,
  td {
    padding: 12px 13px;
    font-size: 0.86rem;
  }

  .dashboard-performance-card table,
  .dashboard-leaderboard-card table,
  .profit-table-card table {
    min-width: 720px;
  }

  .agent-achievement-cell,
  .profit-achievement-cell {
    min-width: 160px;
  }

  .proposal-preview-shell {
    padding: 16px;
    gap: 14px;
  }

  .proposal-preview-scroll {
    padding-bottom: 4px;
  }

  .proposal-preview-frame {
    width: auto;
    min-width: 680px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .auth-screen {
    padding: 10px;
  }

  .auth-card {
    min-height: auto;
    border-radius: 24px;
  }

  .auth-panel-form,
  .auth-panel-hero {
    padding: 22px 18px;
  }

  .auth-brand {
    gap: 12px;
  }

  .auth-copy h2 {
    max-width: none;
    font-size: clamp(1.8rem, 10vw, 2.3rem);
  }

  .page-shell {
    padding: 10px;
    gap: 12px;
  }

  .sidebar {
    inset: 10px auto 10px 10px;
    width: calc(100vw - 20px);
  }

  .sidebar-panel {
    min-height: calc(100vh - 20px);
    padding: 16px;
    border-radius: 22px;
  }

  .topbar {
    gap: 12px;
    padding: 16px 14px;
    border-radius: 22px;
  }

  .title-block h2 {
    font-size: 1.32rem;
  }

  .title-block p {
    font-size: 0.8rem;
  }

  .user-chip {
    gap: 10px;
  }

  .user-chip strong {
    font-size: 0.88rem;
  }

  .user-chip span {
    font-size: 0.75rem;
  }

  .card,
  .hero {
    padding: 16px 14px;
    border-radius: 20px;
  }

  .card-head h3 {
    font-size: 1.12rem;
    line-height: 1.2;
  }

  .kpi-card,
  .dashboard-kpi-card-compact,
  .profit-kpi-card {
    min-height: 124px;
    padding: 15px 14px;
  }

  .kpi-card p,
  .dashboard-kpi-card-compact p {
    font-size: 0.78rem;
  }

  .kpi-card h3,
  .dashboard-kpi-card-compact h3 {
    font-size: 1.42rem;
  }

  .field input,
  .field select,
  .field textarea,
  .search-shell,
  .upload-button,
  .button,
  .icon-button,
  .nav-button {
    min-height: 46px;
  }

  .button {
    padding-inline: 16px;
  }

  table {
    min-width: 620px;
  }

  .dashboard-performance-card table,
  .dashboard-leaderboard-card table,
  .profit-table-card table {
    min-width: 680px;
  }

  .profit-ytd-table {
    min-width: 1120px;
  }

  .proposal-preview-shell {
    padding: 14px;
  }

  .proposal-preview-frame {
    min-width: 620px;
  }

  .proposal-preview-header {
    padding: 16px 16px 14px;
  }
}

/* Agent Performance mobile compaction */

.dashboard-performance-card .table-wrap {
  border-radius: 16px;
}

.dashboard-performance-card th,
.dashboard-performance-card td {
  padding: 12px 14px;
}

.dashboard-performance-card th {
  font-size: 0.74rem;
}

.dashboard-performance-card td {
  font-size: 0.86rem;
}

.dashboard-performance-card .agent-achievement-cell {
  min-width: 150px;
  gap: 6px;
}

.dashboard-performance-card .agent-achievement-percent {
  font-size: 0.86rem;
}

.dashboard-performance-card .agent-achievement-remaining {
  font-size: 0.7rem;
  line-height: 1.15;
}

.dashboard-performance-card .agent-achievement-track {
  height: 6px;
}

@media (min-width: 1041px) {
  .dashboard-management-grid {
    grid-template-columns: minmax(0, 2.28fr) minmax(260px, 0.72fr);
    gap: 18px;
  }

  .dashboard-performance-card {
    padding: 22px 24px 20px;
  }

  .dashboard-performance-card .card-head {
    margin-bottom: 14px;
    padding-right: 4px;
  }

  .dashboard-performance-card .table-wrap {
    width: 100%;
    overflow-x: visible;
  }

  .dashboard-performance-card table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .dashboard-performance-card th,
  .dashboard-performance-card td {
    padding: 13px 14px;
    font-variant-numeric: tabular-nums;
  }

  .dashboard-performance-card th:nth-child(1),
  .dashboard-performance-card td:nth-child(1) {
    width: 25%;
  }

  .dashboard-performance-card th:nth-child(2),
  .dashboard-performance-card td:nth-child(2) {
    width: 15%;
  }

  .dashboard-performance-card th:nth-child(3),
  .dashboard-performance-card td:nth-child(3) {
    width: 15%;
  }

  .dashboard-performance-card th:nth-child(4),
  .dashboard-performance-card td:nth-child(4) {
    width: 13%;
  }

  .dashboard-performance-card th:nth-child(5),
  .dashboard-performance-card td:nth-child(5) {
    width: 32%;
  }

  .dashboard-performance-card th {
    white-space: nowrap;
  }

  .dashboard-performance-card .agent-performance-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 18px;
  }

  .dashboard-performance-card .agent-achievement-cell {
    min-width: 220px;
    width: 100%;
    gap: 8px;
  }

  .dashboard-performance-card .agent-achievement-meta {
    gap: 10px;
  }

  .dashboard-performance-card td:nth-child(2),
  .dashboard-performance-card td:nth-child(3),
  .dashboard-performance-card td:nth-child(4) {
    white-space: nowrap;
  }

  .dashboard-performance-card td:nth-child(5) {
    white-space: normal;
    min-width: 0;
  }

  .dashboard-performance-card .agent-achievement-remaining {
    white-space: nowrap;
  }

  .dashboard-performance-card .agent-achievement-track {
    width: 100%;
    height: 7px;
  }
}

@media (max-width: 1040px) {
  .share-sign-grid,
  .share-proposal-grid,
  .share-upload-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .share-portal {
    padding: 16px;
  }

  .share-portal-topbar {
    padding: 16px;
    border-radius: 20px;
    align-items: flex-start;
    flex-direction: column;
  }

  .share-sign-summary-grid {
    grid-template-columns: 1fr;
  }

  .share-signature-canvas {
    min-height: 180px;
  }
}

@media (max-width: 768px) {
  .dashboard-performance-card .card-head {
    margin-bottom: 12px;
  }

  .dashboard-performance-card th,
  .dashboard-performance-card td {
    padding: 11px 12px;
  }

  .dashboard-performance-card td:first-child {
    min-width: 128px;
  }

  .dashboard-performance-card .agent-achievement-cell {
    min-width: 138px;
    gap: 5px;
  }
}

@media (max-width: 520px) {
  .dashboard-performance-card table {
    min-width: 640px;
  }

  .dashboard-performance-card th,
  .dashboard-performance-card td {
    padding: 10px 11px;
  }

  .dashboard-performance-card th {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  .dashboard-performance-card td {
    font-size: 0.82rem;
  }

  .dashboard-performance-card .agent-achievement-cell {
    min-width: 126px;
    gap: 4px;
  }

  .dashboard-performance-card .agent-achievement-percent {
    font-size: 0.8rem;
  }

  .dashboard-performance-card .agent-achievement-remaining {
    font-size: 0.67rem;
  }

  .dashboard-performance-card .agent-achievement-track {
    height: 5px;
  }
}

@media (max-width: 640px) {
  .dashboard-performance-card .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .dashboard-performance-card table,
  .dashboard-performance-card tbody {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .dashboard-performance-card thead {
    display: none;
  }

  .dashboard-performance-card tbody {
    display: grid;
    gap: 12px;
  }

  .dashboard-performance-card .agent-performance-row {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(15, 61, 46, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 61, 46, 0.04);
  }

  .dashboard-performance-card .agent-performance-row td {
    display: grid;
    grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
    gap: 10px 14px;
    align-items: start;
    padding: 0;
    border: 0;
    font-size: 0.84rem;
    white-space: normal !important;
    text-align: left;
    background: transparent;
  }

  .dashboard-performance-card .agent-performance-row td::before {
    content: attr(data-label);
    color: #687b73;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .dashboard-performance-card .agent-performance-name {
    display: block !important;
    padding-bottom: 2px;
    color: var(--green-900);
    font-size: 0.98rem !important;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .dashboard-performance-card .agent-performance-name::before {
    display: none;
  }

  .dashboard-performance-card .agent-performance-achievement {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .dashboard-performance-card .agent-performance-achievement::before {
    margin-bottom: -2px;
  }

  .dashboard-performance-card .agent-achievement-cell {
    min-width: 0;
    gap: 6px;
  }

  .dashboard-performance-card .agent-achievement-meta {
    gap: 3px;
  }

  .dashboard-performance-card .agent-achievement-percent {
    font-size: 0.92rem;
  }

  .dashboard-performance-card .agent-achievement-remaining {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .dashboard-performance-card .agent-achievement-track {
    height: 7px;
  }
}

@media (max-width: 420px) {
  .dashboard-performance-card .agent-performance-row {
    padding: 12px;
    gap: 9px;
    border-radius: 16px;
  }

  .dashboard-performance-card .agent-performance-row td {
    grid-template-columns: minmax(84px, auto) minmax(0, 1fr);
    gap: 8px 12px;
    font-size: 0.81rem;
  }

  .dashboard-performance-card .agent-performance-name {
    font-size: 0.94rem !important;
  }

  .dashboard-performance-card .agent-achievement-percent {
    font-size: 0.88rem;
  }

  .dashboard-performance-card .agent-achievement-track {
    height: 6px;
  }
}

/* Desktop fintech refinement */

@media (min-width: 1024px) {
  .auth-card {
    width: min(1220px, 100%);
    min-height: min(860px, calc(100vh - 32px));
    border-radius: 30px;
  }

  .auth-panel-form {
    gap: 28px;
    padding: clamp(30px, 4vw, 56px);
  }

  .auth-panel-hero {
    gap: 26px;
    padding: clamp(30px, 4vw, 46px);
  }

  .auth-copy h2 {
    max-width: none;
    font-size: clamp(2.3rem, 3vw, 2.95rem);
  }

  .auth-copy p {
    max-width: 34ch;
  }

  .auth-form {
    max-width: 440px;
    gap: 16px;
  }

  .auth-field input,
  .auth-submit {
    min-height: 60px;
  }

  .auth-hero-copy h3 {
    max-width: 11ch;
    font-size: clamp(2.1rem, 2.8vw, 3rem);
    line-height: 1.04;
  }

  .auth-hero-copy p:last-child {
    max-width: 36ch;
    font-size: 0.98rem;
  }

  .page-shell {
    width: min(1560px, 100%);
    margin: 0 auto;
    grid-template-columns: 286px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
  }

  .workspace,
  .panel,
  #managerDashboardContent,
  #salesDashboardContent {
    gap: 16px;
  }

  .sidebar-panel {
    min-height: calc(100vh - 36px);
    padding: 20px 18px;
    gap: 16px;
    border-radius: 26px;
  }

  .brand-block {
    gap: 14px;
    padding-bottom: 6px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
  }

  .sidebar-kicker {
    font-size: 1.18rem;
  }

  .brand-copy h1 {
    margin-top: 2px;
    font-size: 0.85rem;
    line-height: 1.3;
  }

  .sidebar-nav {
    gap: 8px;
  }

  .nav-button {
    gap: 12px;
    padding: 10px 11px;
    border-radius: 16px;
  }

  .nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .support-card {
    padding: 16px 18px;
    border-radius: 18px;
  }

  .support-copy {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .topbar {
    grid-template-columns: auto minmax(220px, 1fr) auto;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 24px;
  }

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

  .title-block h2 {
    font-size: clamp(1.72rem, 2vw, 2.25rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
  }

  .title-block p {
    margin-top: 4px;
    font-size: 0.84rem;
    line-height: 1.42;
  }

  .search-shell {
    height: 54px;
    padding: 0 16px;
    border-radius: 18px;
  }

  .field-compact {
    min-width: 168px;
  }

  .field span {
    font-size: 0.78rem;
  }

  .field input,
  .field select {
    height: 52px;
    padding: 0 16px;
    border-radius: 16px;
  }

  .field textarea {
    min-height: 112px;
    padding: 14px 16px;
    border-radius: 16px;
  }

  .user-chip {
    gap: 10px;
    padding: 8px 10px 8px 8px;
    border-radius: 18px;
  }

  .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .user-chip strong {
    font-size: 0.86rem;
  }

  .user-chip span {
    font-size: 0.74rem;
  }

  .button,
  .badge {
    min-height: 46px;
    border-radius: 14px;
  }

  .meta-strip {
    padding: 0 2px;
  }

  .subtle-text,
  .card-head .subtle-text {
    font-size: 0.84rem;
    line-height: 1.52;
  }

  .card,
  .hero {
    padding: 20px;
    border-radius: 24px;
  }

  .card-head {
    gap: 10px;
    margin-bottom: 14px;
  }

  .card-head h3 {
    font-size: 1.18rem;
    line-height: 1.18;
    letter-spacing: -0.03em;
  }

  .hero {
    gap: 18px;
    padding: 24px;
  }

  .hero h3 {
    font-size: clamp(1.8rem, 2.1vw, 2.15rem);
    line-height: 1.04;
  }

  .hero .subtle-text {
    margin-top: 10px;
    max-width: 56ch;
  }

  .kpi-grid,
  .form-grid,
  .mini-stats,
  .result-grid,
  .simple-list {
    gap: 14px;
  }

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

  .dashboard-kpi-card-compact {
    min-height: 132px;
    gap: 8px;
    padding: 16px 16px 14px;
    border-radius: 22px;
  }

  .dashboard-kpi-card-compact p {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
  }

  .dashboard-kpi-card-compact h3 {
    margin-top: 2px;
    font-size: clamp(1.4rem, 1.75vw, 1.85rem);
  }

  .dashboard-kpi-card-compact .kpi-foot {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .kpi-card,
  .profit-kpi-grid .kpi-card {
    min-height: 142px;
    padding: 18px 18px 16px;
    border-radius: 22px;
  }

  .kpi-card p {
    font-size: 0.82rem;
  }

  .kpi-card h3 {
    margin-top: 10px;
    font-size: clamp(1.5rem, 1.95vw, 2.05rem);
  }

  .dashboard-management-grid {
    grid-template-columns: minmax(0, 1.48fr) minmax(300px, 0.92fr);
    gap: 14px;
  }

  .module-grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: 16px;
  }

  .upload-grid {
    grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
    gap: 16px;
  }

  .upload-box {
    gap: 16px;
    padding: 20px;
    border-radius: 22px;
  }

  .upload-button {
    gap: 8px;
    padding: 20px 18px;
    border-radius: 18px;
  }

  .upload-visual {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }

  .result-card,
  .simple-item,
  .stage-item {
    padding: 16px;
    border-radius: 18px;
  }

  .result-card .value {
    margin-top: 10px;
    font-size: 1.34rem;
  }

  .table-wrap,
  .dashboard-performance-card .table-wrap,
  .dashboard-leaderboard-card .table-wrap,
  .profit-table-card .table-wrap {
    border-radius: 16px;
  }

  table {
    min-width: 700px;
  }

  th,
  td {
    padding: 13px 14px;
  }

  th {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  td {
    font-size: 0.84rem;
  }

  .dashboard-performance-card td,
  .dashboard-leaderboard-card td,
  .profit-table-card td {
    padding: 12px 13px;
  }

  .profit-ytd-table td,
  .profit-ytd-table th {
    padding: 11px 12px;
  }

  .agent-achievement-cell,
  .profit-achievement-cell {
    min-width: 168px;
    gap: 6px;
  }

  .agent-achievement-percent {
    font-size: 0.88rem;
  }

  .agent-achievement-remaining {
    font-size: 0.69rem;
  }

  .proposal-preview-shell {
    padding: 18px;
    gap: 16px;
    border-radius: 22px;
  }

  .proposal-preview-header {
    border-radius: 18px;
  }

  .proposal-preview-grid {
    gap: 14px;
  }

  .proposal-preview-card {
    min-height: 210px;
    padding: 16px;
    border-radius: 18px;
  }

  .proposal-preview-card.is-wide {
    min-height: 132px;
  }

  .button-row {
    gap: 10px;
  }
}

@media (min-width: 1280px) {
  .page-shell {
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 20px;
  }

  .topbar {
    padding: 15px 18px;
  }

  .dashboard-management-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  }
}

@media (min-width: 1041px) {
  .dashboard-management-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
  }

  .dashboard-management-grid > .dashboard-performance-card,
  .dashboard-management-grid > .dashboard-leaderboard-card {
    grid-column: auto;
  }

  .dashboard-performance-card,
  .dashboard-leaderboard-card {
    min-height: 100%;
  }

  .dashboard-performance-card .card-head,
  .dashboard-leaderboard-card .card-head {
    margin-bottom: 12px;
    align-items: flex-start;
  }

  .dashboard-performance-card .card-head h3,
  .dashboard-leaderboard-card .card-head h3 {
    font-size: 1.06rem;
    line-height: 1.22;
    letter-spacing: -0.015em;
  }

  .dashboard-performance-card .card-head .subtle-text,
  .dashboard-leaderboard-card .card-head .subtle-text {
    margin-top: 4px;
    font-size: 0.83rem;
    line-height: 1.45;
  }

  .dashboard-performance-card .table-wrap,
  .dashboard-leaderboard-card .table-wrap {
    width: 100%;
  }

  .dashboard-performance-card .table-wrap {
    overflow-x: hidden;
  }

  .dashboard-performance-card table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .dashboard-performance-card th,
  .dashboard-performance-card td {
    padding: 13px 16px;
    font-variant-numeric: tabular-nums;
  }

  .dashboard-performance-card th {
    white-space: nowrap;
  }

  .dashboard-performance-card th:nth-child(1),
  .dashboard-performance-card td:nth-child(1) {
    width: 24%;
  }

  .dashboard-performance-card th:nth-child(2),
  .dashboard-performance-card td:nth-child(2) {
    width: 15%;
  }

  .dashboard-performance-card th:nth-child(3),
  .dashboard-performance-card td:nth-child(3) {
    width: 14%;
  }

  .dashboard-performance-card th:nth-child(4),
  .dashboard-performance-card td:nth-child(4) {
    width: 13%;
  }

  .dashboard-performance-card th:nth-child(5),
  .dashboard-performance-card td:nth-child(5) {
    width: 34%;
  }

  .dashboard-performance-card .agent-performance-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dashboard-performance-card td:nth-child(2),
  .dashboard-performance-card td:nth-child(3),
  .dashboard-performance-card td:nth-child(4) {
    white-space: nowrap;
  }

  .dashboard-performance-card td:nth-child(5) {
    white-space: normal;
  }

  .dashboard-performance-card .agent-achievement-cell {
    min-width: 0;
    width: 100%;
    gap: 8px;
  }

  .dashboard-performance-card .agent-achievement-meta {
    display: grid;
    gap: 4px;
    justify-items: start;
  }

  .dashboard-performance-card .agent-achievement-percent {
    font-size: 0.95rem;
    line-height: 1.05;
  }

  .dashboard-performance-card .agent-achievement-remaining {
    white-space: normal;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .dashboard-performance-card .agent-achievement-track {
    width: 100%;
    height: 7px;
  }
}
