:root {
  --ink: #0b2d63;
  --ink-soft: #244a82;
  --muted: #7183a6;
  --line: #d8e3f1;
  --surface: #ffffff;
  --canvas: #f5f9fd;
  --blue: #0b5ed7;
  --blue-soft: #e8f2ff;
  --green: #0f9f6e;
  --green-soft: #def7ec;
  --gold: #a66a16;
  --gold-soft: #f5ebdc;
  --red: #c83333;
  --red-soft: #fde8e8;
  --purple: #7f56d9;
  --cyan: #0891b2;
  --shadow: 0 16px 40px rgba(21, 52, 94, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--canvas);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
.action-button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 16px;
  background: linear-gradient(180deg, #3f8ce5, #1767c7);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(11, 94, 215, 0.18);
}

button:hover,
.action-button:hover {
  filter: brightness(0.98);
}

.secondary,
button.secondary,
.policy-card-actions .secondary {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: linear-gradient(135deg, rgba(11, 94, 215, 0.09), transparent 38%), var(--canvas);
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(145deg, #0b5ed7, #0b2d63);
  font-size: 22px;
  line-height: 1;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  font-weight: 800;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.auth-copy,
.subtitle,
#statusMessage,
#importStatus,
.screen-kicker {
  color: var(--muted);
}

.field-label {
  display: block;
  margin: 18px 0 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

input[type="email"],
input[type="password"],
input[type="file"],
input[type="search"],
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
}

input:focus,
select:focus {
  outline: 3px solid rgba(11, 94, 215, 0.16);
  border-color: var(--blue);
}

.primary-action {
  width: 100%;
  margin-top: 22px;
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--ink-soft);
}

.app-shell {
  min-height: 100vh;
  background: var(--canvas);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--line);
  padding: 32px 18px 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  padding: 0 10px 20px;
  border-bottom: 1px solid var(--line);
}

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

.nav-item,
.nav-group-label {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  text-align: left;
  text-decoration: none;
  font-weight: 800;
}

.nav-group-label {
  border: 0;
}

.nav-subitem {
  display: block;
  margin: 4px 0 4px 48px;
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.nav-item:hover,
.nav-item.active,
.nav-group-label:hover,
.nav-group-label.active,
.nav-subitem:hover,
.nav-subitem.active {
  background: var(--blue-soft);
  color: #064fb7;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #c7dbf2;
  border-radius: 8px;
  color: var(--blue);
  background: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.agent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(21, 52, 94, 0.06);
}

.agent-avatar,
.user-chip,
.policy-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #f7fbff;
  font-weight: 800;
}

.agent-card strong,
.agent-card span {
  display: block;
}

.agent-card span {
  color: var(--muted);
  font-size: 13px;
}

.workspace-panel {
  min-width: 0;
  padding: 34px clamp(18px, 3vw, 38px);
}

.app-header,
.screen-heading,
.section-heading,
.table-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* =====================================================
   PROFILE DROPDOWN
===================================================== */

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.profile-menu {
  position: relative;
}

.profile-menu-button {
  display: flex;
  align-items: center;
  gap: 10px;

  min-height: 44px;
  padding: 6px 10px;

  border: 1px solid transparent;
  border-radius: 12px;

  background: transparent;
  color: inherit;

  font: inherit;
  text-align: left;
  cursor: pointer;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.profile-menu-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-menu-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.profile-menu-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.profile-menu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;
  flex: 0 0 34px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.14);
  color: inherit;

  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.profile-menu-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-menu-identity strong {
  max-width: 180px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 14px;
  line-height: 1.2;
}

.profile-menu-identity span {
  margin-top: 2px;

  font-size: 12px;
  line-height: 1.2;
  opacity: 0.7;
}

.profile-menu-arrow {
  margin-left: 2px;

  font-size: 12px;
  opacity: 0.65;

  transition: transform 0.2s ease;
}

.profile-menu-button[aria-expanded="true"]
  .profile-menu-arrow {
  transform: rotate(180deg);
}

.profile-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1000;

  width: 260px;
  padding: 8px;

  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;

  background: #ffffff;
  color: #1f2937;

  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.14),
    0 4px 12px rgba(15, 23, 42, 0.08);
}

.profile-menu-dropdown.hidden {
  display: none;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  width: 100%;
  min-height: 42px;
  padding: 9px 11px;

  border: 0;
  border-radius: 9px;

  background: transparent;
  color: inherit;

  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;

  transition: background-color 0.16s ease;
}

.profile-menu-item:hover:not(:disabled) {
  background: #f3f4f6;
}

.profile-menu-item:focus-visible {
  outline: 2px solid #64748b;
  outline-offset: -2px;
}

.profile-menu-item span {
  font-size: 11px;
  opacity: 0.55;
}

.profile-menu-item:disabled {
  cursor: default;
  opacity: 0.65;
}

.profile-menu-divider {
  height: 1px;
  margin: 7px 4px;

  background: rgba(15, 23, 42, 0.1);
}

.profile-menu-logout {
  color: #b42318;
}

.profile-menu-logout:hover {
  background: #fef3f2;
}


/* =====================================================
   SIDEBAR IDENTITY PLACEHOLDER
===================================================== */

.identity-card {
  display: flex;
  flex-direction: column;
  gap: 5px;

  margin: 12px;
  padding: 14px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.06);
}

.identity-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
}

.identity-card-title {
  font-size: 14px;
  line-height: 1.3;
}

.identity-card-description {
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.68;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 700px) {
  .profile-menu-identity {
    display: none;
  }

  .profile-menu-arrow {
    display: none;
  }

  .profile-menu-button {
    padding: 5px;
  }

  .profile-menu-dropdown {
    width: min(260px, calc(100vw - 24px));
  }
}

.app-header {
  margin-bottom: 22px;
}

.screen-heading,
.section-heading,
.table-header {
  margin-bottom: 16px;
}

.subtitle {
  margin-bottom: 0;
  font-size: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost-button,
.logout-button {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.logout-button {
  color: var(--red);
}

.module-screen[hidden] {
  display: none;
}

.module-screen.is-active {
  display: block;
}

.summary-grid,
.category-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.summary-card,
.shortcut-card {
  position: relative;
  min-height: 136px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.summary-card[data-view-link],
.shortcut-card {
  cursor: pointer;
}

.summary-card::after,
.shortcut-card::after {
  content: "";
  position: absolute;
  top: 30px;
  right: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--blue-soft);
}

.summary-card .label,
.shortcut-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-card strong,
.shortcut-card strong {
  display: block;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.shortcut-card strong {
  font-size: 20px;
}

.summary-meta {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
}

.summary-card.urgent,
.shortcut-card.urgent {
  border-bottom-color: var(--red);
}

.summary-card.urgent::after,
.shortcut-card.urgent::after {
  background: var(--red-soft);
}

.summary-card.upcoming,
.shortcut-card.upcoming {
  border-bottom-color: var(--gold);
}

.summary-card.upcoming::after,
.shortcut-card.upcoming::after {
  background: var(--gold-soft);
}

.summary-card.current,
.shortcut-card.renewal {
  border-bottom-color: var(--green);
}

.summary-card.current::after,
.shortcut-card.renewal::after {
  background: var(--green-soft);
}

.shortcut-card.amparada {
  border-bottom-color: var(--purple);
}

.shortcut-card.review {
  border-bottom-color: var(--cyan);
}

.panel-card,
.summary-card,
.shortcut-card,
.category,
.policy-card {
  border-radius: var(--radius);
}

.panel-card {
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filters-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) minmax(180px, 240px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
}

.filters-bar label span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.queue-panel {
  padding: 18px;
  margin-bottom: 22px;
}

#statusMessage,
#importStatus {
  margin: 0;
  font-size: 14px;
  text-align: right;
}

.action-queue {
  display: grid;
  gap: 12px;
}

.category {
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  background: #ffffff;
}

.category.payment_urgent {
  border-left-color: var(--red);
}

.category.cancellation_risk {
  border-left-color: var(--gold);
}

.category.payment_upcoming {
  border-left-color: var(--blue);
}

.category.amparada {
  border-left-color: var(--purple);
}

.category.renewal {
  border-left-color: var(--green);
}

.category.review {
  border-left-color: var(--cyan);
}

.category-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  border: 0;
  border-radius: 0;
  padding: 14px 18px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
}

.category-header:hover {
  background: #f8fbff;
}

.category-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue);
  font-size: 11px;
}

.category-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.category-content.hidden {
  display: none;
}

.policy-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 2fr);
  gap: 18px;
  border: 1px solid var(--line);
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(21, 52, 94, 0.06);
}

.policy-card-header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.policy-card-header > div:first-of-type {
  min-width: 0;
}

.policy-card-header h4 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 18px;
}

.policy-card-header p,
.policy-card-metrics span {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.policy-card-metrics {
  display: grid;
  align-content: start;
  gap: 7px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.policy-card-metrics::after {
  content: "Referencia emocional pendiente";
  color: var(--ink-soft);
  font-size: 13px;
}

.policy-card-metrics strong {
  color: var(--blue);
  font-size: 20px;
}

.card-badges {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.payment_upcoming {
  background: var(--blue-soft);
  color: #0756bc;
}

.status-pill.payment_urgent,
.status-pill.cancellation_risk {
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.amparada {
  background: #eee8ff;
  color: #6941c6;
}

.status-pill.renewal {
  background: var(--green-soft);
  color: var(--green);
}

.policy-card-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.policy-card-actions button,
.policy-card-actions .action-button {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
}

.policy-card-actions .action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5f6ef;
  color: #087a55;
  border: 1px solid #bdebd8;
  box-shadow: none;
}

.confirm-payment-button {
  background: linear-gradient(180deg, #3f8ce5, #1767c7);
  color: #ffffff;
}

.import-panel,
.policies-panel,
.empty-state {
  padding: 18px;
}

.empty-state {
  max-width: 760px;
}

form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

pre {
  min-height: 132px;
  max-height: 360px;
  margin: 16px 0 0;
  overflow: auto;
  border-radius: var(--radius);
  padding: 14px;
  background: #071d3d;
  color: #e7eef8;
  font-size: 13px;
}

.policies-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.policies-panel summary small {
  color: var(--muted);
  font-weight: 700;
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #f3f8fe;
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f8fbff;
}

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

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

  .summary-grid,
  .category-shortcuts,
  .category-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .dashboard-layout {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 10;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-brand,
  .agent-card {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-group {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
  }

  .nav-item,
  .nav-group-label {
    flex: 0 0 auto;
    grid-template-columns: 28px max-content;
    min-height: 44px;
  }

  .nav-subitem {
    flex: 0 0 auto;
    margin: 0;
    align-self: center;
    white-space: nowrap;
  }

  .workspace-panel {
    padding: 22px 14px;
  }

  .app-header,
  .screen-heading,
  .section-heading,
  .table-header {
    display: grid;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .summary-grid,
  .category-shortcuts,
  .category-content,
  .filters-bar,
  .policy-card,
  .policy-card-actions {
    grid-template-columns: 1fr;
  }

  .policy-card-metrics {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 14px 0 0;
  }
}

@media (max-width: 520px) {
  .auth-card {
    padding: 24px;
  }

  .summary-card,
  .shortcut-card {
    min-height: 120px;
  }

  #statusMessage,
  #importStatus {
    text-align: left;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.modal-overlay.hidden {
  display: none;
}

.modal-window {
  width: min(560px, 92vw);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.modal-header,
#modalFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

#modalFooter {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

#modalBody {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 22px;
}

.modal-close-button {
  min-height: 0;
  padding: 4px 8px;
  background: transparent;
  color: var(--ink);
  border: 0;
  box-shadow: none;
  font-size: 22px;
}

.modal-form {
  display: grid;
  gap: 16px;
}

.modal-form label span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.modal-form input,
.modal-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font: inherit;
}

.modal-form textarea {
  resize: vertical;
}

/* Renewal result choices live in the shared modal and can be opened from
   either Renewals view. Keep their layout global instead of depending on the
   stylesheet for one dynamically loaded view. */
.modal-form .renewal-choice-fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.modal-form .renewal-choice-fieldset legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.modal-form label.renewal-choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  border-radius: 10px;
  padding: 10px;
  background: #f7faff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.modal-form label.renewal-choice:hover,
.modal-form label.renewal-choice:focus-within {
  background: #edf5ff;
  outline: 2px solid rgba(37, 99, 235, 0.18);
  outline-offset: 1px;
}

.modal-form label.renewal-choice > input[type="radio"] {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 50%;
  padding: 0;
  accent-color: var(--primary);
}

.modal-form label.renewal-choice > span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

/* =========================================================
   AORIA AUTHENTICATION EXPERIENCE V2
========================================================= */

:root {
  --auth-navy: #142746;
  --auth-navy-deep: #0d1d37;
  --auth-blue: #4f87de;
  --auth-blue-bright: #70a4f5;
  --auth-white: #ffffff;
  --auth-canvas: #f2f6fc;
  --auth-text: #172640;
  --auth-muted: #71809a;
  --auth-line: #d9e1ed;
  --auth-error: #c83333;
  --auth-success: #0f8d68;
  --auth-transition: 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Page shell ---------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 52px);
  overflow: hidden;
  background:
    radial-gradient(
      circle at 12% 18%,
      rgba(79, 135, 222, 0.12),
      transparent 28%
    ),
    linear-gradient(145deg, #edf3fb 0%, #f8faff 100%);
}

.auth-experience {
  position: relative;
  isolation: isolate;
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: 44% 56%;
  overflow: hidden;
  border: 1px solid rgba(20, 39, 70, 0.09);
  border-radius: 28px;
  background: var(--auth-white);
  box-shadow:
    0 30px 80px rgba(18, 38, 72, 0.16),
    0 8px 24px rgba(18, 38, 72, 0.08);
}

/* ---------- Structural diagonal ---------- */

.auth-diagonal {
  position: absolute;
  z-index: 1;
  top: -22%;
  bottom: -22%;
  left: 35%;
  width: 23%;
  pointer-events: none;
  background: var(--auth-white);
  transform: rotate(9deg);
  transform-origin: center;
  transition:
    left var(--auth-transition),
    transform var(--auth-transition),
    background-color var(--auth-transition);
}

/* ---------- Brand side ---------- */

.auth-brand-panel {
  position: relative;
  z-index: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--auth-white);
  background:
    radial-gradient(
      circle at 20% 18%,
      rgba(112, 164, 245, 0.22),
      transparent 31%
    ),
    radial-gradient(
      circle at 70% 84%,
      rgba(79, 135, 222, 0.16),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      var(--auth-navy) 0%,
      var(--auth-navy-deep) 100%
    );
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: rotate(22deg);
}

.auth-brand-panel::before {
  width: 380px;
  height: 380px;
  top: -190px;
  left: -160px;
}

.auth-brand-panel::after {
  width: 460px;
  height: 460px;
  right: -300px;
  bottom: -220px;
}

.auth-brand-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(38px, 5vw, 72px);
  padding-right: clamp(72px, 8vw, 118px);
  transition:
    opacity 340ms ease,
    transform var(--auth-transition);
}

.auth-brand-content-login {
  opacity: 1;
  transform: translateX(0);
}

.auth-brand-content-signup {
  opacity: 0;
  transform: translateX(-90px);
  pointer-events: none;
}

.auth-logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
}

.auth-logo-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 18px;
  color: var(--auth-white);
  background: rgba(255, 255, 255, 0.06);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-style: italic;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.auth-logo-name {
  color: var(--auth-white);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.auth-brand-message {
  max-width: 370px;
  margin-bottom: clamp(24px, 6vh, 68px);
}

.auth-kicker {
  margin: 0 0 14px;
  color: var(--auth-blue-bright);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-brand-message h1 {
  max-width: 390px;
  margin: 0 0 20px;
  color: var(--auth-white);
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.auth-brand-message > p:last-child {
  max-width: 350px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- Form side ---------- */

.auth-form-panel {
  position: relative;
  z-index: 3;
  min-width: 0;
  display: grid;
  align-items: center;
  padding:
    clamp(42px, 6vw, 82px)
    clamp(44px, 7vw, 100px)
    clamp(42px, 6vw, 82px)
    clamp(70px, 8vw, 122px);
  background: var(--auth-white);
}

.auth-view {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 470px;
  margin: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(70px);
  transition:
    opacity 280ms ease,
    transform var(--auth-transition),
    visibility 0s linear 720ms;
}

.auth-view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition:
    opacity 360ms ease 180ms,
    transform var(--auth-transition),
    visibility 0s linear 0s;
}

.auth-view-header {
  margin-bottom: 36px;
}

.auth-view-kicker {
  margin: 0 0 9px;
  color: var(--auth-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.auth-view-header h2 {
  margin: 0 0 10px;
  color: var(--auth-text);
  font-size: clamp(29px, 3vw, 38px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.auth-view-header > p:last-child {
  margin: 0;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.6;
}

.auth-view-header-centered {
  text-align: center;
}

/* ---------- Form ---------- */

.auth-form {
  display: grid;
  gap: 24px;
}

.floating-field {
  position: relative;
  min-height: 62px;
  padding-top: 14px;
  border-bottom: 1px solid var(--auth-line);
  transition: border-color 180ms ease;
}

.floating-field::after {
  content: "";
  position: absolute;
  left: -2px;
  right: 100%;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: var(--auth-blue);
  transition: right 220ms ease;
}

.floating-field:focus-within {
  border-bottom-color: transparent;
}

.floating-field:focus-within::after {
  right: -2px;
}

.floating-field input {
  width: 100%;
  min-height: 45px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 14px 48px 4px 0 !important;
  outline: none !important;
  background: transparent !important;
  color: var(--auth-text);
  box-shadow: none !important;
  font-size: 16px;
}

.floating-field label {
  position: absolute;
  left: 0;
  top: 27px;
  pointer-events: none;
  color: var(--auth-muted);
  font-size: 15px;
  transform-origin: left center;
  transition:
    top 180ms ease,
    color 180ms ease,
    font-size 180ms ease,
    transform 180ms ease;
}

.floating-field input:focus + label,
.floating-field input:not(:placeholder-shown) + label {
  top: 4px;
  color: var(--auth-blue);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.floating-field-icon {
  position: absolute;
  right: 3px;
  bottom: 13px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--auth-muted);
  font-size: 14px;
  font-weight: 800;
  transition: color 180ms ease;
}

.floating-field:focus-within .floating-field-icon {
  color: var(--auth-blue);
}

.password-visibility-button {
  position: absolute;
  right: 0;
  bottom: 9px;
  width: auto;
  min-width: 42px;
  min-height: 34px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--auth-muted);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
}

.password-visibility-button:hover {
  color: var(--auth-blue);
  background: rgba(79, 135, 222, 0.08);
  filter: none;
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: -4px;
}

.auth-checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-checkbox input {
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--auth-blue);
}

.auth-checkbox a {
  color: var(--auth-blue);
  font-weight: 700;
}

.auth-text-button,
.auth-switch-button {
  width: auto;
  min-height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--auth-blue);
  background: transparent;
  box-shadow: none;
  font-size: inherit;
  font-weight: 750;
}

.auth-text-button:hover,
.auth-switch-button:hover {
  filter: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-primary-button,
.auth-secondary-button {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  padding: 13px 20px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.auth-primary-button {
  border: 1px solid var(--auth-navy);
  color: var(--auth-white);
  background: var(--auth-navy);
  box-shadow: 0 12px 28px rgba(20, 39, 70, 0.18);
}

.auth-primary-button:hover {
  transform: translateY(-1px);
  filter: none;
  background: #1a3156;
  box-shadow: 0 16px 34px rgba(20, 39, 70, 0.22);
}

.auth-primary-button:active {
  transform: translateY(1px);
}

.auth-secondary-button {
  border: 1px solid var(--auth-line);
  color: var(--auth-text);
  background: var(--auth-white);
  box-shadow: none;
}

.auth-secondary-button:hover {
  border-color: #bcc9dc;
  background: #f8faff;
  filter: none;
}

.auth-primary-button:disabled,
.auth-secondary-button:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.auth-switch-copy {
  margin: 26px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
  text-align: center;
}

.auth-switch-copy .auth-switch-button {
  margin-left: 4px;
}

.auth-password-hint {
  margin: -12px 0 0;
  color: var(--auth-muted);
  font-size: 12px;
}

.auth-terms-checkbox {
  margin-top: -4px;
}

.auth-form-message {
  min-height: 22px;
  margin: -5px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-form-message.is-error {
  color: var(--auth-error);
}

.auth-form-message.is-success {
  color: var(--auth-success);
}

/* ---------- Confirmation ---------- */

.auth-success-symbol {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 26px;
  border: 1px solid #d4e2f6;
  border-radius: 24px;
  color: var(--auth-blue);
  background: #eff5fe;
  font-size: 30px;
}

.auth-confirmation-actions {
  display: grid;
  gap: 12px;
}

#confirmation-email-address {
  color: var(--auth-text);
  overflow-wrap: anywhere;
}

/* ---------- Signup reversed state ---------- */

.auth-experience[data-auth-view="signup"] {
  grid-template-columns: 56% 44%;
}

.auth-experience[data-auth-view="signup"] .auth-brand-panel {
  grid-column: 2;
}

.auth-experience[data-auth-view="signup"] .auth-form-panel {
  grid-column: 1;
  grid-row: 1;
  padding-left: clamp(44px, 7vw, 100px);
  padding-right: clamp(70px, 8vw, 122px);
}

.auth-experience[data-auth-view="signup"] .auth-diagonal {
  left: 43%;
  transform: rotate(9deg);
  background: var(--auth-white);
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-content-login {
  opacity: 0;
  transform: translateX(90px);
  pointer-events: none;
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-content-signup {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.auth-experience[data-auth-view="signup"] .auth-view-login {
  transform: translateX(-70px);
}

/* ---------- Password-reset instance ---------- */

.auth-experience-reset {
  grid-template-columns: 44% 56%;
}

.auth-experience-reset .auth-brand-content {
  position: relative;
  min-height: 100%;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .auth-shell {
    padding: 20px;
  }

  .auth-experience,
  .auth-experience[data-auth-view="signup"],
  .auth-experience-reset {
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .auth-diagonal {
    display: none;
  }

  .auth-brand-panel,
  .auth-experience[data-auth-view="signup"] .auth-brand-panel {
    grid-column: 1;
    grid-row: 1;
    min-height: 250px;
  }

  .auth-brand-content {
    position: absolute;
    justify-content: flex-start;
    gap: 34px;
    padding: 34px;
  }

  .auth-brand-message {
    margin: 0;
  }

  .auth-brand-message h1 {
    max-width: 600px;
    font-size: clamp(29px, 7vw, 42px);
  }

  .auth-brand-message > p:last-child {
    max-width: 600px;
  }

  .auth-form-panel,
  .auth-experience[data-auth-view="signup"] .auth-form-panel {
    grid-column: 1;
    grid-row: 2;
    padding: 42px 34px 48px;
  }
}

/* =========================================================
   AORIA RESPONSIVE PRODUCT SHELL + WELCOME DASHBOARD
========================================================= */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #12233f;
  --ink-soft: #415574;
  --muted: #74839a;
  --line: #d9e2ec;
  --surface: #ffffff;
  --canvas: #f3f6fa;
  --blue: #2f6fed;
  --blue-soft: #eaf1ff;
  --navy: #12233f;
  --navy-deep: #0c1b33;
  --green: #16865f;
  --green-soft: #e5f6ef;
  --gold: #d97706;
  --gold-soft: #fff2db;
  --red: #c83b43;
  --red-soft: #fdebed;
  --shadow: 0 14px 38px rgba(18, 35, 63, 0.08);
  --radius: 14px;
}

body,
button,
input,
select,
textarea {
  font-family: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
.brand-lockup,
.metric-copy > span,
.dashboard-panel-heading {
  font-family: "Manrope", "Inter", "Segoe UI Variable", system-ui, sans-serif;
}

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

.sidebar {
  z-index: 30;
  border-right: 0;
  color: #ffffff;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  box-shadow: 10px 0 34px rgba(12, 27, 51, 0.13);
  backdrop-filter: none;
}

.sidebar-brand {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar .brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .nav-item,
.sidebar .nav-group-label {
  color: rgba(255, 255, 255, 0.76);
}

.sidebar .nav-subitem {
  color: rgba(255, 255, 255, 0.58);
}

.sidebar .nav-icon {
  border-color: rgba(255, 255, 255, 0.13);
  color: #afcaff;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar .nav-item:hover,
.sidebar .nav-item.active,
.sidebar .nav-group-label:hover,
.sidebar .nav-group-label.active,
.sidebar .nav-subitem:hover,
.sidebar .nav-subitem.active {
  color: #ffffff;
  background: var(--blue);
}

.sidebar .nav-item.active .nav-icon,
.sidebar .nav-group-label.active .nav-icon {
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
}

.workspace-panel {
  width: 100%;
  min-width: 0;
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px clamp(20px, 3vw, 48px) 48px;
}

.app-header {
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.app-header h1 {
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.035em;
}

.app-header .subtitle {
  margin-top: 6px;
  font-size: 14px;
}

.profile-menu-button {
  border-color: var(--line);
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(18, 35, 63, 0.06);
}

.profile-menu-button:hover,
.profile-menu-button[aria-expanded="true"] {
  border-color: #c4d1e2;
  background: #f8faff;
}

.profile-menu-avatar {
  color: #ffffff;
  background: var(--blue);
}

.welcome-dashboard {
  display: grid;
  gap: 22px;
}

.welcome-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.welcome-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.welcome-brief {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

.dashboard-updated {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.dashboard-metric-card {
  position: relative;
  min-width: 0;
  min-height: 164px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: start;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 18px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.dashboard-metric-card:hover {
  border-color: #b9c9dd;
  filter: none;
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(18, 35, 63, 0.12);
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.metric-copy {
  min-width: 0;
  display: grid;
}

.metric-copy > span {
  min-height: 38px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
}

.metric-copy strong {
  margin-top: 8px;
  color: var(--ink);
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 36px;
  font-weight: 720;
  letter-spacing: -0.05em;
  line-height: 1;
}

.metric-copy small {
  margin-top: 11px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-arrow {
  color: #9aabc0;
  font-size: 23px;
  line-height: 1;
}

.metric-collections {
  border-color: #c9d8f4;
}

.metric-renewals .metric-icon {
  color: #6e54bf;
  background: #f0edff;
}

.metric-clients .metric-icon {
  color: #187256;
  background: #e8f6f0;
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.dashboard-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.dashboard-panel-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.dashboard-panel-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.025em;
}

.dashboard-text-action {
  min-height: 36px;
  flex: 0 0 auto;
  border: 0;
  padding: 7px 0;
  color: var(--blue);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.dashboard-text-action:hover {
  filter: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.dashboard-list {
  display: grid;
}

.dashboard-list-row {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  border-radius: 0;
  padding: 10px 22px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: none;
  text-align: left;
}

.dashboard-list-row:last-child {
  border-bottom: 0;
}

.dashboard-list-row:hover {
  filter: none;
  background: #f8faff;
}

.dashboard-row-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-list-row.is-danger .dashboard-row-icon {
  color: var(--red);
  background: var(--red-soft);
}

.dashboard-list-row.is-warning .dashboard-row-icon {
  color: #b45e00;
  background: var(--gold-soft);
}

.dashboard-list-row.is-success .dashboard-row-icon,
.dashboard-row-icon.is-calm {
  color: var(--green);
  background: var(--green-soft);
}

.dashboard-row-label {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list-row strong {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 17px;
}

.dashboard-row-arrow {
  color: #a1afc1;
  font-size: 20px;
}

.dashboard-empty-row {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  color: var(--ink-soft);
  font-size: 13px;
}

.movement-panel {
  overflow: visible;
}

.movement-note {
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 12px;
}

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

.movement-stat {
  min-width: 0;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.movement-stat:last-child {
  border-right: 0;
}

.movement-stat span {
  display: block;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.movement-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 30px;
  letter-spacing: -0.04em;
}

/* Long client names can never invade status/metrics areas. */
.policy-card,
.policy-card-header,
.policy-card-header > div:first-child,
.policy-card-metrics,
.card-badges {
  min-width: 0;
}

.policy-card-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.policy-card-header h4 {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.policy-card-header p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-badges {
  grid-column: auto;
  align-items: flex-end;
  justify-content: flex-start;
}

@media (min-width: 701px) and (max-width: 1180px) {
  .dashboard-layout {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: auto;
    height: 100vh;
    padding: 24px 10px;
  }

  .sidebar-brand {
    justify-content: center;
    padding: 0 0 18px;
  }

  .sidebar-brand > span:last-child,
  .sidebar .nav-item > span:last-child,
  .sidebar .nav-group-label > span:last-child,
  .sidebar .nav-subitem,
  .sidebar .identity-card {
    display: none;
  }

  .sidebar-nav {
    display: grid;
    overflow: visible;
  }

  .sidebar .nav-item,
  .sidebar .nav-group-label {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px;
  }

  .sidebar .nav-icon {
    width: 36px;
    height: 36px;
  }

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

  .dashboard-metric-card {
    min-height: 142px;
  }

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

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

  .movement-stat:nth-child(2) {
    border-right: 0;
  }

  .movement-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  .dashboard-layout {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 1200;
    width: 100%;
    height: auto;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 32px rgba(12, 27, 51, 0.2);
  }

  .sidebar-brand,
  .sidebar .identity-card,
  .sidebar-nav > .mobile-secondary,
  .sidebar .nav-subitem {
    display: none;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }

  .sidebar .nav-group {
    min-width: 0;
    display: block;
  }

  .sidebar .nav-item,
  .sidebar .nav-group-label {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-radius: 10px;
    padding: 4px 2px;
    font-size: 10px;
    line-height: 1.1;
  }

  .sidebar .nav-icon {
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    font-size: 9px;
  }

  .workspace-panel {
    padding: 14px 14px calc(88px + env(safe-area-inset-bottom));
  }

  .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    margin-bottom: 18px;
    padding: 0 2px 12px;
  }

  .app-header::before {
    content: "Aoria";
    color: var(--blue);
    font-family: "Manrope", sans-serif;
    font-size: 23px;
    font-weight: 760;
    letter-spacing: -0.04em;
  }

  .app-header > div:first-child {
    display: none;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .profile-menu-button {
    border: 0;
    padding: 4px;
    box-shadow: none;
  }

  .welcome-heading {
    display: grid;
    gap: 10px;
  }

  .welcome-heading h2 {
    font-size: clamp(25px, 8vw, 32px);
  }

  .welcome-brief {
    font-size: 14px;
  }

  .dashboard-updated {
    justify-self: start;
  }

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

  .dashboard-metric-card {
    min-height: 154px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    padding: 16px 13px;
  }

  .metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 10px;
  }

  .metric-copy > span {
    min-height: 48px;
    font-size: 11px;
  }

  .metric-copy strong {
    margin-top: 4px;
    font-size: 30px;
  }

  .metric-copy small {
    grid-column: 1 / -1;
    margin-top: 9px;
    white-space: normal;
  }

  .metric-arrow {
    display: none;
  }

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

  .dashboard-panel-heading {
    padding: 17px 16px;
  }

  .dashboard-list-row {
    grid-template-columns: 28px minmax(0, 1fr) auto 12px;
    padding: 10px 16px;
  }

  .dashboard-row-label {
    white-space: normal;
  }

  .movement-note {
    display: none;
  }

  .movement-stat {
    padding: 18px 16px;
  }

  .movement-stat strong {
    font-size: 26px;
  }

  .filters-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .filters-bar .search-control {
    grid-column: 1 / -1;
  }

  .policy-card-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-badges {
    align-items: flex-start;
  }

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

  .policy-card-actions button,
  .policy-card-actions .action-button {
    min-height: 44px;
  }
}

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

  .dashboard-metric-card {
    min-height: 116px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .metric-copy > span {
    min-height: auto;
  }

  .metric-arrow {
    display: block;
  }
}

/* Shared operational-card contract for Cobranza and Renovaciones. */
.policy-card.operational-policy-card {
  grid-template-columns: minmax(0, 1fr) minmax(176px, 0.42fr);
  column-gap: 20px;
  row-gap: 16px;
}

.policy-card.operational-policy-card .policy-card-header {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.operational-policy-card .policy-card-identity-copy {
  min-width: 0;
}

.operational-policy-card .policy-card-header h4 {
  display: block;
  margin: 0 0 7px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operational-policy-card .policy-card-policy-line,
.operational-policy-card .policy-card-location {
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operational-policy-card .policy-card-location {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.operational-policy-card .policy-card-tags {
  display: flex;
  grid-column: auto;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 7px;
  margin-top: 13px;
}

.policy-card.operational-policy-card .policy-card-metrics {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-content: initial;
  justify-content: flex-start;
  gap: 2px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.operational-policy-card .policy-card-metrics::after {
  content: none;
}

.operational-policy-card .policy-card-timing strong {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.operational-policy-card .policy-card-date-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.operational-policy-card .policy-card-date {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.operational-policy-card .policy-card-followup {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .policy-card.operational-policy-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .policy-card.operational-policy-card .policy-card-metrics {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 14px;
    padding-left: 0;
  }

  .operational-policy-card .policy-card-header h4,
  .operational-policy-card .policy-card-policy-line,
  .operational-policy-card .policy-card-location {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    display: block;
    padding: 0;
    background: var(--auth-white);
  }

  .auth-experience,
  .auth-experience[data-auth-view="signup"],
  .auth-experience-reset {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-brand-panel,
  .auth-experience[data-auth-view="signup"] .auth-brand-panel {
    min-height: 210px;
  }

  .auth-brand-content {
    gap: 26px;
    padding: 26px 24px;
  }

  .auth-logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 29px;
  }

  .auth-logo-name {
    font-size: 24px;
  }

  .auth-brand-message h1 {
    margin-bottom: 10px;
    font-size: 28px;
  }

  .auth-brand-message > p:last-child {
    display: none;
  }

  .auth-form-panel,
  .auth-experience[data-auth-view="signup"] .auth-form-panel {
    align-items: start;
    padding: 36px 24px 48px;
  }

  .auth-view-header {
    margin-bottom: 28px;
  }

  .auth-form {
    gap: 20px;
  }

  .auth-form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

/* ---------- Accessibility ---------- */

/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .auth-view,
  .auth-view.is-active,
  .auth-view.is-active.auth-view-exit,
  .auth-brand-content {
    transform: none !important;
    transition:
      opacity 180ms ease,
      visibility 0s linear 180ms !important;
  }

  .auth-view.is-active {
    transition:
      opacity 180ms ease,
      visibility 0s linear 0s !important;
  }
} 

/* =========================================================
   AUTH V2 — TRANSITION AND SIGNUP LAYOUT REFINEMENTS
========================================================= */

:root {
  --auth-transition:
    1100ms cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-experience {
  transition:
    grid-template-columns var(--auth-transition);
}

.auth-diagonal {
  transition:
    left var(--auth-transition),
    width var(--auth-transition),
    transform var(--auth-transition),
    background-color var(--auth-transition);
}

.auth-brand-content {
  transition:
    opacity 420ms ease,
    transform var(--auth-transition);
}

.auth-view {
  transition:
    opacity 360ms ease,
    transform var(--auth-transition),
    visibility 0s linear 1100ms;
}

.auth-view.is-active {
  transition:
    opacity 440ms ease 300ms,
    transform var(--auth-transition),
    visibility 0s linear 0s;
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-content {
  padding-left: clamp(86px, 9vw, 138px);
  padding-right: clamp(38px, 5vw, 72px);
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-message {
  max-width: 330px;
  margin-left: auto;
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-message h1 {
  max-width: 330px;
  font-size: clamp(30px, 3.4vw, 45px);
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-message > p:last-child {
  max-width: 320px;
}

.auth-experience[data-auth-view="signup"]
  .auth-logo-lockup {
  margin-left: auto;
}

.auth-experience[data-auth-view="signup"] .auth-diagonal {
  left: 45%;
  width: 20%;
}

/* =========================================================
   AUTH V2 — FIXED SHELL MOTION SYSTEM
   The structure stays still; only content changes.
========================================================= */

:root {
  --auth-transition:
    760ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* The two structural panels never exchange sides. */
.auth-experience,
.auth-experience[data-auth-view="signup"] {
  grid-template-columns: 44% 56%;
  transition: none;
}

.auth-experience[data-auth-view="signup"] .auth-brand-panel {
  grid-column: 1;
  grid-row: 1;
}

.auth-experience[data-auth-view="signup"] .auth-form-panel {
  grid-column: 2;
  grid-row: 1;

  padding:
    clamp(42px, 6vw, 82px)
    clamp(44px, 7vw, 100px)
    clamp(42px, 6vw, 82px)
    clamp(70px, 8vw, 122px);
}

/* The diagonal is now a permanent architectural element. */
.auth-diagonal,
.auth-experience[data-auth-view="signup"] .auth-diagonal {
  left: 35%;
  width: 23%;
  transform: rotate(9deg);
  transition: none;
}

/* ---------- Brand composition ---------- */

.auth-brand-content,
.auth-experience[data-auth-view="signup"] .auth-brand-content {
  justify-content: flex-start;

  padding:
    clamp(40px, 5vw, 66px)
    clamp(74px, 7vw, 108px)
    clamp(44px, 6vw, 74px)
    clamp(48px, 5vw, 72px);

  transition:
    opacity 320ms ease,
    transform var(--auth-transition);
}

/* Keep both logo treatments aligned to the left. */
.auth-experience[data-auth-view="signup"] .auth-logo-lockup {
  margin-left: 0;
}

/* Deliberate space between the logo and editorial copy. */
.auth-brand-message,
.auth-experience[data-auth-view="signup"] .auth-brand-message {
  width: 100%;
  max-width: 340px;
  margin:
    clamp(76px, 11vh, 118px)
    0
    0;
}

/* Keep both compositions using the same visual axis. */
.auth-experience[data-auth-view="signup"] .auth-brand-message {
  margin-left: 0;
}

.auth-brand-message h1,
.auth-experience[data-auth-view="signup"] .auth-brand-message h1 {
  max-width: 340px;
  margin-bottom: 22px;
  font-size: clamp(31px, 3.55vw, 46px);
  font-weight: 660;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.auth-brand-message > p:last-child,
.auth-experience[data-auth-view="signup"]
  .auth-brand-message > p:last-child {
  max-width: 305px;
  font-size: 15px;
  line-height: 1.75;
}

/* ---------- Brand-message choreography ---------- */

.auth-brand-content-login {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.auth-brand-content-signup {
  opacity: 0;
  transform: translateY(22px);
  pointer-events: none;
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-content-login {
  opacity: 0;
  transform: translateY(-22px);
  pointer-events: none;
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-content-signup {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------- Form choreography ---------- */

.auth-view {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(28px);

  transition:
    opacity 280ms ease,
    transform var(--auth-transition),
    visibility 0s linear 760ms;
}

.auth-view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);

  transition:
    opacity 360ms ease 170ms,
    transform var(--auth-transition),
    visibility 0s linear 0s;
}

/* Login exits gently to the left when signup is selected. */
.auth-experience[data-auth-view="signup"] .auth-view-login {
  transform: translateX(-28px);
}

@media (max-width: 900px) {
  .auth-experience[data-auth-view="signup"] .auth-brand-panel {
    grid-column: 1;
    grid-row: 1;
  }

  .auth-experience[data-auth-view="signup"] .auth-form-panel {
    grid-column: 1;
    grid-row: 2;
    padding: 42px 34px 48px;
  }

  .auth-brand-content,
  .auth-experience[data-auth-view="signup"] .auth-brand-content {
    padding: 34px;
  }

  .auth-brand-message,
  .auth-experience[data-auth-view="signup"] .auth-brand-message {
    margin-top: 32px;
    max-width: 600px;
  }
}

@media (max-width: 560px) {
  .auth-brand-content,
  .auth-experience[data-auth-view="signup"] .auth-brand-content {
    padding: 26px 24px;
  }

  .auth-brand-message,
  .auth-experience[data-auth-view="signup"] .auth-brand-message {
    margin-top: 24px;
  }
}
/* =========================================================
   AUTH V2 — FADE + DIAGONAL SLIDE TRANSITION
========================================================= */

.auth-view {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /*
   * New screens wait slightly down and to the right,
   * echoing the structural diagonal.
   */
  transform: translate3d(28px, 14px, 0);

  will-change: opacity, transform;

  transition:
    opacity 420ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 620ms;
}

.auth-view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translate3d(0, 0, 0);

  transition:
    opacity 440ms ease,
    transform 640ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

/*
 * Explicit exit state.
 * It travels gently left and upward while fading.
 */
.auth-view.is-active.auth-view-exit {
  opacity: 0;
  visibility: visible;
  pointer-events: none;

  transform: translate3d(-28px, -14px, 0);

  transition:
    opacity 320ms ease,
    transform 380ms cubic-bezier(0.4, 0, 1, 1),
    visibility 0s linear 380ms;
}

/*
 * Explicit entrance starting state.
 */
.auth-view.is-active.auth-view-enter {
  opacity: 0;
  visibility: visible;
  pointer-events: none;

  transform: translate3d(28px, 14px, 0);

  transition: none;
}

/* ---------- Navy-panel message motion ---------- */

.auth-brand-content {
  will-change: opacity, transform;

  transition:
    opacity 420ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-brand-content-login {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.auth-brand-content-signup {
  opacity: 0;
  transform: translate3d(18px, 12px, 0);
  pointer-events: none;
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-content-login {
  opacity: 0;
  transform: translate3d(-18px, -12px, 0);
  pointer-events: none;
}

.auth-experience[data-auth-view="signup"]
  .auth-brand-content-signup {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}
