:root {
    --portal-primary: #d32749;
    --portal-primary-strong: #ac1736;
    --portal-primary-soft: #fff0f3;
    --portal-ink: #101828;
    --portal-muted: #667085;
    --portal-subtle: #98a2b3;
    --portal-line: #e4e7ec;
    --portal-surface: #ffffff;
    --portal-canvas: #f5f7fb;
    --portal-sidebar: #0b1220;
    --portal-sidebar-muted: #98a2b3;
    --portal-success: #067647;
    --portal-success-soft: #ecfdf3;
    --portal-warning: #b54708;
    --portal-warning-soft: #fffaeb;
    --portal-danger: #b42318;
    --portal-danger-soft: #fef3f2;
    --portal-info: #175cd3;
    --portal-info-soft: #eff8ff;
    --topbar-height: 72px;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 88px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 12px 30px rgba(16, 24, 40, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--portal-canvas);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--portal-canvas);
    color: var(--portal-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid rgba(211, 39, 73, 0.32);
    outline-offset: 3px;
}

::selection {
    background: rgba(211, 39, 73, 0.18);
}

.material-symbols-outlined {
    flex: 0 0 auto;
    font-variation-settings: "FILL" 0, "wght" 420, "GRAD" 0, "opsz" 24;
    line-height: 1;
}

/* Application chrome */
.app-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    display: flex;
    min-width: 0;
    height: var(--topbar-height);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px 0 16px;
    border-bottom: 1px solid rgba(228, 231, 236, 0.9);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
    backdrop-filter: blur(18px);
}

.topbar-start,
.topbar-end,
.topbar-brand,
.account-summary,
.topbar-date {
    display: flex;
    min-width: 0;
    align-items: center;
}

.topbar-start,
.topbar-end {
    gap: 12px;
}

.icon-button {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--portal-line);
    border-radius: 13px;
    background: var(--portal-surface);
    color: #344054;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.icon-button:hover {
    border-color: #d0d5dd;
    background: #f9fafb;
    color: var(--portal-primary-strong);
    transform: translateY(-1px);
}

.topbar-brand {
    gap: 12px;
}

.topbar-logo {
    width: auto;
    height: 42px;
    object-fit: contain;
}

.topbar-brand-copy,
.account-copy {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}

.topbar-brand-copy strong,
.account-copy strong {
    overflow: hidden;
    color: var(--portal-ink);
    font-size: 0.875rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-brand-copy small,
.account-copy small {
    color: var(--portal-muted);
    font-size: 0.72rem;
}

.topbar-date {
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--portal-line);
    border-radius: 999px;
    color: #475467;
    font-size: 0.78rem;
    font-weight: 600;
}

.topbar-date .material-symbols-outlined {
    font-size: 18px;
}

.account-summary {
    gap: 10px;
    padding-left: 4px;
}

.account-avatar {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(211, 39, 73, 0.18);
    border-radius: 12px;
    background: var(--portal-primary-soft);
    color: var(--portal-primary-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.logout-button:hover {
    border-color: #fecdca;
    background: var(--portal-danger-soft);
    color: var(--portal-danger);
}

.app-sidebar {
    position: fixed;
    z-index: 50;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--portal-sidebar);
    color: #e4e7ec;
    transition: width 220ms cubic-bezier(0.4, 0, 0.2, 1), transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-scroll {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

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

.sidebar-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.sidebar-navigation {
    padding: 20px 14px 24px;
}

.sidebar-group + .sidebar-group {
    margin-top: 20px;
}

.sidebar-group-label {
    margin: 0 10px 8px;
    overflow: hidden;
    color: var(--portal-sidebar-muted);
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity 140ms ease;
}

.sidebar-list {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-link {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 0.86rem;
    font-weight: 500;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.sidebar-link:hover {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-link.is-active {
    border-color: rgba(255, 112, 138, 0.2);
    background: linear-gradient(135deg, rgba(211, 39, 73, 0.26), rgba(211, 39, 73, 0.12));
    color: #ffffff;
    box-shadow: inset 3px 0 0 #ff6b84;
}

.sidebar-icon {
    width: 24px;
    color: #98a2b3;
    font-size: 22px;
    text-align: center;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link.is-active .sidebar-icon {
    color: #ff8fa3;
}

.sidebar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 140ms ease;
}

.sidebar-footer {
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--portal-sidebar-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-backdrop {
    position: fixed;
    z-index: 45;
    inset: var(--topbar-height) 0 0 0;
    display: none;
    padding: 0;
    border: 0;
    background: rgba(11, 18, 32, 0.56);
    opacity: 0;
    backdrop-filter: blur(3px);
}

#main-content {
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width) !important;
    padding-top: var(--topbar-height) !important;
    background: var(--portal-canvas);
    transition: margin-left 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-precollapsed #main-content,
body.sidebar-collapsed #main-content {
    margin-left: var(--sidebar-collapsed-width) !important;
}

.sidebar-precollapsed .app-sidebar,
body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-precollapsed .sidebar-group-label,
.sidebar-precollapsed .sidebar-label,
body.sidebar-collapsed .sidebar-group-label,
body.sidebar-collapsed .sidebar-label {
    width: 0;
    opacity: 0;
    pointer-events: none;
}

body.sidebar-collapsed .sidebar-navigation {
    padding-inline: 12px;
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-inline: 10px;
}

body.sidebar-collapsed .sidebar-link:hover {
    transform: none;
}

body.sidebar-collapsed .sidebar-footer {
    justify-content: center;
    padding-inline: 10px;
}

/* Dashboard system */
.dashboard-page {
    width: min(100%, 1540px);
    margin: 0 auto;
    padding: clamp(22px, 3vw, 40px);
}

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    color: var(--portal-primary-strong);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-eyebrow::before {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--portal-primary);
    box-shadow: 0 0 0 5px rgba(211, 39, 73, 0.1);
    content: "";
}

.dashboard-title {
    margin: 0;
    color: var(--portal-ink);
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.dashboard-subtitle {
    max-width: 680px;
    margin: 9px 0 0;
    color: var(--portal-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.portal-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: var(--portal-surface);
    color: #344054;
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.portal-button:hover {
    border-color: #d0d5dd;
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(16, 24, 40, 0.08);
}

.portal-button.is-primary {
    border-color: var(--portal-primary);
    background: var(--portal-primary);
    color: #ffffff;
}

.portal-button.is-primary:hover {
    border-color: var(--portal-primary-strong);
    background: var(--portal-primary-strong);
}

.portal-button .material-symbols-outlined {
    font-size: 20px;
}

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

.metric-card,
.dashboard-panel,
.quick-link-card {
    border: 1px solid rgba(228, 231, 236, 0.94);
    background: var(--portal-surface);
    box-shadow: var(--shadow-sm);
}

.metric-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 20px;
    border-radius: var(--radius-md);
}

.metric-card::after {
    position: absolute;
    right: -18px;
    bottom: -38px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(211, 39, 73, 0.08), transparent 70%);
    content: "";
    pointer-events: none;
}

.metric-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.metric-label {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.metric-value {
    margin: 7px 0 0;
    color: var(--portal-ink);
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.metric-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--portal-primary-soft);
    color: var(--portal-primary-strong);
}

.metric-icon.is-success {
    background: var(--portal-success-soft);
    color: var(--portal-success);
}

.metric-icon.is-warning {
    background: var(--portal-warning-soft);
    color: var(--portal-warning);
}

.metric-icon.is-info {
    background: var(--portal-info-soft);
    color: var(--portal-info);
}

.metric-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    color: var(--portal-subtle);
    font-size: 0.72rem;
    font-weight: 600;
}

.trend-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: max-content;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}

.trend-badge {
    padding: 4px 7px;
    background: var(--portal-success-soft);
    color: var(--portal-success);
    font-size: 0.68rem;
}

.trend-badge.is-negative {
    background: var(--portal-danger-soft);
    color: var(--portal-danger);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
    gap: 20px;
}

.dashboard-stack {
    display: grid;
    align-content: start;
    gap: 20px;
}

.dashboard-panel {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--portal-line);
}

.panel-title-group {
    min-width: 0;
}

.panel-title {
    margin: 0;
    color: var(--portal-ink);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.panel-subtitle {
    margin: 4px 0 0;
    color: var(--portal-muted);
    font-size: 0.74rem;
}

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    color: var(--portal-primary-strong);
    font-size: 0.76rem;
    font-weight: 700;
}

.panel-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.panel-body {
    padding: 8px 22px 20px;
}

.panel-body-spacious {
  padding-top: 20px;
}

/* Bookable service catalog */
.catalog-page {
  max-width: 1540px;
}

.portal-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 14px;
}

.portal-alert p {
  margin: 2px 0 0;
}

.portal-alert.is-success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.portal-alert.is-danger {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.catalog-list-header {
  gap: 20px;
}

.catalog-list-search,
.vehicle-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 320px);
  padding: 0 12px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
}

.catalog-search-clear {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  color: #64748b;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  place-items: center;
}

.catalog-search-clear:hover {
  color: #be123c;
  background: #fff1f4;
}

.catalog-search-clear .material-symbols-outlined {
  font-size: 19px;
}

.catalog-search-clear[hidden] {
  display: none;
}

.catalog-list-search input,
.vehicle-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  color: #0f172a;
  background: transparent;
  border: 0;
  outline: 0;
}

.catalog-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 14px 18px;
  background: #fbfcfe;
  border-bottom: 1px solid #e8edf4;
}

.catalog-filter-bar label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.catalog-filter-bar label > span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.catalog-filter-bar select {
  width: 100%;
  min-height: 40px;
  padding: 8px 30px 8px 10px;
  color: #334155;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  outline: 0;
}

.catalog-filter-bar select:focus {
  border-color: #d32749;
  box-shadow: 0 0 0 3px rgb(211 39 73 / 12%);
}

.catalog-filter-reset {
  white-space: nowrap;
}

.catalog-table-wrap {
  overflow-x: auto;
}

.catalog-table {
  width: 100%;
  min-width: 1180px;
  table-layout: fixed;
  border-collapse: collapse;
}

.catalog-table .catalog-col-service { width: 22%; }
.catalog-table .catalog-col-area { width: 15%; }
.catalog-table .catalog-col-cost { width: 16%; }
.catalog-table .catalog-col-suggested { width: 17%; }
.catalog-table .catalog-col-duration { width: 8%; }
.catalog-table .catalog-col-vehicles { width: 7%; }
.catalog-table .catalog-col-status { width: 7%; }
.catalog-table .catalog-col-actions { width: 8%; }

.catalog-table th,
.catalog-table td {
  padding: 15px 18px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #edf1f6;
}

.catalog-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f8fafc;
}

.catalog-sort {
  display: inline-grid;
  max-width: 100%;
  padding: 4px 0;
  align-items: center;
  grid-template-columns: minmax(0, auto) 16px;
  gap: 7px;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.catalog-sort-label {
  min-width: 0;
  line-height: 1.35;
}

.catalog-sort .catalog-sort-icon {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1;
  text-align: center;
}

.catalog-sort:hover,
.catalog-sort.is-active {
  color: #be123c;
}

.catalog-table th.is-money,
.catalog-money-cell {
  text-align: right;
}

.catalog-table th.is-money .catalog-sort {
  width: 100%;
  justify-content: end;
}

.catalog-table th.is-compact,
.catalog-table th.is-actions,
.catalog-compact-cell,
.catalog-actions-cell {
  padding-right: 10px;
  padding-left: 10px;
  text-align: center;
}

.catalog-table th.is-compact .catalog-sort {
  width: 100%;
  grid-template-columns: minmax(0, auto) 12px;
  gap: 4px;
  justify-content: center;
}

.catalog-table th.is-actions {
  padding-right: 14px;
  padding-left: 14px;
}

.catalog-price-stack {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

.catalog-table td {
  color: #334155;
  font-size: 0.875rem;
}

.catalog-price-overrides {
  display: block;
  margin-top: 3px;
  color: #9f1239;
  font-size: 0.7rem;
  font-weight: 650;
  text-decoration: none;
}

.catalog-price-overrides:hover {
  color: #be123c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.catalog-price-missing {
  display: inline-flex;
  padding: 4px 8px;
  color: #92400e;
  background: #fffbeb;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.catalog-margin {
  display: block;
  margin-top: 4px;
  color: #15803d;
  font-size: 0.68rem;
  font-weight: 650;
  white-space: nowrap;
}

.catalog-margin.is-negative,
.has-price-warning strong {
  color: #b91c1c;
}

.catalog-table tbody tr:hover {
  background: #fbfcfe;
}

.catalog-vehicle-count,
.catalog-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.catalog-actions-cell .catalog-row-actions {
  justify-content: center;
}

.catalog-vehicle-count {
  color: #334155;
  font-weight: 650;
  text-decoration: none;
}

.catalog-vehicle-count:hover {
  color: #be123c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.catalog-vehicle-count .material-symbols-outlined {
  color: #64748b;
  font-size: 19px;
}

.catalog-row-actions a {
  display: inline-grid;
  width: 44px;
  height: 44px;
  color: #475569;
  place-items: center;
  border-radius: 9px;
}

.catalog-row-actions a:hover {
  color: #d32749;
  background: #fff1f4;
}

.catalog-row-actions a.is-danger:hover {
  color: #b91c1c;
  background: #fef2f2;
}

.catalog-empty {
  margin: 24px;
}

.catalog-modal[hidden] {
  display: none;
}

.catalog-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
}

.catalog-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgb(7 15 28 / 68%);
  border: 0;
  backdrop-filter: blur(5px);
}

.catalog-modal-card {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgb(2 8 23 / 32%);
}

.catalog-modal-card form {
  display: flex;
  max-height: calc(100vh - 150px);
  flex-direction: column;
}

.catalog-modal-header,
.catalog-modal-footer,
.catalog-edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e8edf4;
}

.catalog-modal-header h2 {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 1.35rem;
}

.catalog-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  place-items: center;
}

.catalog-modal-body,
.catalog-edit-body {
  padding: 24px;
}

.catalog-modal-body {
  overflow-y: auto;
}

.catalog-modal-footer,
.catalog-edit-footer {
  justify-content: flex-end;
  background: #fff;
  border-top: 1px solid #e8edf4;
  border-bottom: 0;
}

.catalog-modal-open {
  overflow: hidden;
}

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

.catalog-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.catalog-field.is-wide {
  grid-column: 1 / -1;
}

.catalog-field label,
.vehicle-picker legend {
  color: #1e293b;
  font-size: 0.875rem;
  font-weight: 650;
}

.catalog-field input,
.catalog-field select,
.catalog-field textarea,
.vehicle-picker-toolbar select {
  width: 100%;
  padding: 10px 12px;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: 0;
}

.catalog-field input:focus,
.catalog-field select:focus,
.catalog-field textarea:focus,
.vehicle-picker-toolbar select:focus,
.catalog-list-search:focus-within,
.vehicle-search:focus-within {
  border-color: #d32749;
  box-shadow: 0 0 0 3px rgb(211 39 73 / 12%);
}

.catalog-field small,
.vehicle-picker-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.catalog-input-prefix,
.catalog-input-suffix {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.catalog-input-prefix:focus-within,
.catalog-input-suffix:focus-within {
  border-color: #d32749;
  box-shadow: 0 0 0 3px rgb(211 39 73 / 12%);
}

.catalog-input-prefix span,
.catalog-input-suffix span {
  padding: 0 12px;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 650;
}

.catalog-input-prefix input,
.catalog-input-suffix input {
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
}

.catalog-price-health {
  margin: 14px 0 0;
  padding: 10px 12px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 650;
}

.catalog-price-health.is-success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.catalog-price-health.is-warning {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.vehicle-picker {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 1px solid #dfe6ef;
  border-radius: 15px;
  scroll-margin-top: calc(var(--topbar-height, 72px) + 18px);
}

.vehicle-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e8edf4;
}

.vehicle-selection-count {
  flex: 0 0 auto;
  padding: 5px 10px;
  color: #9f1239;
  font-size: 0.75rem;
  font-weight: 700;
  background: #fff1f4;
  border-radius: 999px;
}

.vehicle-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.5fr) auto auto auto;
  gap: 10px;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e8edf4;
}

.vehicle-picker-toolbar [aria-pressed="true"] {
  color: #9f1239;
  background: #fff1f4;
  border-color: #f3a8b7;
}

.vehicle-visible-count {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 650;
}

.portal-button.is-compact {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.vehicle-choice-grid {
  display: grid;
  max-height: 330px;
  overflow-y: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.vehicle-choice[hidden] {
  display: none;
}

.vehicle-choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  cursor: pointer;
  border: 1px solid #dfe6ef;
  border-radius: 11px;
  transition: border-color 150ms ease, background 150ms ease;
}

.vehicle-choice:hover,
.vehicle-choice:has(input:checked) {
  background: #fff7f8;
  border-color: #ee9aac;
}

.vehicle-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.vehicle-choice-mark {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  border: 1.5px solid #94a3b8;
  border-radius: 5px;
  place-items: center;
}

.vehicle-choice input:checked + .vehicle-choice-mark {
  background: #d32749;
  border-color: #d32749;
}

.vehicle-choice input:checked + .vehicle-choice-mark::after {
  width: 8px;
  height: 4px;
  content: '';
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.vehicle-choice input:focus-visible + .vehicle-choice-mark {
  outline: 3px solid rgb(211 39 73 / 20%);
  outline-offset: 2px;
}

.vehicle-choice strong,
.vehicle-choice small {
  display: block;
}

.vehicle-choice strong {
  overflow: hidden;
  color: #1e293b;
  font-size: 0.83rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-choice small {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.73rem;
}

.catalog-form-error {
  margin: 12px 16px 0;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 650;
}

.vehicle-pricing {
  min-width: 0;
  margin-top: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 15px;
  scroll-margin-top: calc(var(--topbar-height, 72px) + 18px);
}

.vehicle-pricing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #e8edf4;
}

.vehicle-pricing-header h3 {
  margin: 4px 0 5px;
  color: #1e293b;
  font-size: 1rem;
}

.vehicle-pricing-header p:not(.dashboard-eyebrow) {
  max-width: 720px;
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.5;
}

.vehicle-pricing-bulk {
  display: grid;
  grid-template-columns: minmax(155px, 1fr) minmax(155px, 1fr) minmax(145px, 0.75fr) auto auto;
  align-items: end;
  gap: 12px;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e8edf4;
}

.vehicle-pricing-bulk .portal-button {
  min-height: 42px;
  white-space: nowrap;
}

.vehicle-pricing-feedback {
  min-height: 0;
  margin: 0;
  padding: 0 20px;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 650;
}

.vehicle-pricing-feedback:not(:empty) {
  padding-top: 12px;
}

.vehicle-pricing-feedback.is-error {
  color: #b91c1c;
}

.vehicle-pricing-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px;
  color: #64748b;
  text-align: left;
}

.vehicle-pricing-empty[hidden],
.vehicle-pricing-row[hidden] {
  display: none;
}

.vehicle-pricing-empty .material-symbols-outlined {
  color: #94a3b8;
  font-size: 30px;
}

.vehicle-pricing-empty strong,
.vehicle-pricing-empty p {
  display: block;
  margin: 0;
}

.vehicle-pricing-empty strong {
  color: #334155;
  font-size: 0.86rem;
}

.vehicle-pricing-empty p {
  margin-top: 3px;
  font-size: 0.78rem;
}

.vehicle-pricing-list {
  max-height: 480px;
  overflow-y: auto;
}

.vehicle-pricing-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) minmax(155px, 0.85fr) minmax(155px, 0.85fr) minmax(140px, 0.7fr) 42px;
  align-items: end;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid #edf1f6;
}

.vehicle-pricing-row:first-child {
  border-top: 0;
}

.vehicle-pricing-row:hover {
  background: #fbfcfe;
}

.vehicle-pricing-model {
  align-self: center;
  min-width: 0;
}

.vehicle-pricing-model strong,
.vehicle-pricing-model small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-pricing-model strong {
  color: #1e293b;
  font-size: 0.86rem;
}

.vehicle-pricing-model small {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.74rem;
}

.vehicle-pricing-model .vehicle-pricing-effective {
  margin: 7px 0 0;
  overflow: visible;
  color: #15803d;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}

.vehicle-pricing-model .vehicle-pricing-effective.is-warning {
  color: #b91c1c;
}

.vehicle-pricing-input {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.vehicle-pricing-input > span {
  color: #475569;
  font-size: 0.73rem;
  font-weight: 650;
}

.vehicle-pricing-input input {
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  color: #0f172a;
  background: #fff;
  outline: 0;
}

.vehicle-pricing-reset {
  width: 42px;
  height: 42px;
}

.catalog-edit-form {
  overflow: hidden;
}

.schedule-service-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
  padding: 12px 14px;
  color: #475569;
  font-size: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
}

.schedule-service-summary-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-service-summary-item.is-suggested {
  padding-left: 16px;
  border-left: 1px solid #dbe3ee;
}

.schedule-service-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.schedule-service-summary .material-symbols-outlined {
  color: #d32749;
  font-size: 19px;
}

.schedule-service-summary strong {
  color: #0f172a;
}

@media (max-width: 900px) {
  .catalog-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-filter-reset {
    width: 100%;
  }

  .catalog-form-grid,
  .vehicle-choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .vehicle-picker-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .vehicle-pricing-bulk {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .vehicle-pricing-row {
    grid-template-columns: minmax(180px, 1fr) 1fr 1fr;
  }

  .vehicle-pricing-model,
  .vehicle-pricing-reset {
    grid-column: 1 / -1;
  }

  .vehicle-pricing-reset {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .catalog-table-wrap {
    padding: 12px;
    overflow: visible;
    background: #f8fafc;
  }

  .catalog-table {
    display: block;
    min-width: 0;
  }

  .catalog-table thead {
    display: none;
  }

  .catalog-table tbody {
    display: grid;
    gap: 12px;
  }

  .catalog-table tbody tr {
    display: grid;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgb(15 23 42 / 4%);
  }

  .catalog-table tbody tr[hidden] {
    display: none;
  }

  .catalog-table td,
  .catalog-money-cell {
    display: flex;
    min-width: 0;
    padding: 11px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    text-align: right;
    border-bottom: 1px solid #edf1f6;
  }

  .catalog-table td::before {
    flex: 0 0 42%;
    color: #64748b;
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-align: left;
    text-transform: uppercase;
  }

  .catalog-table td:first-child {
    padding-top: 15px;
    padding-bottom: 15px;
    color: #0f172a;
    background: #fbfcfe;
  }

  .catalog-table td:last-child {
    border-bottom: 0;
  }

  .catalog-table td > strong,
  .catalog-table td > span,
  .catalog-table td > a,
  .catalog-table td > div {
    min-width: 0;
  }

  .catalog-price-overrides,
  .catalog-margin {
    text-align: right;
  }

  .catalog-row-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .catalog-modal {
    padding: 0;
    place-items: stretch;
  }

  .catalog-modal-card {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .catalog-modal-card form {
    max-height: calc(100vh - 82px);
  }

  .catalog-form-grid,
  .vehicle-choice-grid,
  .vehicle-picker-toolbar {
    grid-template-columns: 1fr;
  }

  .catalog-list-header,
  .vehicle-picker-header,
  .vehicle-pricing-header {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-filter-bar {
    grid-template-columns: 1fr;
  }

  .catalog-list-search,
  .vehicle-search {
    min-width: 0;
  }

  .vehicle-picker-toolbar .portal-button {
    width: 100%;
  }

  .vehicle-pricing-bulk,
  .vehicle-pricing-row {
    grid-template-columns: 1fr;
  }

  .vehicle-pricing-bulk .portal-button,
  .vehicle-pricing-reset {
    width: 100%;
  }

  .vehicle-pricing-reset {
    display: flex;
    gap: 8px;
  }

  .vehicle-pricing-reset::after {
    content: 'Usar valores padrão';
    font-size: 0.78rem;
    font-weight: 650;
  }

  .schedule-service-summary {
    grid-template-columns: 1fr;
  }

  .schedule-service-summary-item {
    align-items: flex-start;
  }

  .schedule-service-summary-item.is-suggested {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid #dbe3ee;
    border-left: 0;
  }
}

/* Catálogo inteligente orientado por modelo */
.smart-generator-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 34px;
  margin-bottom: 18px;
  padding: clamp(24px, 3vw, 36px);
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgb(211 39 73 / 8%), transparent 36%),
    #fff;
}

.smart-generator-copy h2,
.smart-agent-generator-copy h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  letter-spacing: -0.04em;
}

.smart-generator-copy > p:last-of-type,
.smart-agent-generator-copy > p:last-of-type {
  max-width: 620px;
  margin: 10px 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.65;
}

.smart-generator-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.smart-generator-flow span,
.smart-generator-flow strong {
  padding: 7px 10px;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  border-radius: 8px;
}

.smart-generator-flow strong {
  color: #9f1239;
  background: #fff1f4;
}

.smart-generator-flow i {
  color: #94a3b8;
  font-size: 17px;
}

.smart-generator-form {
  display: grid;
  align-self: center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.smart-generator-form label,
.smart-agent-generator-form label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.smart-generator-form label:first-child,
.smart-generator-form .portal-button {
  grid-column: 1 / -1;
}

.smart-generator-form label > span,
.smart-agent-generator-form label > span {
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
}

.smart-generator-form select,
.smart-agent-generator-form select,
.smart-function-toolbar select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: #172033;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: 0;
}

.smart-generator-form select:focus,
.smart-agent-generator-form select:focus,
.smart-function-toolbar select:focus {
  border-color: #d32749;
  box-shadow: 0 0 0 3px rgb(211 39 73 / 10%);
}

.smart-generator-form select:disabled,
.smart-agent-generator-form select:disabled {
  color: #94a3b8;
  background: #f1f5f9;
}

.smart-function-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 0.28fr);
  gap: 10px;
  padding: 0 20px 14px;
}

.smart-function-toolbar .smart-search-field {
  margin: 0;
}

.smart-function-row.is-detailed {
  grid-template-columns: 42px minmax(190px, 1fr) auto auto auto auto 42px;
}

.smart-role-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 9px;
  font-size: 0.66rem;
  font-weight: 750;
  border-radius: 999px;
}

.smart-role-badge.is-included {
  color: #075b39;
  background: #eafaf2;
}

.smart-role-badge.is-optional {
  color: #9f1239;
  background: #fff1f4;
}

.smart-role-badge.is-standalone {
  color: #74440b;
  background: #fff7e6;
}

.smart-form-section {
  padding: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
}

.smart-form-section + .smart-form-section {
  margin-top: 16px;
}

.smart-form-section > header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
}

.smart-form-section > header > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  background: #172033;
  border-radius: 9px;
  place-items: center;
}

.smart-form-section > header > div {
  display: flex;
  flex-direction: column;
}

.smart-form-section > header strong {
  color: #1e293b;
  font-size: 0.88rem;
}

.smart-form-section > header p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 0.73rem;
}

.smart-form-section .vehicle-picker {
  margin-top: 0;
}

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

.smart-media-slot {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 11px;
}

.smart-media-slot.has-file {
  background: #fff7f8;
  border-color: #e77f95;
}

.smart-media-slot label {
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
}

.smart-media-slot input[type='text'],
.smart-media-slot input:not([type]) {
  width: 100%;
  padding: 9px 10px;
  color: #172033;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
}

.smart-media-slot input[type='file'] {
  width: 100%;
  color: #64748b;
  font-size: 0.68rem;
}

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

.smart-existing-media label {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
}

.smart-existing-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f1f5f9;
}

.smart-existing-media label > span {
  display: flex;
  padding: 9px;
  flex-direction: column;
}

.smart-existing-media strong {
  overflow: hidden;
  color: #334155;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-existing-media small {
  margin-top: 5px;
  color: #9f1239;
  font-size: 0.65rem;
}

.smart-agent-generator {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
  gap: 36px;
  padding: clamp(28px, 4vw, 48px);
  background:
    radial-gradient(circle at 10% 10%, rgb(211 39 73 / 9%), transparent 34%),
    #fff;
}

.smart-agent-generator-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  color: #9f1239;
  background: #fff1f4;
  border-radius: 17px;
  place-items: center;
}

.smart-agent-generator-form {
  display: grid;
  align-self: center;
  gap: 14px;
  padding: 22px;
  background: #0f192a;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgb(15 23 42 / 18%);
}

.smart-agent-generator-form label > span {
  color: #cbd5e1;
}

.smart-agent-generator-form .portal-button {
  margin-top: 4px;
}

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

.smart-agent-benefits article {
  padding: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
}

.smart-agent-benefits .material-symbols-outlined {
  color: #d32749;
}

.smart-agent-benefits strong {
  display: block;
  margin-top: 12px;
  color: #1e293b;
  font-size: 0.84rem;
}

.smart-agent-benefits p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.55;
}

@media (max-width: 1080px) {
  .smart-generator-panel,
  .smart-agent-generator {
    grid-template-columns: 1fr;
  }

  .smart-function-row.is-detailed {
    grid-template-columns: 42px minmax(160px, 1fr) auto auto 42px;
  }

  .smart-function-row.is-detailed > .smart-function-compatibility:nth-of-type(2),
  .smart-function-row.is-detailed > .smart-status {
    display: none;
  }
}

@media (max-width: 720px) {
  .smart-generator-form,
  .smart-function-toolbar,
  .smart-media-grid,
  .smart-agent-benefits {
    grid-template-columns: 1fr;
  }

  .smart-generator-form label:first-child,
  .smart-generator-form .portal-button {
    grid-column: auto;
  }

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

  .smart-function-row.is-detailed {
    grid-template-columns: 38px minmax(130px, 1fr) auto 40px;
  }

  .smart-function-row.is-detailed > .smart-function-compatibility,
  .smart-function-row.is-detailed > .smart-status {
    display: none;
  }
}

.schedule-list,
.activity-list,
.attention-list,
.quick-link-grid {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-stack.is-secondary .quick-link-grid {
    grid-template-columns: minmax(0, 1fr);
}

.schedule-item,
.activity-item,
.attention-item {
    display: flex;
    min-width: 0;
    gap: 13px;
    padding: 16px 0;
    border-bottom: 1px solid var(--portal-line);
}

.schedule-item:last-child,
.activity-item:last-child,
.attention-item:last-child {
    border-bottom: 0;
}

.schedule-time {
    display: grid;
    width: 68px;
    flex: 0 0 68px;
    align-content: center;
    align-self: stretch;
    padding: 9px 8px;
    border-radius: 12px;
    background: #f2f4f7;
    color: #344054;
    text-align: center;
}

.schedule-time strong {
    font-size: 0.82rem;
}

.schedule-time span {
    color: var(--portal-muted);
    font-size: 0.64rem;
}

.list-item-copy {
    min-width: 0;
    flex: 1;
}

.list-item-title {
    margin: 0;
    overflow: hidden;
    color: var(--portal-ink);
    font-size: 0.84rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-item-meta {
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 0.73rem;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-item-tail {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
}

.status-pill {
    padding: 5px 8px;
    background: #f2f4f7;
    color: #475467;
    font-size: 0.64rem;
}

.status-pill.is-success {
    background: var(--portal-success-soft);
    color: var(--portal-success);
}

.status-pill.is-warning {
    background: var(--portal-warning-soft);
    color: var(--portal-warning);
}

.status-pill.is-danger {
    background: var(--portal-danger-soft);
    color: var(--portal-danger);
}

.status-pill.is-info {
    background: var(--portal-info-soft);
    color: var(--portal-info);
}

.activity-symbol,
.attention-symbol {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--portal-primary-soft);
    color: var(--portal-primary-strong);
}

.attention-symbol.is-warning {
    background: var(--portal-warning-soft);
    color: var(--portal-warning);
}

.attention-symbol.is-danger {
    background: var(--portal-danger-soft);
    color: var(--portal-danger);
}

.attention-symbol.is-info {
    background: var(--portal-info-soft);
    color: var(--portal-info);
}

.empty-state {
    display: grid;
    justify-items: center;
    padding: 42px 18px;
    color: var(--portal-muted);
    text-align: center;
}

.empty-state-icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 16px;
    background: #f2f4f7;
    color: #667085;
}

.empty-state strong {
    color: #344054;
    font-size: 0.85rem;
}

.empty-state p {
    max-width: 330px;
    margin: 6px 0 0;
    font-size: 0.74rem;
    line-height: 1.5;
}

.chart-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 0;
}

.chart-total-label {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.chart-total-value {
    margin: 5px 0 0;
    color: var(--portal-ink);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.bar-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    height: 180px;
    align-items: end;
    padding: 24px 22px 20px;
}

.bar-column {
    display: grid;
    height: 100%;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
    justify-items: center;
}

.bar-track {
    position: relative;
    width: min(34px, 72%);
    height: 100%;
    overflow: hidden;
    border-radius: 9px;
    background: #f2f4f7;
}

.bar-fill {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 4px;
    height: var(--bar-size, 4%);
    border-radius: 9px;
    background: linear-gradient(180deg, #f35b76, var(--portal-primary));
}

.bar-column.is-current .bar-fill {
    background: linear-gradient(180deg, #344054, #101828);
}

.bar-label {
    color: var(--portal-muted);
    font-size: 0.64rem;
    font-weight: 600;
    text-transform: capitalize;
}

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

.quick-link-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 18px;
    border-radius: var(--radius-md);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.quick-link-card:hover {
    border-color: rgba(211, 39, 73, 0.26);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-link-card .material-symbols-outlined {
    color: var(--portal-primary-strong);
    font-size: 26px;
}

.quick-link-card strong {
    color: var(--portal-ink);
    font-size: 0.84rem;
}

.quick-link-card span:not(.material-symbols-outlined) {
    color: var(--portal-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}

.next-appointment {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #101828 0%, #1d2939 62%, #34202b 100%);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.next-appointment::after {
    position: absolute;
    top: -70px;
    right: -40px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 132, 0.28), transparent 68%);
    content: "";
}

.next-appointment-content {
    position: relative;
    z-index: 1;
}

.next-appointment-label {
    margin: 0 0 9px;
    color: #fda4b4;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.next-appointment h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.next-appointment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 14px;
    color: #d0d5dd;
    font-size: 0.76rem;
}

.next-appointment-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.next-appointment .portal-button {
    margin-top: 20px;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: none;
}

/* Compatibility polish for existing portal pages */
.content-wrapper,
.card,
.card-body {
    border-color: var(--portal-line) !important;
}

.card,
.content-wrapper > .card {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm) !important;
}

.card-header,
.pTitle {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.btn-primary,
.btn-register,
#loginBtn {
    border-color: var(--portal-primary) !important;
    background-color: var(--portal-primary) !important;
}

.btn-primary:hover,
.btn-register:hover,
#loginBtn:hover {
    border-color: var(--portal-primary-strong) !important;
    background-color: var(--portal-primary-strong) !important;
}

.dataTables_wrapper,
.select2-container,
table.dataTable {
    font-family: inherit !important;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
input.form-control,
select.form-control,
textarea.form-control {
    min-height: 44px;
    border-color: #d0d5dd !important;
    border-radius: 10px !important;
}

/* System-wide modernization for legacy administrative screens */
.portal-legacy-content {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: clamp(20px, 2.5vw, 34px) !important;
}

.portal-legacy-hero {
    display: flex !important;
    margin-bottom: 24px !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 20px;
}

.portal-legacy-hero h1 {
    margin: 0;
    color: #101828 !important;
    font-size: clamp(1.8rem, 3vw, 2.5rem) !important;
    font-weight: 720 !important;
    letter-spacing: -0.04em;
    line-height: 1.08 !important;
}

.portal-legacy-hero h1 + p,
.portal-legacy-hero p {
    margin-top: 8px;
    color: #667085 !important;
    font-size: 0.9rem;
}

.portal-legacy-hero > button,
.portal-legacy-hero > a,
.portal-legacy-hero > div:last-child > button,
.portal-legacy-hero > div:last-child > a {
    min-height: 46px;
    padding: 10px 17px !important;
    border-radius: 12px !important;
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgb(211 39 73 / 16%);
}

.portal-legacy-panel {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4e9f1;
    border-radius: 18px !important;
    box-shadow: 0 8px 28px rgb(15 23 42 / 6%) !important;
}

.portal-legacy-panel > .border-b,
.portal-legacy-panel > div:first-child.border-b {
    min-height: 70px;
    padding: 18px 22px !important;
    background: #fff;
}

.portal-legacy-panel h2 {
    color: #172033 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.015em;
}

.portal-legacy-ui .content-wrapper {
    min-height: 100vh;
    margin-left: var(--sidebar-width) !important;
    padding: 28px;
    background: var(--portal-canvas) !important;
    transition: margin-left 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-legacy-ui.sidebar-collapsed .content-wrapper,
.sidebar-precollapsed .portal-legacy-ui .content-wrapper {
    margin-left: var(--sidebar-collapsed-width) !important;
}

.portal-legacy-ui .content-wrapper .content-header h1 {
    color: #101828;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 720;
    letter-spacing: -0.04em;
}

.portal-legacy-ui .content-wrapper .card {
    overflow: hidden;
    border: 1px solid #e4e9f1 !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 28px rgb(15 23 42 / 6%) !important;
}

.portal-legacy-ui .portal-content-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.portal-legacy-ui .portal-content-shell select,
.portal-legacy-ui .portal-content-shell textarea,
.portal-legacy-ui .fixed.inset-0 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.portal-legacy-ui .fixed.inset-0 select,
.portal-legacy-ui .fixed.inset-0 textarea {
    min-height: 44px;
    border-color: #d0d5dd !important;
    border-radius: 10px !important;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.portal-legacy-ui .portal-content-shell input:focus,
.portal-legacy-ui .portal-content-shell select:focus,
.portal-legacy-ui .portal-content-shell textarea:focus,
.portal-legacy-ui .fixed.inset-0 input:focus,
.portal-legacy-ui .fixed.inset-0 select:focus,
.portal-legacy-ui .fixed.inset-0 textarea:focus {
    border-color: #d32749 !important;
    box-shadow: 0 0 0 3px rgb(211 39 73 / 12%) !important;
}

.portal-legacy-ui .fixed.inset-0.bg-gray-500,
.portal-legacy-ui .fixed.inset-0[class*="bg-opacity"] {
    background: rgb(7 15 28 / 68%) !important;
    backdrop-filter: blur(5px);
}

.portal-legacy-ui .fixed.inset-0 > .relative.bg-white,
.portal-legacy-ui .fixed.inset-0 > div > .relative.bg-white {
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 28%) !important;
    border-radius: 18px !important;
    box-shadow: 0 28px 80px rgb(2 8 23 / 32%) !important;
}

.portal-data-table {
    position: relative;
    display: flow-root;
    width: 100%;
    color: #344054;
}

.portal-data-table::after {
    display: table;
    clear: both;
    content: "";
}

.portal-data-table .dataTables_length,
.portal-data-table .dataTables_filter {
    margin: 0 0 16px !important;
}

.portal-data-table .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 0.76rem;
    font-weight: 650;
}

.portal-data-table .dataTables_length select {
    min-width: 72px;
    min-height: 44px;
    padding: 8px 28px 8px 10px !important;
    color: #1d2939;
    background-color: #fff;
    border: 1px solid #d0d5dd !important;
    border-radius: 10px !important;
}

.portal-table-search {
    position: relative;
    width: min(100%, 360px);
    font-size: 0;
}

.portal-table-search label {
    display: block;
    font-size: 0;
}

.portal-table-search input[type="search"] {
    width: 100%;
    min-height: 46px;
    margin: 0 !important;
    padding: 10px 42px !important;
    color: #101828;
    background: #fff;
    border: 1px solid #d0d5dd !important;
    border-radius: 12px !important;
    outline: 0;
    font-family: inherit;
    font-size: 0.86rem;
}

.portal-table-search input[type="search"]:focus {
    border-color: #d32749 !important;
    box-shadow: 0 0 0 3px rgb(211 39 73 / 12%);
}

.portal-table-search-icon {
    position: absolute;
    top: 13px;
    left: 13px;
    color: #667085;
    font-size: 20px;
    pointer-events: none;
}

.portal-table-search-clear {
    position: absolute;
    top: 7px;
    right: 7px;
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #667085;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    place-items: center;
}

.portal-table-search-clear[hidden] {
    display: none;
}

.portal-table-search-clear:hover {
    color: #be123c;
    background: #fff1f4;
}

.portal-table-search-clear .material-symbols-outlined {
    font-size: 19px;
}

.portal-table-quick-filters {
    display: flex;
    width: 100%;
    margin: 0 0 16px;
    padding: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    clear: both;
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 12px;
}

.portal-table-quick-filters label {
    display: grid;
    min-width: 150px;
    flex: 1 1 170px;
    gap: 5px;
}

.portal-table-quick-filters label > span {
    color: #667085;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.portal-table-quick-filters select {
    width: 100%;
    min-height: 40px;
    padding: 8px 30px 8px 10px;
    color: #344054;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
}

.portal-table-filter-reset {
    display: inline-flex;
    min-height: 40px;
    padding: 8px 12px;
    align-items: center;
    gap: 6px;
    color: #475467;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.portal-table-filter-reset:hover {
    color: #be123c;
    border-color: #f0a2b1;
    background: #fff7f8;
}

.portal-table-filter-reset .material-symbols-outlined {
    font-size: 18px;
}

.portal-data-table table.dataTable {
    width: 100% !important;
    margin: 0 0 16px !important;
    border: 1px solid #e4e9f1 !important;
    border-radius: 12px;
    border-collapse: separate !important;
    border-spacing: 0;
    overflow: hidden;
}

.portal-data-table table.dataTable thead th,
.portal-data-table table.dataTable thead td {
    padding: 13px 15px !important;
    height: 52px;
    color: #667085 !important;
    background-color: #f8fafc !important;
    border-top: 0 !important;
    border-bottom: 1px solid #e4e9f1 !important;
    font-size: 0.7rem !important;
    font-weight: 750 !important;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: normal;
}

.portal-data-table table.dataTable tbody td {
    padding: 14px 15px !important;
    color: #344054;
    background: #fff;
    border-top: 0 !important;
    border-bottom: 1px solid #eef1f5;
    font-size: 0.82rem;
    vertical-align: middle;
}

.portal-data-table table.dataTable .portal-table-align-money {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.portal-data-table table.dataTable .portal-table-align-center,
.portal-data-table table.dataTable .portal-table-align-actions {
    text-align: center !important;
}

.portal-data-table table.dataTable td.portal-table-align-actions {
    white-space: nowrap;
}

.portal-data-table table.dataTable tbody tr:last-child td {
    border-bottom: 0;
}

.portal-data-table table.dataTable tbody tr:hover td {
    background: #fbfcfe;
}

.portal-data-table table.dataTable td.dataTables_empty {
    padding: 42px 20px !important;
    color: #667085;
    text-align: center;
}

.portal-data-table table.dataTable tbody a:has(.material-symbols-outlined) {
    display: inline-grid;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    place-items: center;
    transition: color 150ms ease, background 150ms ease;
}

.portal-data-table table.dataTable tbody a:has(.material-symbols-outlined):hover {
    color: #be123c !important;
    background: #fff1f4;
}

.portal-data-table .dataTables_info {
    padding: 11px 0 0 !important;
    color: #667085;
    font-size: 0.75rem;
}

.portal-data-table .dataTables_paginate {
    display: flex;
    padding-top: 8px !important;
    align-items: center;
    gap: 4px;
}

.portal-data-table .dataTables_paginate .paginate_button {
    min-width: 38px;
    min-height: 38px;
    margin: 0 !important;
    padding: 8px 10px !important;
    color: #475467 !important;
    background: #fff !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    box-shadow: none !important;
}

.portal-data-table .dataTables_paginate .paginate_button:hover {
    color: #be123c !important;
    background: #fff1f4 !important;
    border-color: #f8c6d0 !important;
}

.portal-data-table .dataTables_paginate .paginate_button.current,
.portal-data-table .dataTables_paginate .paginate_button.current:hover {
    color: #fff !important;
    background: #d32749 !important;
    border-color: #d32749 !important;
}

.portal-data-table .dataTables_paginate .paginate_button.disabled {
    color: #98a2b3 !important;
    opacity: 0.62;
}

.portal-data-table .dt-buttons {
    display: inline-flex;
    margin: 0 8px 16px 0;
    flex-wrap: wrap;
    gap: 7px;
}

.portal-data-table .dt-button,
.portal-data-table button.dt-button,
.portal-data-table div.dt-button,
.portal-data-table a.dt-button {
    min-height: 42px;
    margin: 0 !important;
    padding: 9px 13px !important;
    color: #475467 !important;
    background: #fff !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
}

.portal-data-table .dt-button:hover {
    color: #be123c !important;
    background: #fff7f8 !important;
    border-color: #f0a2b1 !important;
}

.portal-table-result-count {
    display: block;
    margin-top: 10px;
    clear: both;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 650;
    text-align: right;
}

@media (max-width: 767px) {
    .portal-legacy-content {
        padding: 18px 14px 28px !important;
    }

    .portal-legacy-hero {
        align-items: stretch !important;
        flex-direction: column;
    }

    .portal-legacy-hero > button,
    .portal-legacy-hero > a,
    .portal-legacy-hero > div:last-child > button,
    .portal-legacy-hero > div:last-child > a {
        width: 100%;
        justify-content: center;
    }

    .portal-legacy-ui .content-wrapper {
        margin-left: 0 !important;
        padding: 18px 14px 28px;
    }

    .portal-data-table .dataTables_length,
    .portal-data-table .dataTables_filter {
        float: none !important;
        width: 100%;
        text-align: left !important;
    }

    .portal-table-search {
        max-width: none;
    }

    .portal-table-quick-filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .portal-table-quick-filters label,
    .portal-table-filter-reset {
        width: 100%;
    }

    .portal-data-table .dataTables_info,
    .portal-data-table .dataTables_paginate {
        float: none !important;
        width: 100%;
        justify-content: center;
        text-align: center !important;
    }

    .portal-data-table .dataTables_paginate {
        overflow-x: auto;
    }

    .portal-table-result-count {
        text-align: center;
    }
}

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

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

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

@media (max-width: 767px) {
    :root {
        --topbar-height: 64px;
    }

    .app-topbar {
        gap: 10px;
        padding: 0 12px;
    }

    .topbar-start,
    .topbar-end {
        gap: 8px;
    }

    .topbar-logo {
        height: 36px;
    }

    .topbar-brand-copy,
    .topbar-date,
    .account-copy {
        display: none;
    }

    .account-summary {
        padding: 0;
    }

    .account-avatar {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .icon-button {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px;
    }

    .app-sidebar,
    .sidebar-precollapsed .app-sidebar,
    body.sidebar-collapsed .app-sidebar {
        width: min(86vw, 320px);
        transform: translateX(-102%);
        box-shadow: 22px 0 50px rgba(11, 18, 32, 0.22);
    }

    body.sidebar-open {
        overflow: hidden;
    }

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

    body.sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
    }

    .sidebar-group-label,
    .sidebar-label,
    .sidebar-precollapsed .sidebar-group-label,
    .sidebar-precollapsed .sidebar-label,
    body.sidebar-collapsed .sidebar-group-label,
    body.sidebar-collapsed .sidebar-label {
        width: auto;
        opacity: 1;
        pointer-events: auto;
    }

    #main-content,
    .sidebar-precollapsed #main-content,
    body.sidebar-collapsed #main-content {
        width: 100%;
        margin-left: 0 !important;
    }

    .dashboard-page {
        padding: 20px 16px 32px;
    }

    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 22px;
    }

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

    .dashboard-actions .portal-button {
        flex: 1;
    }

    .metric-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .metric-card {
        padding: 18px;
    }

    .dashboard-stack.is-secondary,
    .quick-link-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel-header,
    .chart-summary {
        align-items: flex-start;
        padding: 18px;
    }

    .panel-body,
    .bar-chart {
        padding-right: 18px;
        padding-left: 18px;
    }

    .schedule-time {
        width: 60px;
        flex-basis: 60px;
    }

    .list-item-tail {
        display: none;
    }

    .next-appointment {
        padding: 22px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Catálogo inteligente · Beta */
.sidebar-badge {
  margin-left: auto;
  padding: 3px 7px;
  color: #9f1239;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #fff1f4;
  border: 1px solid rgb(211 39 73 / 20%);
  border-radius: 999px;
}

html.sidebar-precollapsed .sidebar-badge,
body.sidebar-collapsed .sidebar-badge {
  display: none;
}

.smart-catalog-page {
  --smart-accent: #d32749;
  --smart-ink: #111827;
  --smart-muted: #64748b;
  padding-bottom: 72px;
}

.smart-hero {
  align-items: flex-end;
  padding: 10px 4px 4px;
}

.smart-hero .dashboard-title {
  letter-spacing: -0.045em;
}

.smart-beta-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-left: 7px;
  padding: 4px 8px;
  color: #9f1239;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #fff1f4;
  border: 1px solid #fecdd6;
  border-radius: 999px;
}

.smart-hero-actions,
.smart-card-actions,
.smart-onboarding-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.smart-onboarding {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-top: 28px;
  padding: 30px;
}

.smart-onboarding-icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  color: #9f1239;
  background: #fff1f4;
  border-radius: 17px;
  place-items: center;
}

.smart-onboarding h2 {
  margin: 13px 0 7px;
  color: var(--smart-ink);
  font-size: 1.4rem;
}

.smart-onboarding p {
  max-width: 760px;
  margin: 0 0 20px;
  color: var(--smart-muted);
  line-height: 1.65;
}

.smart-onboarding code {
  padding: 3px 7px;
  color: #9f1239;
  background: #fff1f4;
  border-radius: 6px;
}

.smart-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 18px;
}

.smart-metric-card {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e5eaf1;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 4%);
}

.smart-metric-card > .material-symbols-outlined {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: #475569;
  background: #f1f5f9;
  border-radius: 12px;
  place-items: center;
}

.smart-metric-card.is-accent > .material-symbols-outlined {
  color: #a20f34;
  background: #fff1f4;
}

.smart-metric-card div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.smart-metric-card strong {
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
}

.smart-metric-card div span {
  margin-top: 5px;
  overflow: hidden;
  color: var(--smart-muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-workflow {
  margin-bottom: 18px;
}

.smart-panel-header {
  align-items: center;
}

.smart-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0 20px 22px;
}

.smart-workflow-grid > div {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  column-gap: 12px;
  padding: 14px 20px;
}

.smart-workflow-grid > div:not(:last-child)::after {
  position: absolute;
  top: 31px;
  right: -9px;
  width: 18px;
  height: 1px;
  content: '';
  background: #cbd5e1;
}

.smart-workflow-grid > div > span {
  display: grid;
  width: 36px;
  height: 36px;
  grid-row: 1 / 3;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  background: #172033;
  border-radius: 11px;
  place-items: center;
}

.smart-workflow-grid strong {
  color: #172033;
  font-size: 0.88rem;
}

.smart-workflow-grid p {
  margin: 4px 0 0;
  color: var(--smart-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.smart-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 18px;
}

.smart-section.is-wide {
  grid-column: 1 / -1;
}

.smart-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 20px 22px;
}

.smart-catalog-card {
  min-width: 0;
  padding: 18px;
  background: linear-gradient(145deg, #fff 65%, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 15px;
}

.smart-catalog-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.smart-status,
.smart-version {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  font-size: 0.68rem;
  font-weight: 750;
  border-radius: 999px;
}

.smart-status.is-published {
  color: #087343;
  background: #eafaf2;
}

.smart-status.is-draft,
.smart-version {
  color: #475569;
  background: #eef2f7;
}

.smart-status.is-inactive {
  color: #9f1239;
  background: #fff1f4;
}

.smart-catalog-card h3 {
  margin: 17px 0 6px;
  overflow: hidden;
  color: var(--smart-ink);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-catalog-card > p {
  margin: 0;
  overflow: hidden;
  color: var(--smart-muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-catalog-facts {
  display: grid;
  grid-template-columns: 0.7fr 0.7fr 1.4fr;
  gap: 8px;
  margin: 18px 0;
  padding: 13px 0;
  border-top: 1px solid #e8edf4;
  border-bottom: 1px solid #e8edf4;
}

.smart-catalog-facts div {
  min-width: 0;
}

.smart-catalog-facts dt {
  margin-bottom: 3px;
  color: #94a3b8;
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.smart-catalog-facts dd {
  margin: 0;
  overflow: hidden;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-card-actions form {
  margin: 0;
}

.smart-card-actions .portal-button {
  min-height: 38px;
}

.smart-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 20px 14px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #dbe3ed;
  border-radius: 11px;
}

.smart-search-field:focus-within {
  border-color: var(--smart-accent);
  box-shadow: 0 0 0 3px rgb(211 39 73 / 10%);
}

.smart-search-field .material-symbols-outlined {
  color: #64748b;
  font-size: 20px;
}

.smart-search-field input {
  width: 100%;
  min-height: 42px;
  padding: 0;
  color: #172033;
  background: transparent;
  border: 0;
  outline: 0;
}

.smart-function-list {
  padding: 0 20px 20px;
}

.smart-function-row {
  display: grid;
  align-items: center;
  grid-template-columns: 42px minmax(130px, 1fr) auto auto 42px;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f6;
}

.smart-function-row[hidden],
.smart-function-choice[hidden] {
  display: none;
}

.smart-function-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: #9f1239;
  background: #fff1f4;
  border-radius: 11px;
  place-items: center;
}

.smart-function-copy,
.smart-template-card > div:not(.smart-template-swatch),
.smart-function-choice-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.smart-function-copy strong,
.smart-template-card strong,
.smart-function-choice-copy strong {
  overflow: hidden;
  color: #1e293b;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-function-copy span,
.smart-template-card span,
.smart-function-choice-copy small {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.7rem;
}

.smart-function-compatibility {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 650;
}

.smart-function-compatibility .material-symbols-outlined {
  font-size: 18px;
}

.smart-template-list {
  display: grid;
  gap: 10px;
  padding: 0 20px 20px;
}

.smart-template-card {
  display: grid;
  align-items: center;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.smart-template-swatch {
  width: 54px;
  height: 66px;
  background: linear-gradient(145deg, var(--template-accent, #d32749), #111827);
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 35%);
}

.smart-empty-state {
  min-height: 210px;
  margin: 0 20px 20px;
}

.smart-modal .catalog-modal-card {
  width: min(1120px, 100%);
}

.smart-catalog-builder-modal .catalog-modal-card {
  width: min(1240px, 100%);
}

.smart-template-modal-card {
  width: min(720px, 100%) !important;
}

.smart-picker-toolbar {
  grid-template-columns: minmax(250px, 1fr) minmax(160px, 0.35fr) auto auto;
}

.smart-picker-toolbar .smart-search-field {
  margin: 0;
}

.smart-picker-toolbar .smart-search-field input {
  min-height: 38px;
}

.vehicle-picker.is-invalid,
.smart-function-picker.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgb(220 38 38 / 10%);
  animation: smart-shake 240ms ease-in-out;
}

@keyframes smart-shake {
  33% { transform: translateX(-4px); }
  66% { transform: translateX(4px); }
}

.smart-switch-field {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.smart-switch-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.smart-switch-control {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 150ms ease;
}

.smart-switch-control::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  content: '';
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgb(15 23 42 / 25%);
  transition: transform 150ms ease;
}

.smart-switch-field input:checked + .smart-switch-control {
  background: var(--smart-accent);
}

.smart-switch-field input:checked + .smart-switch-control::after {
  transform: translateX(20px);
}

.smart-switch-field > span:last-child {
  display: flex;
  flex-direction: column;
}

.smart-switch-field strong {
  color: #1e293b;
  font-size: 0.84rem;
}

.smart-switch-field small {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.72rem;
}

.smart-function-picker {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 1px solid #dfe6ef;
  border-radius: 15px;
}

.smart-function-picker legend {
  color: #1e293b;
  font-size: 0.875rem;
  font-weight: 650;
}

.smart-function-picker-list {
  display: grid;
  max-height: 430px;
  overflow-y: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.smart-function-choice {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
  grid-template-columns: 42px minmax(100px, 1fr) minmax(120px, 0.55fr) 22px;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
}

.smart-function-choice:hover,
.smart-function-choice:has(input:checked) {
  background: #fff8f9;
  border-color: #ee9aac;
}

.smart-function-choice > input[type='checkbox'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.smart-price-field {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d7dee8;
  border-radius: 9px;
}

.smart-price-field > span {
  padding-left: 9px;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
}

.smart-price-field input {
  width: 100%;
  min-width: 0;
  padding: 8px;
  color: #172033;
  background: transparent;
  border: 0;
  outline: 0;
}

.smart-price-field:has(input:disabled) {
  opacity: 0.45;
}

.smart-choice-check {
  color: #cbd5e1;
  font-size: 22px;
}

.smart-function-choice:has(input:checked) .smart-choice-check {
  color: var(--smart-accent);
  font-variation-settings: 'FILL' 1;
}

.smart-compatibility-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 16px;
  padding: 12px;
  color: #475569;
  font-size: 0.78rem;
  background: #f8fafc;
  border-radius: 10px;
}

.smart-compatibility-notice[hidden] {
  display: none;
}

@media (max-width: 1180px) {
  .smart-catalog-grid,
  .smart-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .smart-function-picker-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .smart-section-grid,
  .smart-workflow-grid {
    grid-template-columns: 1fr;
  }

  .smart-workflow-grid > div:not(:last-child)::after {
    display: none;
  }

  .smart-section.is-wide {
    grid-column: auto;
  }

  .smart-picker-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .smart-hero {
    align-items: flex-start;
  }

  .smart-hero-actions,
  .smart-onboarding-actions,
  .smart-card-actions {
    width: 100%;
  }

  .smart-hero-actions .portal-button,
  .smart-onboarding-actions .portal-button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .smart-metric-grid,
  .smart-catalog-grid,
  .smart-picker-toolbar {
    grid-template-columns: 1fr;
  }

  .smart-onboarding {
    flex-direction: column;
    padding: 22px;
  }

  .smart-function-row {
    grid-template-columns: 38px minmax(110px, 1fr) auto 40px;
  }

  .smart-function-row .smart-status {
    display: none;
  }

  .smart-function-choice {
    grid-template-columns: 38px minmax(100px, 1fr) 22px;
  }

  .smart-function-choice .smart-price-field {
    grid-column: 1 / -1;
  }

  .smart-modal {
    padding: 10px;
  }
}

@media print {
    .app-topbar,
    .app-sidebar,
    .sidebar-backdrop,
    .dashboard-actions {
        display: none !important;
    }

    #main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        background: #ffffff;
    }
}

/* Authentication experience */
.catalog-empty[hidden] {
    display: none !important;
}

.auth-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: #111827;
    background: #f6f7f9;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}

.auth-skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #ffffff;
    background: #111827;
    font-size: 13px;
    font-weight: 700;
    transform: translateY(-150%);
    transition: transform 160ms ease;
}

.auth-skip-link:focus {
    transform: translateY(0);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(440px, 1.06fr) minmax(500px, 0.94fr);
}

.auth-showcase {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: clamp(48px, 6.5vw, 92px);
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    background:
        linear-gradient(rgba(255, 255, 255, 0.027) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.027) 1px, transparent 1px),
        radial-gradient(circle at 16% 12%, rgba(255, 62, 78, 0.18), transparent 34%),
        linear-gradient(145deg, #080d17 0%, #101827 56%, #0a101b 100%);
    background-size: 44px 44px, 44px 44px, auto, auto;
    isolation: isolate;
}

.auth-showcase::before {
    position: absolute;
    z-index: -1;
    top: 10%;
    right: -18%;
    width: 62%;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 50%;
    box-shadow:
        0 0 0 70px rgba(255, 255, 255, 0.018),
        0 0 0 140px rgba(255, 255, 255, 0.012);
    content: "";
}

.auth-showcase-glow {
    position: absolute;
    z-index: -1;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(95px);
    pointer-events: none;
}

.auth-showcase-glow--top {
    top: -210px;
    left: -130px;
    background: rgba(255, 50, 70, 0.24);
}

.auth-showcase-glow--bottom {
    right: -160px;
    bottom: -220px;
    background: rgba(255, 170, 38, 0.17);
}

.auth-showcase-content {
    position: relative;
    z-index: 2;
    width: min(100%, 670px);
}

.auth-eyebrow {
    display: inline-flex;
    margin: 0;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    align-items: center;
    gap: 9px;
    color: #d8dee9;
    background: rgba(255, 255, 255, 0.055);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.auth-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f43648;
    box-shadow: 0 0 0 4px rgba(244, 54, 72, 0.14);
}

.auth-showcase-copy {
    margin-top: clamp(54px, 10vh, 106px);
}

.auth-showcase-copy h1 {
    max-width: 680px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(40px, 4.2vw, 68px);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 1.02;
}

.auth-showcase-copy p {
    max-width: 590px;
    margin: 28px 0 0;
    color: #aeb8c8;
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.72;
}

.auth-feature-list {
    display: grid;
    margin: clamp(44px, 8vh, 82px) 0 0;
    padding: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    list-style: none;
}

.auth-feature-list li {
    min-width: 0;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(14px);
}

.auth-feature-list .material-symbols-outlined {
    display: grid;
    width: 36px;
    height: 36px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 11px;
    place-items: center;
    color: #ff5260;
    background: rgba(244, 54, 72, 0.1);
    font-size: 20px;
}

.auth-feature-list strong,
.auth-feature-list span > span {
    display: block;
}

.auth-feature-list strong {
    margin-bottom: 6px;
    color: #f7f9fc;
    font-size: 13px;
    font-weight: 650;
}

.auth-feature-list li > span:last-child {
    color: #8793a5;
    font-size: 11px;
    line-height: 1.5;
}

.auth-showcase-footer {
    position: relative;
    z-index: 2;
    display: flex;
    margin-top: 52px;
    align-items: center;
    gap: 9px;
    color: #697587;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-ribbons {
    position: absolute;
    z-index: 1;
    right: -150px;
    bottom: -126px;
    width: clamp(360px, 43vw, 690px);
    max-width: none;
    opacity: 0.52;
    transform: rotate(-2deg);
    pointer-events: none;
}

.auth-access {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: 54px clamp(38px, 7vw, 112px) 34px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(244, 54, 72, 0.055), transparent 29%),
        #f8f8fa;
}

.auth-access-inner {
    width: min(100%, 470px);
}

.auth-brand {
    display: flex;
    margin-bottom: clamp(42px, 7vh, 72px);
    align-items: center;
    gap: 12px;
}

.auth-brand img {
    display: block;
    width: auto;
    height: 42px;
    object-fit: contain;
}

.auth-brand-copy {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}

.auth-brand-copy strong {
    color: #111827;
    font-size: 0.875rem;
    font-weight: 700;
}

.auth-brand-copy small {
    color: #7b8492;
    font-size: 0.72rem;
}

.auth-form-heading {
    margin-bottom: 32px;
}

.auth-kicker {
    margin: 0 0 12px;
    color: #e52e40 !important;
    font-size: 11px !important;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-form-heading h2 {
    margin: 0;
    color: #111723;
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 650;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

.auth-form-heading > p:last-child {
    margin: 12px 0 0;
    color: #737b89;
    font-size: 14px;
    line-height: 1.65;
}

.auth-alert {
    display: flex;
    margin: 0 0 24px;
    padding: 14px 15px;
    border: 1px solid;
    border-radius: 13px;
    align-items: flex-start;
    gap: 11px;
}

.auth-alert .material-symbols-outlined {
    margin-top: 1px;
    font-size: 19px;
}

.auth-alert p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.auth-alert.is-danger {
    border-color: #fecdd3;
    color: #9f1239;
    background: #fff1f2;
}

.auth-alert.is-success {
    border-color: #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

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

.auth-field label {
    display: block;
    margin: 0;
    color: #2f3745;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.015em;
}

.auth-label-row {
    display: flex;
    margin-bottom: 9px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-field > label {
    margin-bottom: 9px;
}

.auth-label-row a {
    color: #db2c3e;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.auth-label-row a:hover {
    color: #b91c2d;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-shell input {
    width: 100%;
    min-height: 54px;
    padding: 0 50px 0 47px;
    border: 1px solid #d9dde4;
    border-radius: 14px;
    outline: none;
    color: #131a26;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.025);
    font: inherit;
    font-size: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-input-shell input::placeholder {
    color: #a2a8b3;
}

.auth-input-shell input:hover {
    border-color: #bec4ce;
    background: #ffffff;
}

.auth-input-shell input:focus {
    border-color: #ef4051;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(239, 64, 81, 0.11);
}

.auth-input-icon {
    position: absolute;
    z-index: 1;
    left: 16px;
    color: #8c95a3;
    font-size: 20px;
    pointer-events: none;
}

.auth-password-toggle {
    position: absolute;
    z-index: 2;
    right: 8px;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    place-items: center;
    color: #777f8d;
    background: transparent;
    cursor: pointer;
    transition: color 150ms ease, background 150ms ease;
}

.auth-password-toggle:hover {
    color: #1f2937;
    background: #f1f2f5;
}

.auth-password-toggle:focus-visible,
.auth-label-row a:focus-visible,
.auth-register a:focus-visible {
    outline: 3px solid rgba(239, 64, 81, 0.2);
    outline-offset: 3px;
}

.auth-password-toggle .material-symbols-outlined {
    font-size: 20px;
}

.auth-submit {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 56px;
    margin-top: 2px;
    padding: 0 18px 0 22px;
    border: 0;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #ef3347 0%, #cf2237 100%);
    box-shadow: 0 12px 26px rgba(211, 34, 55, 0.22);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.auth-submit::before {
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.17), transparent);
    content: "";
    transform: skewX(-20deg);
    transition: left 450ms ease;
}

.auth-submit:hover {
    box-shadow: 0 15px 32px rgba(211, 34, 55, 0.29);
    filter: saturate(1.04);
    transform: translateY(-1px);
}

.auth-submit:hover::before {
    left: 130%;
}

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

.auth-submit:focus-visible {
    outline: 4px solid rgba(239, 64, 81, 0.18);
    outline-offset: 3px;
}

.auth-submit-arrow {
    position: absolute;
    right: 19px;
    font-size: 20px;
}

.auth-submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin 700ms linear infinite;
}

.auth-submit.is-loading {
    cursor: wait;
}

.auth-submit.is-loading .auth-submit-arrow {
    display: none;
}

.auth-submit.is-loading .auth-submit-spinner {
    display: block;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-register {
    display: flex;
    margin-top: 26px;
    padding: 17px 18px;
    border: 1px solid #e3e5e9;
    border-radius: 14px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255, 255, 255, 0.62);
}

.auth-register strong,
.auth-register span {
    display: block;
}

.auth-register strong {
    margin-bottom: 3px;
    color: #343c49;
    font-size: 12px;
}

.auth-register span {
    color: #8a919c;
    font-size: 11px;
}

.auth-register a {
    flex: 0 0 auto;
    color: #d8273a;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.auth-register a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-access-note {
    display: flex;
    margin: 24px 0 0;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #9ba1ab;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.035em;
}

.auth-access-note .material-symbols-outlined {
    color: #afb5be;
    font-size: 15px;
}

.auth-copyright {
    position: absolute;
    right: 0;
    bottom: 20px;
    left: 0;
    padding: 0 24px;
    color: #a5abb4;
    font-size: 10px;
    text-align: center;
}

@media (max-width: 1080px) {
    .auth-shell {
        grid-template-columns: minmax(390px, 0.88fr) minmax(480px, 1.12fr);
    }

    .auth-showcase {
        padding: 50px;
    }

    .auth-feature-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .auth-feature-list li {
        display: flex;
        padding: 13px;
        align-items: center;
        gap: 12px;
    }

    .auth-feature-list .material-symbols-outlined {
        flex: 0 0 36px;
        margin: 0;
    }
}

@media (max-height: 760px) and (min-width: 821px) {
    .auth-showcase {
        padding: 42px 50px;
    }

    .auth-showcase-copy {
        margin-top: 42px;
    }

    .auth-showcase-copy p {
        margin-top: 19px;
        line-height: 1.58;
    }

    .auth-feature-list {
        margin-top: 34px;
    }

    .auth-feature-list li {
        padding: 14px;
    }

    .auth-feature-list .material-symbols-outlined {
        margin-bottom: 12px;
    }

    .auth-showcase-footer {
        margin-top: 28px;
    }

    .auth-ribbons {
        bottom: -150px;
        opacity: 0.42;
    }

    .auth-access {
        padding-top: 34px;
        padding-bottom: 26px;
    }

    .auth-brand {
        margin-bottom: 32px;
    }

    .auth-form-heading {
        margin-bottom: 24px;
    }

    .auth-form-heading > p:last-child {
        margin-top: 8px;
    }

    .auth-form {
        gap: 17px;
    }

    .auth-input-shell input {
        min-height: 50px;
    }

    .auth-submit {
        min-height: 52px;
    }

    .auth-register {
        margin-top: 18px;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .auth-access-note {
        margin-top: 14px;
    }

    .auth-copyright {
        bottom: 10px;
    }
}

@media (max-width: 820px) {
    .auth-shell {
        display: flex;
        flex-direction: column;
    }

    .auth-showcase {
        order: 2;
        min-height: auto;
        padding: 36px 28px 42px;
    }

    .auth-showcase-copy {
        margin-top: 42px;
    }

    .auth-showcase-copy h1 {
        max-width: 610px;
        font-size: clamp(34px, 8vw, 54px);
    }

    .auth-showcase-copy p {
        margin-top: 20px;
    }

    .auth-feature-list,
    .auth-showcase-footer {
        display: none;
    }

    .auth-ribbons {
        right: -150px;
        bottom: -95px;
        width: 480px;
        opacity: 0.58;
    }

    .auth-access {
        order: 1;
        min-height: auto;
        padding: 48px 24px 76px;
    }

    .auth-copyright {
        bottom: 22px;
    }
}

@media (max-width: 520px) {
    .auth-showcase {
        padding: 28px 20px 34px;
    }

    .auth-eyebrow {
        font-size: 9px;
    }

    .auth-showcase-copy {
        margin-top: 34px;
    }

    .auth-showcase-copy h1 {
        max-width: 360px;
        font-size: 36px;
    }

    .auth-showcase-copy p {
        max-width: 350px;
        font-size: 14px;
        line-height: 1.62;
    }

    .auth-ribbons {
        right: -190px;
        bottom: -88px;
        width: 450px;
    }

    .auth-access {
        padding: 38px 18px 72px;
        background: #f8f8fa;
    }

    .auth-brand {
        margin-bottom: 38px;
    }

    .auth-brand img {
        width: auto;
        height: 38px;
    }

    .auth-brand-copy strong {
        font-size: 0.82rem;
    }

    .auth-form-heading {
        margin-bottom: 27px;
    }

    .auth-form-heading h2 {
        font-size: 31px;
    }

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

    .auth-copyright {
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit::before,
    .auth-submit-spinner {
        animation: none !important;
        transition: none !important;
    }
}

/* Representative profile */
.profile-page {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: clamp(24px, 3vw, 44px);
    color: #172033;
}

.profile-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 24px;
}

.profile-hero .portal-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    color: #bd1f42;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.profile-hero .portal-eyebrow span {
    width: 10px;
    height: 10px;
    border: 3px solid #fbdce3;
    border-radius: 999px;
    background: #d32749;
    box-sizing: content-box;
}

.profile-hero h1 {
    margin: 0;
    color: #101828;
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 760;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.profile-hero > div:first-child > p:last-child {
    max-width: 680px;
    margin: 12px 0 0;
    color: #667085;
    font-size: 1rem;
    line-height: 1.6;
}

.profile-completion {
    flex: 0 0 280px;
    padding: 16px 18px;
    border: 1px solid #e4e9f1;
    border-radius: 16px;
    background: rgb(255 255 255 / 82%);
    box-shadow: 0 8px 24px rgb(15 23 42 / 5%);
}

.profile-completion-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 650;
}

.profile-completion-copy strong {
    color: #101828;
    font-size: 0.95rem;
}

.profile-progress {
    overflow: hidden;
    height: 7px;
    border-radius: 999px;
    background: #edf0f5;
}

.profile-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d32749, #ec4c68);
}

.profile-alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 22px;
    padding: 16px 52px 16px 18px;
    border: 1px solid;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgb(15 23 42 / 4%);
}

.profile-alert.is-success {
    border-color: #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.profile-alert.is-danger {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.profile-alert > .material-symbols-outlined {
    margin-top: 1px;
    font-size: 24px;
}

.profile-alert strong {
    display: block;
    margin-bottom: 3px;
    color: #172033;
    font-size: 0.9rem;
}

.profile-alert p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
}

.profile-alert button {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    place-items: center;
}

.profile-alert button:hover {
    background: rgb(255 255 255 / 72%);
}

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

.profile-aside {
    position: sticky;
    top: calc(var(--topbar-height) + 24px);
    display: grid;
    gap: 16px;
}

.profile-identity-card,
.profile-nav,
.profile-panel {
    border: 1px solid #e4e9f1;
    background: #fff;
    box-shadow: 0 10px 32px rgb(15 23 42 / 5%);
}

.profile-identity-card {
    padding: 24px;
    border-radius: 20px;
}

.profile-avatar {
    display: grid;
    width: 72px;
    height: 72px;
    margin-bottom: 17px;
    border: 5px solid #fde8ed;
    border-radius: 22px;
    background: linear-gradient(145deg, #c51f42, #ed526e);
    box-shadow: 0 10px 28px rgb(211 39 73 / 24%);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    place-items: center;
}

.profile-identity-copy h2 {
    margin: 0;
    color: #101828;
    font-size: 1.15rem;
    font-weight: 720;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.profile-identity-copy p {
    margin: 5px 0 0;
    color: #667085;
    font-size: 0.83rem;
    line-height: 1.45;
}

.profile-summary-list {
    display: grid;
    gap: 14px;
    margin: 22px 0 0;
    padding-top: 19px;
    border-top: 1px solid #edf0f5;
}

.profile-summary-list div {
    min-width: 0;
}

.profile-summary-list dt {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 3px;
    color: #98a2b3;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-summary-list dt .material-symbols-outlined {
    font-size: 16px;
}

.profile-summary-list dd {
    overflow: hidden;
    margin: 0;
    color: #344054;
    font-size: 0.82rem;
    font-weight: 560;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-nav {
    overflow: hidden;
    padding: 7px;
    border-radius: 18px;
}

.profile-nav-link {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    color: #667085;
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.profile-nav-link:hover {
    background: #f8f9fc;
    color: #344054;
    text-decoration: none;
}

.profile-nav-link.is-active {
    background: #fff1f4;
    color: #b91c3d;
}

.profile-nav-link > .material-symbols-outlined:first-child {
    display: grid;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f3f5f8;
    color: #667085;
    font-size: 20px;
    place-items: center;
}

.profile-nav-link.is-active > .material-symbols-outlined:first-child {
    background: #fff;
    color: #d32749;
    box-shadow: 0 4px 12px rgb(211 39 73 / 10%);
}

.profile-nav-link strong,
.profile-nav-link small {
    display: block;
}

.profile-nav-link strong {
    color: #344054;
    font-size: 0.79rem;
    font-weight: 680;
}

.profile-nav-link.is-active strong {
    color: #a61635;
}

.profile-nav-link small {
    margin-top: 2px;
    color: #98a2b3;
    font-size: 0.66rem;
}

.profile-nav-arrow {
    font-size: 18px;
    opacity: 0.5;
}

.profile-content {
    min-width: 0;
}

.profile-panel {
    overflow: hidden;
    border-radius: 22px;
}

.profile-page.profile-enhanced .profile-panel:not(.is-active) {
    display: none;
}

.profile-panel form {
    margin: 0;
}

.profile-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 27px 30px 24px;
    border-bottom: 1px solid #edf0f5;
}

.profile-section-icon {
    display: grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #fff0f3;
    color: #c91f42;
    place-items: center;
}

.profile-section-icon .material-symbols-outlined {
    font-size: 23px;
}

.profile-panel-header p {
    margin: 0 0 3px;
    color: #d32749;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-panel-header h2 {
    margin: 0;
    color: #101828;
    font-size: 1.32rem;
    font-weight: 730;
    letter-spacing: -0.025em;
}

.profile-panel-header div:last-child > span {
    display: block;
    margin-top: 5px;
    color: #667085;
    font-size: 0.82rem;
    line-height: 1.45;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 28px 30px;
}

.profile-field {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
    margin: 0;
}

.profile-field-wide {
    grid-column: 1 / -1;
}

.profile-field > span {
    color: #344054;
    font-size: 0.78rem;
    font-weight: 680;
}

.profile-field > span b {
    color: #d32749;
}

.profile-field > span em {
    margin-left: 5px;
    color: #98a2b3;
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 600;
}

.profile-field input,
.profile-field select,
.profile-choice-search input {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #d0d5dd;
    border-radius: 11px;
    outline: 0;
    background: #fff;
    color: #172033;
    font-family: inherit;
    font-size: 0.86rem;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.profile-field input:hover,
.profile-field select:hover,
.profile-choice-search input:hover {
    border-color: #b6bfcc;
}

.profile-field input:focus,
.profile-field select:focus,
.profile-choice-search input:focus {
    border-color: #d32749;
    box-shadow: 0 0 0 4px rgb(211 39 73 / 11%);
}

.profile-field small {
    color: #98a2b3;
    font-size: 0.68rem;
    line-height: 1.45;
}

.profile-input-prefix {
    position: relative;
}

.profile-input-prefix > span {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #98a2b3;
    font-weight: 700;
    transform: translateY(-50%);
}

.profile-input-prefix input {
    padding-left: 34px;
}

.profile-choice-section {
    min-width: 0;
    margin: 0;
    padding: 25px 30px;
    border: 0;
    border-top: 1px solid #edf0f5;
}

.profile-choice-section legend,
.profile-choice-section h3 {
    padding: 0;
    margin: 0;
    color: #1d2939;
    font-size: 0.91rem;
    font-weight: 720;
}

.profile-choice-section > p,
.profile-choice-heading p {
    margin: 5px 0 0;
    color: #667085;
    font-size: 0.75rem;
    line-height: 1.45;
}

.profile-choice-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 17px;
}

.profile-choice-search {
    position: relative;
    flex: 0 0 220px;
}

.profile-choice-search .material-symbols-outlined {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 1;
    color: #98a2b3;
    font-size: 19px;
    pointer-events: none;
    transform: translateY(-50%);
}

.profile-choice-search input {
    min-height: 40px;
    padding: 8px 12px 8px 38px;
    font-size: 0.76rem;
}

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

.profile-choice-grid.is-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-choice {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #e0e5ec;
    border-radius: 11px;
    background: #fbfcfd;
    color: #667085;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.profile-choice:hover {
    border-color: #c4ccd7;
    background: #fff;
}

.profile-choice:has(input:checked) {
    border-color: #f2a8b8;
    background: #fff1f4;
    color: #b71c3b;
    box-shadow: inset 0 0 0 1px rgb(211 39 73 / 5%);
}

.profile-choice:focus-within {
    border-color: #d32749;
    box-shadow: 0 0 0 4px rgb(211 39 73 / 11%);
}

.profile-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.profile-choice .material-symbols-outlined {
    font-size: 20px;
}

.profile-choice:not(:has(input:checked)) .material-symbols-outlined {
    color: #b2bac6;
}

.profile-choice strong {
    overflow: hidden;
    color: #344054;
    font-size: 0.74rem;
    font-weight: 640;
    line-height: 1.3;
    text-overflow: ellipsis;
}

.profile-choice:has(input:checked) strong {
    color: #a61635;
}

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

.profile-choice-empty {
    padding: 18px;
    border: 1px dashed #d0d5dd;
    border-radius: 11px;
    text-align: center;
}

.profile-address-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 26px 30px 0;
    padding: 14px 16px;
    border: 1px solid #dce9ff;
    border-radius: 13px;
    background: #f3f7ff;
    color: #285ea8;
}

.profile-address-note > .material-symbols-outlined {
    margin-top: 1px;
    font-size: 21px;
}

.profile-address-note strong {
    display: block;
    color: #174a8b;
    font-size: 0.78rem;
}

.profile-address-note p {
    margin: 3px 0 0;
    font-size: 0.72rem;
}

.profile-security-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.7fr);
    gap: 28px;
    padding: 28px 30px;
}

.profile-password-fields {
    display: grid;
    gap: 18px;
}

.profile-password-input {
    position: relative;
}

.profile-password-input input {
    padding-right: 48px;
}

.profile-password-input button {
    position: absolute;
    top: 50%;
    right: 7px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #667085;
    cursor: pointer;
    transform: translateY(-50%);
    place-items: center;
}

.profile-password-input button:hover {
    background: #f2f4f7;
}

.profile-password-input .material-symbols-outlined {
    font-size: 20px;
}

.profile-security-tip {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    align-self: start;
    padding: 18px;
    border: 1px solid #dce9ff;
    border-radius: 15px;
    background: #f6f9ff;
    color: #285ea8;
}

.profile-security-tip > .material-symbols-outlined {
    font-size: 25px;
}

.profile-security-tip strong {
    display: block;
    color: #174a8b;
    font-size: 0.84rem;
}

.profile-security-tip p {
    margin: 5px 0 12px;
    color: #58759a;
    font-size: 0.73rem;
    line-height: 1.5;
}

.profile-security-tip ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-security-tip li {
    position: relative;
    padding-left: 20px;
    color: #667085;
    font-size: 0.7rem;
}

.profile-security-tip li::before {
    position: absolute;
    top: 3px;
    left: 2px;
    width: 9px;
    height: 9px;
    border: 2px solid #b7c7dc;
    border-radius: 999px;
    content: '';
}

.profile-security-tip li.is-valid {
    color: #067647;
}

.profile-security-tip li.is-valid::before {
    border-color: #12b76a;
    background: #12b76a;
    box-shadow: inset 0 0 0 2px #fff;
}

.profile-panel-actions {
    position: sticky;
    z-index: 4;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 17px 30px;
    border-top: 1px solid #e7ebf1;
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 -12px 28px rgb(15 23 42 / 4%);
    backdrop-filter: blur(10px);
}

.profile-panel-actions p {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #667085;
    font-size: 0.72rem;
}

.profile-panel-actions p .material-symbols-outlined {
    color: #98a2b3;
    font-size: 18px;
}

.profile-panel-actions .portal-button {
    flex: 0 0 auto;
    min-height: 44px;
    border-radius: 11px;
}

.profile-panel-actions .portal-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

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

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

@media (max-width: 920px) {
    .profile-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
    }

    .profile-completion {
        flex-basis: auto;
        width: 100%;
    }

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

    .profile-aside {
        position: static;
    }

    .profile-identity-card {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        align-items: center;
        gap: 14px 16px;
    }

    .profile-avatar {
        width: 64px;
        height: 64px;
        margin: 0;
        border-radius: 18px;
    }

    .profile-summary-list {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 4px;
    }

    .profile-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(180px, 1fr));
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .profile-nav-link {
        scroll-snap-align: start;
    }

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

    .profile-security-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .profile-page {
        padding: 20px 14px 32px;
    }

    .profile-hero h1 {
        font-size: 2rem;
    }

    .profile-identity-card {
        padding: 19px;
    }

    .profile-summary-list {
        grid-template-columns: 1fr;
    }

    .profile-nav {
        grid-template-columns: repeat(4, minmax(165px, 1fr));
    }

    .profile-panel {
        border-radius: 17px;
    }

    .profile-panel-header,
    .profile-form-grid,
    .profile-choice-section,
    .profile-security-layout {
        padding-right: 18px;
        padding-left: 18px;
    }

    .profile-panel-header {
        padding-top: 22px;
        padding-bottom: 20px;
    }

    .profile-form-grid,
    .profile-address-grid {
        grid-template-columns: 1fr;
        gap: 17px;
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .profile-field-wide {
        grid-column: auto;
    }

    .profile-choice-heading {
        flex-direction: column;
    }

    .profile-choice-search {
        flex-basis: auto;
        width: 100%;
    }

    .profile-choice-grid,
    .profile-choice-grid.is-compact {
        grid-template-columns: 1fr;
    }

    .profile-address-note {
        margin-right: 18px;
        margin-left: 18px;
    }

    .profile-panel-actions {
        position: static;
        align-items: stretch;
        flex-direction: column;
        padding: 16px 18px 18px;
    }

    .profile-panel-actions .portal-button {
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-page *,
    .profile-page *::before,
    .profile-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
