/* ═══════════════════════════════════════════════════════════════════════
 * TEMPLATE: flash
 * FILE: style/account.css
 *
 * Flash-skinned account form/card styling for:
 *   login, register, forgot-password, reset-password, settings, delete,
 *   articles_manager, index (landing), subscription.
 *
 * Uses ONLY the 6 theme vars (--color-000/fff/333/555/999/eee) and the
 * --fl-accent/--fl-max-w template vars. No invented tokens.
 *
 * Keep in sync with the JS hook selectors in default/account/script/account.js
 * (form IDs, input names, .social_login_button, .avatar-container etc).
 * ═══════════════════════════════════════════════════════════════════════ */

/* --------  container  -------- */
.fl-account-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  color: var(--color-333);
}
.fl-account-container .fl-account-title,
.fl-account-container .title_account {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--color-000);
  margin: 0 0 30px;
  letter-spacing: -0.02em;
  text-align: center;
}
.fl-account-container .fl-account-title::after,
.fl-account-container .title_account::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--fl-accent, #cc0000);
  margin: 14px auto 0;
}

/* --------  section card  -------- */
.fl-account-section,
.settings-section,
.section_account {
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  border-radius: 4px;
  padding: 28px 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.fl-account-section h1,
.fl-account-section h2,
.fl-account-section h3,
.settings-section h1,
.settings-section h2,
.settings-section h3,
.section_account h2,
.section_account h3 {
  margin: 0 0 18px;
  color: var(--color-000);
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 700;
}
.fl-account-section h1 {
  font-size: 28px;
}
.fl-account-section h2,
.settings-section h2,
.section_account h2 {
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fl-account-section h3 {
  font-size: 18px;
}
.fl-account-section h2 svg,
.settings-section h2 svg,
.section_account h2 svg {
  width: 22px;
  height: 22px;
  color: var(--fl-accent, #cc0000);
  flex-shrink: 0;
}

/* --------  header  -------- */
.fl-account-header,
.settings-header {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--color-eee);
  padding-bottom: 16px;
}
.fl-account-header h1 {
  margin: 0;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--color-000);
}
.fl-account-subtitle {
  margin: 8px 0 0;
  color: var(--color-555);
  font-size: 15px;
}

/* --------  form groups / fields  -------- */
.fl-form-group,
.form-group {
  margin-bottom: 20px;
}
.fl-form-field,
.form-field {
  margin-bottom: 16px;
}
.fl-form-field label,
.form-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--color-555);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.fl-input,
.input-field,
.fl-account-form input[type="text"],
.fl-account-form input[type="email"],
.fl-account-form input[type="password"],
.fl-account-form input[type="url"],
.fl-account-form textarea,
.fl-account-form select {
  width: 100%;
  padding: 11px 13px;
  background: var(--color-fff);
  color: var(--color-000);
  border: 1px solid var(--color-eee);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.fl-input:focus,
.input-field:focus,
.fl-account-form input:focus,
.fl-account-form textarea:focus,
.fl-account-form select:focus {
  outline: none;
  border-color: var(--fl-accent, #cc0000);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}
.fl-account-form textarea {
  min-height: 110px;
  resize: vertical;
}
.fl-account-form input:disabled {
  background: var(--color-eee);
  color: var(--color-999);
  cursor: not-allowed;
}

/* --------  input pair (2-column)  -------- */
.fl-input-pair,
.input-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .fl-input-pair,
  .input-pair {
    grid-template-columns: 1fr;
  }
}

/* --------  links  -------- */
.fl-form-link,
.form-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--fl-accent, #cc0000);
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
}
.fl-form-link:hover,
.form-link:hover {
  text-decoration: underline;
}

/* --------  buttons  -------- */
.fl-btn-primary,
.button-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
  border: 2px solid var(--fl-accent, #cc0000);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  text-align: center;
}
.fl-btn-primary:hover,
.button-primary:hover {
  background: #a00000;
  border-color: #a00000;
  color: var(--color-fff);
}
.fl-btn-outline,
.button-outline,
.button-cancel {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: var(--fl-accent, #cc0000);
  border: 2px solid var(--fl-accent, #cc0000);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: center;
}
.fl-btn-outline:hover,
.button-outline:hover,
.button-cancel:hover {
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
}
.fl-btn-primary:disabled,
.button-primary:disabled,
.fl-btn-outline:disabled,
.button-outline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.button_load {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.button_load::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--color-fff);
  border-radius: 50%;
  animation: fl-spin 0.7s linear infinite;
}
.fl-btn-outline.button_load::after,
.button-outline.button_load::after {
  border-color: rgba(204, 0, 0, 0.3);
  border-top-color: var(--fl-accent, #cc0000);
}
@keyframes fl-spin {
  to { transform: rotate(360deg); }
}

/* --------  actions row  -------- */
.fl-account-actions,
.settings-actions,
.button-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.fl-account-actions.center,
.settings-actions.center,
.button-container.center {
  justify-content: center;
}

/* --------  OR divider  -------- */
.fl-line-with-text,
.LineWithText {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0;
}
.fl-line,
.Line {
  flex: 1;
  height: 1px;
  background: var(--color-eee);
}
.fl-line-with-text span,
.LineWithText span {
  color: var(--color-999);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --------  social login  --------
   `.social-connections` is a wrapper used two ways:
   (1) On login.php directly holding OAuth tiles → we want the grid behavior
   (2) On settings.php wrapping a heading + a nested `.connections-grid`
   Treating it as a grid breaks case 2 (the nested grid only gets one column
   width to live in). Keep it as a block; let `.connections-grid` handle the
   layout on its own. For login.php we also style `.social-connections` that
   DIRECTLY contains the tiles by using `:not(:has(.connections-grid))` so
   the grid only applies when there's no nested layout. */
.fl-social-connections:not(:has(.connections-grid)),
.social-connections:not(:has(.connections-grid)) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.fl-social-button,
.social_login_button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-fff);
  color: var(--color-333);
  border: 1px solid var(--color-eee);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
}
.fl-social-button:hover,
.social_login_button:hover {
  border-color: var(--fl-accent, #cc0000);
  color: var(--fl-accent, #cc0000);
}
.fl-social-button img,
.social_login_button img,
.fl-social-button .img,
.social_login_button .img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* --------  terms text under login  -------- */
.fl-account-terms {
  margin: 20px 0 0;
  color: var(--color-555);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

/* --------  avatar picker (preserve DOM, style it)  -------- */
.avatar-container,
.ContainerAvatar {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.ContainerAvatar {
  position: relative;
  width: 120px;
  height: 120px;
}
.AvatarPreview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-eee);
  background: var(--color-eee);
}
.AvatarPreview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.AvatarEdit {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  z-index: 2;
}
.AvatarEdit input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.AvatarEdit label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--color-fff);
  transition: background 0.15s;
}
.AvatarEdit label:hover {
  background: #a00000;
}
.AvatarEdit label svg,
.AvatarEdit .AddAvatarbutton {
  width: 16px;
  height: 16px;
  color: var(--color-fff);
}

/* --------  switch / toggle  -------- */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
  margin-inline-end: 8px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--color-eee);
  border-radius: 24px;
  transition: 0.2s;
}
.slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: var(--color-fff);
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .slider {
  background: var(--fl-accent, #cc0000);
}
.switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* --------  checkbox row  -------- */
.checkbox-field {
  margin: 18px 0;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  color: var(--color-555);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--fl-accent, #cc0000);
}
.checkbox-label a {
  color: var(--fl-accent, #cc0000);
  font-weight: 600;
  text-decoration: none;
}
.checkbox-label a:hover {
  text-decoration: underline;
}

/* --------  password utilities (strength / match / requirements)  -------- */
.password-input-wrapper {
  position: relative;
}
.toggle-password {
  position: absolute;
  inset-inline-end: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-555);
}
.toggle-password:hover {
  color: var(--color-333);
}
.password-strength {
  margin-top: 6px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-eee);
  transition: width 0.3s, background-color 0.3s;
}
.password-strength.weak { background: #e60000; width: 33%; }
.password-strength.medium { background: #ffc107; width: 66%; }
.password-strength.strong { background: #00b300; width: 100%; }
.password-match {
  margin-top: 5px;
  font-size: 13px;
}
.password-match.match { color: #00b300; }
.password-match.no-match { color: #e60000; }
.password-requirements {
  background: var(--color-eee);
  padding: 14px 16px;
  border-radius: 4px;
  margin: 16px 0;
  color: var(--color-555);
  font-size: 14px;
}
.password-requirements ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.password-requirements li {
  padding: 4px 0 4px 24px;
  position: relative;
}
.password-requirements li::before {
  content: '\2717';
  position: absolute;
  left: 0;
  color: #e60000;
}
.password-requirements li.valid::before {
  content: '\2713';
  color: #00b300;
}

/* --------  settings: social link row with icon  -------- */
.input-with-icon {
  position: relative;
}
.input-with-icon label {
  margin-bottom: 6px;
}
.input-with-icon svg {
  position: absolute;
  inset-inline-start: 10px;
  top: 34px;
  width: 18px;
  height: 18px;
  color: var(--color-555);
  pointer-events: none;
}
.input-with-icon input {
  padding-inline-start: 36px;
}

/* --------  connections grid (followed, social)  -------- */
.connections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.connection-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-eee);
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
}
.connection-item.connected {
  border-color: var(--fl-accent, #cc0000);
}
.connection-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-555);
  flex-shrink: 0;
}
.connection-item .fl-btn-outline,
.connection-item .button-outline {
  margin-inline-start: auto;
  padding: 6px 12px;
  font-size: 12px;
}
.connection-item-2 {
  justify-content: space-between;
}
.category-link,
.connection-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-333);
  text-decoration: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.category-link:hover,
.connection-link:hover {
  color: var(--fl-accent, #cc0000);
}
.category-color-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.connection-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.follow-btn,
.follow-category-btn {
  padding: 6px 12px;
  background: transparent;
  color: var(--fl-accent, #cc0000);
  border: 1px solid var(--fl-accent, #cc0000);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.follow-btn:hover,
.follow-category-btn:hover {
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
}
.no-followed-message {
  color: var(--color-999);
  font-style: italic;
  font-size: 14px;
}

/* --------  delete page stats  -------- */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.stat-item {
  text-align: center;
  padding: 16px 10px;
  background: var(--color-eee);
  border-radius: 4px;
}
.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--fl-accent, #cc0000);
}
.stat-label {
  font-size: 12px;
  color: var(--color-555);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.delete-account-warning {
  background: rgba(204, 0, 0, 0.06);
  border: 1px solid rgba(204, 0, 0, 0.18);
  color: var(--color-333);
  padding: 20px;
  border-radius: 4px;
  line-height: 1.6;
  font-size: 15px;
}
.fl-danger-zone {
  border-color: rgba(204, 0, 0, 0.3);
}
.danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --------  reset-password / expired  -------- */
.expired-message {
  text-align: center;
  padding: 30px 20px;
}
.error-icon {
  color: var(--fl-accent, #cc0000);
  margin-bottom: 16px;
}
.expired-message p {
  margin: 8px 0;
  color: var(--color-555);
  font-size: 15px;
}

/* --------  passkey / security rows  -------- */
.security-item {
  margin-bottom: 20px;
}
.passkey-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--color-eee);
  border-radius: 4px;
}
.passkey-status.active {
  background: rgba(0, 179, 0, 0.08);
}
.passkey-status svg {
  width: 20px;
  height: 20px;
  color: var(--color-555);
}
.passkey-status.active svg {
  color: #00b300;
}
.passkey-status .fl-btn-primary,
.passkey-status .button-primary {
  margin-inline-start: auto;
  padding: 7px 14px;
  font-size: 12px;
}

/* --------  account landing (index.php)  -------- */
.fl-account-grid,
.container_account {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.fl-account-grid.single-row,
.container_account.single-row {
  grid-template-columns: 1fr;
}
.info_item_account {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-eee);
  font-size: 14px;
}
.info_item_account:last-child {
  border-bottom: none;
}
.info_item_account strong {
  color: var(--color-555);
  font-weight: 600;
}
.fl-account-card,
.card_account {
  padding: 14px;
  background: var(--color-eee);
  border-radius: 4px;
  margin-bottom: 10px;
}
.fl-account-card a,
.card_account a {
  color: var(--color-000);
  text-decoration: none;
  font-weight: 700;
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.3;
}
.fl-account-card a:hover,
.card_account a:hover {
  color: var(--fl-accent, #cc0000);
}
.fl-account-card p,
.card_account p {
  color: var(--color-555);
  font-size: 12px;
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card_content_account {
  color: var(--color-333);
  line-height: 1.5;
  font-size: 14px;
}
.badge_account {
  display: inline-block;
  padding: 2px 9px;
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-inline-start: 6px;
}
.fl-action-links,
.action_links_wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.fl-action-link,
.action_link_account {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--fl-accent, #cc0000);
  border: 1px solid var(--fl-accent, #cc0000);
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.fl-action-link:hover,
.action_link_account:hover {
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
}
.fl-action-link svg,
.action_link_account svg {
  width: 14px;
  height: 14px;
}
.fl-empty {
  color: var(--color-999);
  font-style: italic;
  padding: 12px 0;
}

/* --------  level / gamification  -------- */
.fl-level-container,
.level_container {
  margin-bottom: 24px;
}
.level_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.info_icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-eee);
  background: var(--color-fff);
  color: var(--color-555);
  font-weight: 700;
  cursor: pointer;
}
.info_icon:hover {
  border-color: var(--fl-accent, #cc0000);
  color: var(--fl-accent, #cc0000);
}
.level_badge {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.level_icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-fff);
  font-weight: 800;
  position: relative;
  flex-shrink: 0;
}
.level_number {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--color-000);
  color: var(--color-fff);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-fff);
}
.level_details {
  flex: 1;
  min-width: 0;
}
.level_name {
  font-weight: 700;
  color: var(--color-000);
  font-size: 16px;
}
.points_counter {
  color: var(--color-555);
  font-size: 13px;
  margin-bottom: 8px;
}
.level_progress_container {
  background: var(--color-eee);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}
.level_progress {
  height: 100%;
  background: var(--fl-accent, #cc0000);
  transition: width 0.3s;
}
.level_progress_text {
  font-size: 12px;
  color: var(--color-555);
  margin-top: 6px;
}
.activity_summary h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.activity_stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}
.activity_stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--color-eee);
  border-radius: 4px;
}
.activity_stat svg {
  width: 20px;
  height: 20px;
  color: var(--fl-accent, #cc0000);
  margin-bottom: 4px;
}
.activity_stat .stat_value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-000);
}
.activity_stat .stat_label {
  display: block;
  font-size: 11px;
  color: var(--color-555);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.help_window {
  display: none;
}
.help_window[data-modal-target].open {
  display: flex;
}

/* --------  subscription page  -------- */
.subscription_info {
  background: var(--color-eee);
  padding: 16px 18px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.subscription_status,
.subscription_status_inline {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.subscription_status.active,
.subscription_status_inline.active {
  background: #00b300;
  color: var(--color-fff);
}
.subscription_status.trialing,
.subscription_status_inline.trialing {
  background: #ffc107;
  color: var(--color-000);
}
.subscription_status.cancelled,
.subscription_status.past_due {
  background: #e60000;
  color: var(--color-fff);
}
.no_subscription_message {
  text-align: center;
  padding: 30px 20px;
  color: var(--color-555);
}
.no_subscription_message svg {
  width: 42px;
  height: 42px;
  color: var(--color-999);
  margin-bottom: 10px;
}
.free_usage {
  margin: 16px 0;
}
.usage_bar {
  background: var(--color-eee);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.usage_progress {
  background: var(--fl-accent, #cc0000);
  height: 100%;
  transition: width 0.3s;
}
.plans_container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.plans_container.display_none {
  display: none;
}
.plan_card {
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  border-radius: 4px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s, border-color 0.15s;
}
.plan_card:hover {
  border-color: var(--fl-accent, #cc0000);
  transform: translateY(-2px);
}
.plan_card.featured {
  border-color: var(--fl-accent, #cc0000);
  box-shadow: 0 4px 20px rgba(204, 0, 0, 0.1);
}
.plan_badge {
  position: absolute;
  top: -10px;
  inset-inline-end: 16px;
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.plan_card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--color-000);
}
.plan_price {
  margin-bottom: 12px;
  color: var(--color-000);
}
.plan_price.has_sale {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plan_price .currency {
  font-size: 16px;
  margin-inline-end: 4px;
}
.plan_price .amount {
  font-size: 32px;
  font-weight: 800;
}
.plan_price .period {
  font-size: 14px;
  color: var(--color-555);
  margin-inline-start: 4px;
}
.original_price {
  text-decoration: line-through;
  color: var(--color-999);
  font-size: 15px;
}
.sale_price {
  color: var(--fl-accent, #cc0000);
}
.sale_badge {
  display: inline-block;
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-inline-start: 8px;
}
.sale_timer {
  background: var(--color-000);
  color: var(--color-fff);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin: 8px 0;
  text-align: center;
  font-family: monospace;
}
.trial_info {
  display: inline-block;
  background: #00b300;
  color: var(--color-fff);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  margin-bottom: 10px;
}
.plan_features {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  flex-grow: 1;
}
.plan_features li {
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-555);
  font-size: 14px;
}
.plan_features li svg {
  width: 14px;
  height: 14px;
  color: #00b300;
  flex-shrink: 0;
}
.button_black {
  width: 100%;
  margin-top: auto;
}
.plan_selector {
  text-align: center;
  margin-bottom: 20px;
}
.plan_toggle {
  display: inline-flex;
  background: var(--color-eee);
  padding: 4px;
  border-radius: 999px;
  gap: 4px;
}
.plan_toggle button {
  background: transparent;
  border: none;
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--color-555);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}
.plan_toggle button.active {
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
}
.plans_info_text {
  margin-top: 20px;
  padding: 16px;
  background: var(--color-eee);
  border-radius: 4px;
  color: var(--color-555);
  line-height: 1.6;
  font-size: 14px;
  text-align: center;
}
.transactions_table {
  overflow-x: auto;
  border: 1px solid var(--color-eee);
  border-radius: 4px;
}
.transactions_table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.transactions_table th {
  background: var(--color-eee);
  padding: 10px 14px;
  text-align: start;
  color: var(--color-333);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}
.transactions_table td {
  padding: 10px 14px;
  border-top: 1px solid var(--color-eee);
  color: var(--color-555);
}
.transaction_status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.transaction_status.completed {
  background: #00b300;
  color: var(--color-fff);
}
.transaction_status.failed {
  background: #e60000;
  color: var(--color-fff);
}
.receipt_link {
  color: var(--fl-accent, #cc0000);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
.receipt_link:hover {
  text-decoration: underline;
}
.receipt_link svg {
  width: 14px;
  height: 14px;
}

/* --------  subscription modal chrome  -------- */
.payment_selection_wrapper {
  padding: 10px 4px;
}
.selected_plan_info,
.coupon_section {
  background: var(--color-eee);
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.selected_plan_info h4,
.coupon_section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-555);
}
.plan_summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.summary_item {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: var(--color-333);
}
.summary_item.total {
  font-weight: 800;
  color: var(--color-000);
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 17px;
}
.discount_item {
  color: #00b300;
}
.billing_info {
  background: rgba(255, 193, 7, 0.15);
  color: var(--color-333);
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
}
.coupon_input_wrapper {
  display: flex;
  gap: 8px;
}
.coupon_input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--color-eee);
  background: var(--color-fff);
  color: var(--color-000);
  border-radius: 4px;
  font-size: 14px;
}
.coupon_input:focus {
  outline: none;
  border-color: var(--fl-accent, #cc0000);
}
.coupon_button {
  padding: 9px 18px;
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}
.coupon_button:hover {
  background: #a00000;
}
.coupon_button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.coupon_message {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
}
.coupon_message.success {
  background: rgba(0, 179, 0, 0.1);
  color: #00b300;
}
.coupon_message.error {
  background: rgba(230, 0, 0, 0.1);
  color: var(--fl-accent, #cc0000);
}
.applied_coupon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(0, 179, 0, 0.1);
  border-radius: 4px;
  margin-top: 10px;
  font-size: 13px;
  color: #00b300;
}
.coupon_details {
  display: flex;
  align-items: center;
  gap: 6px;
}
.remove_coupon {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  padding: 0 4px;
}
.payment_methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.payment_method {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-333);
  transition: border-color 0.15s, transform 0.1s;
}
.payment_method:hover {
  border-color: var(--fl-accent, #cc0000);
  transform: translateY(-1px);
}
.payment_method.active {
  border-color: var(--fl-accent, #cc0000);
  background: rgba(204, 0, 0, 0.04);
}
.payment_method svg {
  width: 18px;
  height: 18px;
  color: var(--fl-accent, #cc0000);
}
.payment_method span {
  font-weight: 600;
}
.payment_forms_container {
  margin-top: 16px;
}
.payment_form {
  padding: 16px;
  background: rgba(204, 0, 0, 0.04);
  border: 1px solid var(--fl-accent, #cc0000);
  border-radius: 4px;
}
.payment_form.display_none {
  display: none;
}
.security_badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px;
  background: rgba(0, 179, 0, 0.08);
  color: #00b300;
  border-radius: 4px;
  font-size: 13px;
}
.security_badge svg {
  width: 18px;
  height: 18px;
}
#stripe-card-element {
  padding: 12px;
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  border-radius: 4px;
  margin-bottom: 12px;
}
#stripe-card-errors {
  color: var(--fl-accent, #cc0000);
  font-size: 13px;
  margin-bottom: 10px;
}
.fl-success-message,
.success_message {
  text-align: center;
  padding: 24px;
  background: rgba(0, 179, 0, 0.08);
  color: #00b300;
  border-radius: 4px;
  margin-bottom: 20px;
}
.fl-success-message svg,
.success_message svg {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}
.fl-success-message h3,
.success_message h3 {
  color: inherit;
  margin: 0 0 6px;
}
.fl-success-message p,
.success_message p {
  color: var(--color-555);
}
.confirm_dialog_content {
  text-align: center;
  padding: 16px 20px;
}
.confirm_dialog_content p {
  color: var(--color-555);
  margin-bottom: 16px;
}
.confirm_dialog_buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.confirm_yes,
.confirm_no {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}
.confirm_yes {
  background: var(--fl-accent, #cc0000);
  color: var(--color-fff);
}
.confirm_yes:hover {
  background: #a00000;
}
.confirm_no {
  background: var(--color-eee);
  color: var(--color-333);
}
.confirm_no:hover {
  background: var(--color-999);
  color: var(--color-fff);
}
.display_none {
  display: none !important;
}

/* --------  articles manager (specific_articles)  -------- */
.fl-articles-manager__title {
  margin: 0 0 20px;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 26px;
  color: var(--color-000);
}
.fl-articles-manager__item,
.LA9 {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-eee);
}
.fl-articles-manager__item:last-child,
.LA9:last-child {
  border-bottom: none;
}
.fl-articles-manager__img,
.LA10 {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.fl-articles-manager__body,
.LA11 {
  flex: 1;
  min-width: 0;
}
.fl-articles-manager__title-link,
.LA13 {
  margin: 6px 0;
  font-size: 18px;
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--color-000);
  line-height: 1.3;
}
.fl-articles-manager__title-link:hover,
.LA13:hover {
  color: var(--fl-accent, #cc0000);
}
.fl-articles-manager__sub,
.LA14 {
  color: var(--color-555);
  font-size: 14px;
  margin: 4px 0 0;
  line-height: 1.5;
}
.LA12 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.LA22,
.LA23 {
  font-size: 12px;
  color: var(--color-555);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.SavingArticleButton {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fl-accent, #cc0000);
  padding: 4px;
}
.SavingArticleButton svg {
  width: 18px;
  height: 18px;
}
.fl-shorts-grid,
.author-shorts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.author-short-item .short-link {
  text-decoration: none;
  color: var(--color-333);
}
.short-thumbnail {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--color-eee);
  border-radius: 4px;
  overflow: hidden;
}
.short-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-button::after {
  content: '';
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-inline-start: 14px solid var(--color-fff);
  margin-inline-start: 3px;
}
.short-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: var(--color-fff);
}
.short-stats {
  display: flex;
  gap: 10px;
  font-size: 12px;
}
.short-stats svg {
  width: 12px;
  height: 12px;
}
.short-title {
  font-size: 14px;
  font-weight: 700;
  margin: 8px 0 4px;
  line-height: 1.3;
  color: var(--color-000);
}
.short-date {
  font-size: 12px;
  color: var(--color-555);
  margin: 0;
}

/* --------  dark mode overrides  --------
   The 6 theme vars flip in dark mode:
   --color-fff (base bg) becomes near-black; --color-000 (text) becomes near-white.
   So a "paper-looking" card in both modes uses var(--color-fff) for its bg.
*/
body.dark-mode .fl-account-section,
body.dark-mode .settings-section,
body.dark-mode .section_account,
body.dark-mode .plan_card,
body.dark-mode .fl-social-button,
body.dark-mode .social_login_button,
body.dark-mode .payment_method {
  background: var(--color-fff);
  border-color: var(--color-eee);
}
/* .connection-item uses --color-eee already, no override needed */
body.dark-mode .fl-input,
body.dark-mode .input-field,
body.dark-mode .fl-account-form input,
body.dark-mode .fl-account-form textarea,
body.dark-mode .fl-account-form select,
body.dark-mode .coupon_input,
body.dark-mode #stripe-card-element {
  background: var(--color-eee);
  border-color: var(--color-eee);
  color: var(--color-000);
}
body.dark-mode .fl-account-form input:disabled {
  background: var(--color-eee);
  color: var(--color-999);
  opacity: 0.6;
}
body.dark-mode .fl-account-card,
body.dark-mode .card_account,
body.dark-mode .stat-item,
body.dark-mode .activity_stat,
body.dark-mode .plans_info_text,
body.dark-mode .password-requirements,
body.dark-mode .selected_plan_info,
body.dark-mode .coupon_section,
body.dark-mode .subscription_info,
body.dark-mode .passkey-status {
  background: var(--color-fff);
  border-color: var(--color-eee);
}
body.dark-mode .AvatarPreview {
  background: var(--color-eee);
  border-color: var(--color-eee);
}
body.dark-mode .AvatarEdit label {
  border-color: var(--color-eee);
}
body.dark-mode .transactions_table th {
  background: var(--color-eee);
  color: var(--color-000);
}
body.dark-mode .fl-action-link,
body.dark-mode .action_link_account {
  background: transparent;
}
body.dark-mode .plan_toggle {
  background: var(--color-eee);
}
body.dark-mode .confirm_no {
  background: var(--color-eee);
  color: var(--color-000);
}

/* ══════════════════════════════════════════════════════════════
   ACCOUNT PARTIALS — CNN-bold card style for /account/{saved,liked,
   comments,saved_shorts}. Horizontal list rhythm, tight spacing,
   dedicated remove-action button. All classes prefixed fl-acct-.
   ══════════════════════════════════════════════════════════════ */

/* ── Containers (data-infinite-target targets) ─────────────── */
.fl-acct-articles-list { display: flex; flex-direction: column; gap: 14px; }
.fl-acct-comments-list { display: flex; flex-direction: column; gap: 12px; }
.fl-acct-shorts-grid   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1024px) { .fl-acct-shorts-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .fl-acct-shorts-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Article card (saved / liked) ──────────────────────────── */
.fl-acct-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  padding: 14px;
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  border-inline-start: 4px solid var(--fl-accent);
  transition: box-shadow .15s, transform .15s;
}
.fl-acct-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.fl-acct-card--liked { border-inline-start-color: #e11d48; }

.fl-acct-card__thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-eee); }
.fl-acct-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fl-acct-card__body { display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.fl-acct-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-555);
  margin-bottom: 2px;
}
.fl-acct-card__cat {
  color: var(--fl-accent);
  font-weight: 900;
}
.fl-acct-card__date { color: var(--color-555); font-weight: 600; }
.fl-acct-card__action {
  margin-inline-start: auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-eee);
  color: var(--fl-accent);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  padding: 0;
}
.fl-acct-card__action:hover {
  background: var(--fl-accent);
  color: #fff;
  border-color: var(--fl-accent);
}
.fl-acct-card__action .icon { width: 16px; height: 16px; }
.fl-acct-card--liked .fl-acct-card__action { color: #e11d48; }
.fl-acct-card--liked .fl-acct-card__action:hover { background: #e11d48; border-color: #e11d48; color: #fff; }

.fl-acct-card__link { color: var(--color-000); text-decoration: none; display: block; }
.fl-acct-card__title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--color-000);
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fl-acct-card__link:hover .fl-acct-card__title { color: var(--fl-accent); }
.fl-acct-card__sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-555);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fl-acct-card__foot {
  margin-top: auto;
  padding-top: 6px;
  font-size: 11px;
  color: var(--color-555);
}
.fl-acct-card__author {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-333);
}

@media (max-width: 640px) {
  .fl-acct-card { grid-template-columns: 120px 1fr; gap: 12px; padding: 10px; }
  .fl-acct-card__title { font-size: 15px; }
  .fl-acct-card__sub { display: none; }
}

/* ── Comment card (user's own posts) ──────────────────────── */
.fl-acct-comment {
  padding: 16px 18px;
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  border-inline-start: 4px solid var(--fl-accent);
  transition: box-shadow .15s;
}
.fl-acct-comment:hover { box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.fl-acct-comment__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-000);
  margin-bottom: 12px;
  word-wrap: break-word;
}
.fl-acct-comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-eee);
  font-size: 11px;
  color: var(--color-555);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fl-acct-comment__date { display: inline-flex; align-items: center; gap: 5px; }
.fl-acct-comment__ref {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--fl-accent);
  text-decoration: none;
  font-weight: 800;
}
.fl-acct-comment__ref:hover { text-decoration: underline; }
.fl-acct-comment__meta .icon { width: 13px; height: 13px; }

/* ── Saved short card ─────────────────────────────────────── */
.fl-acct-short {
  display: flex;
  flex-direction: column;
  background: var(--color-fff);
  color: var(--color-000);
  text-decoration: none;
  border: 1px solid var(--color-eee);
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.fl-acct-short:hover { box-shadow: 0 8px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.fl-acct-short__thumb {
  position: relative;
  aspect-ratio: 9 / 14;
  background: #000;
  overflow: hidden;
}
.fl-acct-short__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fl-acct-short__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
  opacity: 0.85;
}
.fl-acct-short__play .icon { width: 38px; height: 38px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.fl-acct-short__stats {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.fl-acct-short__stats span { display: inline-flex; align-items: center; gap: 4px; }
.fl-acct-short__stats .icon { width: 12px; height: 12px; }
.fl-acct-short__title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-000);
  padding: 10px 10px 4px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fl-acct-short:hover .fl-acct-short__title { color: var(--fl-accent); }
.fl-acct-short__meta {
  font-size: 11px;
  color: var(--color-555);
  padding: 0 10px 10px;
  margin: 0;
}

/* ── Dark-mode overrides ──────────────────────────────────── */
body.dark-mode .fl-acct-card,
body.dark-mode .fl-acct-comment,
body.dark-mode .fl-acct-short {
  background: var(--color-fff);
  border-color: var(--color-eee);
}
body.dark-mode .fl-acct-comment__meta { border-top-color: var(--color-eee); }
body.dark-mode .fl-acct-card__action { border-color: var(--color-eee); }


/* ══════════════════════════════════════════════════════════════
   DASHBOARD (/account) — CNN-bold magazine, hero + sidebar + grid
   Class prefix: fl-dash-
   ══════════════════════════════════════════════════════════════ */

.fl-dash {
  max-width: calc(var(--fl-max-w) + 80px);
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ── HERO BANNER ────────────────────────────────────────── */
.fl-dash__hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  color: #fff;
  border-inline-start: 6px solid var(--fl-accent);
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.fl-dash__hero::after {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  width: 220px;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 20px,
    rgba(204, 0, 0, 0.06) 20px,
    rgba(204, 0, 0, 0.06) 40px
  );
  pointer-events: none;
}
.fl-dash__hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}
.fl-dash__hero-identity {
  display: flex;
  align-items: center;
  gap: 20px;
}
.fl-dash__avatar {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid var(--fl-accent);
  background: var(--color-eee);
}
.fl-dash__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fl-dash__hero-body { min-width: 0; }
.fl-dash__hero-welcome {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fl-accent);
  margin-bottom: 6px;
}
.fl-dash__hero-name {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 10px;
}
.fl-dash__hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}
.fl-dash__hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.fl-dash__hero-meta .icon { width: 13px; height: 13px; color: var(--fl-accent); }

/* ── LEVEL CARD in hero ─────────────────────────────────── */
.fl-dash__level {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  min-width: 280px;
}
.fl-dash__level-badge {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: var(--lvl-color, var(--fl-accent));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  position: relative;
}
.fl-dash__level-icon {
  font-size: 24px;
  line-height: 1;
}
.fl-dash__level-n {
  position: absolute;
  inset-block-end: -4px;
  inset-inline-end: -4px;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 900;
  background: #fff;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fl-dash__level-body { flex: 1; min-width: 0; }
.fl-dash__level-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.fl-dash__level-name {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fl-dash__level-pts {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}
.fl-dash__level-bar {
  height: 6px;
  background: rgba(255,255,255,0.15);
  overflow: hidden;
  margin-bottom: 6px;
}
.fl-dash__level-fill {
  height: 100%;
  background: var(--lvl-color, var(--fl-accent));
  transition: width 0.4s ease;
}
.fl-dash__level-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

/* ── KPI STRIP ──────────────────────────────────────────── */
.fl-dash__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.fl-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 22px;
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  border-block-start: 4px solid var(--fl-accent);
  color: var(--color-000);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}
a.fl-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.fl-kpi__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--fl-accent);
  margin-bottom: 4px;
}
.fl-kpi__icon .icon { width: 22px; height: 22px; }
.fl-kpi__n {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  color: var(--color-000);
  letter-spacing: -0.02em;
}
.fl-kpi__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-555);
}

/* ── GRID: sidebar + main ───────────────────────────────── */
.fl-dash__grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
.fl-dash__side {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fl-dash__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ── SIDEBAR NAV ────────────────────────────────────────── */
.fl-dash__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  padding: 6px;
}
.fl-dash__nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: var(--color-333);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.12s, color 0.12s;
  position: relative;
}
.fl-dash__nav-link .icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--color-555); }
.fl-dash__nav-link > span:first-of-type { flex: 1; min-width: 0; }
.fl-dash__nav-badge {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  background: var(--color-eee);
  color: var(--color-555);
  letter-spacing: 0.04em;
  min-width: 22px;
  text-align: center;
}
.fl-dash__nav-link:hover {
  background: var(--color-eee);
  color: var(--color-000);
}
.fl-dash__nav-link:hover .icon { color: var(--fl-accent); }
.fl-dash__nav-link.is-active {
  background: var(--fl-accent);
  color: #fff;
}
.fl-dash__nav-link.is-active .icon { color: #fff; }
.fl-dash__nav-link.is-active .fl-dash__nav-badge {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.fl-dash__nav-link--danger { color: #dc2626; }
.fl-dash__nav-link--danger .icon { color: #dc2626; }
.fl-dash__nav-link--danger:hover {
  background: #fee2e2;
  color: #dc2626;
}
.fl-dash__nav-sep {
  height: 1px;
  background: var(--color-eee);
  margin: 6px 10px;
}

/* ── SUBSCRIPTION MINI-CARD ─────────────────────────────── */
.fl-dash__sub-card {
  padding: 18px;
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fl-dash__sub-card--upsell {
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  border-color: transparent;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.fl-dash__sub-card--upsell::before {
  content: '';
  position: absolute;
  inset-block-start: -40px;
  inset-inline-end: -40px;
  width: 120px;
  height: 120px;
  background: var(--fl-accent);
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
}
.fl-dash__sub-card--active {
  border-inline-start: 4px solid #16a34a;
}
.fl-dash__sub-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-555);
}
.fl-dash__sub-card--upsell .fl-dash__sub-label { color: var(--fl-accent); }
.fl-dash__sub-name {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
  color: inherit;
  letter-spacing: -0.01em;
}
.fl-dash__sub-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  background: #16a34a;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: fit-content;
}
.fl-dash__sub-meta {
  font-size: 12px;
  color: var(--color-555);
  line-height: 1.5;
  margin: 0;
}
.fl-dash__sub-card--upsell .fl-dash__sub-meta { color: rgba(255,255,255,0.7); }
.fl-dash__sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 9px 14px;
  background: var(--fl-accent);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  justify-content: center;
  transition: background 0.15s;
}
.fl-dash__sub-btn:hover { background: #a30000; }

/* ── MAIN ACTIVITY CARDS ────────────────────────────────── */
.fl-dash__card {
  background: var(--color-fff);
  border: 1px solid var(--color-eee);
  padding: 20px 22px;
}
.fl-dash__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-block-end: 2px solid var(--fl-accent);
}
.fl-dash__card-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-000);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.fl-dash__card-title .icon { width: 18px; height: 18px; color: var(--fl-accent); }
.fl-dash__card-more {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fl-accent);
  text-decoration: none;
}
.fl-dash__card-more:hover { text-decoration: underline; }
.fl-dash__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .fl-dash__hero-inner { grid-template-columns: 1fr; gap: 18px; }
  .fl-dash__level { min-width: 0; }
  .fl-dash__kpis { grid-template-columns: repeat(2, 1fr); }
  .fl-dash__grid { grid-template-columns: 1fr; }
  .fl-dash__side { position: static; }
  .fl-dash__nav { flex-direction: row; flex-wrap: wrap; }
  .fl-dash__nav-link { flex: 1 1 auto; min-width: calc(50% - 6px); }
  .fl-dash__nav-sep { display: none; }
}
@media (max-width: 640px) {
  .fl-dash { padding: 16px 12px 40px; }
  .fl-dash__hero { padding: 20px; }
  .fl-dash__hero-identity { flex-direction: column; text-align: center; align-items: center; }
  .fl-dash__avatar { width: 72px; height: 72px; }
  .fl-dash__hero-name { font-size: 22px; }
  .fl-dash__hero-meta { justify-content: center; gap: 12px; font-size: 11px; }
  .fl-dash__kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fl-kpi { padding: 14px 16px; }
  .fl-kpi__n { font-size: 24px; }
  .fl-dash__nav-link { min-width: 100%; }
  .fl-dash__card { padding: 16px; }
  .fl-dash__card-title { font-size: 14px; }
}

/* ── DARK MODE ──────────────────────────────────────────── */
body.dark-mode .fl-kpi,
body.dark-mode .fl-dash__nav,
body.dark-mode .fl-dash__sub-card:not(.fl-dash__sub-card--upsell),
body.dash-mode .fl-dash__card,
body.dark-mode .fl-dash__card {
  background: var(--color-fff);
  border-color: var(--color-eee);
}
body.dark-mode .fl-dash__nav-link:hover { background: var(--color-eee); }
body.dark-mode .fl-dash__nav-badge { background: var(--color-eee); color: var(--color-555); }
body.dark-mode .fl-dash__nav-link--danger:hover { background: rgba(220,38,38,0.15); }

/* ── Page-specific chrome inside .fl-dash__card (articles_manager, settings, delete, subscription) */
.fl-dash__card-title {
  font-size: 16px;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.fl-dash__card-count {
  font-size: 11px;
  font-weight: 900;
  padding: 3px 10px;
  background: var(--fl-accent);
  color: #fff;
  letter-spacing: 0.06em;
  margin-inline-start: auto;
}

/* Settings / delete / subscription pages inside main column — reset the ancient container */
.fl-settings .settings-form,
.fl-delete-card form,
.fl-subscription {
  margin: 0;
}
.fl-settings .settings-section,
.fl-settings .fl-account-section,
.fl-settings .section_account,
.fl-delete-card .settings-section,
.fl-delete-card .fl-account-section,
.fl-delete-card .section_account,
.fl-subscription .settings-section,
.fl-subscription .fl-account-section,
.fl-subscription .section_account {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 18px 0;
  margin: 0;
  border-block-end: 1px solid var(--color-eee);
}
.fl-settings .settings-section:last-child,
.fl-settings .fl-account-section:last-child,
.fl-settings .section_account:last-child,
.fl-delete-card .settings-section:last-child,
.fl-delete-card .fl-account-section:last-child,
.fl-delete-card .section_account:last-child,
.fl-subscription .settings-section:last-child,
.fl-subscription .fl-account-section:last-child,
.fl-subscription .section_account:last-child { border-block-end: 0; }

.fl-settings .settings-section h2,
.fl-settings .fl-account-section h2,
.fl-settings .section_account h2,
.fl-delete-card .settings-section h2,
.fl-delete-card .fl-account-section h2,
.fl-delete-card .section_account h2,
.fl-subscription .settings-section h2,
.fl-subscription .fl-account-section h2,
.fl-subscription .section_account h2 {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-000);
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-block-end: 2px solid var(--fl-accent);
  display: inline-block;
}

/* fl-account-grid / container_account inside page wrapper — clean grid, no bg */
.fl-settings .fl-account-grid,
.fl-settings .container_account,
.fl-subscription .fl-account-grid,
.fl-subscription .container_account,
.fl-delete-card .fl-account-grid,
.fl-delete-card .container_account {
  background: transparent;
  margin-bottom: 0;
}

/* Clean the "title_account" leftover h2 when a settings/subscription page
   still emits it alongside our new card header. */
.fl-dash__main .title_account,
.fl-dash__main .fl-account-title { display: none; }
