/* =============================================================================
   Compta — surfaces métier sur shell Lucidos
   Tokens : styles.css (--accent, --surface, --border, sémantiques…)
   ============================================================================= */

main.app-main {
  overflow: auto;
}

/* Chrome desktop porte déjà le titre : éviter le doublon Comptes / Comptes. */
@media (min-width: 769px) {
  .shell-page__title {
    display: none;
  }

  .shell-page__header:not(:has(.compta-breadcrumb)):not(:has(.shell-page__header-actions)) {
    display: none;
    margin: 0;
  }

  .shell-page__header:has(.compta-breadcrumb) {
    margin-bottom: 0.85rem;
  }
}

/* --- Marque sidebar --- */
.compta-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 0.75rem 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.compta-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-shadow);
}

.compta-brand__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.compta-brand__meta strong {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text);
}

.compta-brand__meta span {
  font-size: 0.72rem;
  color: var(--muted);
}

@media (min-width: 769px) and (max-width: 1200px) {
  .app-sidebar:not(:hover):not(:focus-within) .compta-brand__meta {
    width: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
  }

  .app-sidebar:not(:hover):not(:focus-within) .compta-brand {
    justify-content: center;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

.compta-sidebar-logout {
  margin: 0;
}

.compta-sidebar-logout .avatar-trigger {
  width: 100%;
}

.compta-chrome-sync {
  display: flex;
  align-items: stretch;
}

.compta-chrome-sync .btn,
.app-mobile-chrome .btn {
  align-self: center;
}

/* --- Login --- */
.compta-login-card {
  width: min(100%, 400px);
}

.compta-login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.compta-login-brand__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.compta-login-brand__sub {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- Breadcrumb --- */
.compta-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.compta-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.compta-breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.compta-breadcrumb span[aria-hidden] {
  opacity: 0.45;
}

/* --- Callout couverture --- */
.compta-callout {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--gradient-primary-subtle);
}

.compta-callout strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.compta-callout p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* --- Home : boîtes org en grille --- */
.compta-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
}

.compta-org-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.compta-org-box__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.55rem;
  border-bottom: 1px solid var(--border);
}

.compta-org-box__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  text-align: left;
  line-height: 1.25;
}

.compta-org-box__count {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.compta-org-box__list {
  display: flex;
  flex-direction: column;
}

.compta-account-item {
  display: block;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.compta-account-item:last-child {
  border-bottom: none;
}

.compta-account-item:hover {
  background: var(--bg-secondary);
}

.compta-account-item--empty {
  opacity: 0.72;
}

.compta-account-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.compta-account-item__bank {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.compta-account-item__name {
  margin: 0.1rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.compta-account-item__balance {
  margin: 0.15rem 0;
  font-size: 1.15rem;
}

.compta-account-item__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.compta-account-item__note {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--warning-hover);
}

/* legacy table home (unused) */
.compta-accounts-table-wrap {
  margin-top: 0.25rem;
}

.compta-accounts-table {
  table-layout: fixed;
}

.compta-accounts-group__head th {
  padding: 0.85rem 0.75rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border-bottom: none;
  position: static;
}

.compta-account-row td {
  vertical-align: middle;
}

.compta-account-row--empty {
  opacity: 0.65;
}

.compta-account-row__name {
  font-weight: 550;
  width: 22%;
}

.compta-account-row__name a {
  color: var(--text);
  text-decoration: none;
}

.compta-account-row__name a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.compta-account-row__status {
  width: 10rem;
}

.compta-account-row__balance {
  width: 8.5rem;
  font-size: 1.05rem;
}

.compta-account-row__meta {
  font-size: 0.8rem;
}

.compta-account-row__action {
  width: 4.5rem;
  text-align: right;
}

.compta-account-row__open {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.compta-account-row__open:hover {
  text-decoration: underline;
}

.compta-account-row:hover td {
  background: var(--bg-secondary);
}

/* --- Statuts / badges --- */
.compta-status {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.35;
}

.compta-status--ok {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.compta-status--warn {
  background: var(--warning-bg);
  color: var(--warning-hover);
  border: 1px solid var(--warning-border);
}

.compta-status--danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.compta-status--muted {
  background: var(--bg-secondary);
  color: var(--muted);
  border: 1px solid var(--border);
}

.compta-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  vertical-align: middle;
  white-space: nowrap;
}

.compta-badge--warn {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-hover);
}

/* --- Montants --- */
.compta-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.compta-amount--in {
  color: var(--success);
}

.compta-amount--out {
  color: var(--danger);
}

.compta-amount--zero {
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- KPI strip --- */
.compta-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.compta-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.compta-kpi__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compta-kpi__value {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.compta-kpi__hint {
  font-size: 0.72rem;
  color: var(--muted);
}

.compta-kpi-legend {
  margin: 0 0 1.15rem;
  font-size: 0.82rem;
}

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

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

/* --- Panneaux / sections --- */
.compta-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.1rem;
  margin-bottom: 1rem;
}

.compta-panel__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.compta-panel__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
}

.compta-panel__head .compta-panel__title {
  margin: 0;
}

.compta-panel > .compta-panel__title {
  margin-bottom: 0.75rem;
}

.compta-panel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.compta-panel__lead {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.85rem;
}

.compta-panel__empty {
  margin: 0;
  font-size: 0.88rem;
}

/* --- Alertes --- */
.compta-alert {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.compta-alert--danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.compta-alert--warn {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-hover);
}

.compta-alert--ok {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

/* --- Tables --- */
.compta-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.compta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.compta-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-secondary);
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.compta-table tbody td {
  padding: 0.42rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.compta-table tbody tr:hover td {
  background: var(--bg-secondary);
}

.compta-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.compta-date {
  white-space: nowrap;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

.compta-label a {
  color: var(--text);
  text-decoration: none;
}

.compta-label a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.compta-op-row--active td {
  background: var(--gradient-primary-subtle);
}

.compta-piece-cell {
  width: 2.25rem;
  text-align: center;
}

.compta-piece {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.compta-piece--attach {
  color: var(--muted);
}

.compta-piece--empty {
  display: inline-block;
  width: 1rem;
}

.compta-tags-cell {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 18rem;
}

.compta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.compta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.1rem 0.2rem 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.3;
}

.compta-chip__label {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compta-chip__amt {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.compta-chip__x {
  margin: 0;
  display: inline-flex;
}

.compta-chip__x button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  line-height: 1;
  padding: 0;
  font-size: 0.95rem;
}

.compta-chip__x button:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.compta-tag-add {
  position: relative;
}

.compta-tag-add__btn {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}

.compta-tag-add__btn::-webkit-details-marker {
  display: none;
}

.compta-tag-add__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--gradient-primary-subtle);
}

.compta-tag-add[open] .compta-tag-add__form {
  display: flex;
}

.compta-tag-add__form {
  display: none;
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 4px);
  gap: 0.35rem;
  align-items: center;
  padding: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.compta-tag-add__form input {
  width: 7.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}

/* --- Chart --- */
.compta-chart {
  margin-bottom: 0.75rem;
}

.compta-chart__caption {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.compta-chart__svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
}

.compta-chart__area {
  fill: var(--accent-glow);
}

.compta-chart__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.compta-chart__grid {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  opacity: 0.7;
}

.compta-chart__tick {
  fill: var(--muted);
  font-size: 10px;
  font-family: inherit;
}

.compta-chart__zero {
  stroke: var(--text-secondary);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0.55;
}

.compta-chart__threshold {
  stroke: var(--warning);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}

.compta-chart__thr-label {
  fill: var(--warning-hover);
  font-size: 10px;
  font-family: inherit;
}

.compta-chart__legend {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.compta-forecast-details {
  margin-top: 0.5rem;
}

.compta-forecast-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.compta-forecast-details summary:hover {
  color: var(--accent);
}

/* --- Panneau latéral (op / batch) --- */
.app-workspace--with-right .app-right--op {
  --app-right-width: min(380px, 42vw);
  width: 0;
  flex: 0 0 0;
  max-width: var(--app-right-width);
  border-left: 1px solid transparent;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100dvh - 56px);
  position: sticky;
  top: 0;
  align-self: start;
  overflow: hidden;
  opacity: 0;
  transform: translateX(12px);
  transition: width 0.2s ease, flex-basis 0.2s ease, opacity 0.18s ease, transform 0.2s ease, border-color 0.2s ease;
  pointer-events: none;
}

.app-workspace--with-right .app-right--op[hidden] {
  display: none !important;
}

.app-workspace--with-right .app-right--op.is-open {
  width: var(--app-right-width);
  flex-basis: var(--app-right-width);
  border-left-color: var(--border);
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.compta-op-panel {
  overflow-y: auto;
  flex: 1;
  padding: 1rem;
}

.compta-op-panel.app-right-body {
  padding: 1rem;
}

.compta-op-panel__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.compta-op-hero__amount {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.compta-op-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.compta-op-panel__section {
  margin-top: 1.15rem;
}

.compta-op-panel__section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.compta-tag-form--panel {
  margin-top: 0.75rem;
}

.compta-tag-form--panel .form-group {
  flex: 1 1 100%;
  min-width: 0;
}

.compta-batch-panel__count {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.compta-batch-panel__hint {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
}

.compta-op-row--active td {
  background: var(--gradient-primary-subtle);
}

@media (max-width: 768px) {
  .app-workspace--with-right .app-right--op {
    position: fixed;
    inset: auto 0 0 0;
    top: auto;
    width: 100%;
    flex-basis: auto;
    max-height: 0;
    border-left: none;
    border-top: 1px solid transparent;
    border-radius: 16px 16px 0 0;
    box-shadow: none;
    z-index: 360;
    transform: translateY(100%);
    opacity: 0;
  }

  .app-workspace--with-right .app-right--op.is-open {
    max-height: min(88dvh, 640px);
    width: 100%;
    border-top-color: var(--border);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.14);
    transform: translateY(0);
    opacity: 1;
  }

  .compta-org-grid {
    grid-template-columns: 1fr;
  }

  .compta-account-row__meta {
    display: none;
  }
}

.compta-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.compta-search input {
  flex: 1 1 16rem;
}

.compta-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.compta-batch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.compta-batch .form-group {
  margin: 0;
  min-width: 8rem;
  flex: 1 1 8rem;
}

.compta-batch__count,
.compta-batch__all {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.compta-check {
  width: 2rem;
  text-align: center;
}

.compta-more {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
}

.compta-row-actions {
  text-align: right;
  white-space: nowrap;
}

.compta-row-actions form {
  display: inline;
  margin: 0;
}

/* --- Formulaires tags / seuil --- */
.compta-tag-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.compta-tag-form .form-group {
  margin: 0;
  min-width: 9.5rem;
  flex: 1 1 9.5rem;
}

.compta-tag-form--inline .form-group {
  flex: 0 1 14rem;
}

.compta-tag-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* --- Opération détail --- */
.compta-op-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.15rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.compta-op-hero__amount {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.compta-op-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.compta-doc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.compta-doc-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.compta-doc__title {
  font-weight: 600;
  font-size: 0.9rem;
}

.compta-doc__meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.compta-empty {
  margin: 1rem 0;
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.auth-links {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.875rem;
}

.auth-links a {
  color: var(--accent);
}

.settings-avatar-preview-wrap {
  margin-bottom: 0.75rem;
}

.settings-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-circle .avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.settings-avatar-placeholder {
  width: 72px;
  height: 72px;
}

.settings-passkey-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.settings-passkey-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.settings-backup-codes {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}

/* Mobile : titres page déjà masqués par app-shell ; breadcrumb utile */
@media (max-width: 768px) {
  .shell-page__header {
    margin-bottom: 0.75rem;
  }

  .compta-breadcrumb {
    display: flex !important;
  }

  .compta-op-hero__amount {
    font-size: 1.45rem;
  }

  .compta-table thead th,
  .compta-table tbody td {
    padding: 0.5rem 0.55rem;
  }
}
