/* ========================================
   BIVA V2 — COMPACT CLIENT DASHBOARD
======================================== */


/* ========================================
   PAGE
======================================== */

.client-executive-page {
  min-height: 100vh;

  background:
    linear-gradient(
      180deg,
      #f5f7fb 0%,
      #ffffff 100%
    );
}

.client-executive-container {
  width: 100%;
  min-width: 0;
}

.client-dashboard-layout {
  width: 100%;
  min-height: 100vh;

  display: flex;
}

.client-dashboard-workspace {
  width: 100%;
  min-width: 0;

  padding:
    clamp(16px, 2vw, 26px);
}


/* ========================================
   COMPACT HERO
======================================== */

.client-executive-hero {
  position: relative;

  width: 100%;
  min-height: 165px;

  padding:
    22px 26px;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr);

  align-items: center;

  gap: 0;

  border:
    1px solid
    rgba(255, 255, 255, 0.08);

  border-radius: 20px;

  color:
    #ffffff;

  background:
    radial-gradient(
      circle at 94% 4%,
      rgba(53, 112, 243, 0.34),
      transparent 34%
    ),
    radial-gradient(
      circle at 3% 100%,
      rgba(255, 200, 46, 0.07),
      transparent 28%
    ),
    linear-gradient(
      145deg,
      var(--biva-black),
      var(--biva-black-soft) 58%,
      #173675
    );

  box-shadow:
    0 18px 48px
    rgba(7, 11, 20, 0.16);

  overflow: hidden;
}

.client-executive-hero::before {
  content: "";

  position: absolute;
  inset: 0 0 auto 0;

  height: 3px;

  background:
    linear-gradient(
      90deg,
      var(--biva-blue-500),
      var(--biva-yellow-400),
      transparent 82%
    );
}

.client-executive-hero::after {
  content: "";

  position: absolute;

  width: 210px;
  height: 210px;

  right: -95px;
  bottom: -155px;

  border:
    1px solid
    rgba(255, 255, 255, 0.05);

  border-radius: 50%;

  box-shadow:
    0 0 0 38px
    rgba(255, 255, 255, 0.018),

    0 0 0 76px
    rgba(255, 255, 255, 0.009);

  pointer-events: none;
}

.client-executive-hero > * {
  position: relative;
  z-index: 1;
}


/* ========================================
   HERO CONTENT
======================================== */

.client-executive-kicker {
  display: block;

  margin-bottom: 7px;

  color:
    var(--biva-yellow-400);

  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.client-executive-hero-main h1 {
  max-width: 900px;

  margin: 0;

  overflow-wrap: anywhere;

  color:
    #ffffff;

  font-size:
    clamp(1.8rem, 3vw, 3.15rem);

  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.055em;
}

.client-executive-hero-main p {
  max-width: 820px;

  margin: 10px 0 0;

  color:
    rgba(255, 255, 255, 0.64);

  font-size: 0.74rem;
  line-height: 1.5;
}

.client-executive-hero-main p strong {
  color:
    #ffffff;
}

.client-dashboard-refresh-btn {
  width: fit-content;
  min-height: 36px;

  margin-top: 13px;
  padding:
    0 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  border:
    1px solid
    rgba(255, 255, 255, 0.15);

  border-radius: 11px;

  color:
    #ffffff;

  background:
    rgba(255, 255, 255, 0.065);

  font:
    inherit;

  font-size: 0.6rem;
  font-weight: 820;

  cursor: pointer;

  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.client-dashboard-refresh-btn:hover {
  border-color:
    rgba(255, 255, 255, 0.25);

  background:
    rgba(255, 255, 255, 0.12);
}

.client-dashboard-refresh-btn:disabled {
  opacity: 0.55;

  cursor: wait;
}

.client-dashboard-refresh-btn svg {
  width: 15px;
  height: 15px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}



/* ========================================
   COMPACT KPI GRID
======================================== */

.client-executive-kpi-grid {
  margin-top: 16px;

  display: grid;

  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  gap: 10px;
}

.client-executive-kpi-card {
  min-width: 0;
  min-height: 94px;

  padding: 12px;

  display: flex;
  align-items: flex-start;

  gap: 10px;

  border:
    1px solid
    var(--biva-line);

  border-radius: 14px;

  color:
    inherit;

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8faff
    );

  box-shadow:
    0 5px 16px
    rgba(15, 31, 58, 0.055);

  font:
    inherit;

  text-align: left;

  cursor: pointer;

  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.client-executive-kpi-card:hover {
  border-color:
    rgba(53, 112, 243, 0.21);

  box-shadow:
    0 8px 22px
    rgba(15, 31, 58, 0.08);

  transform:
    translateY(-1px);
}

.client-executive-kpi-icon {
  width: 34px;
  height: 34px;

  flex:
    0 0 34px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  color:
    var(--biva-blue-700);

  background:
    var(--biva-blue-50);
}

.client-executive-kpi-icon svg {
  width: 17px;
  height: 17px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-executive-kpi-copy {
  min-width: 0;

  display: grid;

  gap: 4px;
}

.client-executive-kpi-copy
> small {
  color:
    var(--biva-muted);

  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1.35;
}

.client-executive-kpi-copy
> strong {
  color:
    var(--biva-ink);

  font-size:
    clamp(1.15rem, 2vw, 1.8rem);

  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.client-executive-kpi-copy
> span {
  color:
    var(--biva-muted);

  font-size: 0.52rem;
  line-height: 1.35;
}


/* ========================================
   FINANCE + INVOICES LAYOUT
======================================== */

.client-dashboard-finance-layout {
  margin-top: 16px;

  display: grid;

  grid-template-columns:
    minmax(0, 1.12fr)
    minmax(340px, 0.88fr);

  align-items: stretch;

  gap: 12px;
}

.client-dashboard-finance-column,
.client-dashboard-invoice-column {
  min-width: 0;
}

.client-dashboard-finance-column {
  display: block;
}

.client-dashboard-financial-summary,
.client-dashboard-recent-invoices {
  height: 100%;
}


/* ========================================
   FINANCIAL SUMMARY
======================================== */

.client-dashboard-financial-summary {
  min-width: 0;

  padding: 18px;

  border:
    1px solid
    var(--biva-line);

  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      #ffffff,
      #f8fbff
    );

  box-shadow:
    0 7px 22px
    rgba(15, 31, 58, 0.065);
}

.client-dashboard-financial-summary__header
> span,
.client-dashboard-recent-invoices__header
> div
> span {
  display: block;

  margin-bottom: 4px;

  color:
    var(--biva-blue-600);

  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.client-dashboard-financial-summary__header h2,
.client-dashboard-recent-invoices__header h2 {
  margin: 0;

  color:
    var(--biva-ink);

  font-size:
    clamp(1.05rem, 1.8vw, 1.45rem);

  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.client-dashboard-financial-summary__header p,
.client-dashboard-recent-invoices__header p {
  margin: 5px 0 0;

  color:
    var(--biva-muted);

  font-size: 0.59rem;
  line-height: 1.45;
}

.client-dashboard-financial-summary__grid {
  margin-top: 15px;

  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 0;
}

.client-dashboard-financial-total {
  min-width: 0;

  padding: 16px 18px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.client-dashboard-financial-total:first-child {
  border-right:
    1px solid
    var(--biva-line);
}

.client-dashboard-financial-total
> span {
  margin-bottom: 8px;

  color:
    #5a6780;

  font-size: 0.68rem;
  font-weight: 760;
}

.client-dashboard-financial-total
> strong {
  display: grid;

  gap: 3px;

  font-size:
    clamp(1.65rem, 3vw, 2.8rem);

  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.05em;
}

.client-dashboard-financial-total.is-paid
> strong {
  color:
    #55a96c;
}

.client-dashboard-financial-total.is-outstanding
> strong {
  color:
    #e58a12;
}

.client-dashboard-financial-total
.client-dashboard-money-line {
  display: block;
}

.client-dashboard-financial-total
> small {
  margin-top: 9px;

  color:
    var(--biva-muted);

  font-size: 0.55rem;
}


/* ========================================
   RECENT INVOICES
======================================== */

.client-dashboard-recent-invoices {
  min-width: 0;

  padding: 18px;

  border:
    1px solid
    var(--biva-line);

  border-radius: 16px;

  background:
    #ffffff;

  box-shadow:
    0 7px 22px
    rgba(15, 31, 58, 0.065);
}

.client-dashboard-recent-invoices__header {
  margin-bottom: 13px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 12px;
}

.client-dashboard-recent-invoices__header
> div {
  min-width: 0;
}

.client-dashboard-recent-invoices__header
> button {
  width: fit-content;
  min-height: 34px;

  padding:
    0 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 6px;

  border:
    1px solid
    rgba(53, 112, 243, 0.15);

  border-radius: 10px;

  color:
    var(--biva-blue-700);

  background:
    var(--biva-blue-50);

  font:
    inherit;

  font-size: 0.56rem;
  font-weight: 840;

  white-space: nowrap;

  cursor: pointer;
}

.client-dashboard-recent-invoices__header
> button:hover {
  background:
    var(--biva-blue-100);
}

.client-dashboard-recent-invoices__header
> button svg {
  width: 14px;
  height: 14px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ========================================
   INVOICE LIST
======================================== */

.client-dashboard-compact-list {
  display: grid;

  gap: 8px;
}

.client-dashboard-compact-item {
  width: 100%;
  min-width: 0;
  min-height: 60px;

  padding: 10px 11px;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto
    auto;

  align-items: center;

  gap: 10px;

  border:
    1px solid
    var(--biva-line);

  border-radius: 11px;

  color:
    inherit;

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8faff
    );

  font:
    inherit;

  text-align: left;

  cursor: pointer;

  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.client-dashboard-compact-item:hover {
  border-color:
    rgba(53, 112, 243, 0.2);

  background:
    var(--biva-blue-50);

  transform:
    translateY(-1px);
}

.client-dashboard-compact-item
> span {
  min-width: 0;
}

.client-dashboard-compact-item strong {
  display: block;

  overflow-wrap: anywhere;

  color:
    var(--biva-ink);

  font-size: 0.6rem;
  font-weight: 850;
  line-height: 1.35;
}

.client-dashboard-compact-item small {
  display: block;

  margin-top: 2px;

  color:
    var(--biva-muted);

  font-size: 0.49rem;
  line-height: 1.35;
}


/* ========================================
   STATUS BADGES
======================================== */

.client-executive-status-badge {
  width: fit-content;
  min-height: 22px;

  padding:
    3px 7px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid
    rgba(53, 112, 243, 0.14);

  border-radius: 999px;

  color:
    var(--biva-blue-700);

  background:
    var(--biva-blue-50);

  font-size: 0.49rem;
  font-weight: 850;
}

.client-executive-status-badge[data-status="active"],
.client-executive-status-badge[data-status="open"],
.client-executive-status-badge[data-status="paid"],
.client-executive-status-badge[data-status="completed"] {
  color:
    var(--biva-success);

  border-color:
    rgba(7, 148, 85, 0.14);

  background:
    var(--biva-success-soft);
}

.client-executive-status-badge[data-status="pending"],
.client-executive-status-badge[data-status="received"],
.client-executive-status-badge[data-status="reviewing"],
.client-executive-status-badge[data-status="issued"] {
  color:
    #805800;

  border-color:
    rgba(242, 183, 5, 0.18);

  background:
    var(--biva-yellow-50);
}

.client-executive-status-badge[data-status="rejected"],
.client-executive-status-badge[data-status="cancelled"],
.client-executive-status-badge[data-status="overdue"],
.client-executive-status-badge[data-status="failed"] {
  color:
    var(--biva-danger);

  border-color:
    rgba(217, 45, 32, 0.14);

  background:
    var(--biva-danger-soft);
}


/* ========================================
   EMPTY PANEL
======================================== */

.client-executive-panel-empty {
  min-height: 105px;

  padding: 18px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border:
    1px dashed
    var(--biva-line-strong);

  border-radius: 11px;

  background:
    var(--biva-surface-soft);

  text-align: center;
}

.client-executive-panel-empty strong {
  color:
    var(--biva-ink);

  font-size: 0.65rem;
  font-weight: 850;
}

.client-executive-panel-empty span {
  max-width: 390px;

  margin-top: 4px;

  color:
    var(--biva-muted);

  font-size: 0.54rem;
  line-height: 1.4;
}


/* ========================================
   COMPACT SUPPORT PANEL
======================================== */

.client-dashboard-full-support {
  margin-top: 14px;
}

.client-executive-panel {
  min-width: 0;

  border:
    1px solid
    var(--biva-line);

  border-radius: 16px;

  background:
    #ffffff;

  box-shadow:
    0 7px 22px
    rgba(15, 31, 58, 0.06);
}

.client-executive-support-panel {
  position: relative;

  padding: 16px 18px;

  display: grid;

  grid-template-columns:
    auto minmax(0, 1fr) auto;

  align-items: center;

  gap: 13px;

  color:
    #ffffff;

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(53, 112, 243, 0.25),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      var(--biva-black),
      var(--biva-black-soft),
      #173675
    );

  overflow: hidden;
}

.client-executive-support-panel
> span {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border:
    1px solid
    rgba(255, 255, 255, 0.1);

  border-radius: 13px;

  color:
    var(--biva-yellow-400);

  background:
    rgba(255, 255, 255, 0.055);
}

.client-executive-support-panel
> span svg {
  width: 20px;
  height: 20px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-executive-support-panel small {
  display: block;

  margin-bottom: 3px;

  color:
    var(--biva-yellow-400);

  font-size: 0.51rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.client-executive-support-panel h2 {
  margin: 0;

  color:
    #ffffff;

  font-size:
    clamp(0.95rem, 1.8vw, 1.35rem);

  font-weight: 900;
  letter-spacing: -0.035em;
}

.client-executive-support-panel p {
  max-width: 720px;

  margin: 5px 0 0;

  color:
    rgba(255, 255, 255, 0.6);

  font-size: 0.56rem;
  line-height: 1.45;
}

.client-executive-support-panel
> button {
  width: fit-content;
  min-height: 34px;

  padding:
    0 11px;

  border:
    1px solid
    rgba(255, 255, 255, 0.15);

  border-radius: 10px;

  color:
    #ffffff;

  background:
    rgba(255, 255, 255, 0.07);

  font:
    inherit;

  font-size: 0.56rem;
  font-weight: 840;

  white-space: nowrap;

  cursor: pointer;
}

.client-executive-support-panel
> button:hover {
  background:
    rgba(255, 255, 255, 0.13);
}


/* ========================================
   FOOTER
======================================== */

.client-executive-footer {
  margin-top: 14px;

  padding:
    10px 2px 2px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;

  color:
    var(--biva-muted);
}

.client-executive-footer
> div {
  display: grid;

  gap: 2px;
}

.client-executive-footer strong {
  color:
    var(--biva-ink);

  font-size: 0.58rem;
  font-weight: 900;
}

.client-executive-footer span {
  font-size: 0.5rem;
  line-height: 1.4;
}


/* ========================================
   LOADING
======================================== */

.client-executive-loading {
  min-height: 100vh;

  padding: 40px 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.client-executive-loading strong {
  margin-top: 12px;

  color:
    var(--biva-ink);

  font-size: 0.76rem;
  font-weight: 860;
}

.client-executive-loading p {
  max-width: 420px;

  margin: 5px 0 0;

  color:
    var(--biva-muted);

  font-size: 0.61rem;
  line-height: 1.45;
}


/* ========================================
   ERROR STATE
======================================== */

.client-executive-error {
  min-height: 100vh;

  padding: 40px 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.client-executive-error-icon {
  width: 50px;
  height: 50px;

  display: grid;
  place-items: center;

  border-radius: 15px;

  color:
    var(--biva-danger);

  background:
    var(--biva-danger-soft);

  font-size: 1.2rem;
  font-weight: 900;
}

.client-executive-error h1 {
  margin:
    13px 0 0;

  color:
    var(--biva-ink);

  font-size:
    clamp(1.3rem, 2.5vw, 1.9rem);

  font-weight: 900;
  letter-spacing: -0.04em;
}

.client-executive-error p {
  max-width: 500px;

  margin:
    7px auto 0;

  color:
    var(--biva-muted);

  font-size: 0.64rem;
  line-height: 1.5;
}

.client-dashboard-error-actions {
  margin-top: 15px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;
}

.client-executive-primary-btn,
.client-executive-secondary-btn {
  min-height: 36px;

  padding:
    0 12px;

  border-radius: 10px;

  font:
    inherit;

  font-size: 0.58rem;
  font-weight: 850;

  cursor: pointer;
}

.client-executive-primary-btn {
  border:
    1px solid
    var(--biva-blue-600);

  color:
    #ffffff;

  background:
    var(--biva-blue-600);
}

.client-executive-secondary-btn {
  border:
    1px solid
    var(--biva-line);

  color:
    var(--biva-text);

  background:
    #ffffff;
}


/* ========================================
   MEDIUM DESKTOP
======================================== */

@media (max-width: 1250px) {

  .client-executive-kpi-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

}


/* ========================================
   TABLET
======================================== */

@media (max-width: 1000px) {

  .client-executive-hero {
    min-height: auto;

    grid-template-columns: 1fr;

    padding: 21px;
  }

  .client-dashboard-finance-layout {
    grid-template-columns: 1fr;
  }

  .client-dashboard-financial-summary,
  .client-dashboard-recent-invoices {
    height: auto;
  }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 700px) {

  .client-dashboard-workspace {
    padding:
      12px 10px 20px;
  }

  .client-executive-hero {
    padding:
      18px 14px;

    gap: 16px;

    border-radius: 16px;
  }

  .client-executive-hero-main h1 {
    font-size:
      clamp(1.65rem, 9vw, 2.5rem);
  }

  .client-executive-hero-main p {
    margin-top: 8px;

    font-size: 0.68rem;
  }

  .client-dashboard-refresh-btn {
    width: 100%;

    margin-top: 11px;
  }

  .client-executive-profile-card {
    padding: 12px;
  }

  .client-executive-profile-details {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .client-executive-kpi-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 8px;

    margin-top: 12px;
  }

  .client-executive-kpi-card {
    min-height: 88px;

    padding: 10px;
  }

  .client-executive-kpi-icon {
    width: 31px;
    height: 31px;

    flex-basis: 31px;
  }

  .client-executive-kpi-copy
  > strong {
    font-size: 1.25rem;
  }

  .client-dashboard-finance-layout {
    margin-top: 12px;

    gap: 10px;
  }

  .client-dashboard-financial-summary,
  .client-dashboard-recent-invoices {
    padding: 14px;

    border-radius: 14px;
  }

  .client-dashboard-financial-summary__grid {
    grid-template-columns: 1fr;

    margin-top: 11px;
  }

  .client-dashboard-financial-total {
    padding:
      13px 8px;
  }

  .client-dashboard-financial-total:first-child {
    border-right: 0;

    border-bottom:
      1px solid
      var(--biva-line);
  }

  .client-dashboard-financial-total
  > strong {
    font-size:
      clamp(1.65rem, 10vw, 2.35rem);
  }

  .client-dashboard-recent-invoices__header {
    align-items: stretch;
    flex-direction: column;

    margin-bottom: 10px;
  }

  .client-dashboard-recent-invoices__header
  > button {
    width: 100%;
  }

  .client-dashboard-compact-item {
    grid-template-columns: 1fr;

    align-items: start;

    min-height: 0;
  }

  .client-executive-support-panel {
    padding: 14px;

    grid-template-columns: 1fr;

    align-items: start;
  }

  .client-executive-support-panel
  > button {
    width: 100%;
  }

  .client-executive-footer {
    align-items: flex-start;
    flex-direction: column;

    gap: 5px;
  }

  .client-dashboard-error-actions {
    width: 100%;

    flex-direction: column;
  }

  .client-executive-primary-btn,
  .client-executive-secondary-btn {
    width: 100%;
  }

}


/* ========================================
   SMALL PHONES
======================================== */

@media (max-width: 420px) {

  .client-executive-profile-details {
    grid-template-columns: 1fr;
  }

  .client-executive-kpi-grid {
    grid-template-columns: 1fr;
  }

  .client-executive-kpi-card {
    min-height: 76px;

    align-items: center;
  }

}


/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {

  .client-executive-kpi-card,
  .client-dashboard-compact-item,
  .client-dashboard-refresh-btn {
    transition: none;
  }

}