body.fi-has-sidebar .account-header {
  display: none;
}
.account-header {
  background: #1c3d35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
}
.account-header .header-actions {
  display: flex;
  gap: 8px;
}
.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 72px);
  background: #ffffff;
}
body.fi-has-sidebar .account-layout {
  min-height: 100vh;
}
.account-nav {
  background: #fff;
  border-right: 1px solid #e8e8e8;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.prefs-zone {
  display: block;
  margin-bottom: 24px;
  padding: 20px 20px 12px;
  background: #fafaf9;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
}
.prefs-zone [hidden] {
  display: none !important;
}
.prefs-zone-title {
  display: block;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2ddd6;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f6e56;
  letter-spacing: -0.01em;
}
.prefs-card {
  display: block;
  margin: 0 0 14px;
  padding: 16px 18px 18px;
  border: 1px solid #e2ddd6;
  border-radius: 8px;
  background: #fff;
}
.prefs-zone .prefs-card:last-child {
  margin-bottom: 6px;
}
.prefs-card-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.prefs-notifications {
  display: flex;
  margin: 8px 0 0;
  font-size: 14px;
}

.patient-folder-pref {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.patient-folder-hint,
.patient-folder-note {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
}
.patient-folder-configured {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
#patient-folder-unconfigured[hidden],
#patient-folder-configured[hidden] {
  display: none !important;
}
.patient-folder-label {
  font-size: 12px;
  font-weight: 600;
  color: #0f6e56;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}
.patient-folder-path {
  font-family: "DM Mono", monospace;
  font-size: 13px;
  color: #1c3d35;
  background: #edf7f2;
  border: 1px solid #a8d5be;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0;
  max-width: 100%;
  word-break: break-all;
}
.patient-folder-pref .btn-patient-folder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #0f6e56;
  color: #0f6e56;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.patient-folder-pref .btn-patient-folder:hover {
  background: #edf7f2;
}
.patient-folder-pref .btn-patient-folder:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.patient-passphrase-pref {
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: none;
}
.patient-passphrase-warning {
  margin: 0 0 14px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.45;
}
.patient-passphrase-danger {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
}
.patient-passphrase-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 420px;
}
.patient-passphrase-form .form-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.patient-passphrase-form .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.patient-passphrase-form .form-input {
  width: 100%;
  padding: 8px 44px 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: Inter, sans-serif;
  font-size: 14px;
}
.passphrase-input-wrap {
  position: relative;
  width: 100%;
}
.passphrase-pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
}
.passphrase-pw-toggle:hover {
  color: #0f6e56;
  background: #edf7f2;
}
.passphrase-pw-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.patient-passphrase-configured {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
#patient-passphrase-unset[hidden],
#patient-passphrase-set[hidden],
#patient-passphrase-change-form[hidden] {
  display: none !important;
}
.patient-passphrase-ack {
  margin: 0;
  font-size: 13px;
}
.patient-passphrase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.patient-passphrase-pref .btn-patient-folder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #0f6e56;
  color: #0f6e56;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
}
.patient-passphrase-pref .btn-patient-folder:hover:not(:disabled) {
  background: #edf7f2;
}
.patient-passphrase-pref .btn-patient-folder:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.account-nav-item {
  text-align: left;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}
.account-nav-item:hover {
  background: #f8faf9;
  color: #0f6e56;
}
.account-nav-item.active {
  background: #ebf4f1;
  color: #0f6e56;
  font-weight: 600;
  border-left: 3px solid #0f6e56;
  padding-left: 11px;
}
.account-nav-item .nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 8px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
.account-main {
  padding: 32px 40px 48px;
  max-width: 800px;
}
.account-panel h1 {
  font-size: 1.5rem;
  color: #0f6e56;
  margin-bottom: 8px;
}
.panel-lead {
  color: #6b7280;
  margin-bottom: 24px;
  font-size: 14px;
}
.account-form fieldset {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.account-form legend {
  font-weight: 700;
  color: #0f6e56;
  padding: 0 8px;
}
.account-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 14px;
}
.account-form input,
.account-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #ddd8d0;
  border-radius: 6px;
  font-size: 14px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 100px;
  gap: 14px;
}
.profile-progress {
  margin-bottom: 24px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.profile-progress-bar {
  height: 8px;
  background: #f0ebe3;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
#profile-progress-fill {
  height: 100%;
  width: 0;
  background: #0f6e56;
  transition: width 0.3s;
}
.form-msg {
  margin-top: 12px;
  font-size: 14px;
  color: #0f6e56;
  font-weight: 600;
}
.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  padding-bottom: 8px;
}
.profile-actions .btn-primary {
  min-width: 180px;
}
.profile-actions .btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}
.form-msg.is-error {
  color: #b91c1c;
}
.subscription-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.account-password-pref {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.account-password-pref .panel-lead {
  margin-top: 0;
}
.account-password-pref #btn-reset-password {
  margin-top: 4px;
}

.security-section-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
}
.security-section .panel-lead {
  margin-bottom: 16px;
}
.security-section #btn-reset-password {
  margin-top: 4px;
}
.usage-list,
.favorites-list {
  list-style: none;
  padding: 0;
}
.usage-list li,
.favorites-list li {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.favorites-empty {
  color: #6b7280;
  line-height: 1.5;
}
.favorites-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.favorites-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.favorites-domain {
  font-size: 12px;
  color: #6b7280;
}
.favorites-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.favorites-open {
  font-size: 13px;
  font-weight: 600;
  color: #0f6e56;
  text-decoration: none;
}
.favorites-open:hover {
  text-decoration: underline;
}
.favorites-open--muted {
  color: #9ca3af;
  font-weight: 500;
}
.favorites-remove {
  width: 28px;
  height: 28px;
  border: 1px solid #e2ddd6;
  border-radius: 6px;
  background: #fff;
  color: #6b7280;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.favorites-remove:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #374151;
}
@media (max-width: 768px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
  .account-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid #e2ddd6;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Zone de danger — suppression de compte (RGPD art. 17) */
.account-delete-pref {
  border: 1px solid #f3c2c2;
  background: #fdf5f5;
}
.account-delete-pref .prefs-card-title {
  color: #b91c1c;
}
.btn-danger {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #b91c1c;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.btn-danger:hover:not(:disabled) {
  background: #991b1b;
}
.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
