/* ============================================================================================================================================================ 
Global Impacts
 ============================================================================================================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
}

img,
svg {
  max-width: 100%;
}

@supports not (overflow-x: clip) {
  html {
    overflow-x: hidden;
  }
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

.section--spaced144 {
  margin-top: 144px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@font-face {
  font-family: "Univers LT Pro";
  src: url(Fonts/universltpro-45light.968893f2.woff2) format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Univers LT Pro";
  src: url(Fonts/universltpro-65bold.4fe5bcaf.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sfs-red: #eb3c24;
  --sfs-light-red: #FFE6E6;
  --sfs-teal: #0b646b;
  --sfs-light-teal: #CEE0E1;
  --sfs-sand: #A3AD85;
  --sfs-sand-light: #f7f5e8;
  --sfs-green: #59caa5;
  --sfs-light-green: #e1f3ee;
  --sfs-orange: #e67e22;
  --sfs-dark-orange: #d35400;
  --sfs-blue: #3498db;
  --sfs-dark-blue: #2980b9;
  --text-1: #333;
  --text-2: #444;
  --text-3: #666;
  --text-4: #777;
  --text-5: #888;
  --bg-1: #fff;
  --bg-2: #f9f9f9;
  --border: #e6e6e6;
  --focus: var(--sfs-red);
  --divider: var(--border);
  --shadow-base: 0 2px 6px rgba(0, 0, 0, .06);
  --shadow-hover: 0 6px 14px rgba(0, 0, 0, .10);
  --shadow-active: 0 4px 10px rgba(0, 0, 0, .08);
  --cols-04: 3;
  --cols-05: 3;
  --cols-06: 4;
  --cols-07: 4;
  --field-line: #eeeeee;
  --field-line-hover: var(--text-5);
  --field-radius: 0;
  --field-focus-outline: var(--sfs-red);
  --placeholder-color: #aaaaaa;
}

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(24px, calc((100vw - 1352px) / 2), 300px);
  margin-top: 32px;
  margin-bottom: 32px;
  padding-top: 72px;
}

body {
  font-family: "Univers LT Pro", Arial, Helvetica, sans-serif;
  font-weight: 300;
  color: #333;
}

/* Global input text color fix */
input,
textarea,
select {
  color: var(--text-1, #333);
}

.sfs-app-num {
  display: block;
  margin: 24px 0 0 0;
  font-size: .75rem;
  line-height: 1;
  color: #9a9a9a;
  font-weight: 400;
  margin-bottom: 64px;
}

.sfs-app-num::after {
  content: attr(data-num);
}

.section {
  margin-bottom: 64px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  border-bottom: 1px solid var(--divider);
  padding-bottom: 8px;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

@media (max-width: 1200px) {
  .sfs-app-ex-04-wrapper {
    --cols-04: 2;
  }

  .sfs-app-ex-05-wrapper {
    --cols-05: 2;
  }

  .sfs-app-ex-06-wrapper {
    --cols-06: 2;
  }

  .sfs-app-ex-07-wrapper {
    --cols-07: 2;
  }
}

@media (max-width: 720px) {
  .sfs-app-ex-04-wrapper {
    --cols-04: 1;
  }

  .sfs-app-ex-05-wrapper {
    --cols-05: 1;
  }

  .sfs-app-ex-06-wrapper {
    --cols-06: 1;
  }

  .sfs-app-ex-07-wrapper {
    --cols-07: 1;
  }

  .c-08-body {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  .c-08-vdiv {
    display: none;
  }

  .sfs-app-ex-01,
  .sfs-app-ex-02 {
    width: 100%;
  }
}

/* ========== Utilities — Buttons, Focus, Motion ========== */
.sfs-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  padding: 10px 24px;
  font-family: "Univers LT Pro", Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  border: 1px solid transparent;
  background: var(--bg-1);
  color: var(--text-1);
  cursor: pointer;
  border-radius: 0;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease,
    transform 0.05s ease;
}

.sfs-btn svg {
  display: block;
}

.sfs-btn svg path {
  fill: currentColor;
}

.sfs-btn--primary {
  background: var(--sfs-red);
  color: #fff;
  border-color: var(--sfs-red);
}

.sfs-btn--primary:hover {
  filter: brightness(0.95);
}

.sfs-btn--primary:active {
  background: #c52a18;
  border-color: #c52a18;
  transform: translateY(1px);
}

.sfs-btn--danger {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}

.sfs-btn--danger:hover {
  filter: brightness(0.95);
}

.sfs-btn--secondary {
  background: #fff;
  color: var(--text-1);
  border-color: var(--text-1);
}

.sfs-btn--secondary:hover {
  border-color: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sfs-btn--secondary:active {
  background: #f9f9f9;
  border-color: #111;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) inset;
}

.sfs-btn--hero {
  font-size: 16px;
  padding: 12px 24px;
}

.sfs-btn--medium {
  font-size: 14px;
  padding: 11px 16px;
}

.sfs-btn:focus-visible,
.c-02-btn-more:focus-visible,
.c-04-card:focus-visible,
.c-05-card:focus-visible,
.c-08-upload:focus-visible,
.c-02-checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(235, 60, 36, 0.18), var(--shadow-hover);
}


@media (prefers-reduced-motion: reduce) {

  .c-01-card:hover,
  .c-04-card:hover,
  .c-05-card:hover {
    transform: none;
  }
}




/* =============================================================================================================================================================== 
Section 01 — Cards + Elements
 ================================================================================================================================================================= */


/* ========================= 01 — New Project Card ========================= */
.sfs-app-ex-01 {
  width: 100%;
  max-width: 490px;
}

.c-01-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 32px;
  box-shadow: var(--shadow-base);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.c-01-card:hover {
  border-color: var(--sfs-red);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.c-01-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.c-01-title {
  font-weight: 700;
  font-size: 21px;
  line-height: 28px;
  color: var(--text-1);
  letter-spacing: -0.2px;
}

.c-01-divider {
  height: 2px;
  background: var(--sfs-red);
  width: 100%;
}

.c-01-desc {
  font-weight: 300;
  font-size: 15px;
  line-height: 24px;
  color: var(--text-3);
  margin-bottom: 8px;
}

.c-01-cta {
  gap: 15px;
  width: 100%;
}

.c-01-icon {
  width: 15px;
  height: 15px;
  display: block;
}

@media (max-width: 480px) {
  .c-01-card {
    padding: 16px;
  }
}


/* ========================= 02 — Project Summary Card ========================= */
.sfs-app-ex-02 {
  width: 100%;
  max-width: 378px;
}

.c-02-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-base);
  transition: all .25s ease;
}

.c-02-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.c-02-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.c-02-progress {
  flex: 1 1 auto;
  min-width: 0;
  height: 6px;
  background: var(--border);
  overflow: hidden;
}

.c-02-progress-bar {
  height: 100%;
  background: var(--sfs-red);
}

.c-02-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid #afafaf;
  border-radius: 0;
  appearance: none;
  background: var(--bg-1);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  margin: 0;
}

.c-02-checkbox:checked {
  background: var(--sfs-red);
  border: 1px solid var(--text-1);
}

.c-02-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 24px;
  gap: 12px;
}

.c-02-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
  line-height: 1;
}

.c-02-number {
  font-size: 14px;
  color: var(--text-3);
  font-weight: 300;
  margin-top: 6px;
}

.c-02-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--sfs-sand);
  background: #fff8e6;
  border: 1px solid var(--sfs-sand);
  padding: 4px 16px;
}

.c-02-details {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.c-02-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.c-02-label {
  font-size: 14px;
  color: var(--text-4);
  font-weight: 300;
}

.c-02-value {
  font-size: 14px;
  color: var(--text-1);
  font-weight: 300;
}

.c-02-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-02-actions .sfs-btn {
  width: auto;
  min-width: 0;
}

.c-02-btn-primary {
  flex: 1 1 auto;
}

.c-02-btn-more {
  background: var(--sfs-red);
  border: none;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease;
}

.c-02-btn-more:hover {
  filter: brightness(0.95);
}

.c-02-btn-more:active {
  background: #c52a18;
  border-color: #c52a18;
  transform: translateY(1px);
}

.c-02-btn-more svg {
  display: block;
}

@media (max-width: 480px) {
  .c-02-card {
    padding: 16px;
  }
}


/* ========================= 03 — Step Info Card ========================= */
.sfs-app-ex-03 {
  width: 100%;
  max-width: 1120px;
}

.c-03-card {
  background: #f9f9f9;
  border-left: 5px solid var(--sfs-red);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-03-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.c-03-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
  line-height: 1.5;
}


/* ========================= 04 — System Card ::: Uses Script ::: ========================= */
.sfs-app-ex-04-wrapper {
  display: grid;
  grid-template-columns: repeat(var(--cols-04), minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.sfs-app-ex-04 {
  width: auto;
}

.c-04-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .25s ease;
}

.c-04-card:hover,
.c-04-card:focus-visible {
  background: var(--bg-1);
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  outline: 2px solid transparent;
  outline-offset: 2px;
  cursor: pointer;
}

.c-04-card:active {
  background: #FFEAEA;
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-active);
}

.c-04-img {
  width: 212px;
  height: auto;
  display: block;
}

.c-04-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  margin-bottom: auto;
}

.c-04-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-1);
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

.c-04-desc {
  font-weight: 300;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}

.c-04-meta {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-5);
}

.c-04-card.is-selected,
.c-04-card[aria-pressed="true"] {
  background: #FFEAEA;
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-active);
}

.c-04-card.is-selected:hover,
.c-04-card.is-selected:focus-visible,
.c-04-card[aria-pressed="true"]:hover,
.c-04-card[aria-pressed="true"]:focus-visible {
  transform: translateY(-4px);
}



/* ========================= 05 — Substrate Card ::: Uses Script ::: ========================= */
.sfs-app-ex-05-wrapper {
  display: grid;
  grid-template-columns: repeat(var(--cols-05), minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.sfs-app-ex-05 {
  width: auto;
}

.c-05-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .25s ease;
}

.c-05-card:hover,
.c-05-card:focus-visible {
  background: var(--bg-1);
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  outline: 2px solid transparent;
  outline-offset: 2px;
  cursor: pointer;
}

.c-05-card:active {
  background: #FFEAEA;
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-active);
}

.c-05-img {
  width: 85px;
  height: auto;
  display: block;
}

.c-05-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin-bottom: auto;
}

.c-05-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-1);
  letter-spacing: -0.2px;
}

.c-05-attrs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c-05-attr {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-3);
}

.c-05-card.is-selected,
.c-05-card[aria-pressed="true"] {
  background: #FFEAEA;
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-active);
}

.c-05-card.is-selected:hover,
.c-05-card.is-selected:focus-visible,
.c-05-card[aria-pressed="true"]:hover,
.c-05-card[aria-pressed="true"]:focus-visible {
  transform: translateY(-4px);
}




/* ========================= 06 — Metric Card ========================= */
.sfs-app-ex-06-wrapper {
  display: grid;
  grid-template-columns: repeat(var(--cols-06), minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.sfs-app-ex-06 {
  width: auto;
}

.c-06-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base, 0 2px 6px rgba(0, 0, 0, 0.06));
  padding: 16px;
  height: 224px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.c-06-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c-06-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.2px;
  color: var(--text-1);
  text-align: left;
}

.c-06-divider {
  height: 2px;
  background: var(--sfs-red);
  width: 100%;
}

.c-06-metric {
  margin-top: auto;
  margin-bottom: auto;
  align-self: center;
  font-weight: 700;
  font-size: 72px;
  line-height: 1;
  color: var(--text-1);
}

.c-06-card:hover,
.c-06-card:focus-visible,
.c-06-card:active {
  border-color: var(--border);
  box-shadow: var(--shadow-base, 0 2px 6px rgba(0, 0, 0, 0.06));
  background: var(--bg-1);
  transform: none;
  outline: none;
}

.c-06--red .c-06-metric {
  color: var(--sfs-red);
}

.c-06--teal .c-06-divider {
  background: var(--sfs-teal);
}

.c-06--teal .c-06-metric {
  color: var(--sfs-teal);
}

.c-06--sand .c-06-divider {
  background: var(--sfs-sand);
}

.c-06--sand .c-06-metric {
  color: var(--sfs-sand);
}

.c-06--dark-underline .c-06-divider {
  background: #333;
}


/* ========================= 07 — Stats Card ========================= */
.sfs-app-ex-07-wrapper {
  display: grid;
  grid-template-columns: repeat(var(--cols-07), minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.sfs-app-ex-07 {
  width: auto;
}

.c-07-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base, 0 2px 6px rgba(0, 0, 0, .06));
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.c-07-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-07-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--text-1);
  letter-spacing: -0.2px;
}

.c-07-divider {
  height: 2px;
  background: var(--sfs-red);
  width: 100%;
}

.c-07-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.c-07-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}

.c-07-label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-3);
  font-weight: 300;
}

.c-07-value {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-1);
  font-weight: 300;
  text-align: right;
}


/* ========================= 08 — Quote Upload Card ========================= */
.sfs-app-ex-08-wrapper {
  display: block;
  width: 100%;
}

.sfs-app-ex-08 {
  width: 100%;
}

.c-08-card {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base, 0 2px 6px rgba(0, 0, 0, .06));
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border .25s ease;
}

.c-08-card:hover {
  border-color: var(--text-5);
}

.c-08-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-08-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-1);
  letter-spacing: -0.2px;
}

.c-08-title .c-08-format {
  font-weight: 300;
  color: var(--text-3);
}

.c-08-divider {
  height: 2px;
  background: var(--sfs-red);
  width: 100%;
}

.c-08-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 24px;
  align-items: stretch;
}

.c-08-upload {
  background: #f9f9f9;
  border: 1px dashed var(--border);
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.c-08-file {
  display: none;
}

.c-08-upload-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.c-08-upload-icon {
  display: block;
}

.c-08-upload-hint {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
}

.c-08-vdiv {
  width: 0;
  border-left: 1px solid var(--border);
}

.c-08-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.c-08-subtitle {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.c-08-desc {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
  line-height: 1.5;
}

@media (max-width: 720px) {
  .c-08-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .c-08-vdiv {
    display: none;
  }

  .c-08-upload,
  .c-08-info {
    width: 100%;
  }
}


/* ========================= 09 — Info Card ========================= */
.sfs-app-ex-09-wrapper {
  display: block;
  width: 100%;
}

.sfs-app-ex-09 {
  width: 100%;
}

.c-09-card {
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: 16px 16px 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.c-09-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-1);
}

.c-09-text {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 300;
  color: var(--text-4);
}


/* ========================= 10 — Action Button Card ========================= */
.sfs-app-ex-10-wrapper {
  display: block;
  width: 100%;
}

.sfs-app-ex-10 {
  width: 100%;
}

.c-10-card {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .c-10-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .c-10-card {
    grid-template-columns: 1fr;
  }
}

.c-10-card .sfs-btn {
  width: 100%;
  min-width: 0;
}

.c-10-btn svg path {
  fill: currentColor;
}

.c-10-btn--red svg path {
  fill: #fff;
}


/* ========================= 11 — Document Download Card ========================= */
.sfs-app-ex-11-wrapper {
  display: block;
  width: 100%;
}

.sfs-app-ex-11 {
  width: 100%;
}

.c-11-card {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.c-11-card:hover {
  border-color: var(--text-5);
}

.c-11-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.c-11-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-1);
  letter-spacing: -0.2px;
}

.c-11-desc {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-3);
}

.c-11-meta {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-4);
}

.c-11-btn {
  padding-left: 56px;
  padding-right: 56px;
}

.c-11-cta .sfs-btn {
  width: auto;
  min-width: 0;
}

@media (max-width: 720px) {
  .c-11-card {
    grid-template-columns: 1fr;
  }

  .c-11-cta .sfs-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .c-11-card {
    padding: 16px;
  }
}


/* ========================= 12 — Custom Substrate Card ========================= */
.sfs-app-ex-12-wrapper {
  display: block;
  width: 100%;
}

.sfs-app-ex-12 {
  width: 100%;
}

.c-12-card {
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: 24px;
  width: 100%;
}

.c-12-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-1);
  letter-spacing: -0.2px;
  margin-bottom: 8px;
}

.c-12-desc {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 16px;
}

.c-12-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.c-12-actions .sfs-btn {
  width: auto;
  min-width: 0;
}

.c-12-btn-secondary .c-12-upload-icon {
  display: block;
  margin-right: 8px;
}

.c-12-btn-primary {
  padding: 10px 48px;
}

.c-12-empty {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-2);
}

@media (max-width: 640px) {
  .c-12-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .c-12-actions .sfs-btn {
    width: 100%;
  }
}


/* ========================= 13 — Project Submission Card ========================= */
.sfs-app-ex-13-wrapper {
  display: block;
  width: 100%;
}

.sfs-app-ex-13 {
  width: 100%;
}

.c-13-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
}

.c-13-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: #f9f9f9;
}

.c-13-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.c-13-badge {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sfs-light-green);
  border: 2px solid var(--sfs-green);
  flex-shrink: 0;
  border-radius: 0;
}

.c-13-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.c-13-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--text-1);
}

.c-13-sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
  line-height: 1.4;
}

.c-13-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.c-13-actions .sfs-btn {
  width: auto;
  min-width: 0;
}

.c-13-btn-primary {
  gap: 8px;
  padding-inline: 24px;
}

.c-13-body {
  text-align: center;
  padding: 72px 24px;
}

.c-13-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 2px;
}

.c-13-number {
  font-weight: 700;
  font-size: clamp(32px, 14vw, 56px);
  line-height: 1;
  color: var(--sfs-red);
}

.c-13-info {
  margin-top: 24px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
  line-height: 1.5;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 760px) {
  .c-13-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 550px) {
  .c-13-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .c-13-actions .sfs-btn {
    width: 100%;
  }
}


/* ========================= 14 — Share Project Card ========================= */
.sfs-app-ex-14-wrapper {
  display: block;
  width: 100%;
}

.sfs-app-ex-14 {
  width: 100%;
}

.c-14-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 24px;
  position: relative;
}

.c-14-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--sfs-red);
}

.c-14-top {
  margin-left: 8px;
  margin-bottom: 16px;
}

.c-14-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-1);
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

.c-14-sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
  line-height: 1.5;
  margin-bottom: 24px;
}

.c-14-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  column-gap: 24px;
  row-gap: 16px;
  margin-left: 8px;
  align-items: end;
}

.c-14-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.c-14-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}

.c-14-select-wrap {
  position: relative;
  display: block;
}

.c-14-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 0 40px 0 12px;
  font-size: 14px;
  font-weight: 300;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 0;
  color: var(--placeholder-color);
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, color .15s ease;
}

.c-14-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 12px;
  height: 7px;
  transform: translateY(-50%);
  color: #dbdbdb;
  pointer-events: none;
  transition: color .15s ease;
}

.c-14-focusline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--sfs-red);
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}

.c-14-select:hover {
  border-color: #333;
  color: var(--text-1);
}

.c-14-select:hover+.c-14-caret {
  color: #333;
}

.c-14-select:focus,
.c-14-select:focus-visible {
  outline: none;
  border-color: #eb3c24;
  color: var(--text-1);
}

.c-14-select:focus+.c-14-caret,
.c-14-select:focus-visible+.c-14-caret {
  color: #eb3c24;
}

.c-14-select-wrap:focus-within .c-14-focusline {
  opacity: 1;
}

.c-14-select option[disabled],
.c-14-select option[value=""] {
  color: var(--text-4);
}

.c-14-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.c-14-input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px 0 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--field-line);
  border-radius: 0;
  transition: border-bottom-color .25s ease;
  position: relative;
}

.c-14-input::placeholder {
  color: var(--placeholder-color);
}

.c-14-input:hover {
  border-bottom-color: var(--field-line-hover);
}

.c-14-input-wrap .c-14-focusline {
  bottom: 0;
}

.c-14-input:focus,
.c-14-input:focus-visible {
  outline: none;
}

.c-14-input-wrap:focus-within .c-14-focusline {
  opacity: 1;
}

.c-14-input-wrap:focus-within .c-14-input,
.c-14-input-wrap:focus-within .c-14-input:hover {
  border-bottom-color: transparent;
}

.c-14-action {
  display: flex;
  align-items: end;
}

.c-14-action .sfs-btn {
  font-size: 14px;
  padding: 10px 56px;
  width: auto;
  min-width: 0;
}

@media (max-width: 900px) {
  .c-14-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  }
}

@media (max-width: 680px) {
  .c-14-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .c-14-field:nth-child(2) {
    grid-column: 1 / 2;
  }
}

@media (max-width: 520px) {
  .c-14-row {
    grid-template-columns: 1fr;
  }

  .c-14-action .sfs-btn {
    width: 100%;
  }
}




/* =============================================================================================================================================================== 
Section 02 — Form Elements & Inputs
 ================================================================================================================================================================= */

/* ========================= 15 — Download / Export / Print Buttons ========================= */
.sfs-form-ex-15 {
  width: 100%;
}

.c-15-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.c-15-btn {
  width: auto;
  min-width: 0;
  padding: 10px 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: background .15s ease, border-color .15s ease, filter .15s ease;
}

.c-15-ico {
  width: 20px;
  height: 20px;
  display: block;
}

.c-15-btn--outline {
  background: #fff;
  border: 2px solid var(--text-1);
  color: var(--text-1);
}

.c-15-btn--outline:hover {
  background: #fcfcfc;
  border-color: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-15-btn--outline:active {
  background: #f0f0f0;
  border-color: #222;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08) inset, 0 1px 2px rgba(0, 0, 0, .06);
  transform: translateY(1px);
}

.sfs-btn--primary .c-15-ico {
  filter: invert(1) brightness(2);
}

.sfs-btn--primary:hover {
  filter: brightness(0.95);
}

.sfs-btn--primary:active {
  background: #c52a18;
  border-color: #c52a18;
}

@media (max-width: 520px) {
  .c-15-row {
    flex-direction: column;
  }

  .c-15-btn {
    width: 100%;
  }
}


/* ========================= 16 — Dropdown :::Uses Script::: ========================= */

.sfs-form-ex-16 {
  width: 100%;
}

.c-16-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}

.c-16-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.c-16-req {
  color: var(--sfs-red);
}

.c-16-select-wrap {
  position: relative;
  display: block;
}

.c-16-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 0 40px 0 12px;
  font-size: 14px;
  font-weight: 300;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 0;
  color: var(--placeholder-color);
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, color .15s ease;
}

.c-16-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 12px;
  height: 7px;
  transform: translateY(-50%);
  color: #dbdbdb;
  pointer-events: none;
  transition: color .15s ease;
}

.c-16-select:hover {
  border-color: #333;
  color: var(--text-1);
}

.c-16-select:hover+.c-16-caret {
  color: #333;
}

.c-16-select:focus,
.c-16-select:focus-visible {
  outline: none;
  border-color: #eb3c24;
  color: var(--text-1);
}

.c-16-select:focus+.c-16-caret,
.c-16-select:focus-visible+.c-16-caret {
  color: #eb3c24;
}

.c-16-select option[disabled],
.c-16-select option[value=""] {
  color: var(--text-4);
}

.c-16-hint {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-3);
}

.c-16-select-wrap.is-filled .c-16-select {
  color: var(--text-1);
}

.c-16-select-wrap.is-filled .c-16-select,
.c-14-select-wrap.is-filled .c-14-select {
  color: var(--text-1);
}




/* ========================= 17 — Date Picker ========================= */
.sfs-form-ex-17 {
  width: 100%;
}

.c-17-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}

.c-17-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
}

.c-17-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  color: #dbdbdb;
}

.c-17-input {
  width: 100%;
  min-height: 48px;
  padding: 0 44px 0 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--field-line);
  border-radius: 0;
  transition: border-bottom-color .25s ease;
  position: relative;
}

.c-17-input::placeholder {
  color: var(--placeholder-color);
}

.c-17-input:hover {
  border-bottom-color: var(--field-line-hover);
}

.c-17-wrap:hover {
  color: var(--text-2);
}

.c-17-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--sfs-red);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
  pointer-events: none;
}

.c-17-wrap:focus-within {
  color: var(--sfs-red);
}

.c-17-wrap:focus-within::after {
  opacity: 1;
}

.c-17-input:focus,
.c-17-input:focus-visible {
  outline: none;
}

.c-17-wrap:focus-within .c-17-input,
.c-17-wrap:focus-within .c-17-input:hover {
  border-bottom-color: transparent;
}

.c-17-ico {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0.9;
  pointer-events: none;
}

.c-17-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, 100%);
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  z-index: 30;
  display: none;
}

.c-17-wrap:focus-within .c-17-popover {
  display: block;
}

.c-17-cal {
  padding: 12px;
}

.c-17-calhead {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.c-17-title {
  text-align: center;
  font-weight: 700;
  color: var(--text-1);
  font-size: 14px;
}

.c-17-nav {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  cursor: pointer;
  line-height: 1;
  font-size: 18px;
  color: var(--text-1);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.c-17-nav:hover {
  background: #fcfcfc;
  border-color: var(--text-2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.c-17-nav:active {
  background: #f3f3f3;
  border-color: var(--text-2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) inset, 0 1px 2px rgba(0, 0, 0, 0.06);
}

.c-17-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.c-17-dow>div {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-4);
  padding: 6px 0;
}

.c-17-days>div {
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  padding: 6px 0;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.c-17-days>div:hover {
  border-color: var(--field-line-hover);
}

.c-17-days>div.is-today {
  outline: 2px solid var(--text-2);
  background: var(--bg-1);
}

.c-17-days>div.is-selected {
  background: #FFEAEA;
  color: var(--sfs-red);
  border-color: var(--sfs-red);
}

@media (max-width: 520px) {
  .c-17-popover {
    width: 100%;
  }
}


/* ========================= 18 — Metric Input Field: Building Height :::Uses Script::: ========================= */
.sfs-form-ex-18 {
  width: 100%;
}

.c-18-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}

.c-18-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
}

.c-18-req {
  color: var(--sfs-red);
  margin-left: 3px;
}

.c-18-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  color: #dbdbdb;
  transition: color 0.25s ease;
}

.c-18-input {
  width: 100%;
  min-height: 48px;
  padding: 0 34px 0 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--field-line);
  border-radius: 0;
  transition: border-bottom-color .25s ease;
  position: relative;
  appearance: textfield;
  -webkit-appearance: textfield;
}

.c-18-input::-webkit-outer-spin-button,
.c-18-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.c-18-input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.c-26-card input[type=number],
.c-27-panel input[type=number] {
  -moz-appearance: textfield;
  -webkit-appearance: textfield;
  appearance: textfield;
}

.c-18-input::placeholder {
  color: var(--placeholder-color);
}

.c-18-input:hover {
  border-bottom-color: var(--field-line-hover);
}

.c-18-wrap:hover {
  color: var(--text-2);
}

.c-18-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--sfs-red);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
  pointer-events: none;
}

.c-18-wrap:focus-within {
  color: var(--sfs-red);
}

.c-18-wrap:focus-within::after {
  opacity: 1;
}

.c-18-input:focus,
.c-18-input:focus-visible {
  outline: none;
}

.c-18-wrap:focus-within .c-18-input,
.c-18-wrap:focus-within .c-18-input:hover {
  border-bottom-color: transparent;
}

.c-18-spinner {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 20px;
  transform: translateY(-50%);
  pointer-events: none;
  color: inherit;
}

.c-18-hint {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--sfs-red);
}

.c-18-hint--alert {
  color: var(--sfs-red);
  font-weight: 300;
  text-transform: uppercase;
}

.c-18-step {
  position: absolute;
  right: 6px;
  width: 20px;
  height: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 3;
  color: inherit;
  transition: color 0.25s ease;
}

.c-18-step svg {
  display: none;
  pointer-events: none;
}

.c-18-step::after {
  content: "";
  position: absolute;
  inset: -4px -2px;
}

.c-18-step--up {
  top: calc(50% - 10px);
}

.c-18-step--down {
  top: calc(50% + 2px);
}

.c-18-step:focus {
  outline: none;
}



/* ========================= 19 — Input Field: Project Name ========================= */
.sfs-form-ex-19 {
  width: 100%;
}

.c-19-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}

.c-19-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
}

.c-19-req {
  color: var(--sfs-red);
  margin-left: 3px;
}

.c-19-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.c-19-input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px 0 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--field-line);
  border-radius: 0;
  transition: border-bottom-color .25s ease;
  position: relative;
}

.c-19-input::placeholder {
  color: var(--placeholder-color);
}

.c-19-input:hover {
  border-bottom-color: var(--field-line-hover);
}

.c-19-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--sfs-red);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
  pointer-events: none;
}

.c-19-wrap:focus-within::after {
  opacity: 1;
}

.c-19-input:focus,
.c-19-input:focus-visible {
  outline: none;
}

.c-19-wrap:focus-within .c-19-input,
.c-19-wrap:focus-within .c-19-input:hover {
  border-bottom-color: transparent;
}

.c-19-hint {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--sfs-red);
}




/* ========================= 20 — Slider: Rail Profile Length ::: Uses Script ::: ========================= */
.sfs-form-ex-20 {
  width: 100%;
}

.c-20-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.c-20-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
}

.c-20-req {
  color: var(--sfs-red);
  margin-left: 3px;
}

.c-20-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 24px;
  width: auto;
}

.c-20-slider {
  width: 100%;
  flex: 1 1 auto;
}

.c-20-range {
  --c20-pct: 0%;
  --c20-track-height: 8px;
  --c20-track-bg: #e9e9e9;
  --c20-fill: var(--sfs-red);
  --c20-thumb-size: 20px;
  --c20-thumb-border: 3px solid var(--sfs-red);

  width: 100%;
  background: linear-gradient(to right, var(--c20-fill) var(--c20-pct), var(--c20-track-bg) var(--c20-pct));
  border: none;
  outline: none;
  appearance: none;
}

.c-20-range:focus-visible {
  outline: none;
}

.c-20-range::-webkit-slider-runnable-track {
  height: var(--c20-track-height);
  background: transparent;
}

.c-20-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--c20-thumb-size);
  height: var(--c20-thumb-size);
  background: #fff;
  border: var(--c20-thumb-border);
  margin-top: calc((var(--c20-track-height) - var(--c20-thumb-size)) / 2);
  border-radius: 0;
  cursor: pointer;
}

.c-20-range::-moz-range-track {
  height: var(--c20-track-height);
  background: transparent;
  border: none;
}

.c-20-range::-moz-range-progress {
  height: var(--c20-track-height);
  background: var(--c20-fill);
  border: none;
}

.c-20-range::-moz-range-thumb {
  width: var(--c20-thumb-size);
  height: var(--c20-thumb-size);
  background: #fff;
  border: var(--c20-thumb-border);
  border-radius: 0;
  cursor: pointer;
}

.c-20-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 300;
}

.c-20-metric {
  display: flex;
  align-items: center;
}

.c-20-metric-wrap {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px;
}

.c-20-metric-input {
  width: 68px;
  min-height: 32px;
  padding: 0 4px;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: var(--text-1);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text-5);
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.c-20-metric-input:focus {
  outline: none;
  border-bottom-color: var(--sfs-red);
  border-bottom-width: 2px;
}

.c-20-metric-suffix {
  font-size: 18px;
  line-height: 1;
  font-weight: 300;
  color: var(--text-3);
}

@media (max-width: 760px) {
  .c-20-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {

  .c-20-metric-input,
  .c-20-metric-suffix {
    font-size: 20px;
  }
}


/* ========================= 21 — Slider: Top Hat Depth ::: Uses Script ::: ========================= */
.sfs-form-ex-21 {
  width: 100%;
}

.c-21-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.c-21-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
}

.c-21-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
}

.c-21-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.c-21-metric-wrap {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px;
}

.c-21-metric-input {
  width: 68px;
  min-height: 32px;
  padding: 0 4px;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: var(--text-1);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text-5);
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.c-21-metric-input:focus {
  outline: none;
  border-bottom-color: var(--sfs-red);
  border-bottom-width: 2px;
}

.c-21-metric-suffix {
  font-size: 18px;
  line-height: 1;
  font-weight: 300;
  color: var(--text-3);
}

.c-21-rangeinfo {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-5);
}

.c-21-slider {
  width: 100%;
}

.c-21-range {
  --c21-pct: 0%;
  --c21-track-height: 8px;
  --c21-track-bg: #e9e9e9;
  --c21-fill: var(--sfs-red);
  --c21-thumb-size: 20px;
  --c21-thumb-border: 3px solid var(--sfs-red);

  width: 100%;
  background: linear-gradient(to right, var(--c21-fill) var(--c21-pct), var(--c21-track-bg) var(--c21-pct));
  border: none;
  outline: none;
  appearance: none;
}

.c-21-range:focus-visible {
  outline: none;
}

.c-21-range::-webkit-slider-runnable-track {
  height: var(--c21-track-height);
  background: transparent;
}

.c-21-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--c21-thumb-size);
  height: var(--c21-thumb-size);
  background: #fff;
  border: var(--c21-thumb-border);
  margin-top: calc((var(--c21-track-height) - var(--c21-thumb-size)) / 2);
  border-radius: 0;
  cursor: pointer;
}

.c-21-range::-moz-range-track {
  height: var(--c21-track-height);
  background: transparent;
  border: none;
}

.c-21-range::-moz-range-progress {
  height: var(--c21-track-height);
  background: var(--c21-fill);
  border: none;
}

.c-21-range::-moz-range-thumb {
  width: var(--c21-thumb-size);
  height: var(--c21-thumb-size);
  background: #fff;
  border: var(--c21-thumb-border);
  border-radius: 0;
  cursor: pointer;
}

@media (max-width: 720px) {
  .c-21-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .c-21-metrics {
    align-items: flex-start;
  }

  .c-21-metric-input {
    font-size: 22px;
    width: 64px;
  }
}

@media (max-width: 480px) {
  .c-21-metric-input {
    font-size: 20px;
    width: 60px;
  }

  .c-21-metric-suffix {
    font-size: 18px;
  }
}


/* ========================= 22 — Toggle Switch: Thermal Performance Required ========================= */
.sfs-form-ex-22 {
  width: 100%;
}

.c-22-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}

.c-22-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
}

.c-22-toggle {
  position: relative;
  width: 68px;
  height: 32px;
  display: inline-block;
  user-select: none;
}

.c-22-input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.c-22-track {
  position: absolute;
  inset: 0;
  background: #dcdcdc;
  border-radius: 9999px;
  transition: background .18s ease, box-shadow .18s ease, filter .18s ease;
}

.c-22-thumb {
  position: absolute;
  top: 3px;
  left: 2px;
  width: 26px;
  height: 26px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  pointer-events: none;
}

.c-22-toggle:hover .c-22-track {
  filter: brightness(.98);
}

.c-22-input:checked~.c-22-track {
  background: var(--sfs-red);
}

.c-22-input:checked~.c-22-thumb {
  transform: translateX(36px);
  border-color: var(--sfs-red);
}


/* ========================= 23 — Checkbox Cards: Additional Requirements ========================= */
.sfs-form-ex-23 {
  width: 100%;
}

.c-23-field {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.c-23-primary {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-1);
}

.c-23-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.c-23-card {
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: 24px;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 24px;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: border 0.25s ease;
}

.c-23-card:hover {
  border: 1px solid var(--text-2);
}

.c-23-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.c-23-box {
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-3);
  background: #fff;
  display: inline-block;
}

.c-23-input:checked+.c-23-box {
  background: var(--sfs-red);
  border-color: var(--text-1);
}

.c-23-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.c-23-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
}

.c-23-sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .c-23-grid {
    grid-template-columns: 1fr;
  }
}


/* ========================= 24 — Checkboxes ========================= */
.sfs-form-ex-24 {
  width: 100%;
}

.c-24-field {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
}

.c-24-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
}

.c-24-checks {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.c-24-check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.c-24-input {
  width: 18px;
  height: 18px;
  appearance: none;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  border-color: var(--text-2);
  border-radius: 0;
  background: var(--bg-1);
  transition: background 0.2s ease, border-color 0.2s ease;
  margin: 0;
}

.c-24-input:hover {
  border-color: var(--field-line-hover);
}

.c-24-input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.c-24-input:checked {
  background: var(--sfs-red);
  border-color: var(--text-1);
}

.c-24-text {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
}


/* ========================= 25 — Description Input Field ========================= */
.sfs-form-ex-25 {
  width: 100%;
}

.c-25-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}

.c-25-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1);
}

.c-25-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  background: var(--bg-1);
  border: 1px solid var(--field-line);
  border-radius: 0;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.c-25-textarea::placeholder {
  color: var(--placeholder-color);
}

.c-25-textarea:hover {
  border-color: var(--field-line-hover);
}

.c-25-textarea:focus {
  outline: none;
  border-color: var(--sfs-red);
  box-shadow: 0 0 0 1px var(--sfs-red);
}




/* ========================= 26 — Static Form: Project Information ========================= */
.sfs-form-ex-26 {
  width: 100%;
}

.c-26-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: clamp(720px, 80vw, 1120px);
  margin-inline: auto;
}

.c-26-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-26-title {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  color: var(--text-1);
}

.c-26-desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-4);
  line-height: 1.5;
}

.c-26-divider {
  height: 2px;
  background: var(--sfs-red);
  width: 100%;
}

.c-26-head .c-26-title,
.c-26-head .c-26-desc {
  max-width: 720px;
}

.c-26-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.c-26-block--tight {
  gap: 16px;
}

.c-26-primary {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-1);
}

.c-26-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 32px;
}

.c-26-cell {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (max-width: 900px) {
  .c-26-card {
    width: 100%;
  }

  .c-26-form {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 520px) {
  .c-26-card {
    padding: 16px;
  }
}



/* ========================= 27 — Pop-up Form: Cutting Job ========================= */
.sfs-form-ex-27 {
  width: 100%;
  display: grid;
  place-items: start;
}

.c-27-open-btn {
  margin: 16px 0;
}

.c-27-toggle:not(:checked)~.c-27-overlay,
.c-27-toggle:not(:checked)~.c-27-modal {
  display: none;
}

.c-27-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 90;
}

.c-27-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 24px;
}

.c-27-panel {
  width: clamp(720px, 84vw, 1120px);
  height: 90vh;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.c-27-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  background: #fff;
  border-bottom: 1px solid var(--divider);
  box-shadow: 0 10px 14px -12px rgba(0, 0, 0, .18);
}

.c-27-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}

.c-27-close-top {
  margin-left: 16px;
  padding: 10px 48px;
}

.c-27-body {
  flex: 1;
  overflow: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-right: 48px;
}

.c-27-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}

.c-27-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}

.c-27-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 40px;
}

.c-27-grid>.c-27-span-2 {
  grid-column: 1 / -1;
  max-width: none;
  width: 100%;
}

.c-27-span-2 {
  grid-column: 1 / -1;
}

.c-27-divider {
  border-bottom: 1px solid var(--border);
  margin: 40px 0px;
  width: 100%;
}

.c-27-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.c-27-grid--cuts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 40px;
}

.c-27-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: #fff;
  border-top: 1px solid var(--divider);
  box-shadow: 0 -10px 14px -12px rgba(0, 0, 0, .18);
}

.c-27-save-foot {
  padding: 10px 48px;
}

.c-27-close-bot {
  font-weight: 300;
  border: 1px solid var(--text-3);
}

.c-27-foot .sfs-btn {
  min-height: 40px;
}

.c-27-foot-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.c-27-foot-actions .sfs-btn svg,
.c-27-foot-actions .sfs-btn img {
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .c-27-panel {
    width: 92vw;
    height: 92vh;
  }

  .c-27-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .c-27-grid--cuts {
    grid-template-columns: 1fr;
  }

  .c-27-body {
    padding: 24px;
    gap: 32px;
  }

  .c-27-head,
  .c-27-foot {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 16px;
  }

  .c-27-title {
    font-size: 18px;
  }

  .c-27-foot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
}

.c-18-wrap,
.c-19-wrap {
  position: relative;
}

.c-18-focus,
.c-19-focus {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--sfs-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: none;
  pointer-events: none;
}

.c-18-wrap:focus-within .c-18-focus,
.c-19-wrap:focus-within .c-19-focus {
  transform: scaleX(1);
}

/* ========================= Enhanced Responsiveness & Width Fit ========================= */
.c-27-modal {
  --c27-gutter: clamp(8px, 3vw, 24px);
  padding: var(--c27-gutter);
}

.c-27-panel {
  width: min(1120px, 84vw, calc(100vw - var(--c27-gutter) * 2));
  max-width: calc(100vw - var(--c27-gutter) * 2);
  min-width: 0;
  height: clamp(78vh, 92vh, 92vh);
}

.c-27-head,
.c-27-foot {
  padding-inline: clamp(12px, 3vw, 40px);
  padding-block: clamp(10px, 1.5vw, 24px);
}

.c-27-title {
  font-size: clamp(18px, 1.6vw, 22px);
}

.c-27-body {
  padding: clamp(16px, 3vw, 40px);
  padding-right: clamp(20px, 3.2vw, 48px);
  gap: clamp(16px, 3vw, 40px);
}

.c-27-section-title {
  font-size: clamp(16px, 1.4vw, 18px);
}

.c-27-grid,
.c-27-grid--cuts {
  gap: clamp(12px, 2vw, 40px);
}

.c-27-divider {
  margin: clamp(20px, 4vw, 40px) 0;
}

.c-27-panel .sfs-btn {
  padding-block: clamp(8px, 1.3vw, 10px);
  padding-inline: clamp(12px, 2.4vw, 48px);
  font-size: clamp(12px, 1.2vw, 14px);
  line-height: 1.1;
  white-space: nowrap;
}

.c-27-foot .sfs-btn {
  min-height: 38px;
}

.c-27-foot-actions {
  gap: clamp(6px, 1.4vw, 12px);
}

.c-27-foot-actions .sfs-btn svg,
.c-27-foot-actions .sfs-btn img {
  margin-right: clamp(4px, 0.8vw, 8px);
}

.c-27-close-top {
  padding-inline: clamp(12px, 2.4vw, 48px);
}

.c-27-foot {
  overflow: hidden;
}

.c-27-foot-actions {
  flex-wrap: wrap;
}

.c-27-foot-actions .sfs-btn {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  .c-27-panel {
    width: calc(100vw - var(--c27-gutter) * 2);
    height: 92vh;
  }
}

@media (max-width: 680px) {

  .c-27-head,
  .c-27-foot {
    gap: 8px;
  }

  .c-27-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .c-27-foot-actions {
    order: 2;
    justify-content: stretch;
  }

  .c-27-foot-actions .sfs-btn {
    flex: 1 1 33%;
    text-align: center;
  }

  .c-27-save-foot {
    order: 1;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .c-27-title {
    font-size: 16px;
  }

  .c-27-panel .sfs-btn {
    padding-block: 8px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .c-27-foot-actions .sfs-btn svg,
  .c-27-foot-actions .sfs-btn img {
    margin-right: 4px;
  }
}

@media (max-width: 420px) {
  .c-27-modal {
    --c27-gutter: clamp(6px, 4vw, 16px);
  }
}




/* ===============================================================================================================================================================
Section 03 — Navigation Elements
 ================================================================================================================================================================= */


/* ========================= 28 — Progress Bar: Project Steps ========================= */
.sfs-nav-ex-28 {
  width: 100%;
}

.c-28-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.c-28-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.c-28-title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.2px;
}

.c-28-steps {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 300;
  color: var(--text-5);
  white-space: nowrap;
}

.c-28-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: #e9e9e9;
  overflow: hidden;
}

.c-28-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--c28-progress, 0%);
  background: var(--sfs-red);
  transition: width .25s ease;
}

@media (max-width: 560px) {
  .c-28-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}


/* ========================= 29 — Step Controls (Prev / Next) ========================= */
.sfs-nav-ex-29 {
  width: 100vw;
  margin-left: calc(49% - 49vw);
  margin-right: calc(49% - 49vw);
  margin-top: 32px;
  background: #f9f9f9;
  border: 1px solid var(--border);
}

.c-29-inner {
  max-width: 1352px;
  margin: 0 auto;
  padding-block: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.c-29-btn {
  min-height: 40px;
  gap: 10px;
}

.c-29-btn--secondary {
  background: #fff;
  border: 2px solid #333;
  color: #000;
  font-weight: 700;
  padding-inline: 32px;
}

.c-29-btn--primary {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
  padding-inline: 48px;
}

.c-29-ico {
  width: 14px;
  height: 14px;
  display: block;
}

.c-29-btn--secondary .c-29-ico path,
.c-29-btn--primary .c-29-ico path {
  fill: currentColor;
}

.c-29-btn.is-disabled {
  opacity: .25;
  pointer-events: none;
}

.c-29-btn--primary:active {
  background: #c52a18;
  border-color: #c52a18;
  transform: translateY(1px);
  transition: background 0.05s ease, border-color 0.05s ease, transform 0.05s ease;
}

.c-29-btn--secondary:active {
  background: #f9f9f9;
  border-color: #111;
  transform: translateY(1px);
  transition: background 0.05s ease, border-color 0.05s ease, transform 0.05s ease;
}

@media (max-width: 1400px) and (min-width: 641px) {
  .c-29-inner {
    padding-inline: 24px;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .c-29-inner {
    justify-content: center;
    padding-inline: 24px;
  }

  .c-29-btn {
    width: 100%;
    justify-content: center;
  }
}


/* ========================= 30 — Search / Filters / Actions ========================= */
.c-30-span {
  display: block;
}

.sfs-filters-ex-30 {
  background: #fff;
}

.sfs-filters-ex-30>.c-30-inner {
  max-width: 1352px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  padding: 24px 16px;
}

.c-30-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

.c-30-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.c-30-search {
  position: relative;
  flex: 0 0 480px;
  max-width: 520px;
  display: flex;
  align-items: center;
  margin-right: 16px;
}

.c-30-search-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #333;
  padding: 11px 32px 11px 12px;
  font-size: 14px;
  font-weight: 300;
  color: #333;
  background: transparent;
}

.c-30-search-input::placeholder {
  color: #b0b0b0;
}

.c-30-search-input:focus {
  outline: none;
  border-bottom: 2px solid #eb3c24;
}

.c-30-search-ico {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.c-30-search:focus-within .c-30-search-ico svg path {
  fill: #eb3c24;
}

.c-30-select-wrap {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.c-30-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 150px;
  background: #fff;
  border: 1px solid #dbdbdb;
  min-height: 40px;
}

.c-30-select select {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 28px 10px 12px;
  font-size: 14px;
  font-weight: 300;
  color: #666;
  cursor: pointer;
  outline: none;
}

.c-30-select:hover {
  border-color: #999;
}

.c-30-select:focus-within {
  border-color: #eb3c24;
}

.c-30-select:focus-within select {
  outline: none;
  color: #333;
}

.c-30-caret {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

.c-30-select:focus-within .c-30-caret {
  color: #eb3c24;
}

.c-30-clear {
  padding: 10px 32px;
  white-space: nowrap;
}

.c-30-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.c-30-left-actions,
.c-30-right-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.c-30-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.c-30-checkbox {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 1px solid #444;
  background: #fff;
  border-radius: 0;
  margin: 0;
}

.c-30-checkbox:checked {
  background: #eb3c24;
  border-color: #333;
}

.c-30-check-label {
  font-size: 14px;
  font-weight: 300;
  color: #333;
}

.c-30-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f9f9f9;
  border: 1px solid #e6e6e6;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 300;
  color: #666;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.c-30-action-btn:hover {
  background: #fff;
  border-color: #d0d0d0;
}

.c-30-action-btn:active {
  background: #f0f0f0;
  border-color: #c8c8c8;
  transform: translateY(1px);
  transition: background 0.05s ease, border-color 0.05s ease, transform 0.05s ease;
}

.c-30-action-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.c-30-icon-btns {
  display: flex;
  gap: 8px;
}

.c-30-icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #e6e6e6;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.c-30-icon-btn:hover {
  background: #f9f9f9;
  border-color: #d5d5d5;
}

.c-30-icon-btn:active {
  background: #f0f0f0;
  border-color: #c8c8c8;
  transform: translateY(1px);
  transition: background 0.05s ease, border-color 0.05s ease, transform 0.05s ease;
}

.c-30-span .sfs-app-num {
  max-width: 1352px;
  margin: 24px auto 64px;
  display: block;
}

@media (max-width: 1210px) {
  .c-30-top {
    flex-wrap: wrap;
  }

  .c-30-search {
    flex: 0 0 100%;
    max-width: 100%;
    margin-right: 0;
  }

  .c-30-left {
    flex-wrap: wrap;
  }

  .c-30-select-wrap {
    width: 100%;
  }

  .c-30-select {
    flex: 1 1 0;
    min-width: 140px;
  }

  .c-30-clear {
    margin-left: auto;
  }
}

@media (max-width: 960px) {
  .c-30-bottom {
    flex-direction: column;
    gap: 16px;
  }

  .c-30-left-actions,
  .c-30-right-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .c-30-select-wrap {
    flex-direction: column;
  }

  .c-30-select {
    width: 100%;
  }

  .c-30-clear {
    width: 100%;
    text-align: center;
    margin-left: 0;
  }

  .c-30-left-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .c-30-left-actions__right {
    width: 100%;
    display: flex;
    gap: 12px;
  }

  .c-30-action-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }

  .c-30-right-actions {
    width: 100%;
  }
}

/* ========================= 31 — Pagination Bar ========================= */
.c-31-span {
  display: block;
}

.sfs-pagination-ex-31 {
  background: #fff;
}

.sfs-pagination-ex-31>.c-31-inner {
  max-width: 1352px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  padding: 24px 16px;
}

.c-31-left {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
}

.c-31-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.c-31-perpage {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-31-perpage-label {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
}

.c-31-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #dbdbdb;
  min-height: 40px;
  width: 72px;
}

.c-31-select select {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 9px 26px 9px 10px;
  font-size: 14px;
  font-weight: 300;
  color: #333;
  cursor: pointer;
  outline: none;
}

.c-31-caret {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

.c-31-select:focus-within {
  border-color: #eb3c24;
}

.c-31-select:focus-within .c-31-caret {
  color: #eb3c24;
}

.c-31-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-31-btn-disabled {
  opacity: 0.25;
  pointer-events: none;
}

.c-31-prev {
  padding: 10px 40px;
}

.c-31-next {
  padding: 10px 48px;
}

.c-31-span .sfs-app-num {
  max-width: 1352px;
  margin: 24px auto 64px;
  display: block;
}

@media (max-width: 720px) {
  .sfs-pagination-ex-31>.c-31-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .c-31-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .c-31-right {
    flex-wrap: wrap;
    gap: 12px;
  }

  .c-31-controls {
    width: 100%;
    justify-content: space-between;
  }

  .c-31-next {
    padding: 10px 0;
    width: 100%;
    text-align: center;
  }

  .c-31-prev {
    padding: 10px 0;
    width: 100%;
    text-align: center;
  }
}



/* ========================= 32 — Step Controls (Prev / Next, Light) ========================= */
.c-32-span {
  display: block;
}

.sfs-nav-ex-32 {
  width: 100vw;
  margin-left: calc(49% - 49vw);
  margin-right: calc(49% - 49vw);
  margin-top: 32px;
  background: #fff;
  border-top: 1px solid #e6e6e6;
}

.c-32-inner {
  max-width: 1352px;
  margin: 0 auto;
  padding-block: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.c-32-btn {
  min-height: 40px;
  gap: 10px;
}

.c-32-btn--secondary {
  background: #fff;
  border: 2px solid #333;
  color: #000;
  font-weight: 700;
  padding-inline: 32px;
}

.c-32-btn--primary {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
  padding-inline: 48px;
}

.c-32-ico {
  width: 14px;
  height: 14px;
  display: block;
}

.c-32-btn--secondary .c-32-ico path,
.c-32-btn--primary .c-32-ico path {
  fill: currentColor;
}

.c-32-btn.is-disabled {
  opacity: .25;
  pointer-events: none;
}

.c-32-btn--primary:active {
  background: #c52a18;
  border-color: #c52a18;
  transform: translateY(1px);
  transition: background 0.05s ease, border-color 0.05s ease, transform 0.05s ease;
}

.c-32-btn--secondary:active {
  background: #f9f9f9;
  border-color: #111;
  transform: translateY(1px);
  transition: background 0.05s ease, border-color 0.05s ease, transform 0.05s ease;
}

@media (max-width: 1400px) and (min-width: 641px) {
  .c-32-inner {
    padding-inline: 24px;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .c-32-inner {
    justify-content: center;
    padding-inline: 24px;
  }

  .c-32-btn {
    width: 100%;
    justify-content: center;
  }
}

.c-32-span .sfs-app-num {
  max-width: 1352px;
  margin: 24px auto 64px;
  display: block;
}



/* ========================= 33 — Top-level Navigation Slider :::Uses Script::: ========================= */
.c-33-span {
  display: block;
}

.sfs-nav-ex-33 {
  background: #fff;
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  padding: 24px 0;
}

.sfs-nav-ex-33 .c-33-inner {
  max-width: 1352px;
  margin-inline: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-33-arrow {
  background: #fefefe;
  border: 1px solid #d7d7d7;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #555;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .12s ease;
  flex: 0 0 auto;
  z-index: 4;
}

.c-33-arrow:hover {
  background: #ffffff;
  border-color: #c2c2c2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

.c-33-arrow:active {
  background: #f2f2f2;
  border-color: #b0b0b0;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .02) inset;
}

.c-33-arrow.is-deactivated {
  opacity: 0.35;
  background: #f3f3f3;
  border-color: #e4e4e4;
  color: #9a9a9a;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.c-33-arrow.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.c-33-track-wrap {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  margin-inline: 12px;
}

.c-33-track-wrap.no-left-fade {
  margin-left: 0;
}

.c-33-track-wrap.no-right-fade {
  margin-right: 0;
}

.c-33-track-wrap::before,
.c-33-track-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42px;
  pointer-events: none;
  z-index: 3;
  transition: opacity .12s ease;
}

.c-33-track-wrap::before {
  left: 0;
  background: linear-gradient(to right, #fff 15%, rgba(255, 255, 255, 0));
}

.c-33-track-wrap::after {
  right: 0;
  background: linear-gradient(to left, #fff 15%, rgba(255, 255, 255, 0));
}

.c-33-track-wrap.no-left-fade::before {
  opacity: 0;
}

.c-33-track-wrap.no-right-fade::after {
  opacity: 0;
}

.c-33-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
}

.c-33-track:active {
  cursor: grabbing;
}

.c-33-track::-webkit-scrollbar {
  display: none;
}

.c-33-tab {
  background: #f9f9f9;
  border: 1px solid #e6e6e6;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 24px;
  padding-bottom: 13px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  position: relative;
}

.c-33-tab:hover {
  border-color: #666;
  background: #fefefe;
}

.c-33-tab.is-active,
.c-33-tab[aria-selected="true"] {
  background: #f9f9f9;
  border: 1px solid #e6e6e6;
  color: var(--text-1);
}

.c-33-tab.is-active::after,
.c-33-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -1px;
  height: 3px;
  background: var(--sfs-red);
  pointer-events: none;
}

.c-33-tab:active {
  background: #f3f3f3;
}

.c-33-span .sfs-app-num {
  max-width: 1352px;
  margin: 24px auto 64px;
  display: block;
}

.c-33-track.is-dragging {
  scroll-behavior: auto !important;
  cursor: grabbing;
}

@media (max-width: 680px) {
  .sfs-nav-ex-33 .c-33-inner {
    padding-inline: 8px;
  }

  .c-33-track-wrap {
    margin-inline: 8px;
  }

  .c-33-arrow {
    width: 32px;
    height: 32px;
  }
}



/* ========================= 34 — Side Navigation Steps :::Uses Script::: ========================= */
.sfs-app-ex-34-wrapper {
  width: 100%;
  display: block;
}

.sfs-app-ex-34 {
  width: 240px;
  background: #f9f9f9;
  border: 1px solid #e6e6e6;
}

.c-34-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.c-34-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #e6e6e6;
  cursor: pointer;
  transition: color .12s ease;
  outline: none;
  background: transparent;
}

.c-34-index {
  width: 30px;
  height: 30px;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  background: #fff;
  flex-shrink: 0;
}

.c-34-label {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
  line-height: 1.2;
  min-width: 0;
}

.c-34-item:hover {
  background: rgba(255, 255, 255, 0.35);
}

.c-34-item:hover .c-34-label {
  color: var(--text-1);
}

.c-34-item:hover .c-34-index {
  border-color: var(--text-3);
}

.c-34-item.is-active,
.c-34-item[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.4);
}

.c-34-item.is-active .c-34-label,
.c-34-item[aria-selected="true"] .c-34-label {
  color: var(--text-1);
  font-weight: 700;
}

.c-34-item.is-active .c-34-index,
.c-34-item[aria-selected="true"] .c-34-index {
  border: 2px solid var(--sfs-red);
  color: var(--sfs-red);
  background: #fff;
}

.c-34-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(235, 60, 36, 0.14);
  position: relative;
  z-index: 1;
}

@media (max-width: 820px) {
  .sfs-app-ex-34 {
    width: 100%;
  }
}


/* ========================= Component 35 — Title Bar with Actions ========================= */

.sfs-app-ex-35 {
  width: 100%;
  background: #fff;
}

.c-35-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 14px 0;
}

.c-35-title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-1);
}

.c-35-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-35-btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 0;
  display: grid;
  place-items: center;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
  color: #323232;
}

.c-35-btn-icon:hover {
  background: #fcfcfc;
  border-color: #9a9a9a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-35-btn-icon:active {
  background: #f0f0f0;
  border-color: #777;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06) inset;
}

.c-35-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline: 24px;
  font-size: 14px;
  padding: 7px 24px;
}

.c-35-btn-primary svg {
  display: block;
}

.c-35-divider {
  height: 2px;
  background: var(--sfs-red);
  width: 100%;
}

@media (max-width: 640px) {
  .c-35-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .c-35-actions {
    width: 100%;
    justify-content: space-between;
  }

  .c-35-btn-primary {
    width: auto;
  }
}


/* ========================= Component 36 — Title Bar with Version and Primary Action =========================*/
.sfs-app-ex-36 {
  width: 100%;
  background: #fff;
}

.c-36-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 14px 0;
}

.c-36-title {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-1);
}

.c-36-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.c-36-version {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
}

.c-36-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 24px;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 640px) {
  .c-36-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .c-36-actions {
    width: 100%;
    justify-content: space-between;
  }

  .c-36-btn-primary {
    width: auto;
  }
}





/* ===============================================================================================================================================================
Section 04 — Tables and Interfaces
 ================================================================================================================================================================= */


/* ========================= 37 — Basic Data Table ========================= */
.sfs-app-ex-37 {
  width: 100%;
}

.c-37-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e6e6e6;
  box-shadow: var(--shadow-base);
}

.c-37-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--text-1);
  min-width: 600px;
  table-layout: auto;
}

.c-37-table thead {
  background: #f9f9f9;
}

.c-37-table th {
  text-align: left;
  padding: 12px 24px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  border-bottom: 1px solid #e6e6e6;
}

.c-37-table td {
  padding: 12px 24px;
  border-bottom: 1px solid #e6e6e6;
  font-weight: 300;
  color: var(--text-2);
}

.c-37-table tbody tr:hover {
  background: #fcfcfc;
}

/* soften width pressure from narrow numeric columns */
.c-37-table th:nth-child(3),
.c-37-table td:nth-child(3) {
  width: clamp(80px, 16vw, 120px);
}

.c-37-table th:nth-child(4),
.c-37-table td:nth-child(4) {
  width: clamp(110px, 18vw, 160px);
}

.c-37-table th:nth-child(5),
.c-37-table td:nth-child(5) {
  width: clamp(160px, 30vw, 340px);
}

@media (max-width: 900px) {
  .c-37-table {
    font-size: 13.5px;
  }

  .c-37-table th,
  .c-37-table td {
    padding: 10px 18px;
  }
}

@media (max-width: 640px) {
  .c-37-table {
    font-size: 13px;
  }

  .c-37-table th,
  .c-37-table td {
    padding: 9px 14px;
  }

  .c-37-table {
    min-width: 680px;
  }
}

@media (max-width: 480px) {

  .c-37-table th,
  .c-37-table td {
    padding: 8px 12px;
    font-size: 12.5px;
  }

  .c-37-table {
    min-width: 720px;
  }
}





/* ========================= Component 38 — Export Panel ========================= */
.sfs-app-ex-38 {
  width: 100%;
  background: #fff;
  border: 1px solid #e6e6e6;
  box-shadow: var(--shadow-base);
  padding: 24px;
}

.c-38-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.c-38-title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-1);
}

.c-38-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sfs-teal);
  color: #fff;
  padding: 10px 16px 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.c-38-status svg {
  display: block;
}

.c-38-headline {
  height: 2px;
  background: var(--sfs-red);
  margin-top: 8px;
  margin-bottom: 24px;
}


.c-38-body {
  background: #fff;
  margin-bottom: 24px;
}

.c-38s-doc {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 24px;
  border: 1px solid var(--border);
}


.c-38-doc {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 20px 18px 20px;
}

.c-38-doc-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.c-38-doc-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-1);
}

.c-38-doc-desc {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 300;
  color: var(--text-3);
  max-width: 540px;
}

.c-38-doc-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.c-38-tab {
  background: #f6f6f6;
  border: 1px solid #d7d7d7;
  padding: 8px 16px 7px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-2);
  cursor: default;
}


.c-38-doc-right {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0;
}

.c-38-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
  white-space: nowrap;
}

.c-38-filetype {
  font-weight: 700;
  color: var(--text-1);
}

.c-38-export-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.c-38-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 40px;
}


.c-38-footer {
  width: 100%;
  background: #fff;
  border: 1px solid #333;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  cursor: pointer;
  transition: background .12s ease, box-shadow .12s ease, transform .04s ease;
}

.c-38-footer:hover {
  background: #fefefe;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.c-38-footer:active {
  background: #f3f3f3;
  transform: translateY(1px);
}

.c-38-footer svg {
  display: block;
}

@media (max-width: 1024px) {
  .sfs-app-ex-38 {
    padding: 16px;
  }

  .c-38-doc-desc {
    max-width: 520px;
  }

  .c-38-meta {
    gap: 6px;
  }
}

@media (max-width: 820px) {
  .c-38s-doc {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px;
  }

  .c-38-doc-left,
  .c-38-doc-right {
    width: 100%;
  }

  .c-38-doc-right {
    align-self: auto;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
  }

  .c-38-meta {
    white-space: normal;
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .c-38-export-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
  }
}


@media (max-width: 680px) {
  .sfs-app-ex-38 {
    padding-inline: 14px;
  }

  .c-38-title {
    font-size: 19px;
  }

  .c-38-doc-desc {
    max-width: none;
  }

  .c-38-doc-tabs {
    gap: 6px;
  }

  .c-38-tab {
    padding: 8px 12px 7px;
    font-size: 13.5px;
  }

  .c-38-footer {
    min-height: 46px;
    gap: 8px;
    font-size: 14.5px;
  }
}

@media (max-width: 540px) {
  .sfs-app-ex-38 {
    padding-inline: 12px;
  }

  .c-38-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .c-38-status {
    margin-top: 4px;
    padding: 9px 14px 7px;
    font-size: 13.5px;
  }

  .c-38-doc-tabs {
    gap: 6px;
  }

  .c-38-tab {
    padding: 7px 12px 6px;
  }

  .c-38-export-btn {
    padding: 10px 16px;
  }

  .c-38-export-btn svg {
    width: 17px;
    height: 17px;
  }

  .c-38-footer {
    margin-bottom: 12px;
  }
}

@media (max-width: 380px) {
  .c-38-title {
    font-size: 18px;
  }

  .c-38-doc-title {
    font-size: 17px;
  }

  .c-38-tab {
    font-size: 13px;
    padding: 7px 10px 6px;
  }

  .c-38-export-btn svg {
    width: 16px;
    height: 16px;
  }
}



/* ========================= Component 39 — Compatibility Card ========================= */
.sfs-app-ex-39 {
  width: 100%;
}

.c-39-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 24px;
}

.c-39-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.c-39-title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-1);
  flex: 1 1 auto;
  min-width: 0;
}

.c-39-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sfs-teal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px 8px;
  line-height: 1;
  flex: 0 0 auto;
  white-space: nowrap;
  justify-content: center;
}

.c-39-headline {
  height: 2px;
  background: var(--sfs-red);
  margin-top: 8px;
  margin-bottom: 24px;
}

.c-39-section {
  margin-bottom: 24px;
}

.c-39-section:last-child {
  margin-bottom: 0;
}

.c-39-subtitle {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.c-39-platform-card {
  border: 1px solid var(--border);
  background: #fff;
}

.c-39-platform {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 24px;
}

.c-39-dot {
  width: 12px;
  height: 12px;
  background: #2fbf5a;
  display: block;
}

.c-39-platform-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.c-39-platform-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--text-1);
}

.c-39-platform-sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
}

.c-39-download {
  padding: 10px 24px;
}

.c-39-ico {
  display: block;
}

.c-39-activity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: #f9f9f9;
  border: 1px solid var(--border);
}

.c-39-activity-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.c-39-activity-title {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
}

.c-39-activity-meta {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-5);
}

.c-39-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: var(--sfs-light-green);
  border: 1px solid var(--sfs-green);
  color: var(--sfs-green);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.c-39-platform:hover {
  background: #fcfcfc;
}

@media (max-width:720px) {
  .c-39-card {
    padding: 16px;
  }

  .c-39-platform {
    grid-template-columns: 12px 1fr;
    grid-template-rows: auto auto;
    row-gap: 8px;
  }

  .c-39-download {
    grid-column: 1 / -1;
    width: 100%;
  }

  .c-39-activity {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
}

@media (max-width:380px) {
  .c-39-head {
    flex-wrap: wrap;
  }

  .c-39-status {
    margin-left: auto;
    margin-top: 6px;
    width: 100%
  }
}



/* ========================= Component 40 — Tips Info Card ========================= */
.sfs-app-ex-40-wrapper {
  display: block;
  width: 100%;
}

.sfs-app-ex-40 {
  width: 100%;
}

.c-40-card {
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.c-40-icon {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--text-1);
  line-height: 1;
}

.c-40-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.c-40-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}

.c-40-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c-40-line {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
  line-height: 1.5;
  margin: 0;
}

@media (max-width:520px) {
  .c-40-card {
    padding: 14px 16px;
    grid-template-columns: 20px 1fr;
    gap: 12px;
  }
}



/* ========================= Component 41 — Drop to Delete Tag ========================= */
.sfs-app-ex-41-wrapper {
  display: block;
  width: 100%;
}

.sfs-app-ex-41 {
  width: 100%;
}

.c-41-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #EB3C24;
  background: #FFE6E6;
  color: #EB3C24;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  padding: 10px 20px;
  text-align: center;
  transition: background .2s ease, color .2s ease;
}

.c-41-tag svg {
  width: 12px;
  height: auto;
  flex-shrink: 0;
}

.c-41-tag.is-active {
  background: #EB3C24;
  color: #fff;
}

.c-41-tag.is-active svg path {
  fill: #fff;
}

@media (max-width:520px) {
  .c-41-tag {
    font-size: 13px;
    padding: 8px 16px;
    gap: 5px;
  }
}



/* ========================= Component 42 — Stats Card ========================= */
.sfs-app-ex-42 {
  width: 100%;
}

.sfs-app-ex-42-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
  margin-top: 24px;
}

.c-42-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 24px 24px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.c-42-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0px;
  bottom: 0px;
  width: 4px;
  background: var(--sfs-red);
}

.c-42-card:hover {
  border-color: #dcdcdc;
  box-shadow: var(--shadow-hover);
}

@media (prefers-reduced-motion: no-preference) {
  .c-42-card:hover {
    transform: translateY(-2px);
  }
}

.c-42-value {
  font-weight: 300;
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1;
  color: var(--sfs-red);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.c-42-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}

.c-42-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
  line-height: 1.5;
}

@media (max-width:720px) {
  .sfs-app-ex-42-grid {
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .c-42-card {
    padding: 16px 16px 16px 22px;
    gap: 4px;
  }
}




/* ========================= Component 43 — Comparison Cards  ========================= */
.sfs-app-ex-43 {
  width: 100%;
}

.c-43-titlebar {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 12px;
}

.sfs-app-ex-43-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 760px) {
  .sfs-app-ex-43-grid {
    grid-template-columns: 1fr;
  }
}

.c-43-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  outline: none;
  cursor: pointer;
  transition:
    border-color .28s cubic-bezier(.2, .7, .3, 1),
    box-shadow .28s cubic-bezier(.2, .7, .3, 1),
    background-color .28s cubic-bezier(.2, .7, .3, 1);
}

.c-43-card:hover {
  border-color: #dfdfdf;
  box-shadow: var(--shadow-hover);
}

.c-43-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(235, 60, 36, .14), var(--shadow-hover);
}

.c-43-card.is-selected {
  background-color: #fff7f6;
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-hover),
    0 0 0 1px var(--sfs-red);
}

.c-43-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.c-43-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.c-43-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: #eaf6f3;
  border: 1px solid #cfe8e2;
  color: var(--sfs-teal);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.c-43-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 8px;
  column-gap: 16px;
}

.c-43-label {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
}

.c-43-value {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  text-align: right;
  white-space: nowrap;
}

.c-43-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  font-weight: 700;
  background: #fff;
  color: var(--text-1);
  border: 1px solid var(--text-1);
  transition:
    background .24s cubic-bezier(.2, .7, .3, 1),
    border-color .24s cubic-bezier(.2, .7, .3, 1),
    color .24s cubic-bezier(.2, .7, .3, 1),
    filter .24s cubic-bezier(.2, .7, .3, 1);
}

.c-43-btn:hover {
  background: #fff;
  border-color: var(--sfs-red);
  color: var(--sfs-red);
}

.c-43-btn:active {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
}

.c-43-card.is-selected .c-43-btn {
  background: var(--sfs-red);
  color: #fff;
  border-color: var(--sfs-red);
}

.c-43-card.is-selected .c-43-btn:hover {
  filter: brightness(.96);
}

@media (max-width: 520px) {
  .c-43-badge {
    font-size: 12px;
    padding: 6px 8px;
  }

  .c-43-card {
    padding: 16px;
  }
}




/* ========================= Component 44 — Report Summary Cards (aligned) ========================= */
.sfs-app-ex-44 {
  width: 100%;
}

.c-44-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width:1100px) {
  .c-44-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:760px) {
  .c-44-grid {
    grid-template-columns: 1fr;
  }
}

.c-44-card {
  --c44-primary: var(--text-1);
  --c44-soft: #f6f6f6;

  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 24px 24px 40px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.c-44-card:hover {
  border-color: #e0e0e0;
  box-shadow: var(--shadow-hover);
}

@media (prefers-reduced-motion:no-preference) {
  .c-44-card:hover {
    transform: translateY(-2px);
  }
}

.c-44-head {
  display: grid;
  grid-template-columns: 44px 12px 1fr;
  gap: 4px;
  align-items: start;
}

.c-44-ico {
  grid-column: 1;
  width: 44px;
  height: 44px;
  border: 2px solid var(--c44-primary);
  display: grid;
  place-items: center;
  color: var(--c44-primary);
  background: var(--c44-soft);
}

.c-44-titlewrap {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-44-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}

.c-44-rule {
  height: 2px;
  width: 100%;
  background: #eaeaea;
}

.c-44-body {
  margin-left: calc(44px + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.c-44-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
  line-height: 1.6;
}

.c-44-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c44-primary);
  background: var(--c44-soft);
  border: 1px solid color-mix(in srgb, var(--c44-primary) 35%, transparent);
  line-height: 1;
}

.c-44--red {
  --c44-primary: var(--sfs-red);
  --c44-soft: var(--sfs-light-red, #FFEAEA);
}

.c-44--green {
  --c44-primary: var(--sfs-green);
  --c44-soft: var(--sfs-light-green);
}

.c-44--teal {
  --c44-primary: var(--sfs-teal);
  --c44-soft: var(--sfs-light-teal, #EAF3F4);
}

@media (max-width:520px) {
  .c-44-card {
    padding: 16px 16px 32px 16px;
  }

  .c-44-head {
    grid-template-columns: 40px 10px 1fr;
  }

  .c-44-ico {
    width: 40px;
    height: 40px;
  }

  .c-44-body {
    margin-left: calc(40px + 18px);
  }
}




/* ========================= Component 45 — Calculation Summary Card ========================= */
.sfs-app-ex-45 {
  width: 100%;
}

.c-45-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.24s cubic-bezier(.2, .7, .3, 1), box-shadow 0.24s cubic-bezier(.2, .7, .3, 1);
}

.c-45-card:hover {
  border-color: #e2e2e2;
  box-shadow: var(--shadow-hover);
}

/* Header */
.c-45-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.c-45-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--text-1);
  font-weight: 700;
  line-height: 1.25;
  font-size: 20px;
}

.c-45-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 6px;
  background: var(--sfs-light-green);
  border: 1px solid #cfe8e2;
  color: var(--sfs-green);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.c-45-meta {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
}

.c-45-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.c-45-load {
  font-size: 14px;
  color: var(--text-1);
}

.c-45-load strong {
  font-weight: 700;
}

.c-45-footer .sfs-btn svg path {
  fill: none !important;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .c-45-title {
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .c-45-card {
    padding: 16px;
  }

  .c-45-title {
    font-size: 16px;
  }

  .c-45-status,
  .c-45-meta,
  .c-45-load,
  .sfs-btn {
    font-size: 12px;
  }

  .c-45-status {
    padding: 7px 10px 5px;
  }

  .sfs-btn {
    padding: 8px 12px;
  }

  .sfs-btn svg {
    width: 18px;
    height: 18px;
  }

  .c-45-footer {
    flex-wrap: wrap;
    gap: 12px;
  }
}




/* ========================= Component 46 — Carbon Summary Row ========================= */
.sfs-app-ex-46 {
  width: 100%;
}

.c-46-card {
  background: #f9f9f9;
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
}

.c-46-baseline {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-2);
}

.c-46-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.c-46-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-3);
  line-height: 1.5;
}

.c-46-value {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-1);
  line-height: 1.5;
}


@media (max-width: 640px) {
  .c-46-card {
    padding: 20px;
    gap: 16px;
  }

  .c-46-baseline {
    font-size: 14px;
  }

  .c-46-label,
  .c-46-value {
    font-size: 13.5px;
  }
}

@media (max-width: 400px) {
  .c-46-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}




/* ========================= Component 47 — Advisory Message ========================= */
.sfs-app-ex-47 {
  width: 100%;
}

.c-47-card {
  background: var(--sfs-sand-light, #f7f5e8);
  border: 1px solid var(--sfs-sand, #A3AD85);
  color: var(--sfs-sand, #A3AD85);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 620px;
}

.c-47-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--sfs-sand, #A3AD85);
}

.c-47-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--sfs-sand, #A3AD85);
}

@media (max-width: 520px) {
  .c-47-card {
    padding: 20px;
    gap: 14px;
  }

  .c-47-title,
  .c-47-text {
    font-size: 13.5px;
  }
}




/* ========================= Component 48 — Facade Dead Load ========================= */
.sfs-app-ex-48 {
  width: 100%;
}

.c-48-card {
  position: relative;
  background: #f9f9f9;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.c-48-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #eb3c24;
}

.c-48-card:hover {
  border-color: #e0e0e0;
  box-shadow: var(--shadow-hover);
}

.c-48-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.c-48-title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-1);
}

.c-48-result {
  font-size: 18px;
  font-weight: 700;
  color: var(--sfs-red);
  white-space: nowrap;
}

.c-48-formula {
  background: #fff;
  border: 1px solid #e6e6e6;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  padding: 12px 16px;
}

.c-48-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.sfs-app-ex-48 .c-18-input {
  background: #fff;
  border: 1px solid var(--field-line);
}

.sfs-app-ex-48 .c-18-spinner {
  z-index: 3;
}

.sfs-app-ex-48 .c-18-step {
  z-index: 4;
}

.c-48-grid .c-18-field {
  gap: 6px;
  max-width: none;
}

.c-48-grid .c-18-label {
  font-size: 12px;
}

.c-48-grid .c-18-input {
  min-height: 40px;
  font-size: 12px;
  padding: 0 32px 0 12px;
}

.c-48-grid .c-18-spinner {
  width: 12px;
  height: 18px;
}

@media (max-width:900px) {
  .c-48-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:600px) {
  .c-48-head {
    align-items: flex-start;
  }

  .c-48-title {
    font-size: 18px;
  }

  .c-48-result {
    font-size: 16px;
  }

  .c-48-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width:420px) {
  .c-48-title {
    font-size: 17px;
  }

  .c-48-result {
    font-size: 15px;
  }

  .c-48-formula {
    font-size: 13.5px;
    padding: 10px 12px;
  }
}



/* ========================= 49 — Load Calculations Accordion ========================= */
.sfs-app-ex-49 {
  width: 100%;
}

.c-49-accordion {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
}

.c-49-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 16px;
  cursor: pointer;
  user-select: none;
}

.c-49-summary::-webkit-details-marker {
  display: none;
}

.c-49-title {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-1);
}

.c-49-ico {
  color: #333;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.c-49-ico .ico-minus {
  display: none;
}

.c-49-accordion[open] .ico-plus {
  display: none;
}

.c-49-accordion[open] .ico-minus {
  display: block;
}

.c-49-panel {
  border-top: 1px solid var(--border);
  padding: 16px;
  overflow: hidden;
  height: 0;
}

.c-49-table-wrap {
  box-shadow: none;
  border: none;
}

.c-49-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--text-1);
  min-width: 0;
  table-layout: auto;
}

.c-49-table thead {
  background: #f9f9f9;
}

.c-49-table th {
  text-align: left;
  padding: 12px 24px;
  font-weight: 700;
  color: var(--text-1);
  border-bottom: 1px solid #e6e6e6;
  white-space: nowrap;
}

.c-49-table td {
  padding: 12px 24px;
  border-bottom: 1px solid #e6e6e6;
  font-weight: 300;
  color: var(--text-2);
  vertical-align: top;
}

.c-49-table tbody tr:hover {
  background: #fcfcfc;
}

.c-49-table td:first-child,
.c-49-table th:first-child {
  white-space: normal;
  word-break: break-word;
}

.c-49-table th:nth-child(2),
.c-49-table td:nth-child(2) {
  width: clamp(88px, 22vw, 140px);
}

.c-49-table th:nth-child(3),
.c-49-table td:nth-child(3) {
  width: clamp(72px, 18vw, 108px);
  text-align: left;
}

.c-49-table tbody td:nth-child(2) {
  background: color-mix(in srgb, var(--sfs-light-red) 55%, transparent);
  color: var(--sfs-red);
}

.c-49-table tbody tr:hover td:nth-child(2) {
  background: color-mix(in srgb, var(--sfs-light-red) 70%, transparent);
}

.c-49-unit {
  color: var(--sfs-red);
  white-space: nowrap;
}

.c-49-summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(235, 60, 36, 0.14);
}

.c-49-summary:hover {
  background: #fff;
}

@media (max-width: 900px) {
  .c-49-summary {
    padding: 22px 14px;
  }

  .c-49-title {
    font-size: 17px;
  }

  .c-49-panel {
    padding: 14px;
  }

  .c-49-table th,
  .c-49-table td {
    padding: 10px 16px;
    font-size: 13.5px;
  }

  .c-49-table th:nth-child(2),
  .c-49-table td:nth-child(2) {
    width: clamp(84px, 24vw, 124px);
  }

  .c-49-table th:nth-child(3),
  .c-49-table td:nth-child(3) {
    width: clamp(64px, 20vw, 96px);
  }
}

@media (max-width: 640px) {
  .c-49-summary {
    padding: 18px 12px;
  }

  .c-49-title {
    font-size: 16px;
  }

  .c-49-panel {
    padding: 8px;
  }

  .c-49-table th,
  .c-49-table td {
    padding: 9px 12px;
    font-size: 13px;
  }

  .c-49-table th:nth-child(2),
  .c-49-table td:nth-child(2) {
    width: clamp(45px, 15vw, 112px);
  }

  .c-49-table th:nth-child(3),
  .c-49-table td:nth-child(3) {
    width: clamp(55px, 20vw, 88px);
  }
}

@media (max-width: 480px) {

  .c-49-table th,
  .c-49-table td {
    padding: 12px 8px;
    font-size: 12px;
  }

  .c-49-title {
    font-size: 15px;
  }
}



/* ========================= 50 — Component Info Table  ========================= */
.sfs-app-ex-50 {
  width: 100%;
}

.c-50-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e6e6e6;
  box-shadow: var(--shadow-base);
}

.c-50-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--text-1);
  min-width: 720px;
  table-layout: auto;
}

.c-50-table thead {
  background: #f9f9f9;
}

.c-50-table th {
  text-align: left;
  padding: 12px 20px;
  font-weight: 700;
  color: var(--text-1);
  border-bottom: 1px solid #e6e6e6;
  white-space: nowrap;
}

.c-50-table td {
  padding: 14px 20px;
  border-bottom: 1px solid #efefef;
  font-weight: 300;
  color: var(--text-2);
  vertical-align: middle;
}

.c-50-table tbody tr:hover {
  background: #fcfcfc;
}

.c-50-epd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  color: var(--sfs-red);
  border: 1.5px solid var(--sfs-red);
  font-weight: 300;
  line-height: 1;
  white-space: nowrap;
  transition: box-shadow 0.25s ease, transform 0.06s ease;
}

.c-50-epd-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14);
}

@media (max-width: 900px) {
  .c-50-table {
    font-size: 13.5px;
  }

  .c-50-table th,
  .c-50-table td {
    padding: 10px 16px;
  }
}

@media (max-width: 640px) {
  .c-50-table {
    font-size: 13px;
  }

  .c-50-table th,
  .c-50-table td {
    padding: 9px 12px;
  }

  .c-50-table {
    min-width: 760px;
  }
}

@media (max-width: 480px) {

  .c-50-table th,
  .c-50-table td {
    padding: 8px 10px;
    font-size: 12.5px;
  }

  .c-50-table {
    min-width: 800px;
  }
}




/* ========================= 51 — Panel Jobs Interface ========================= */
.sfs-app-ex-51 {
  width: 100%;
}

.c-51-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.c-51-search {
  position: relative;
  width: min(100%, 574px);
}

.c-51-search input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #333;
  padding: 11px 36px 11px 12px;
  font-size: 14px;
  font-weight: 300;
  color: #333;
  background: transparent;
}

.c-51-search input::placeholder {
  color: #b0b0b0;
}

.c-51-search input:focus {
  outline: none;
  border-bottom: 2px solid var(--sfs-red);
}

.c-51-search-ico {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  line-height: 0;
  color: #555;
}

.c-51-search:focus-within .c-51-search-ico {
  color: var(--sfs-red);
}

.c-51-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.c-51-select {
  position: relative;
  width: 180px;
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid #e6e6e6;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.c-51-select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 28px 10px 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
  cursor: pointer;
}

.c-51-select:hover {
  border-color: #333;
}

.c-51-select:hover select {
  color: var(--text-1);
}

.c-51-select:hover .c-51-caret {
  color: #333;
}

.c-51-select:focus-within {
  border-color: var(--sfs-red);
}

.c-51-select:focus-within select {
  color: var(--text-1);
}

.c-51-select:focus-within .c-51-caret {
  color: var(--sfs-red);
}

.c-51-select select:focus,
.c-51-select select:focus-visible {
  outline: none;
}

.c-51-select select::-ms-expand {
  display: none;
}

.c-51-caret {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: #dbdbdb;
  pointer-events: none;
}

.c-51-icon-square {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #e6e6e6;
  background: #fff;
  cursor: pointer;
  flex: 0 0 40px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
  color: #323232;
}

.c-51-icon-square:hover {
  background: #fcfcfc;
  border-color: #9a9a9a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-51-icon-square:active {
  background: #f0f0f0;
  border-color: #777;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06) inset;
}

.c-51-icon-square:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(235, 60, 36, .14), 0 4px 12px rgba(0, 0, 0, .08);
  border-color: var(--sfs-red);
}

.c-51-new {
  padding: 11px 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.c-51-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e6e6e6;
}

.c-51-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 920px;
}

.c-51-table thead {
  background: #f9f9f9;
}

.c-51-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 1px solid #e6e6e6;
  white-space: nowrap;
}

.c-51-table td {
  padding: 16px 16px;
  border-bottom: 1px solid #efefef;
  font-weight: 300;
  color: var(--text-2);
  vertical-align: middle;
}

.c-51-table tbody tr:hover {
  background: #fcfcfc;
}

.c-51-job-name {
  font-weight: 300;
  color: var(--text-1);
}

.c-51-job-id {
  font-size: 12px;
  color: #9aa1a6;
  margin-top: 4px;
}

.c-51-app-tag {
  display: inline-block;
  padding: 8px 12px;
  background: var(--sfs-teal);
  color: #fff;
  font-weight: 300;
  font-size: 13px;
}

.c-51-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.c-51-ico-btn {
  --btn-bg: #fff;
  --btn-color: #333;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-color);
  box-sizing: border-box;
  transition: box-shadow .18s ease, transform .06s ease, filter .12s ease;
  cursor: pointer;
}

.c-51-ico-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.c-51-ico-btn:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  filter: brightness(1.02);
}

.c-51-ico-btn:active {
  transform: translateY(1px);
}

.c-51-ico-btn--view {
  --btn-bg: var(--sfs-light-teal);
  --btn-color: var(--sfs-teal);
}

.c-51-ico-btn--edit {
  --btn-bg: var(--sfs-sand-light);
  --btn-color: var(--sfs-sand);
}

.c-51-ico-btn--del {
  --btn-bg: var(--sfs-light-red);
  --btn-color: var(--sfs-red);
}

@media (max-width: 960px) {
  .c-51-toolbar {
    gap: 12px;
  }

  .c-51-select {
    width: 160px;
  }
}

@media (max-width: 720px) {
  .c-51-toolbar {
    gap: 8px;
  }

  .c-51-search {
    width: 100%;
    max-width: none;
  }

  .c-51-filters {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 8px;
    align-items: center;
    width: 100%;
  }

  .c-51-select {
    width: 100%;
    grid-column: 1 / -1;
  }

  .c-51-icon-square {
    grid-column: 1;
    flex: 0 0 40px;
  }

  .c-51-new {
    grid-column: 2;
    width: 100%;
    text-align: center;
    flex: 1 1 auto;
  }
}

@media (max-width: 560px) {

  .c-51-table th,
  .c-51-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .c-51-search {
    width: 100%;
  }
}





/* ========================= 52 — Cutting Jobs Interface ========================= */
.sfs-app-ex-52 {
  width: 100%;
}

.c-52-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
}

.c-52-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px;
}

.c-52-title {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-1);
}

.c-52-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-52-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  border: 1px solid transparent;
  background: #fff;
  color: var(--text-1);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease, filter .12s ease;
}

.c-52-btn svg {
  display: block;
}

.c-52-btn--outline {
  background: #fff;
  border: 1px solid var(--text-1);
  color: var(--text-1);
}

.c-52-btn--outline:hover {
  background: #fcfcfc;
  border-color: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-52-btn--outline:active {
  background: #f0f0f0;
  border-color: #111;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06) inset;
}

.c-52-btn--primary {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
  padding: 11px 32px;
}

.c-52-btn--primary:hover {
  filter: brightness(.95);
}

.c-52-btn--primary:active {
  background: #c52a18;
  border-color: #c52a18;
  transform: translateY(1px);
}

.c-52-divider {
  height: 1px;
  background: var(--border);
}

.c-52-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.c-52-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 760px;
}

.c-52-table thead {
  background: #f9f9f9;
}

.c-52-table th {
  text-align: left;
  padding: 12px 24px;
  font-weight: 700;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.c-52-empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 24px 56px;
  color: var(--text-1);
}

.c-52-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}

.c-52-empty-text {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-4);
  margin-bottom: 12px;
}

.c-52-empty-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.c-52-icon-square {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #e6e6e6;
  background: #fff;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease, color .15s ease;
  color: #323232;
}

.c-52-icon-square:hover {
  background: #fcfcfc;
  border-color: #9a9a9a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-52-icon-square:active {
  background: #f0f0f0;
  border-color: #777;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06) inset;
}

.c-52-icon-square:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(235, 60, 36, .14), 0 4px 12px rgba(0, 0, 0, .08);
  border-color: var(--sfs-red);
}

@media (max-width: 820px) {
  .c-52-head {
    padding: 14px 16px;
  }

  .c-52-title {
    font-size: 20px;
  }

  .c-52-actions {
    gap: 8px;
  }

  .c-52-btn {
    padding: 9px 14px;
    font-size: 13.5px;
  }

  .c-52-table th {
    padding: 10px 16px;
  }
}

@media (max-width: 560px) {
  .c-52-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .c-52-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .c-52-btn--primary {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .c-52-empty {
    padding: 32px 16px 40px;
  }

  .c-52-empty-actions {
    gap: 10px;
  }
}




/* ========================= 53 — Thermal Builder ========================= */
.sfs-app-ex-53 {
  width: 100%;
}

.c-53-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
}

.c-53-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
}

.c-53-title {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-1);
}

.c-53-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-53-col--drag {
  width: 40px;
}

.c-53-table th:first-child,
.c-53-table td:first-child {
  width: 40px;
  padding-left: 16px;
  padding-right: 8px;
}

.c-53-drag {
  text-align: center;
  cursor: grab;
}

.c-53-drag svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto;
  pointer-events: none;
}

.c-53-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  border: 1px solid transparent;
  background: #fff;
  color: var(--text-1);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease, filter .12s ease;
}

.c-53-btn svg {
  display: block;
}

.c-53-btn--outline {
  background: #fff;
  border: 1px solid var(--text-1);
  color: var(--text-1);
}

.c-53-btn--outline:hover {
  background: #fcfcfc;
  border-color: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-53-btn--outline:active {
  background: #f0f0f0;
  border-color: #111;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06) inset;
}

.c-53-btn--primary {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
}

.c-53-btn--primary:hover {
  filter: brightness(.95);
}

.c-53-btn--primary:active {
  background: #c52a18;
  border-color: #c52a18;
  transform: translateY(1px);
}

.c-53-btn--danger {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
}

.c-53-btn--danger:hover {
  filter: brightness(0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-53-btn--danger:active {
  background: #c52a18;
  border-color: #c52a18;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06) inset;
}

.c-53-rule {
  height: 1px;
  background: var(--border);
  margin-top: 0;
}

.c-53-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.c-53-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 920px;
}

.c-53-table thead {
  background: #f9f9f9;
}

.c-53-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}


.c-53-compact .c-16-caret {
  right: 10px;
  top: 50%;
  transform: translateY(-100%);
}

.c-53-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #efefef;
  vertical-align: middle;
  background: #fff;
}

.c-53-table tbody tr:hover {
  background: #fcfcfc;
}

.c-53-drag {
  width: 20px;
  text-align: center;
  cursor: grab;
}

.c-53-drag:active {
  cursor: grabbing;
}

.c-53-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.c-53-check {
  gap: 8px;
}

.c-53-ico-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #dcdcdc;
  color: #333;
  transition: box-shadow .18s ease, transform .06s ease, background .15s ease, border-color .15s ease;
}

.c-53-ico-btn svg {
  width: 16px;
  height: 16px;
}

.c-53-ico-btn {
  color: #333;
}

.c-53-ico-btn--primary {
  color: #fff;
}

.c-53-ico-btn--duplicate svg {
  width: 30px;
  height: 30px;
}

.c-53-ico-btn:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  border-color: #333;
}

.c-53-ico-btn:active {
  transform: translateY(1px);
}

.c-53-ico-btn--primary {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
}

.c-53-tip {
  font-size: 12px;
  color: var(--text-4);
  padding: 24px;
}

.c-53-tip strong {
  font-weight: 700;
  color: var(--text-2);
}

.c-53-compact .c-19-input,
.c-53-compact .c-18-input,
.c-53-compact .c-16-select {
  min-height: 36px;
  font-size: 13px;
}

.c-53-compact .c-16-select {
  padding: 0 32px 0 10px;
}

.c-53-compact .c-16-caret {
  right: 10px;
}

.c-53-in {
  min-width: 0;
  display: block;
}

.c-53-in--mini .c-16-select {
  width: 88px;
}

.c-53-check .c-24-input {
  width: 16px;
  height: 16px;
}

.c-53-check .c-24-text {
  font-size: 13px;
}

@media (max-width: 860px) {
  .c-53-head {
    padding: 16px;
  }

  .c-53-title {
    font-size: 20px;
  }

  .c-53-actions {
    gap: 8px;
  }

  .c-53-btn {
    padding: 9px 14px;
    font-size: 13.5px;
  }

  .c-53-table th {
    padding: 10px 12px;
  }

  .c-53-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 560px) {
  .c-53-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .c-53-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .c-53-btn--primary {
    grid-column: 1 / -1;
    justify-content: center;
  }
}



/* ========================= 54 — System Visualisations ========================= */
.sfs-app-ex-54 {
  width: 100%;
}

.c-54-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
}

.c-54-head {
  padding: 24px 24px 0;
}

.c-54-title {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-1);
}

.c-54-rule {
  height: 2px;
  background: var(--sfs-red);
  margin-top: 8px;
}

.c-54-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 16px 24px 0;
  flex-direction: row;
  justify-content: space-between;
}

.c-54-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  min-height: 40px;
  border: 1px solid var(--text-1);
  background: #fff;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease, filter .12s ease;
}

.c-54-tab:hover {
  background: #fcfcfc;
  border-color: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-54-tab:active {
  transform: translateY(1px);
  background: #f0f0f0;
}

.c-54-tab[aria-selected="true"] {
  border-color: var(--sfs-red);
  color: var(--sfs-red);
}

.c-54-stage {
  margin: 16px 24px 24px;
  background: #f9f9f9;
  border: 2px dashed #e6e6e6;
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 32px;
}

.c-54-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.c-54-empty-ico {
  display: inline-flex;
}

.c-54-empty-text {
  font-size: 14px;
  color: var(--text-3);
}

@media (max-width: 860px) {
  .c-54-head {
    padding: 16px 16px 0;
  }

  .c-54-tabs {
    padding: 12px 16px 0;
    gap: 12px;
  }

  .c-54-stage {
    margin: 12px 16px 16px;
    padding: 24px;
    min-height: 260px;
  }

  .c-54-title {
    font-size: 20px;
  }
}

@media (max-width: 520px) {
  .c-54-tab {
    flex: 1 1 calc(50% - 6px);
  }

  .c-54-tabs {
    flex-wrap: wrap;
  }
}




/* ========================= 55 — Map Overview ========================= */
.sfs-app-ex-55 {
  width: 100%;
}

.c-55-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  overflow: hidden;
}

.c-55-map-wrap {
  position: relative;
  overflow: hidden;
  background: #eee;
}

.c-55-map {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  max-height: 560px;
}

.c-55-pagetitle {
  position: absolute;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: var(--text-1);
  font-weight: 700;
  font-size: clamp(14px, 1.8vw, 16px);
  padding: 11px 48px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
  border-left: 4px solid var(--sfs-red);
}

.c-55-pagetitle-text {
  line-height: 1;
}

.c-55-actions {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  gap: 12px;
}

.c-55-act--secondary,
.c-55-act--primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 168px;
  justify-content: flex-start;
  padding: 10px 16px;
  font-weight: 300;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: box-shadow .18s ease, transform .06s ease, background .18s ease, border-color .18s ease, filter .12s ease;
}

.c-55-act--secondary {
  background: #fff;
  color: var(--text-1);
  border: none;
}

.c-55-act--secondary:hover {
  filter: brightness(.98);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .10);
}

.c-55-act--secondary:active {
  transform: translateY(1px);
}

.c-55-act--primary {
  background: var(--sfs-teal);
  border: 1px solid var(--sfs-teal);
  color: #fff;
}

.c-55-act--primary:hover {
  filter: brightness(.96);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .10);
}

.c-55-act--primary:active {
  transform: translateY(1px);
}

.c-55-pin-card {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: min(420px, calc(100% - 48px));
  box-shadow: 0 16px 36px rgba(0, 0, 0, .20);
  border: 2px solid var(--sfs-red);
}

.c-55-pin-card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border-width: 10px 10px 0 10px;
  border-style: solid;
  border-color: var(--sfs-red) transparent transparent transparent;
}

.c-55-pin-card::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  transform: translateX(-50%);
  border-width: 9px 9px 0 9px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

.c-55-pin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 16px 4px;
}

.c-55-pin-title {
  font-weight: 700;
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.25;
}

.c-55-pin-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--text-2);
  cursor: pointer;
}

.c-55-pin-close:hover {
  background: #f6f6f6;
}

.c-55-pin-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  padding: 10px 16px 16px;
  align-items: center;
}

.c-55-pin-label {
  color: var(--text-3);
  font-size: 14px;
}

.c-55-pin-value {
  color: var(--text-1);
  font-weight: 700;
  font-size: 14px;
}

.c-55-pin-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  pointer-events: none;
  z-index: 2;
}

.c-55-pin-marker svg {
  display: block;
  width: 100%;
  height: auto;
}

.c-55-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 16px);
  padding: clamp(20px, 2.5vw, 24px);
  border-top: 1px solid var(--border);
}

.c-55-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  width: auto;
  max-width: 100%;
}

.c-55-meta-item {
  display: grid;
  gap: clamp(6px, 1.2vw, 8px);
  position: relative;
}

.c-55-meta-item+.c-55-meta-item {
  padding-left: clamp(12px, 1.8vw, 24px);
}

.c-55-meta-item+.c-55-meta-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.c-55-meta-label {
  color: var(--text-3);
  font-size: clamp(11px, 1.5vw, 12px);
  font-weight: 300;
  letter-spacing: .01em;
}

.c-55-meta-value {
  color: var(--text-1);
  font-weight: 700;
  font-size: clamp(14px, 2vw, 16px);
}

.c-55-edit {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: clamp(10px, 1.6vw, 12px) clamp(24px, 3vw, 32px);
  background: var(--sfs-red);
  color: #fff;
  border: 1px solid var(--sfs-red);
  font-weight: 700;
  font-size: clamp(13px, 1.8vw, 14px);
  line-height: 1;
  cursor: pointer;
  transition: filter .12s ease, transform .06s ease, box-shadow .18s ease;
}

.c-55-edit:hover {
  filter: brightness(.96);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .10);
}

.c-55-edit:active {
  transform: translateY(1px);
}

.c-55-act--secondary:focus-visible,
.c-55-act--primary:focus-visible,
.c-55-edit:focus-visible,
.c-55-pin-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(235, 60, 36, .16), 0 8px 22px rgba(0, 0, 0, .10);
  border-color: var(--sfs-red);
}

@media (prefers-reduced-motion: reduce) {

  .c-55-act--secondary,
  .c-55-act--primary,
  .c-55-edit {
    transition: none;
  }
}

@media (max-width: 1180px) {
  .c-55-map {
    max-height: 520px;
  }
}

@media (max-width: 1020px) {
  .c-55-pin-card {
    top: 46%;
  }

  .c-55-footer {
    gap: clamp(8px, 2vw, 12px);
  }

  .c-55-meta {
    gap: clamp(8px, 2vw, 16px);
  }

  .c-55-meta-item+.c-55-meta-item {
    padding-left: clamp(8px, 1.6vw, 16px);
  }
}

@media (max-width: 900px) and (min-width: 769px) {
  .c-55-pin-card {
    width: min(312px, calc(100% - 48px));
  }

  .c-55-pin-head {
    padding: 12px 12px 4px;
  }

  .c-55-pin-row {
    padding: 0 12px 12px;
    margin-top: 8px;
    gap: 8px 8px;
  }
}

@media (max-width: 820px) {
  .c-55-map {
    max-height: 480px;
  }

  .c-55-pagetitle {
    top: 16px;
    left: 16px;
    padding: 12px 18px;
  }

  .c-55-actions {
    right: 16px;
    top: 16px;
    gap: 10px;
  }

  .c-55-act--secondary,
  .c-55-act--primary {
    min-width: 156px;
  }
}

@media (max-width: 768px) {
  .c-55-card {
    padding: 16px;
  }

  .c-55-map-wrap {
    margin-top: 0;
    background: #fff;
    padding-top: 51px;
  }

  .c-55-pagetitle {
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    background: #fff;
    border-left: 0;
    box-shadow: none;
    font-size: 18px;
  }

  .c-55-pagetitle::after {
    content: attr(data-project-title);
    font-size: 12px;
    font-weight: 400;
    color: var(--text-4);
    margin-left: auto;
  }

  .c-55-map {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    max-height: none;
    object-fit: cover;
  }

  .c-55-pin-card {
    display: none;
  }

  .c-55-pin-marker {
    display: block;
    width: clamp(48px, 12vw, 64px);
    height: auto;
  }

  .c-55-pin-marker svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  }

  .c-55-actions {
    top: 59px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .c-55-act--secondary,
  .c-55-act--primary {
    min-width: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }

  .c-55-act--secondary span,
  .c-55-act--primary span {
    display: none;
  }

  .c-55-footer {
    padding: 24px 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    border-top: 1px solid var(--border);
  }

  .c-55-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 16px;
  }

  .c-55-meta-item {
    gap: 4px;
  }

  .c-55-meta-item+.c-55-meta-item {
    padding-left: 0;
  }

  .c-55-meta-item+.c-55-meta-item::before {
    display: none;
  }

  .c-55-meta-item:nth-child(1) {
    grid-column: 1 / -1;
  }

  .c-55-meta-item:nth-child(3) {
    text-align: right;
  }

  .c-55-meta-item:nth-child(3) .c-55-meta-label,
  .c-55-meta-item:nth-child(3) .c-55-meta-value {
    justify-self: end;
  }

  .c-55-edit {
    width: 100%;
    font-size: 13px;
    padding: 12px 0;
  }
}

@media (max-width: 620px) {
  .c-55-actions {
    gap: 6px;
  }

  .c-55-act--secondary,
  .c-55-act--primary {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 370px) {
  .c-55-pagetitle {
    font-size: 16px;
    top: 0;
  }

  .c-55-map-wrap {
    padding-top: 27px;
  }

  .c-55-pagetitle::after {
    content: "";
  }

  .c-55-actions {
    top: 35px;
    right: 8px;
    gap: 4px;
  }

  .c-55-act--secondary,
  .c-55-act--primary {
    width: 24px;
    height: 24px;
  }

  .c-55-pin-marker {
    width: clamp(32px, 10vw, 44px);
  }
}





/* ========================= 56 — BIM/CAD Sidebar ::: Uses Script ::: ========================= */

.sfs-app-ex-56 {
  width: 100%;
  max-width: 25%;
  display: flex;
  flex-direction: column;
}

.c-56-primary-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.c-56-title {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text-1);
}

.c-56-title-rule {
  margin-top: 8px;
  height: 1px;
  background: var(--sfs-red);
}

.c-56-intro {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-4);
}

.c-56-section {
  margin-top: 24px;
}

.c-56-section-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--text-1);
  text-transform: none;
}

.c-56-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.c-56-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-56-list-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.c-56-list-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.c-56-list-text {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-2);
}

.c-56-divider {
  margin-top: 16px;
  height: 1px;
  background: var(--border);
}

.c-56-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-56-actions .sfs-btn {
  width: 100%;
}

.c-56-metrics {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  width: 100%;
}

.c-56-metric-card {
  flex: 1 1 0;
  height: 115px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.c-56-metric-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-1);
}

.c-56-metric-rule {
  margin-top: 4px;
  height: 1px;
  width: 100%;
  background: var(--sfs-red);
}

.c-56-metric-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-56-metric-value {
  font-size: 30px;
  line-height: 1;
  font-weight: 300;
  color: var(--text-1);
}

.c-56-toggle {
  display: none;
}

.c-56-overlay {
  display: none;
}

.c-56-mobile-hint {
  display: none;
  margin-top: 32px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-4);
  font-weight: 300;
}


@media (max-width: 1020px) {
  .sfs-app-ex-56 {
    position: relative;
    max-width: 100%;
  }

  .c-56-mobile-hint {
    display: block;
  }

  .c-56-shell {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, 90vw);
    max-width: 360px;
    transform: translateX(calc(-100% - 8px));
    transition: transform 0.26s cubic-bezier(.2, .7, .3, 1);
    z-index: 60;
    pointer-events: none;
    display: flex;
    flex-direction: column;
  }

  .c-56-shell.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .c-56-panel {
    position: relative;
    z-index: 2;
    height: 100%;
    overflow-y: auto;
    background: #fff;
  }

  .c-56-toggle {
    position: absolute;
    right: -53px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px 16px 40px;
    min-width: 72px;
    background: #fff;
    border-radius: 0 8px 8px 0;
    border: 1px solid #d7d7d7;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-1);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
  }

  .c-56-toggle-ico {
    font-size: 14px;
    line-height: 1;
    margin-bottom: 4px;
    transition: transform 0.25s ease;
  }

  .c-56-toggle-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .c-56-shell.c-56-shell--active .c-56-toggle {
    opacity: 1;
    pointer-events: auto;
  }

  .c-56-shell.is-open .c-56-toggle-ico {
    transform: rotate(180deg);
  }

  .c-56-shell.is-open .c-56-toggle {
    opacity: 0;
    pointer-events: none;
  }

  .c-56-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 50;
    display: block;
  }

  .c-56-shell.is-open+.c-56-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .sfs-app-ex-56 .c-56-primary-card {
    border: 0;
    box-shadow: none;
    border-bottom: 1px solid #e6e6e6;
    border-radius: 0;
  }

  .sfs-app-ex-56 .c-56-metrics {
    margin-top: 0;
    padding: 16px 16px 24px;
    background: #fff;
    border: 0;
    box-shadow: none;
  }

  .sfs-app-ex-56 .c-56-metric-card {
    border: 0;
    box-shadow: none;
    height: 120px;
  }
}


@media (max-width: 400px) {
  .sfs-app-ex-56 {
    max-width: 100%;
  }
}




/* ========================= 57 — Calculation Sidebar ::: Uses Script ::: ========================= */

.sfs-app-ex-57 {
  width: 100%;
  max-width: 25%;
  display: flex;
  flex-direction: column;
}

.c-57-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 20px 16px;
}

.c-57-card+.c-57-card {
  margin-top: 16px;
}

.c-57-head {
  margin-bottom: 12px;
}

.c-57-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text-1);
}

.c-57-title-rule {
  margin-top: 8px;
  height: 1px;
  background: var(--sfs-red);
}

.c-57-summary-list {
  margin: 0;
  padding: 0;
}

.c-57-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.c-57-summary-row:last-child {
  border-bottom: 0;
}

.c-57-summary-row dt,
.c-57-summary-row dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.c-57-summary-row dt {
  color: var(--text-3);
  font-weight: 400;
}

.c-57-summary-row dd {
  color: var(--text-1);
  font-weight: 700;
}

.c-57-vars-list {
  margin: 0;
  padding: 0;
}

.c-57-vars-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.c-57-vars-row dt,
.c-57-vars-row dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.c-57-vars-row dt {
  color: var(--text-3);
  font-weight: 400;
}

.c-57-vars-row dd {
  color: var(--text-1);
  font-weight: 400;
}

.c-57-standards-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.c-57-standard-code {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.c-57-standard-desc {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-3);
}

.c-57-card--actions .c-57-head {
  margin-bottom: 16px;
}

.c-57-actions {
  display: flex;
  gap: 8px;
}

.c-57-actions .sfs-btn {
  flex: 1 1 0;
}

.c-57-toggle {
  display: none;
}

.c-57-overlay {
  display: none;
}

.c-57-mobile-hint {
  display: none;
  margin-top: 32px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-4);
}

@media (max-width: 1020px) {
  .sfs-app-ex-57 {
    position: relative;
    max-width: 100%;
  }

  .c-57-mobile-hint {
    display: block;
  }

  .c-57-shell {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, 90vw);
    max-width: 360px;
    transform: translateX(calc(-100% - 8px));
    transition: transform 0.26s cubic-bezier(.2, .7, .3, 1);
    z-index: 60;
    pointer-events: none;
    display: flex;
    flex-direction: column;
  }

  .c-57-shell.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .c-57-panel {
    position: relative;
    z-index: 2;
    height: 100%;
    overflow-y: auto;
    background: #fff;
  }

  .c-57-toggle {
    position: absolute;
    right: -62px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px 16px 40px;
    min-width: 72px;
    background: #fff;
    border-radius: 0 8px 8px 0;
    border: 1px solid #d7d7d7;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-1);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
  }

  .c-57-toggle-ico {
    font-size: 14px;
    line-height: 1;
    margin-bottom: 4px;
    transition: transform 0.25s ease;
  }

  .c-57-toggle-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .c-57-shell.c-57-shell--active .c-57-toggle {
    opacity: 1;
    pointer-events: auto;
  }

  .c-57-shell.is-open .c-57-toggle-ico {
    transform: rotate(180deg);
  }

  .c-57-shell.is-open .c-57-toggle {
    opacity: 0;
    pointer-events: none;
  }

  .c-57-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 50;
    display: block;
  }

  .c-57-shell.is-open+.c-57-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .c-57-card {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 20px 16px;
  }

  .c-57-card+.c-57-card {
    margin-top: 0;
    border-top: 1px solid #e6e6e6;
  }
}

@media (max-width: 400px) {
  .sfs-app-ex-57 {
    max-width: 100%;
  }
}





/* ========================= 58 — Interactive Controls Sidebar ::: Uses Script ::: ========================= */

.sfs-app-ex-58 {
  width: 100%;
  max-width: 25%;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.c-58-shell {
  display: flex;
  flex-direction: column;
}

.c-58-panel {
  background: var(--bg-1);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.c-58-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.c-58-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
  padding: 20px 16px 24px;
}

.c-58-head {
  margin-bottom: 16px;
}

.c-58-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.c-58-title-rule {
  margin-top: 4px;
  height: 1px;
  background: var(--sfs-red);
}

.c-58-subtitle,
.c-58-field-label,
.c-58-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-1);
  width: 100%;
}

.c-58-subtitle {
  margin: 0 0 8px;
}

.c-58-help {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-4);
  line-height: 1.5;
  text-align: justify;
}

.c-58-actions-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
}

.c-58-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  background: #fff;
  color: var(--text-1);
  cursor: pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .05s ease,
    filter .12s ease;
}

.c-58-btn-ico {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.c-58-btn-ico svg {
  width: 85%;
  height: 100%;
  fill: currentColor;
}

.c-58-btn--secondary {
  border-color: #333;
  background: #fff;
  color: #000;
  width: 100%;
}

.c-58-btn--secondary:hover {
  background: #fcfcfc;
  border-color: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-58-btn--secondary:active {
  background: #f9f9f9;
  border-color: #111;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06) inset;
}

.c-58-btn--primary {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
}

.c-58-btn--primary:hover {
  filter: brightness(.96);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.c-58-btn--primary:active {
  background: #c52a18;
  border-color: #c52a18;
  transform: translateY(1px);
}

.c-58-btn--full {
  width: 100%;
  justify-content: center;
}

.c-58-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.c-58-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.c-58-row--direction {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.c-58-stepper {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.c-58-stepper-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #e6e6e6;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease,
    box-shadow .15s ease,
    transform .05s ease;
}

.c-58-stepper-btn:hover {
  border-color: #333333;
}

.c-58-stepper-btn:focus-visible {
  outline: none;
  border-color: var(--sfs-red);
  box-shadow: 0 0 0 2px rgba(235, 60, 36, 0.18);
}

.c-58-stepper-btn:active {
  background: var(--sfs-light-red);
  border-color: var(--sfs-red);
  color: var(--sfs-red);
  transform: translateY(1px);
}

.c-58-stepper-value {
  min-width: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
}

.c-58-row--spacing {
  align-items: center;
}

.c-58-spacing {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-58-spacing .c-18-wrap {
  min-width: 96px;
}

.c-58-spacing .c-18-input {
  text-align: center;
}

.c-58-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-3);
}

.c-58-input {
  min-height: 40px;
}

.c-58-direction {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
}

.c-58-dir-btn {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e6e6e6;
  background: #fff;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-2);
  text-align: center;
  cursor: pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    font-weight .15s ease;
}

.c-58-dir-btn.is-active {
  border-color: var(--sfs-red);
  background: var(--sfs-light-red);
  color: var(--sfs-red);
  font-weight: 300;
}

.c-58-rail-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.c-58-rail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
}

.c-58-rail-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.c-58-rail-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.c-58-rail-meta {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-4);
}

.c-58-card--autospace .c-58-btn--primary.c-58-btn--full {
  margin-top: 24px;
}

.c-58-card--validation .c-58-help {
  margin-top: 12px;
}

.c-58-legend {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-58-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-58-legend-swatch {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.c-58-legend-swatch--fixed {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
}

.c-58-legend-swatch--sliding {
  background: #fff;
}

.c-58-legend-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-1);
}

.c-58-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.c-58-check {
  gap: 4px;
  padding: 8px;
}

.c-58-toggle {
  display: none;
}

.c-58-overlay {
  display: none;
}

@media (max-width: 1020px) {
  .sfs-app-ex-58 {
    max-width: 100%;
    position: relative;
  }

  .c-58-shell {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, 90vw);
    max-width: 360px;
    transform: translateX(calc(-100% - 8px));
    transition: transform 0.26s cubic-bezier(.2, .7, .3, 1);
    z-index: 60;
    pointer-events: none;
    display: flex;
    flex-direction: column;
  }

  .c-58-shell.c-58-shell--active .c-58-toggle {
    opacity: 1;
    pointer-events: auto;
  }

  .c-58-shell.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .c-58-panel {
    height: 100%;
    overflow-y: auto;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: #fff;
  }

  .c-58-stack {
    padding: 0;
  }

  .c-58-card {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 20px 16px 24px;
  }

  .c-58-card+.c-58-card {
    border-top: 1px solid #e6e6e6;
  }

  .c-58-toggle {
    position: absolute;
    right: -53px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px 16px 40px;
    min-width: 72px;
    background: #fff;
    border-radius: 0 8px 8px 0;
    border: 1px solid #d7d7d7;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-1);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
  }

  .c-58-toggle-ico {
    font-size: 14px;
    line-height: 1;
    margin-bottom: 4px;
    transition: transform 0.25s ease;
  }

  .c-58-shell.is-open .c-58-toggle-ico {
    transform: rotate(180deg);
  }

  .c-58-shell.is-open .c-58-toggle {
    opacity: 0;
    pointer-events: none;
  }

  .c-58-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 50;
    display: block;
  }

  .c-58-shell.is-open+.c-58-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .c-58-mobile-hint {
    display: block;
    margin-top: 32px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-4);
    font-weight: 300;
  }
}

@media (min-width: 1021px) {
  .c-58-mobile-hint {
    display: none;
  }
}





/* ========================= 59 — Login Interface ========================= */

.sfs-app-ex-59 {
  width: 100%;
  max-width: 500px;
  padding: 16px 16px 24px;
  font-size: 14px;
}

.c-59-inner {
  width: 100%;
}

.c-59-logo-wrap {
  text-align: center;
  margin-bottom: 48px;
}

.c-59-logo {
  width: 300px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 12px;
}

.c-59-intro {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-5);
}

.c-59-fields {
  margin-bottom: 16px;
}

.c-59-field-group {
  margin-bottom: 16px;
}

.c-59-label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
}

.c-59-field-group:last-child {
  margin-bottom: 0;
}

.c-59-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.c-59-remember .c-24-text {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-3);
}

.c-59-remember {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.c-59-forgot {
  font-size: 13px;
  font-weight: 300;
  color: var(--sfs-red);
  cursor: pointer;
  text-decoration: none;
}

.c-59-forgot:hover {
  text-decoration: underline;
}

.c-59-login {
  margin-bottom: 32px;
}

.c-59-login-btn {
  width: 100%;
  justify-content: center;
}

.c-59-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.c-59-divider-line {
  flex: 1 1 0;
  height: 1px;
  background: #e6e6e6;
}

.c-59-divider-text {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
  white-space: nowrap;
}

.c-59-guest {
  margin-bottom: 12px;
}

.c-59-guest-btn {
  width: 100%;
  justify-content: center;
}

.c-59-guest-icon {
  display: inline-flex;
  margin-right: 8px;
}

.c-59-footer {
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-5);
}

.c-59-register {
  color: #eb3c24;
  text-decoration: none;
  cursor: pointer;
}

.c-59-register:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .sfs-app-ex-59 {
    padding: 12px 12px 20px;
  }

  .c-59-logo-wrap {
    margin-bottom: 40px;
  }

  .c-59-intro {
    font-size: 13px;
  }

  .c-59-fields {
    margin-bottom: 12px;
  }

  .c-59-field-group {
    margin-bottom: 12px;
  }

  .c-59-label {
    font-size: 13px;
  }

  .c-59-remember-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
  }

  .c-59-remember .c-24-text,
  .c-59-forgot {
    font-size: 12px;
  }

  .c-59-login {
    margin-bottom: 24px;
  }

  .c-59-divider {
    margin-bottom: 20px;
    gap: 12px;
  }

  .c-59-divider-text {
    font-size: 13px;
  }

  .c-59-guest {
    margin-bottom: 10px;
  }

  .c-59-footer {
    font-size: 12px;
  }
}




/* ========================= Component 60 – Downloads Bar ::: Uses Script x2 ::: ========================= */
.sfs-app-ex-60 {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  pointer-events: none;
  font-family: inherit;
}

.c-60-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  pointer-events: none;
}

.c-60-closed {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--sfs-red, #eb3c24);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  pointer-events: auto;
  border: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.15s ease;
}

.c-60-closed:hover {
  background: #d73720;
}

.c-60-closed:active {
  background: #c6301b;
  transform: translateY(1px);
}

.c-60-closed-label {
  white-space: nowrap;
}

.c-60-closed-ico {
  display: none;
  align-items: center;
  justify-content: center;
}

.c-60-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  background: var(--sfs-red, #eb3c24);
  color: #ffffff;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}

.c-60-bar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 16px;
  cursor: pointer;
}

.c-60-title-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
}

.c-60-closed-count,
.c-60-count {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 4px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.35);
  font-size: 14px;
  font-weight: 700;
}

.c-60-closed-count {
  min-width: 24px;
  height: 24px;
}

.c-60-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.c-60-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.35);
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}

.c-60-refresh:hover {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.c-60-refresh:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) inset;
}

.c-60-refresh-ico {
  display: inline-flex;
}

.c-60-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  color: #ffeae6;
  font-size: 14px;
  cursor: pointer;
}

.c-60-toggle-ico {
  display: inline-flex;
}

.c-60-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: #ffeae6;
  cursor: pointer;
}

.c-60-toggle-label {
  display: flex;
  width: 13ch;
  white-space: nowrap;
  justify-content: flex-end;
}

.c-60-toggle-ico {
  flex: 0 0 auto;
}

.c-60-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  background: #f9f9f9;
  background: #ffffff;
  overflow: clip;
  height: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: height 260ms cubic-bezier(.2, .7, .2, 1), opacity 220ms ease, transform 260ms cubic-bezier(.2, .7, .2, 1);
  will-change: height, opacity, transform;
}

.c-60-shell--maximised .c-60-panel.is-open {
  height: auto;
  opacity: 1;
  transform: translateY(0);
}

.c-60-panel[data-animating] {
  transition: height 260ms cubic-bezier(.2, .7, .2, 1), opacity 220ms ease, transform 260ms cubic-bezier(.2, .7, .2, 1);
}

.c-panel-main {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 0px 16px;
}

.c-60-panel-footer {
  background: #f9f9f9;
  padding: 8px 24px 16px;
  border-top: 1px solid var(--border);
}

.c-60-track-wrap {
  position: relative;
  overflow: hidden;
  padding-right: 0px;
  flex: 1 1 auto;
  background: #ffffff;
}

.c-60-track {
  cursor: grab;
}

.c-60-track:active {
  cursor: grabbing;
}

.c-60-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto !important;
}

.c-60-track.is-dragging,
.c-60-track.is-dragging * {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.c-60-arrow {
  background: #fefefe;
  border: 1px solid #d7d7d7;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #555;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .12s ease, transform .12s ease;
  flex: 0 0 auto;
  align-self: center;
  z-index: 4;
}

.c-60-arrow:hover {
  background: #ffffff;
  border-color: #c2c2c2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

.c-60-arrow:active {
  background: #f2f2f2;
  border-color: #b0b0b0;
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .02) inset;
}

.c-60-arrow.is-deactivated {
  opacity: 0.35;
  background: #f3f3f3;
  border-color: #e4e4e4;
  color: #9a9a9a;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.c-60-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 16px;
  scroll-behavior: smooth;
  touch-action: pan-x;
  -ms-touch-action: pan-x;
  -webkit-user-drag: none;
}

.c-60-track {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.c-60-track::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.c-60-track::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

.c-panel-main::before,
.c-panel-main::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 50px;
  width: 24px;
  pointer-events: none;
  z-index: 3;
}

.c-panel-main::before {
  left: 58px;
  background: linear-gradient(to right, #ffffff, rgba(249, 249, 249, 0));
}

.c-panel-main::after {
  right: 58px;
  background: linear-gradient(to left, #ffffff, rgba(249, 249, 249, 0));
}

.c-60-track-wrap.no-left-fade::before {
  opacity: 0;
}

.c-60-track-wrap.no-right-fade::after {
  opacity: 0;
}

.c-60-scroll-next {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 32px;
  height: 56px;
  border: none;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #444;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.08);
}

.c-60-card {
  flex: 0 0 260px;
  background: #ffffff;
  border: 1px solid #e4e4e4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-width: 350px;
  position: relative;
  transition: border 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.c-60-card:hover {
  border: 1px solid #999999;
  transform: translateY(-1px);
}

.c-60-card:has(button:active) {
  transform: translateY(-1px);
}

.c-60-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.c-60-filetype {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
}

.c-60-filetype--pdf {
  background: var(--sfs-red, #eb3c24);
}

.c-60-filetype--xls {
  background: var(--sfs-green);
}

.c-60-filetype--json {
  background: var(--sfs-sand);
}

.c-60-filetype--zip {
  background: var(--sfs-teal);
}

.c-60-filename {
  font-size: 14px;
  font-weight: 500;
  color: #222222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-60-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #777777;
  margin-bottom: 8px;
}

.c-60-download {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  font-size: 13px;
  border-radius: 0;
  gap: 4px;
}

.c-60-download-ico {
  display: inline-flex;
  margin-right: 6px;
}

.c-60-tip {
  margin-top: 8px;
  font-size: 12px;
  color: #777777;
}

.c-60-shell--closed .c-60-bar {
  display: none;
}

.c-60-shell--closed .c-60-closed {
  opacity: 1;
  pointer-events: auto;
}

.c-60-shell--minimised .c-60-panel {
  display: none;
}

.c-60-shell--minimised .c-60-closed {
  display: none;
}

.c-60-shell--maximised .c-60-closed {
  display: none;
}

@media (max-width: 768px) {
  .c-60-bar-main {
    padding-inline: 16px;
  }

  .c-60-bar-actions {
    gap: 8px;
  }

  .c-60-refresh-label {
    display: none;
  }

  .c-60-panel {
    padding-inline: 16px;
  }

  .c-60-card {
    flex: 0 0 220px;
  }

  .c-60-toggle-label {
    width: auto;
  }

  .c-60-closed {
    right: 16px;
    bottom: 16px;
    padding: 0;
    width: 44px;
    height: 44px;
    justify-content: center;
    gap: 0;
  }

  .c-60-closed-label,
  .c-60-closed-count {
    display: none;
  }

  .c-60-closed-ico {
    display: flex;
  }
}

@media (max-width: 480px) {
  .c-60-bar-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .c-60-bar-actions {
    align-self: stretch;
    justify-content: flex-end;
  }

  .c-60-panel {
    padding-block: 12px 16px;
  }
}

/* ========================= Additive: ≤1020px Drawer Mode ========================= */
@media (max-width: 1020px) {

  .c-60--drawer .c-60-bar {
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
    z-index: 43;
    inset-inline: 0;
    bottom: 0;
  }

  .c-60--drawer .c-60-bar-main {
    display: none !important;
  }

  .c-60--drawer .c-60-closed {
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: inline-flex !important;
    pointer-events: auto;
  }

  .c-60-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease;
    z-index: 42;
    pointer-events: none;
  }

  .c-60-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .c-60--drawer .c-60-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(320px, 90vw, 420px);
    max-width: 100%;
    background: #fff;
    border-top: none;
    box-shadow: -12px 0 28px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    height: auto !important;
    opacity: 1 !important;
    transform: translateX(100%) !important;
    transition: transform 260ms cubic-bezier(.2, .7, .2, 1) !important;
    display: block !important;
    z-index: 44;
  }

  .c-60--drawer .c-60-panel.is-open {
    transform: translateX(0) !important;
    padding: 0 16px;
  }

  .c-panel-main::before,
  .c-panel-main::after {
    content: "";
    display: none;
  }

  .c-60--drawer .c-60-drawer-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    margin: 0 -16px 16px;
    background: var(--sfs-red, #eb3c24);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
  }

  .c-60--drawer .c-60-drawer-head .c-60-title-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 800;
  }

  .c-60--drawer .c-60-drawer-head .c-60-count {
    border: 1px solid rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .35);
  }

  .c-60--drawer .c-60-drawer-head .c-60-refresh {
    border: 1px solid rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .35);
    color: #fff;
    gap: 8px;
    padding: 6px 8px;
    font-size: 14px;
  }

  .c-60--drawer .c-60-drawer-head .c-60-refresh-ico {
    display: inline-flex;
  }

  .c-60--drawer .c-60-drawer-head .c-60-close {
    color: #ffeae6;
    width: 30px;
    height: 30px;
  }

  .c-60--drawer .c-panel-main {
    display: block;
    padding: 0;
  }

  .c-60--drawer .c-60-arrow {
    display: none !important;
  }

  .c-60--drawer .c-60-track-wrap {
    overflow: visible;
    background: transparent;
    padding: 0;
  }

  .c-60--drawer .c-60-track {
    display: block;
    overflow: visible;
    padding: 0;
  }

  .c-60--drawer .c-60-card {
    min-width: 0;
    width: 100%;
    margin-bottom: 16px;
    padding: 16px;
  }

  .c-60--drawer .c-60-card:last-child {
    margin-bottom: 0;
  }

  .c-60--drawer .c-60-card-head {
    gap: 8px;
    margin-bottom: 8px;
  }

  .c-60--drawer .c-60-meta {
    margin-bottom: 8px;
  }

  .c-60--drawer .c-60-download {
    padding: 8px 24px;
  }

  .c-60--drawer .c-60-panel-footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 16px -16px 0;
    border-top: 1px solid var(--border, #e9e9e9);
  }

  .c-60--drawer .c-60-closed.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
  }

  .c-60--drawer .c-60-vfade {
    position: sticky;
    z-index: 2;
    pointer-events: none;
    height: 20px;
    margin: 0 -16px;
    opacity: 0;
    transition: opacity 160ms ease;
  }

  .c-60--drawer .c-60-vfade.is-on {
    opacity: 1;
  }

  .c-60--drawer .c-60-vfade--top {
    top: var(--c60-head-h, 56px);
    margin-top: calc(-20px);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
  }

  .c-60--drawer .c-60-vfade--bottom {
    bottom: var(--c60-tip-h, 72px);
    margin-bottom: calc(-20px);
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-60--drawer .c-60-panel {
    transition: none !important;
  }

  .c-60-overlay {
    transition: none !important;
  }
}





/* ========================= 61 — Navigation Utility Bar ========================= */
.sfs-app-ex-61 {
  --c61-top: 0px;
  --c61-height: 80px;
  position: relative;
  padding-top: var(--c61-height);
  overflow-x: hidden;
  isolation: isolate;
}

.c-61-inner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
  padding-inline: clamp(24px, calc((100vw - 1352px) / 2), 300px);
  padding-block: 16px;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
}

.c-61-logo {
  display: block;
  height: clamp(26px, 3.2vw, 32px);
  width: auto;
  cursor: pointer;
}

.c-61-actions {
  display: inline-flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
}

.c-61-notification,
.c-61-account {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.c-61-notification {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.c-61-notification svg {
  display: block;
  width: clamp(18px, 2.6vw, 20px);
  height: auto;
  transform: translateY(1px);
}


.c-61-notification-badge {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #eb3c24;
  border: 1px solid #fff;
  top: 2px;
  right: -2px;
  box-shadow: 0 0 0 0 rgba(235, 60, 36, .4);
}

.c-61-notification-badge.is-hidden {
  display: none;
}

.c-61-account {
  width: clamp(36px, 4.2vw, 40px);
  height: clamp(36px, 4.2vw, 40px);
  background: #0b646b;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 300;
  flex: 0 0 auto;
}

.c-61-account-wrap {
  position: relative;
}

.c-61-notification-wrap {
  position: static;
}

.c-61-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  background: #fff;
  border: 1px solid #eaeaea;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .08);
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transition: opacity 140ms ease, transform 180ms cubic-bezier(.2, .8, .2, 1), visibility 0s linear 180ms;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
  width: 320px;
  box-sizing: border-box;
  overflow: hidden;
  will-change: transform, opacity;
}

.c-61-dropdown.hovered {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 140ms ease, transform 200ms cubic-bezier(.2, .8, .2, 1), visibility 0s;
}

.c-61-dropdown.leaving {
  opacity: 0;
  transform: translateY(-6px) scale(.98);
}

.c-61-dropdown:before {
  content: "";
  position: absolute;
  top: -8px;
  right: 16px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: 1px solid #eaeaea;
  border-top: 1px solid #eaeaea;
  transform: rotate(45deg);
  z-index: -1;
}

.c-61-dropdown--notifications {
  width: min(480px, 92vw);
  min-width: 320px;
}

.c-61-dropdown-top {
  padding: 16px;
  border-bottom: 1px solid #e6e6e6;
  text-align: center;
  background: #fff;
}

.c-61-dropdown-avatar {
  width: 50px;
  height: 50px;
  background: #0b646b;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  margin: 0 auto 8px;
}

.c-61-dropdown-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0;
}

.c-61-dropdown-role {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
  margin-bottom: 0;
}

.c-61-dropdown-bottom {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
}

.c-61-dropdown-link {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  text-decoration: none;
}

.c-61-dropdown-link:hover {
  text-decoration: underline;
}

.c-61-dropdown-link:active {
  color: var(--sfs-red);
  text-decoration: underline;
}

.c-61-dropdown-logout {
  margin-top: 12px;
  width: 100%;
  padding-top: 10px;
  padding-bottom: 10px;
}

.c-61-notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e6e6e6;
  background: #fff;
}

.c-61-notification-title-main {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
}

.c-61-notification-mark-all {
  border: none;
  background: none;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--sfs-red);
  cursor: pointer;
  text-decoration: underline;
}

.c-61-notification-list {
  max-height: 420px;
  overflow-y: auto;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #cfcfcf transparent;
}

.c-61-notification-list::-webkit-scrollbar {
  width: 10px;
}

.c-61-notification-list::-webkit-scrollbar-track {
  background: transparent;
}

.c-61-notification-list::-webkit-scrollbar-thumb {
  background: #cfcfcf;
  border-radius: 0;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.c-61-notification-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  background: #fff;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  transition: background 120ms ease;
}

.c-61-notification-item:hover {
  background: #f9f9f9;
}

.c-61-notification-item--unread {
  background: #fff6f5;
}

.c-61-notification-item--unread:hover {
  background: #ffe8e6;
}

.c-61-notification-item--unread:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: -1px;
  width: 3px;
  background: #eb3c24;
}

.c-61-notification-item:focus-visible {
  outline: 2px solid var(--sfs-red);
  outline-offset: -2px;
}

.c-61-notification-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
}

.c-61-notification-avatar--initial {
  color: #fff;
}

.c-61-notification-avatar--olive {
  background: #cec79f;
}

.c-61-notification-avatar--coral {
  background: #ef6f5e;
}

.c-61-notification-avatar--teal {
  background: #0b646b;
}

.c-61-notification-avatar--grey {
  background: #e6e6e6;
  color: var(--text-1);
}

.c-61-notification-avatar--submitted {
  background: #fff;
  border: 1px solid #e6e6e6;
}

.c-61-notification-avatar--submitted svg {
  display: block;
}

.c-61-notification-text {
  flex: 1 1 auto;
  padding-right: 72px;
  min-width: 0;
}

.c-61-notification-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-61-notification-subtext {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-61-notification-time {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-5);
}

.c-61-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--c61-top, 0);
  bottom: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 0s linear 160ms;
  z-index: 900;
}

.c-61-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 160ms ease, visibility 0s;
}

body.is-locked {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .c-61-dropdown--notifications {
    width: min(420px, 92vw);
  }
}

@media (max-width: 768px) {
  .c-61-inner {
    padding-block: 12px;
  }

  .c-61-actions {
    gap: 16px;
  }

  .c-61-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--c61-top, 0);
    width: 100vw;
    max-height: 70vh;
    border: 1px solid #eaeaea;
    border-radius: 0;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 160ms ease, transform 220ms cubic-bezier(.2, .8, .2, 1), visibility 0s linear 220ms;
    z-index: 1001;
    overflow: hidden;
  }

  .c-61-dropdown.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .c-61-dropdown:before {
    display: none;
  }

  .c-61-dropdown--notifications {
    width: 100vw;
    min-width: 0;
  }

  .c-61-notification-list {
    max-height: 60vh;
  }
}

@media (min-width: 769px) {
  .c-61-account-wrap {
    position: relative;
  }

  .c-61-notification-wrap {
    position: static;
  }

  .c-61-dropdown--notifications {
    position: fixed;
    right: clamp(24px, calc((100vw - 1352px) / 2), 300px);
    top: calc(var(--c61-height) - 1px);
    width: min(480px, 92vw);
    min-width: 320px;
  }

  .c-61-dropdown--notifications:before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .c-61-dropdown,
  .c-61-dropdown.hovered,
  .c-61-dropdown.is-open,
  .c-61-overlay {
    transition: none;
    transform: none;
  }
}




/* ========================= 62 — Breadcrumbs ========================= */
.sfs-app-ex-62 {
  padding: 8px 0;
}

.sfs-app-ex-62 .c-62-breadcrumbs {
  font-size: 13px;
  line-height: 1.4;
}

.sfs-app-ex-62 .c-62-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sfs-app-ex-62 .c-62-item {
  display: inline-flex;
  align-items: center;
}

.sfs-app-ex-62 .c-62-link,
.sfs-app-ex-62 .c-62-current {
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.sfs-app-ex-62 .c-62-link {
  color: var(--text-5);
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.sfs-app-ex-62 .c-62-current {
  color: var(--text-1);
}

.sfs-app-ex-62 .c-62-link:hover,
.sfs-app-ex-62 .c-62-link:focus-visible {
  color: var(--text-1);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  outline: none;
}

.sfs-app-ex-62 .c-62-link:active {
  color: var(--sfs-red);
}

.sfs-app-ex-62 .c-62-item--current:hover .c-62-current {
  text-decoration: none;
}

.sfs-app-ex-62 .c-62-separator {
  display: inline-flex;
  align-items: center;
  margin: 0 8px;
}

.sfs-app-ex-62 .c-62-separator svg {
  display: block;
}

@media (max-width: 480px) {
  .sfs-app-ex-62 .c-62-list {
    row-gap: 4px;
  }

  .sfs-app-ex-62 .c-62-item {
    max-width: 100%;
  }
}



/* ========================= 63 — Toast Alerts ========================= */
.sfs-app-ex-63 {
  width: 100%;
}

.c-63-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 480px;
}

.c-63-toast {
  display: flex;
  justify-content: space-between;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.08);
  border-left-width: 4px;
  border-left-style: solid;
}

.c-63-toast--complete {
  border-left-color: var(--sfs-green);
}

.c-63-toast--pending {
  border-left-color: var(--sfs-teal);
}

.c-63-toast--warning {
  border-left-color: var(--sfs-sand);
}

.c-63-toast--error {
  border-left-color: var(--sfs-red);
}

.c-63-left {
  display: flex;
  gap: 16px;
}

.c-63-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.c-63-text {
  display: flex;
  flex-direction: column;
}

.c-63-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

.c-63-desc {
  margin: 4px 0 0 0;
  font-size: 16px;
  font-weight: 300;
  color: var(--text-3);
}

.c-63-time {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-5);
}


.c-63-close {
  background: none;
  border: none;
  padding: 0;
  width: 10px;
  height: 10px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 20px;
  margin-top: 4px;
}

.c-63-close svg {
  display: block;
}

/* ========================= Login Page Layout ========================= */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.login-page .container {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  display: flex;
  justify-content: center;
}

.login-page .sfs-app-ex-59 {
  margin-inline: auto;
}



/* ============================================================================================================================================================ 
Academy Hub — Custom Extensions
============================================================================================================================================================== */

/* Container override for Academy Hub (no top padding/margin) */
.ah-container {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(24px, calc((100vw - 1352px) / 2), 300px);
}

/* Section without excessive vertical margin */
.ah-section {
  margin-bottom: 32px;
}

/* Link styling */
a {
  color: var(--sfs-teal);
  text-decoration: none;
}

a:hover {
  color: var(--sfs-red);
}

a.sfs-btn--primary:hover,
a.sfs-btn--primary:focus-visible {
  color: #fff;
  text-decoration: none;
}

/* Display hero title */
.ah-display-hero {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-1);
  letter-spacing: -0.5px;
}

@media (max-width: 768px) {
  .ah-display-hero {
    font-size: 36px;
  }
}

/* Subtitle text */
.ah-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-3);
  line-height: 1.5;
}

/* Position utilities */
.ah-relative {
  position: relative;
}

.ah-absolute {
  position: absolute;
}

/* Hidden utility */
.ah-hidden {
  display: none !important;
}

/* Flex utilities */
.ah-d-flex {
  display: flex;
}

.ah-items-center {
  align-items: center;
}

.ah-justify-between {
  justify-content: space-between;
}

.ah-justify-end {
  justify-content: flex-end;
}

.ah-flex-wrap {
  flex-wrap: wrap;
}

/* Gap utilities */
.ah-gap-8 {
  gap: 8px;
}

.ah-gap-16 {
  gap: 16px;
}

.ah-gap-24 {
  gap: 24px;
}

.ah-gap-32 {
  gap: 32px;
}

/* Spacing utilities (8px scale) */
.ah-mb-0 {
  margin-bottom: 0;
}

.ah-mb-8 {
  margin-bottom: 8px;
}

.ah-mb-16 {
  margin-bottom: 16px;
}

.ah-mb-24 {
  margin-bottom: 24px;
}

.ah-mb-32 {
  margin-bottom: 32px;
}

.ah-mb-40 {
  margin-bottom: 40px;
}

.ah-mt-0 {
  margin-top: 0;
}

.ah-mt-8 {
  margin-top: 8px;
}

.ah-mt-16 {
  margin-top: 16px;
}

.ah-mt-24 {
  margin-top: 24px;
}

.ah-mt-32 {
  margin-top: 32px;
}

.ah-p-8 {
  padding: 8px;
}

.ah-p-16 {
  padding: 16px;
}

.ah-p-24 {
  padding: 24px;
}

.ah-p-32 {
  padding: 32px;
}

/* Grid layouts */
.ah-grid {
  display: grid;
  gap: 16px;
}

.ah-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ah-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ah-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .ah-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {

  .ah-grid-2,
  .ah-grid-3,
  .ah-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Tabset navigation */
.ah-tabset {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ah-tab {
  padding: 10px 24px;
  background: var(--bg-2);
  color: var(--text-1);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ah-tab:hover {
  background: var(--bg-1);
  color: var(--sfs-red);
  box-shadow: inset 0 -2px 0 0 var(--sfs-red);
}

.ah-tab.active {
  background: var(--bg-1);
  box-shadow: inset 0 -2px 0 0 var(--sfs-red);
}

/* KPI / Metric cards for dashboard */
.ah-kpi-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 16px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ah-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.ah-kpi-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-1);
  margin-bottom: 4px;
}

.ah-kpi-rule {
  height: 2px;
  width: 100%;
  background: var(--sfs-red);
  margin-bottom: 8px;
}

.ah-kpi-rule--teal {
  background: var(--sfs-teal);
}

.ah-kpi-rule--sand {
  background: var(--sfs-sand);
}

.ah-kpi-rule--dark {
  background: var(--text-1);
}

.ah-kpi-value {
  margin: auto;
  font-weight: 700;
  font-size: 48px;
  color: var(--text-1);
}

.ah-kpi-value--red {
  color: var(--sfs-red);
}

.ah-kpi-value--teal {
  color: var(--sfs-teal);
}

.ah-kpi-value--sand {
  color: var(--sfs-sand);
}

/* Data table */
.ah-table {
  width: 100%;
  border-collapse: collapse;
}

.ah-table thead th {
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 2px solid var(--text-1);
  background: var(--bg-1);
  color: var(--text-1);
}

.ah-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}

.ah-table tbody tr:hover {
  background: var(--bg-2);
}

/* Pagination */
.ah-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}

.ah-pagination a,
.ah-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: var(--bg-2);
  color: var(--text-1);
  font-weight: 700;
  font-size: 14px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ah-pagination a:hover,
.ah-pagination button:hover {
  background: var(--border);
}

.ah-pagination .active {
  background: var(--border);
  outline: 2px solid var(--text-1);
}

/* ============================================================================================================================================================== 
   CMS Enhanced Filters & Pagination
   ============================================================================================================================================================== */

/* CMS Filters */
.cms-filters {
  margin-bottom: 24px;
}

.cms-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.cms-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cms-filter-group--search {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.cms-filter-group--date {
  gap: 6px;
}

.cms-filter-label {
  font-size: 13px;
  color: var(--text-3);
  white-space: nowrap;
}

.cms-filter-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cms-filter-search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-4);
  pointer-events: none;
}

.cms-filter-search {
  padding-left: 36px !important;
  padding-right: 32px !important;
}

.cms-filter-date {
  width: 140px !important;
  min-height: 40px !important;
}

.cms-filter-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cms-filter-select {
  min-width: 140px;
  padding-right: 48px !important;
}

.cms-filter-clear-btn {
  position: absolute;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: var(--bg-3);
  border: none;
  cursor: pointer;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s;
}

.cms-filter-select-wrap .cms-filter-clear-btn {
  right: 28px;
}

.cms-filter-clear-btn:hover {
  background: var(--border);
  color: var(--text-1);
}

.cms-filter-clear-all {
  height: 40px;
  font-size: 13px;
}

/* Active filter pills */
.cms-filters-active {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cms-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 12px;
  background: var(--bg-3);
  font-size: 12px;
  color: var(--text-2);
}

.cms-filter-pill button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--text-3);
  transition: color 0.15s;
}

.cms-filter-pill button:hover {
  color: var(--text-1);
}

/* CMS Enhanced Pagination */
.cms-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.cms-pagination-info {
  font-size: 13px;
  color: var(--text-3);
}

.cms-pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cms-pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cms-pagination-btn:hover:not(:disabled) {
  background: var(--border);
  color: var(--text-1);
}

.cms-pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cms-pagination-pages {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 8px;
}

.cms-pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cms-pagination-page:hover {
  background: var(--border);
  color: var(--text-1);
}

.cms-pagination-page.active {
  background: var(--text-1);
  color: var(--bg-1);
  border-color: var(--text-1);
}

.cms-pagination-ellipsis {
  padding: 0 8px;
  color: var(--text-4);
}

.cms-pagination-size {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
}

.cms-pagination-select {
  min-width: 70px;
  min-height: 36px !important;
  padding: 0 28px 0 10px !important;
}

/* CMS Table Selection */
.cms-table-checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--text-1);
}

.cms-selection-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-3);
  margin-bottom: 16px;
}

.cms-selection-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}

.cms-selection-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* Form inputs */
.ah-input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  background: var(--bg-1);
  border: 1px solid var(--border);
  transition: border-color 0.15s ease;
}

.ah-input:hover {
  border-color: var(--text-5);
}

.ah-input:focus {
  outline: none;
  border-color: var(--sfs-red);
}

.ah-input::placeholder {
  color: var(--placeholder-color);
}

.ah-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  background: var(--bg-1);
  border: 1px solid var(--border);
  resize: vertical;
  transition: border-color 0.15s ease;
}

.ah-textarea:focus {
  outline: none;
  border-color: var(--sfs-red);
}

/* Search input with icon */
.ah-search {
  position: relative;
}

.ah-search .ah-input {
  padding-right: 44px;
  background: var(--bg-2);
}

.ah-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
}

/* Badge / Tag pills */
.ah-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-2);
  color: var(--text-1);
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ah-badge:hover {
  border-color: var(--sfs-red);
  color: var(--sfs-red);
}

/* Product/Content tile */
.ah-tile {
  display: block;
  background: var(--bg-1);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ah-tile:hover {
  transform: translateY(-4px);
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-hover);
}

.ah-tile-media {
  height: 160px;
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
}

.ah-tile-body {
  padding: 16px;
}

.ah-tile-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-1);
  margin-bottom: 4px;
  padding-top: 8px;
  border-top: 2px solid var(--sfs-red);
}

.ah-tile-subtitle {
  font-weight: 300;
  font-size: 14px;
  color: var(--text-3);
}

/* Sidenav steps */
.ah-sidenav {
  width: 260px;
  background: var(--bg-2);
  border-top: 2px solid var(--border);
}

.ah-sidenav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ah-sidenav li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.15s ease;
}

.ah-sidenav li:hover {
  color: var(--sfs-red);
}

.ah-sidenav li.active {
  font-weight: 700;
}

.ah-sidenav .step-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-1);
}

.ah-sidenav li.active .step-index {
  border-color: var(--sfs-red);
  color: var(--sfs-red);
}

/* Modal/Dialog overlay */
.ah-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ah-modal {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  max-width: 560px;
  width: 92vw;
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
}

.ah-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ah-modal-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-1);
}

.ah-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-3);
}

.ah-modal-close:hover {
  color: var(--text-1);
}

.ah-modal--sm {
  max-width: 420px;
}

.ah-modal-body {
  margin-bottom: 24px;
}

.ah-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ah-field-hint {
  font-size: 12px;
  color: var(--text-4);
  margin-top: 6px;
}

/* Toast notification */
.ah-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-1);
  color: var(--bg-1);
  padding: 16px 24px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-hover);
  z-index: 2000;
}

.ah-toast--success {
  background: var(--sfs-green);
}

.ah-toast--error {
  background: var(--sfs-red);
}

/* Header top bar */
.ah-topbar {
  background: var(--text-1);
  color: var(--bg-1);
  padding: 8px 0;
}

.ah-topbar a {
  color: var(--bg-1);
}

/* Icon button (circle) */
.ah-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-1);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ah-icon-btn:hover {
  background: var(--bg-2);
}

/* Dropdown notification panel */
.ah-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-1);
  border: 1px solid var(--border);
  min-width: 320px;
  box-shadow: var(--shadow-hover);
  z-index: 50;
}

.ah-dropdown-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.ah-dropdown-item:last-child {
  border-bottom: none;
}

/* Avatar */
.ah-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-1);
}

.ah-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer */
.ah-footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

/* Checkbox styling */
.ah-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.ah-checkbox input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-2);
  background: var(--bg-1);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ah-checkbox input[type="checkbox"]:checked {
  background: var(--sfs-red);
  border-color: var(--text-1);
}

/* Label */
.ah-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-1);
  display: block;
  margin-bottom: 8px;
}

/* Form field with label */
.ah-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Hint/helper text */
.ah-hint {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-3);
}

/* Required indicator */
.ah-required {
  color: var(--sfs-red);
}

/* Select dropdown */
.ah-select-wrap {
  position: relative;
  display: inline-block;
}

.ah-select-wrap select {
  appearance: none;
  min-height: 36px;
  padding: 6px 32px 6px 10px;
  font-size: 14px;
  font-weight: 400;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-1);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.ah-select-wrap select:hover {
  border-color: var(--text-5);
}

.ah-select-wrap select:focus {
  outline: none;
  border-color: var(--sfs-red);
}

.ah-select {
  appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 0 40px 0 12px;
  font-size: 14px;
  font-weight: 300;
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-1);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.ah-select:hover {
  border-color: var(--text-5);
}

.ah-select:focus {
  outline: none;
  border-color: var(--sfs-red);
}

.ah-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.ah-select-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -70%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
}

/* Info card */
.ah-info-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--sfs-red);
  padding: 16px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ah-info-card--success {
  border-left-color: var(--sfs-green);
}

.ah-info-card--warning {
  border-left-color: var(--sfs-sand);
}

/* Progress bar */
.ah-progress {
  height: 6px;
  background: var(--border);
  overflow: hidden;
}

.ah-progress-bar {
  height: 100%;
  background: var(--sfs-red);
  transition: width 0.3s ease;
}

/* Status badge */
.ah-status {
  display: inline-block;
  padding: 4px 12px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.ah-status--draft {
  background: var(--bg-2);
  color: var(--text-3);
  border: 1px solid var(--border);
}

.ah-status--published {
  background: var(--sfs-light-green);
  color: var(--sfs-teal);
  border: 1px solid var(--sfs-green);
}

.ah-status--pending {
  background: var(--sfs-sand-light);
  color: var(--sfs-sand);
  border: 1px solid var(--sfs-sand);
}

/* Text alignment */
.ah-text-center {
  text-align: center;
}

.ah-text-right {
  text-align: right;
}

/* Divider */
.ah-divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}

.ah-divider--strong {
  height: 2px;
  background: var(--sfs-red);
}

/* ========================= Buttons ========================= */
.ah-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 24px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.25s ease;
  text-decoration: none;
  line-height: 1;
}

.ah-btn:active {
  transform: translateY(1px);
}

.ah-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(235, 60, 36, 0.18);
  outline: none;
}

.ah-btn--primary {
  background: var(--sfs-red);
  color: #fff;
  border: 1px solid var(--sfs-red);
}

.ah-btn--primary:hover {
  filter: brightness(0.95);
  box-shadow: 0 4px 12px rgba(235, 60, 36, 0.25);
}

.ah-btn--primary:active {
  background: #C52A18;
  border-color: #C52A18;
}

.ah-btn--secondary {
  background: #fff;
  color: var(--text-1);
  border: 1px solid var(--text-1);
}

.ah-btn--secondary:hover {
  border-color: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ah-btn--sm {
  padding: 6px 16px;
  font-size: 13px;
}

/* ========================= Form Inputs ========================= */
.ah-input {
  border: none;
  border-bottom: 1px solid var(--field-line);
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-1);
  width: 100%;
  transition: border-color 0.15s ease;
}

.ah-input:focus {
  border-bottom-color: var(--sfs-red);
  outline: none;
}

.ah-input::placeholder {
  color: var(--placeholder-color);
}

.ah-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Video container */
.ah-video-container {
  position: relative;
  width: 100%;
  background: #000;
}

.ah-video-container video {
  width: 100%;
  display: block;
}

/* Card with content */
.ah-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base);
}

.ah-card-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.ah-card-body {
  padding: 16px;
}

.ah-card-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* List styles */
.ah-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ah-list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.ah-list-item:last-child {
  border-bottom: none;
}

/* Breadcrumb */
.ah-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-3);
}

.ah-breadcrumb a {
  color: var(--text-3);
}

.ah-breadcrumb a:hover {
  color: var(--sfs-red);
}

/* Empty state */
.ah-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}

.ah-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Loading spinner */
.ah-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--sfs-red);
  border-radius: 50%;
  animation: ah-spin 0.8s linear infinite;
}

@keyframes ah-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================= Admin Sidebar Layout ========================= */
.ah-admin-layout {
  display: flex;
  min-height: calc(100vh - 72px);
  gap: 0;
}

.ah-admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}

.ah-admin-content {
  flex: 1;
  min-width: 0;
  padding: 0;
}

/* Sidebar Navigation List */
.ah-sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.ah-sidebar-section {
  padding: 12px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-4);
}

.ah-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 400;
  transition: all 0.12s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
}

.ah-sidebar-item:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-1);
}

.ah-sidebar-item.is-active,
.ah-sidebar-item[aria-current="page"] {
  background: rgba(235, 60, 36, 0.06);
  color: var(--sfs-red);
  border-left-color: var(--sfs-red);
  font-weight: 600;
}

.ah-sidebar-item.is-active .ah-sidebar-icon,
.ah-sidebar-item[aria-current="page"] .ah-sidebar-icon {
  color: var(--sfs-red);
}

.ah-sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  transition: color 0.12s ease;
}

.ah-sidebar-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.ah-sidebar-item:hover .ah-sidebar-icon {
  color: var(--text-2);
}

.ah-sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 16px;
}

/* Responsive: collapse sidebar on smaller screens */
@media (max-width: 900px) {
  .ah-admin-layout {
    flex-direction: column;
  }

  .ah-admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .ah-admin-sidebar .ah-sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    padding: 8px;
    gap: 4px;
  }

  .ah-sidebar-section {
    width: 100%;
    padding: 8px 8px 4px;
  }

  .ah-sidebar-item {
    padding: 8px 12px;
    border-left: none;
    border-radius: 4px;
    font-size: 13px;
  }

  .ah-sidebar-item.is-active,
  .ah-sidebar-item[aria-current="page"] {
    border-left: none;
    background: var(--sfs-red);
    color: #fff;
  }

  .ah-sidebar-item.is-active .ah-sidebar-icon,
  .ah-sidebar-item[aria-current="page"] .ah-sidebar-icon {
    color: #fff;
  }

  .ah-sidebar-divider {
    display: none;
  }
}

/* Admin Dashboard Specific Styles */
.ah-admin-stats-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.ah-admin-stats-row--4 {
  grid-template-columns: repeat(4, 1fr);
}

.ah-admin-stats-row--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1100px) {
  .ah-admin-stats-row--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .ah-admin-stats-row--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {

  .ah-admin-stats-row--4,
  .ah-admin-stats-row--3 {
    grid-template-columns: 1fr;
  }
}

.ah-admin-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .ah-admin-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.ah-admin-section-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px;
}

.ah-admin-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.ah-admin-section-content {
  min-height: 100px;
}

.ah-admin-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-admin-quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-2);
  border-radius: 0;
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
}

.ah-admin-quick-action:hover {
  background: var(--sfs-red);
  color: #fff;
}

.ah-admin-quick-action svg {
  opacity: 0.7;
}

.ah-admin-quick-action:hover svg {
  opacity: 1;
}

/* Ensure original sidebar-divider rule completes */
@media (max-width: 900px) {
  .ah-admin-layout .ah-sidebar-divider {
    display: none;
  }
}

/* ========================= Main App Sidebar Layout ========================= */
.ah-app-layout {
  --impersonation-banner-height: 44px;
  display: flex;
  min-height: 100vh;
  background: #f5f5f5;
}

.ah-app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

.ah-app-sidebar.is-open {
  transform: translateX(0);
}

.ah-app-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ah-app-sidebar-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.ah-app-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Sidebar Header with Logo */
.ah-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.ah-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-1);
}

.ah-sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--sfs-red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ah-sidebar-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.ah-sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.ah-sidebar-logo-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-1);
}

.ah-sidebar-logo-subtitle {
  font-size: 11px;
  color: var(--text-3);
}

.ah-app-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.ah-app-sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.ah-app-nav-section {
  padding: 16px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-4);
}

.ah-app-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
  transition: all 0.12s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
  background: transparent;
  border-top: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  text-align: left;
}

.ah-app-nav-item:hover {
  background: var(--bg-2);
  color: var(--text-1);
}

.ah-app-nav-item.is-active {
  background: rgba(235, 60, 36, 0.08);
  color: var(--sfs-red);
  border-left-color: var(--sfs-red);
  font-weight: 500;
}

.ah-app-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.7;
}

.ah-app-nav-item.is-active .ah-app-nav-icon {
  opacity: 1;
}

.ah-app-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 16px;
}

/* ========================= Sidebar Accordion / Collapsible Sections ========================= */
.ah-nav-accordion {
  margin: 0;
}

.ah-nav-accordion-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
  transition: all 0.15s ease;
}

.ah-nav-accordion-toggle:hover {
  background: var(--bg-2);
  color: var(--text-1);
}

.ah-nav-accordion-toggle.is-open {
  color: var(--text-1);
  border-left-color: var(--sfs-red);
}

.ah-nav-accordion-toggle .ah-app-nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  flex-shrink: 0;
}

.ah-nav-accordion-toggle .ah-app-nav-icon svg {
  width: 16px;
  height: 16px;
}

.ah-nav-accordion-toggle:hover .ah-app-nav-icon,
.ah-nav-accordion-toggle.is-open .ah-app-nav-icon {
  opacity: 1;
}

.ah-nav-accordion-toggle>span:nth-child(2) {
  flex-grow: 1;
}

.ah-nav-accordion-chevron {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  flex-shrink: 0;
  margin-left: auto;
}

.ah-nav-accordion-toggle:hover .ah-nav-accordion-chevron,
.ah-nav-accordion-toggle.is-open .ah-nav-accordion-chevron {
  opacity: 0.8;
}

.ah-nav-accordion-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  flex-shrink: 0;
}

.ah-nav-accordion-toggle:hover .ah-nav-accordion-icon,
.ah-nav-accordion-toggle.is-open .ah-nav-accordion-icon {
  opacity: 1;
}

.ah-nav-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.32, 0, 0.2, 1);
}

.ah-nav-accordion-panel.is-open {
  max-height: 500px;
}

.ah-app-nav-item--nested {
  padding-left: 40px !important;
  font-size: 13px;
}

.ah-app-nav-item--nested .ah-app-nav-icon {
  width: 18px;
  height: 18px;
}

.ah-app-nav-item--nested .ah-app-nav-icon svg {
  width: 16px;
  height: 16px;
}

/* Admin content only (no sidebar) */
.ah-admin-content-only {
  width: 100%;
}

.ah-app-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: var(--bg-2);
  border-radius: 8px;
}

.ah-app-user-info--clickable {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ah-app-user-info--clickable:hover {
  background: var(--bg-3);
}

.ah-app-user-info--clickable:hover .ah-app-user-avatar {
  box-shadow: 0 0 0 2px var(--sfs-red);
}

.ah-app-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: var(--sfs-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.5px;
  color: #fff;
  text-transform: uppercase;
  overflow: hidden;
  overflow: hidden;
  flex-shrink: 0;
}

.ah-app-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-app-user-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ah-app-user-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-app-user-role {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-app-logout {
  margin-top: 8px;
  color: var(--text-3);
  border-left: none;
}

.ah-app-logout:hover {
  color: var(--sfs-red);
}

/* Top Bar */
.ah-app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.ah-app-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Notification Bell & Dropdown */
.ah-notif-dropdown-container {
  position: relative;
  z-index: 1001;
}

.ah-notif-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-2, #666);
  transition: color 0.15s ease;
}

.ah-notif-bell-btn:hover {
  color: var(--sfs-red, #eb3c24);
}

.ah-notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--sfs-red, #eb3c24);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
}

.ah-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--border, #e5e5e5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
}

/* Invisible bridge to maintain hover when moving from icon to dropdown */
.ah-notif-dropdown::before {
  content: '';
  position: absolute;
  top: -16px;
  right: 0;
  width: 60px;
  height: 16px;
}

.ah-notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border, #e5e5e5);
}

.ah-notif-dropdown-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1, #111);
}

.ah-notif-unread-label {
  font-size: 12px;
  color: var(--sfs-red, #eb3c24);
  font-weight: 500;
}

.ah-notif-dropdown-list {
  max-height: 400px;
  overflow-y: auto;
}

.ah-notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-3, #888);
  font-size: 14px;
}

.ah-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-1, #111);
  border-bottom: 1px solid var(--border, #e5e5e5);
  transition: background 0.12s ease;
}

.ah-notif-item:hover {
  background: var(--bg-2, #f8f9fa);
}

.ah-notif-item.is-unread {
  background: #fef9f8;
}

.ah-notif-item.is-unread:hover {
  background: #fef3f0;
}

.ah-notif-item.is-unread .ah-notif-item-message {
  font-weight: 600;
}

.ah-notif-item.is-unread .ah-notif-item-time {
  font-weight: 500;
}

.ah-notif-item-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
}

.ah-notif-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-notif-item-content {
  flex: 1;
  min-width: 0;
}

.ah-notif-item-message {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-1, #111);
}

.ah-notif-item-message strong {
  font-weight: 600;
}

.ah-notif-mention-icon {
  color: var(--sfs-red, #eb3c24);
  font-weight: 700;
  margin-right: 2px;
}

.ah-notif-item-preview {
  font-size: 13px;
  color: var(--text-3, #888);
  font-style: italic;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-notif-item-time {
  font-size: 12px;
  color: var(--text-3, #888);
  margin-top: 4px;
}

.ah-notif-item-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: var(--sfs-red, #eb3c24);
  border-radius: 50%;
  margin-top: 6px;
}

/* Notification item wrapper for delete functionality */
.ah-notif-item-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}

.ah-notif-item-wrapper .ah-notif-item {
  flex: 1;
  min-width: 0;
}

.ah-notif-delete-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg-1, #fff);
  border: 1px solid var(--border, #e5e5e5);
  color: var(--text-3, #888);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ah-notif-item-wrapper:hover .ah-notif-delete-btn {
  opacity: 1;
}

.ah-notif-delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Undo delete banner */
.ah-notif-item--undo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: #fef3c7;
  border-bottom: 1px solid var(--border, #e5e5e5);
}

.ah-notif-undo-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ah-notif-undo-text {
  font-size: 14px;
  color: var(--text-2, #444);
}

.ah-notif-undo-btn {
  padding: 4px 12px;
  background: transparent;
  border: 1px solid #d97706;
  color: #d97706;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ah-notif-undo-btn:hover {
  background: #d97706;
  color: #fff;
}

.ah-notif-load-more {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border, #e5e5e5);
  color: var(--sfs-red, #eb3c24);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background 0.12s ease;
}

.ah-notif-load-more:hover {
  background: var(--bg-2, #f8f9fa);
}

.ah-notif-dropdown-footer {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--sfs-red, #eb3c24);
  text-decoration: none;
  transition: background 0.12s ease;
}

.ah-notif-dropdown-footer:hover {
  background: var(--bg-2, #f8f9fa);
}

/* Impersonation Banner */
.ah-impersonation-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  min-height: var(--impersonation-banner-height);
  box-sizing: border-box;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ah-impersonation-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ah-impersonation-banner-content svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.ah-impersonation-banner-content strong {
  font-weight: 600;
  color: #fff;
}

.ah-impersonation-role {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ah-impersonation-stop-btn {
  padding: 6px 16px;
  background: var(--sfs-red, #eb3c24);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ah-impersonation-stop-btn:hover {
  background: #d63520;
}

/* Offset content when impersonation banner is visible */
.ah-app-layout.is-impersonating .ah-app-sidebar,
.ah-app-layout.is-impersonating .ah-app-content,
.ah-app-layout:has(.ah-impersonation-banner) .ah-app-sidebar,
.ah-app-layout:has(.ah-impersonation-banner) .ah-app-content {
  margin-top: var(--impersonation-banner-height);
}

.ah-app-layout.is-impersonating .ah-modal-overlay,
.ah-app-layout:has(.ah-impersonation-banner) .ah-modal-overlay {
  top: var(--impersonation-banner-height);
  bottom: 0;
  height: auto;
}

.ah-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ah-app-main {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.ah-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  border-radius: 4px;
  transition: background 0.12s ease;
}

.ah-hamburger:hover {
  background: var(--bg-2);
}

.ah-hamburger svg {
  width: 24px;
  height: 24px;
}

/* Main header nav tabs - keep horizontal */
.ah-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ah-header-nav-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.12s ease;
}

.ah-header-nav-item:hover {
  background: var(--bg-3);
  color: var(--text-1);
}

.ah-header-nav-item.is-active {
  background: #fff;
  color: var(--text-1);
  border-color: var(--text-3);
}

.ah-header-nav-item--primary {
  background: var(--sfs-red);
  color: #fff;
  border-color: var(--sfs-red);
}

.ah-header-nav-item--primary:hover {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
}

/* Resources dropdown */
.ah-nav-dropdown {
  position: relative;
}

.ah-nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow-hover);
  min-width: 180px;
  padding: 8px 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.15s ease;
}

.ah-nav-dropdown:hover .ah-nav-dropdown-menu,
.ah-nav-dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ah-nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px;
  transition: background 0.12s ease;
}

.ah-nav-dropdown-item:hover {
  background: var(--bg-2);
  color: var(--text-1);
}

@media (min-width: 901px) {
  .ah-app-sidebar {
    transform: translateX(0);
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .ah-app-sidebar-overlay {
    display: none;
  }

  .ah-hamburger {
    display: none;
  }
}

/* ========================= Dashboard Styles ========================= */
.ah-dashboard {
  max-width: 1600px;
  width: 100%;
}

/* Dashboard Banner */
.ah-dashboard-banner {
  width: 100%;
  margin-bottom: 24px;
  overflow: hidden;
}

.ah-dashboard-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.ah-dashboard-header {
  margin-bottom: 24px;
}

.ah-dashboard-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px;
}

.ah-dashboard-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
}

/* Dashboard Search */
.ah-dashboard-search {
  position: relative;
  margin-bottom: 24px;
}

.ah-dashboard-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  pointer-events: none;
}

.ah-dashboard-search-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.ah-dashboard-search-field {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text-1);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ah-dashboard-search-field:focus {
  outline: none;
  border-color: var(--sfs-red);
  box-shadow: 0 0 0 3px rgba(235, 60, 36, 0.08);
}

.ah-dashboard-search-field::placeholder {
  color: var(--text-4);
}

/* Dashboard Search Results Dropdown */
.ah-dashboard-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ah-dashboard-search-result {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
}

.ah-dashboard-search-result:last-child {
  border-bottom: none;
}

.ah-dashboard-search-result:hover {
  background: var(--bg-2);
}

.ah-dashboard-search-result-image {
  width: 56px;
  height: 40px;
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.ah-dashboard-search-result-content {
  flex: 1;
  min-width: 0;
}

.ah-dashboard-search-result-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-1);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-dashboard-search-result-meta {
  font-size: 12px;
  color: var(--text-4);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.ah-search-type-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 0;
  flex-shrink: 0;
}

.ah-search-type-badge--course {
  background: var(--sfs-red);
  color: #fff;
}

.ah-search-type-badge--article {
  background: var(--sfs-teal);
  color: #fff;
}

.ah-search-author {
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-search-level {
  color: var(--text-4);
  flex-shrink: 0;
}

.ah-search-level::before {
  content: '•';
  margin-right: 8px;
}

.ah-dashboard-search-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-4);
  font-size: 14px;
}

.ah-dashboard-search-loading {
  padding: 16px;
  text-align: center;
  color: var(--text-4);
  font-size: 14px;
}

/* Main Row - Content + Community Sidebar spanning multiple sections */
.ah-dashboard-main-row {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  margin-bottom: 32px;
  width: 100%;
  align-items: stretch;
}

.ah-dashboard-main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Stats Cards - 4 in a row */
.ah-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Community Hub Sidebar - spans full height of adjacent content */
.ah-community-sidebar {
  background: #1a1a2e;
  color: #fff;
  display: flex;
  flex-direction: column;
}

/* Light theme variant for sidebar */
.ah-community-sidebar.ah-community-sidebar--light {
  background: var(--bg-1, #fff);
  color: var(--text-1);
  border: 1px solid var(--border);
}

.ah-community-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ah-community-sidebar--light .ah-community-sidebar-header {
  border-bottom: 1px solid var(--border);
}

.ah-community-sidebar-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.ah-community-sidebar--light .ah-community-sidebar-title {
  color: var(--text-1);
}

.ah-community-sidebar-content {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.ah-community-sidebar-loading,
.ah-community-sidebar-empty {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

.ah-community-sidebar--light .ah-community-sidebar-loading,
.ah-community-sidebar--light .ah-community-sidebar-empty {
  color: var(--text-3);
}

.ah-community-sidebar-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card-style posts for light theme */
.ah-community-sidebar-card {
  display: block;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-1);
  transition: all 0.15s ease;
}

.ah-community-sidebar-card:hover {
  border-color: var(--sfs-red);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ah-community-sidebar-card-header {
  margin-bottom: 8px;
}

.ah-community-sidebar-card-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-1);
  margin: 0 0 10px;
}

.ah-community-sidebar-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-3);
}

.ah-community-sidebar-author {
  font-weight: 700;
  color: var(--text-2);
}

.ah-community-sidebar-date {
  color: var(--text-3);
}

.ah-community-sidebar-date::before {
  content: '•';
  margin-right: 8px;
}

/* Small avatar for sidebar */
.ah-community-avatar--sm {
  width: 24px;
  height: 24px;
  min-width: 24px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ah-community-avatar--sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark theme posts (original) */
.ah-community-sidebar-post {
  display: block;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: #fff;
  transition: background 0.15s ease;
}

.ah-community-sidebar-post:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ah-community-sidebar-post-content {
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.9);
}

.ah-community-sidebar-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.ah-community-sidebar-post-type {
  text-transform: uppercase;
  color: var(--sfs-teal);
  font-weight: 700;
}

.ah-community-sidebar-post-time {
  color: rgba(255, 255, 255, 0.4);
}

.ah-community-sidebar-view-all {
  display: block;
  padding: 12px 16px;
  text-align: center;
  color: var(--sfs-teal);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease;
}

.ah-community-sidebar--light .ah-community-sidebar-view-all {
  color: var(--sfs-red);
  border-top: 1px solid var(--border);
}

.ah-community-sidebar-view-all:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ah-community-sidebar--light .ah-community-sidebar-view-all:hover {
  background: var(--bg-2);
}

@media (max-width: 1200px) {
  .ah-dashboard-main-row {
    grid-template-columns: 1fr 280px;
  }

  .ah-dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .ah-dashboard-main-row {
    grid-template-columns: 1fr;
  }

  .ah-community-sidebar {
    max-height: 400px;
  }

  .ah-dashboard-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .ah-dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .ah-dashboard-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .ah-dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .ah-dashboard-stats {
    grid-template-columns: 1fr;
  }
}

.ah-stat-card {
  padding: 20px;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ah-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover, 0 6px 14px rgba(0, 0, 0, 0.10));
}

.ah-stat-card-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0 0 0 100%;
}

.ah-stat-card--red {
  background: var(--sfs-red);
  color: #fff;
}

.ah-stat-card--gray {
  background: #666;
  color: #fff;
}

.ah-stat-card--dark {
  background: #1a1a1a;
  color: #fff;
}

.ah-stat-card--light {
  background: #e8e8e8;
  color: var(--text-1);
}

.ah-stat-card--light .ah-stat-card-corner {
  background: rgba(0, 0, 0, 0.05);
}

.ah-stat-card--light .ah-stat-icon {
  background: rgba(0, 0, 0, 0.08);
}

.ah-stat-card--teal {
  background: var(--sfs-teal);
  color: #fff;
}

.ah-stat-card--teal:hover {
  filter: brightness(1.05);
}

.ah-stat-card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}

.ah-stat-card-subtitle {
  font-size: 13px;
  opacity: 0.9;
}

.ah-stat-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.ah-stat-icon svg {
  width: 24px;
  height: 24px;
}

.ah-stat-value {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1;
}

.ah-stat-label {
  font-size: 13px;
  opacity: 0.9;
}

/* Dashboard Section */
.ah-dashboard-section {
  margin-bottom: 32px;
}

.ah-dashboard-section--full-width {
  margin-bottom: 32px;
}

/* Community Hub Section */
.ah-community-icon {
  margin-right: 8px;
}

.ah-community-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-3);
}

.ah-community-empty {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border: 1px solid var(--border);
}

.ah-community-empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.ah-community-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .ah-community-grid {
    grid-template-columns: 1fr;
  }
}

.ah-community-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.ah-community-card:hover {
  border-color: var(--sfs-teal);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ah-community-card-header {
  margin-bottom: 12px;
}

.ah-community-type-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
}

.ah-community-card-body {
  flex: 1;
  margin-bottom: 16px;
}

.ah-community-card-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  margin: 0;
}

.ah-community-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ah-community-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ah-community-avatar {
  width: 32px;
  height: 32px;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  line-height: 1;
  overflow: hidden;
  flex-shrink: 0;
}

.ah-community-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-community-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ah-community-author-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-community-date {
  font-size: 11px;
  color: var(--text-3);
}

.ah-community-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ah-community-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
}

.ah-community-stat svg {
  opacity: 0.6;
}

.ah-view-all-btn--primary {
  background: var(--sfs-orange);
  color: #fff;
  padding: 10px 20px;
  font-weight: 700;
}

.ah-view-all-btn--primary:hover {
  background: var(--sfs-dark-orange);
}

/* ========================= Social Feed Dashboard ========================= */

/* Right sidebar column: Community Hub + My Progress stacked */
.ah-dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Social Feed — vertical list of feed cards */
.ah-social-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Feed Card --- */
.ah-feed-card {
  background: var(--bg-1, #fff);
  border: 1px solid var(--border);
  padding: 0;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.ah-feed-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: #ccc;
}

/* Feed Card Header */
.ah-feed-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 0;
}

.ah-feed-card-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.ah-feed-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.ah-feed-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-feed-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-1);
}

.ah-feed-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--sfs-red);
  color: #fff;
  padding: 2px 8px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

.ah-feed-card-badge svg {
  width: 12px;
  height: 12px;
}

.ah-feed-card-menu {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 1;
  border-radius: 0;
  transition: background 0.12s;
}

.ah-feed-card-menu:hover {
  background: var(--bg-2);
  color: var(--text-1);
}

/* Feed Card Menu Wrapper (for dropdown positioning) */
.ah-feed-card-menu-wrap {
  position: relative;
}

/* Feed Card Dropdown Menu */
.ah-feed-card-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  padding: 4px 0;
}

.ah-feed-card-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-1);
  text-align: left;
  transition: background 0.12s;
  white-space: nowrap;
}

.ah-feed-card-dropdown-item:hover {
  background: var(--bg-2);
}

.ah-feed-card-dropdown-item svg {
  flex-shrink: 0;
  color: var(--text-3);
}

.ah-feed-card-dropdown-item--danger {
  color: var(--sfs-red);
}

.ah-feed-card-dropdown-item--danger svg {
  color: var(--sfs-red);
}

.ah-feed-card-dropdown-item--danger:hover {
  background: rgba(235, 60, 36, 0.06);
}

/* ===== Hidden Post Placeholder ===== */
.ah-feed-card--hidden {
  background: var(--bg-2);
  border: 1px dashed var(--border);
  opacity: 0.85;
}

.ah-feed-card-hidden-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
}

.ah-feed-card-hidden-content>svg {
  flex-shrink: 0;
  color: var(--text-4);
}

.ah-feed-card-hidden-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ah-feed-card-hidden-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
}

.ah-feed-card-hidden-text span {
  font-size: 13px;
  color: var(--text-4);
}

.ah-feed-card-hidden-undo {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--text-2);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.ah-feed-card-hidden-undo:hover {
  background: var(--bg-1);
  border-color: var(--text-1);
}

/* ===== Hide Reasons (Facebook-style radio list) ===== */
.ah-feed-hide-reasons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ah-feed-hide-reason {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  font-size: 14px;
  color: var(--text-1);
}

.ah-feed-hide-reason:hover {
  background: var(--bg-2);
}

.ah-feed-hide-reason--selected {
  border-color: var(--sfs-red);
  background: rgba(235, 60, 36, 0.04);
}

.ah-feed-hide-reason input[type="radio"] {
  accent-color: var(--sfs-red);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== Report Categories ===== */
.ah-feed-report-categories {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}

.ah-feed-report-category {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.ah-feed-report-category:hover {
  background: var(--bg-2);
}

.ah-feed-report-category--selected {
  border-color: var(--sfs-red);
  background: rgba(235, 60, 36, 0.04);
}

.ah-feed-report-category input[type="radio"] {
  accent-color: var(--sfs-red);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.ah-feed-report-category-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.ah-feed-report-category-content strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
}

.ah-feed-report-category-content span {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}


.ah-feed-card-title {
  padding: 12px 20px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

/* Feed Card Body */
.ah-feed-card-body {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  align-items: flex-start;
}

.ah-feed-card-body--article {
  gap: 20px;
}

.ah-feed-card-body--community {
  display: grid;
  gap: 12px;
}

.ah-feed-card-community-media {
  margin-top: 0;
}

.ah-feed-card-body--community .ah-feed-card-text {
  width: 100%;
}

/* Course arrival: image left, text right */
.ah-feed-card-image {
  width: 180px;
  height: 120px;
  flex-shrink: 0;
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.ah-feed-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-feed-card-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  min-width: 0;
}

/* Achievement card body */
.ah-feed-card-body--achievement {
  justify-content: space-between;
  align-items: center;
}

.ah-feed-card-achievement-info {
  flex: 1;
}

.ah-feed-card-achievement-info p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 16px;
}

.ah-feed-card-complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sfs-green, #59CAA5);
  color: #fff;
  padding: 6px 16px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: default;
}

.ah-feed-card-certificate {
  width: 160px;
  height: 120px;
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.ah-feed-card-certificate-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fdf6e3 0%, #fff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
}

.ah-feed-card-certificate-inner .cert-logo {
  background: var(--sfs-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  letter-spacing: 1px;
}

.ah-feed-card-certificate-inner .cert-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ah-feed-card-certificate-inner .cert-name {
  font-size: 12px;
  color: var(--text-2);
  font-style: italic;
}

/* Article share card */
.ah-feed-card-article-thumb {
  width: 120px;
  height: 90px;
  flex-shrink: 0;
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.ah-feed-card-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-feed-card-article-content {
  flex: 1;
  min-width: 0;
}

.ah-feed-card-type-label {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--sfs-red);
  margin-bottom: 8px;
}

.ah-feed-card-article-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 6px;
  line-height: 1.4;
}

.ah-feed-card-article-excerpt {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-3);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ah-feed-card-read-more {
  color: var(--sfs-red);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.ah-feed-card-read-more:hover {
  text-decoration: underline;
}

/* Feed Card Footer — Likes, Comments, Share */
.ah-feed-card-footer {
  display: flex;
  align-items: center;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  gap: 20px;
}

.ah-feed-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.12s;
  background: none;
  border: none;
  font-family: inherit;
}

.ah-feed-card-stat:hover {
  color: var(--text-1);
}

.ah-feed-card-stat svg {
  width: 18px;
  height: 18px;
}

.ah-feed-card-stat--liked svg {
  fill: var(--sfs-red);
  color: var(--sfs-red);
}

.ah-feed-card-stat--liked {
  color: var(--sfs-red);
}

.ah-feed-card-share {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sfs-red);
  color: #fff;
  border: 1px solid var(--sfs-red);
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0;
  font-family: inherit;
  transition: background 0.15s ease, filter 0.15s ease;
}

.ah-feed-card-share:hover {
  filter: brightness(0.95);
}

.ah-feed-card-share:active {
  background: #C52A18;
  border-color: #C52A18;
  transform: translateY(1px);
}

.ah-feed-card-share svg {
  width: 16px;
  height: 16px;
}

/* Active state for comment button */
.ah-feed-card-stat--active {
  color: var(--sfs-teal, #00827F);
  font-weight: 600;
}

.ah-feed-card-stat--active svg {
  color: var(--sfs-teal, #00827F);
}

/* --- Feed Comments Section --- */
.ah-feed-comments {
  border-top: 1px solid var(--border);
  padding: 0;
  animation: ah-comments-slide-in 0.25s ease-out;
}

@keyframes ah-comments-slide-in {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    max-height: 600px;
    transform: translateY(0);
  }
}

/* Comment input row */
.ah-feed-comments-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.ah-feed-comments-input-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sfs-teal, #00827F);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.ah-feed-comments-input input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-2, #f5f5f5);
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-1);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.ah-feed-comments-input input:focus {
  border-color: var(--sfs-teal, #00827F);
  background: #fff;
}

.ah-feed-comments-input input::placeholder {
  color: var(--text-4, #aaa);
}

.ah-feed-comments-send {
  background: var(--sfs-teal, #00827F);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: filter 0.12s, opacity 0.12s;
}

.ah-feed-comments-send:hover:not(:disabled) {
  filter: brightness(1.15);
}

.ah-feed-comments-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ah-feed-comments-send svg {
  width: 16px;
  height: 16px;
}

/* Comment list */
.ah-feed-comments-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 0;
}

.ah-feed-comments-loading,
.ah-feed-comments-empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3, #999);
}

/* Individual comment */
.ah-feed-comment {
  display: flex;
  gap: 10px;
  padding: 10px 20px;
  align-items: flex-start;
  position: relative;
  transition: background 0.12s;
}

.ah-feed-comment:hover {
  background: var(--bg-2, #f8f8f8);
}

.ah-feed-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.ah-feed-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-feed-comment-body {
  flex: 1;
  min-width: 0;
}

.ah-feed-comment-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.ah-feed-comment-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-feed-comment-time {
  font-size: 11px;
  color: var(--text-4, #aaa);
}

.ah-feed-comment-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  margin: 0;
  word-break: break-word;
}

.ah-feed-comment-delete {
  background: none;
  border: none;
  color: var(--text-4, #aaa);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s;
  flex-shrink: 0;
}

.ah-feed-comment:hover .ah-feed-comment-delete {
  opacity: 1;
}

.ah-feed-comment-delete:hover {
  color: var(--sfs-red);
}

/* View all comments link */
.ah-feed-comments-view-all {
  display: block;
  width: 100%;
  padding: 8px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3, #6b7280);
  text-align: left;
  transition: color 0.15s;
}

.ah-feed-comments-view-all:hover {
  color: var(--sfs-red, #c8102e);
}

/* --- My Progress Sidebar --- */
.ah-progress-sidebar {
  background: var(--bg-1, #fff);
  border: 1px solid var(--border);
}

.ah-progress-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.ah-progress-sidebar-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-progress-sidebar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.ah-progress-stat-card {
  padding: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ah-progress-stat-card--teal {
  background: var(--sfs-teal);
  color: #fff;
}

.ah-progress-stat-card--red {
  background: var(--sfs-red);
  color: #fff;
}

.ah-progress-stat-card--gray {
  background: #666;
  color: #fff;
}

.ah-progress-stat-card--dark {
  background: #1a1a1a;
  color: #fff;
}

.ah-progress-stat-card .ah-progress-stat-icon {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.ah-progress-stat-card .ah-progress-stat-icon svg {
  width: 16px;
  height: 16px;
}

.ah-progress-stat-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

.ah-progress-stat-label {
  font-size: 11px;
  opacity: 0.9;
}

.ah-progress-stat-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.2;
}

.ah-progress-stat-subtitle {
  font-size: 11px;
  opacity: 0.85;
}

/* --- Enhanced Community Hub Sidebar --- */
.ah-community-sidebar-comment {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.ah-community-sidebar-comment input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--bg-2, #f5f5f5);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-1);
  transition: border-color 0.15s;
}

.ah-community-sidebar-comment input:focus {
  outline: none;
  border-color: var(--sfs-red);
}

.ah-community-sidebar-comment input::placeholder {
  color: var(--text-4);
}

.ah-community-sidebar-reactions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

.ah-community-sidebar-reaction-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: color 0.12s, background 0.12s;
}

.ah-community-sidebar-reaction-btn:hover {
  background: var(--bg-2);
  color: var(--sfs-red);
}

.ah-community-sidebar-reaction-btn svg {
  width: 18px;
  height: 18px;
}

/* Responsive for new social feed layout */
@media (max-width: 1200px) {
  .ah-dashboard-main-row {
    grid-template-columns: 1fr 280px;
  }
}

@media (max-width: 900px) {
  .ah-dashboard-main-row {
    grid-template-columns: 1fr;
  }

  .ah-dashboard-sidebar {
    order: -1;
  }

  .ah-feed-card-image {
    width: 140px;
    height: 100px;
  }
}

@media (max-width: 600px) {
  .ah-feed-card-body {
    flex-direction: column;
  }

  .ah-feed-card-image {
    width: 100%;
    height: 180px;
  }

  .ah-feed-card-article-thumb {
    width: 100%;
    height: 140px;
  }

  .ah-progress-sidebar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Timeline Social Feed Layout --- */
.ah-timeline {
  position: relative;
}

.ah-timeline-item {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 24px;
}

.ah-timeline-item:last-child {
  padding-bottom: 0;
}

.ah-timeline-track {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48px;
  flex-shrink: 0;
  padding-top: 18px;
}

.ah-timeline-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ah-timeline-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-timeline-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--border, #E6E6E6);
  z-index: 1;
}

.ah-timeline-item:first-child .ah-timeline-line {
  top: 42px;
}

.ah-timeline-item:last-child .ah-timeline-line {
  height: 42px;
}

.ah-timeline-card {
  flex: 1;
  min-width: 0;
}

@media (max-width: 600px) {
  .ah-timeline-track {
    display: none;
  }

  .ah-timeline-item {
    gap: 0;
  }
}

/* --- Engagement Activity Graph --- */
.ah-engagement-graph {
  background: var(--bg-1, #fff);
  border: 1px solid var(--border);
}

.ah-engagement-graph-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ah-engagement-graph-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-engagement-graph-period {
  font-size: 12px;
  font-weight: 700;
  color: var(--sfs-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ah-engagement-graph-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 24px 20px 12px;
  height: 160px;
}

.ah-engagement-graph-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.ah-engagement-graph-bar-track {
  flex: 1;
  width: 100%;
  background: var(--bg-2, #f5f5f5);
  position: relative;
  display: flex;
  align-items: flex-end;
}

.ah-engagement-graph-bar-fill {
  width: 100%;
  background: var(--sfs-red);
  transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 4px;
}

.ah-engagement-graph-bar-fill--accent {
  background: var(--sfs-teal);
}

.ah-engagement-graph-bar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
}

.ah-engagement-graph-stats {
  display: flex;
  border-top: 1px solid var(--border);
}

.ah-engagement-graph-stat {
  flex: 1;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ah-engagement-graph-stat:first-child {
  border-right: 1px solid var(--border);
}

.ah-engagement-graph-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-engagement-graph-stat-label {
  font-size: 11px;
  color: var(--text-3);
}

/* Quick Actions Section */
.ah-quick-actions-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .ah-quick-actions-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .ah-quick-actions-cards {
    grid-template-columns: 1fr;
  }
}

.ah-quick-action-card-v2 {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
}

.ah-quick-action-card-v2:hover {
  border-color: var(--sfs-red);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ah-quick-action-card-v2-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sfs-red);
}

.ah-quick-action-card-v2-icon svg {
  width: 24px;
  height: 24px;
}

.ah-quick-action-card-v2-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ah-quick-action-card-v2-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-quick-action-card-v2-subtitle {
  font-size: 13px;
  color: var(--sfs-red);
}

/* Legacy quick actions bar - keeping for compatibility */
.ah-quick-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
}

.ah-quick-actions-bar .sfs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 300;
}

.ah-quick-actions-bar .sfs-btn svg {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .ah-quick-actions-bar {
    flex-direction: column;
  }

  .ah-quick-actions-bar .sfs-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Legacy quick action cards - keeping for compatibility */
.ah-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .ah-quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ah-quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: #fff;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ah-quick-action-card:hover {
  border-color: var(--sfs-teal);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ah-quick-action-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.ah-quick-action-card-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-course-grid--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ah-course-grid--4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) {
  .ah-course-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .ah-course-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .ah-course-grid--3,
  .ah-course-grid--4 {
    grid-template-columns: 1fr;
  }
}

.ah-dashboard-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.ah-dashboard-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px;
}

.ah-dashboard-section-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
}

/* View All Button */
.ah-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ah-view-all-btn:hover {
  background: var(--bg-2);
  border-color: var(--text-4);
  color: var(--text-1);
}

.ah-view-all-btn svg {
  width: 16px;
  height: 16px;
}

/* Course Grid */
.ah-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.ah-course-card {
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-base, 0 2px 6px rgba(0, 0, 0, 0.06));
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.ah-course-card:hover {
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-hover, 0 6px 14px rgba(0, 0, 0, 0.10));
  transform: translateY(-4px);
}

.ah-course-card-image-wrap {
  position: relative;
}

.ah-course-card-image {
  height: 180px;
  background: #e5e5e5;
  background-size: cover;
  background-position: center;
}

.ah-course-card-video-thumb {
  position: relative;
  height: 180px;
  background: #1a1a1a;
  overflow: hidden;
}

.ah-course-card-video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-course-card-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(235, 60, 36, 0.9);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ah-course-card-play-icon svg {
  margin-left: 2px;
}

.ah-course-tag--video {
  background: rgba(31, 41, 55, 0.88) !important;
  padding: 4px 8px !important;
  min-width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
}

.ah-course-card-tags-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ah-course-card-body {
  padding: 16px;
}

.ah-course-card-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.ah-course-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.ah-course-tag--level {
  background: #fff;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.ah-course-tag--featured {
  background: var(--sfs-red);
  color: #fff;
}

.ah-course-tag--lesson {
  background: #f59e0b;
  color: #fff;
}

/* Section divider for search results */
.ah-section-divider {
  margin: 40px 0 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.ah-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

.ah-section-title svg {
  color: var(--sfs-red);
}

.ah-course-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ah-course-card-desc {
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ah-course-card-author {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
}

.ah-course-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}

.ah-course-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ah-course-meta-item svg {
  opacity: 0.7;
}

.ah-course-meta-item--parent {
  color: var(--sfs-red);
  font-weight: 700;
}

.ah-course-meta-item--parent svg {
  opacity: 1;
}

.ah-course-progress {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.ah-course-progress-bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 6px;
}

.ah-course-progress-fill {
  height: 100%;
  background: var(--sfs-red);
  border-radius: 0;
  transition: width 0.3s ease;
}

.ah-course-progress-text {
  font-size: 12px;
  color: var(--text-3);
}

/* Dashboard Two Column Layout */
.ah-dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  margin-top: 32px;
}

@media (max-width: 1024px) {
  .ah-dashboard-two-col {
    grid-template-columns: 1fr;
  }
}

.ah-dashboard-main-col {
  min-width: 0;
}

.ah-dashboard-side-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Activity Panel */
.ah-activity-panel {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 20px;
}

.ah-activity-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ah-activity-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

.ah-activity-view-all {
  font-size: 13px;
  color: var(--sfs-blue);
  text-decoration: none;
  font-weight: 500;
}

.ah-activity-view-all:hover {
  text-decoration: underline;
}

.ah-activity-loading {
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

.ah-activity-empty {
  text-align: center;
  padding: 24px 16px;
}

.ah-activity-empty-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.ah-activity-empty p {
  color: var(--text-3);
  margin: 0 0 12px;
  font-size: 14px;
}

.ah-activity-cta {
  display: inline-block;
  padding: 8px 16px;
  background: var(--sfs-orange);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.ah-activity-cta:hover {
  background: var(--sfs-dark-orange);
}

.ah-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ah-activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.ah-activity-item:first-child {
  padding-top: 0;
}

.ah-activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ah-activity-item:hover {
  background-color: var(--bg-2);
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.ah-activity-type-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-activity-content {
  flex: 1;
  min-width: 0;
}

.ah-activity-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.ah-activity-type-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--sfs-blue);
  letter-spacing: 0.5px;
}

.ah-activity-dot {
  color: var(--text-4);
  font-size: 10px;
}

.ah-activity-time {
  font-size: 11px;
  color: var(--text-4);
}

.ah-activity-text {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-activity-author {
  font-size: 12px;
  color: var(--text-3);
}

/* Quick Actions Panel */
.ah-quick-actions-panel {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 20px;
}

.ah-quick-actions-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px;
}

.ah-quick-actions-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ah-quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.ah-quick-action-btn:hover {
  background: var(--bg-3);
  border-color: var(--sfs-blue);
}

.ah-quick-action-icon {
  font-size: 24px;
}

.ah-quick-action-btn span:last-child {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

/* Course Detail Page */
.ah-course-detail-hero {
  background: #1a1a1a;
  color: #fff;
  margin: -24px -24px 0;
  padding: 40px 24px;
}

.ah-course-detail-hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .ah-course-detail-hero-content {
    grid-template-columns: 1fr;
  }
}

.ah-course-detail-hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ah-course-detail-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
}

.ah-course-detail-desc {
  font-size: 15px;
  opacity: 0.9;
  margin: 0 0 16px;
  line-height: 1.6;
}

.ah-course-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 14px;
  opacity: 0.9;
}

.ah-course-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ah-course-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--sfs-red);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.15s ease;
  width: fit-content;
  border: 2px solid var(--sfs-red);
}

.ah-course-start-btn:hover {
  background: #c62828;
  border-color: #c62828;
}

.ah-course-start-btn--outline {
  background: transparent;
  border: 2px solid var(--sfs-red);
  color: #fff;
}

.ah-course-start-btn--outline:hover {
  background: var(--sfs-red);
}

.ah-course-start-btn-icon {
  width: 32px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-course-start-btn-icon svg {
  margin-left: 2px;
}

.ah-course-detail-hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image Collage Effect */
.ah-course-detail-image-collage {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 20px;
}

.ah-image-collage-main {
  position: relative;
  z-index: 2;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ah-image-collage-main img {
  width: 100%;
  height: auto;
  display: block;
}

.ah-image-collage-placeholder {
  width: 100%;
  padding-top: 56.25%;
  background: #444;
}

.ah-image-collage-accent {
  position: absolute;
  background: rgba(235, 60, 36, 0.15);
  border: 2px solid rgba(235, 60, 36, 0.4);
  border-radius: 8px;
}

.ah-image-collage-accent--1 {
  top: 0;
  right: 0;
  width: 40%;
  height: 60%;
  z-index: 1;
}

.ah-image-collage-accent--2 {
  bottom: 0;
  left: 0;
  width: 35%;
  height: 50%;
  z-index: 1;
}

.ah-course-detail-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ah-course-detail-image-placeholder {
  width: 100%;
  padding-top: 56.25%;
  background: #333;
  border-radius: 8px;
}

/* Course Detail Layout */
.ah-course-detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

@media (max-width: 900px) {
  .ah-course-detail-layout {
    grid-template-columns: 1fr;
  }
}

.ah-course-detail-main {
  min-width: 0;
}

.ah-course-detail-section {
  margin-bottom: 32px;
}

.ah-course-detail-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Curriculum List */
.ah-curriculum-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-curriculum-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.ah-curriculum-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-2);
  cursor: pointer;
  font-weight: 500;
}

.ah-curriculum-section-header::-webkit-details-marker {
  display: none;
}

.ah-curriculum-section-title {
  font-weight: 600;
  color: var(--text-1);
}

.ah-curriculum-section-count {
  font-size: 13px;
  color: var(--text-3);
}

.ah-curriculum-lessons {
  border-top: 1px solid var(--border);
}

.ah-curriculum-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-2);
  transition: background 0.12s ease;
  border-bottom: 1px solid var(--border);
}

.ah-curriculum-lesson:last-child {
  border-bottom: none;
}

.ah-curriculum-lesson:hover {
  background: var(--bg-2);
}

.ah-curriculum-lesson-number {
  width: 24px;
  height: 24px;
  background: var(--bg-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  flex-shrink: 0;
}

.ah-curriculum-lesson-title {
  flex: 1;
  font-size: 14px;
}

.ah-curriculum-lesson-duration {
  font-size: 13px;
  color: var(--text-4);
}

.ah-curriculum-lesson-type {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  padding: 2px 8px;
  background: var(--bg-2);
  color: var(--text-3);
}

/* Course Detail Sidebar */
.ah-course-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ah-course-detail-sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.ah-course-detail-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px;
}

.ah-course-detail-learn-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-course-detail-learn-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.4;
}

.ah-course-detail-learn-check {
  color: var(--sfs-teal);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Instructor */
.ah-course-instructor {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.ah-course-instructor:not(:last-child) {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 4px;
}

.ah-course-instructor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.ah-course-instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-course-instructor-info {
  flex: 1;
  min-width: 0;
}

.ah-course-instructor-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
}

.ah-course-instructor-title {
  font-size: 13px;
  color: var(--text-3);
}

/* ========================= Page Layout & Hero ========================= */
.ah-page {
  max-width: 100%;
}

.ah-page-hero {
  margin: -24px -24px 0;
  padding: 40px 24px;
  color: #fff;
}

.ah-page-hero--red {
  background: var(--sfs-red);
}

.ah-page-hero--dark {
  background: #1a1a1a;
}

.ah-page-hero--gray {
  background: #424242;
}

.ah-page-hero-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
}

.ah-page-hero-subtitle {
  font-size: 15px;
  margin: 0;
  opacity: 0.9;
}

.ah-page-hero-icon {
  width: 56px;
  height: 56px;
  background: var(--sfs-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

/* Profile Page Styles */
.ah-profile-picture-section {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.ah-profile-avatar-large {
  width: 80px;
  height: 80px;
  background: var(--sfs-red);
  overflow: hidden;
  flex-shrink: 0;
}

.ah-profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ah-profile-avatar-initials {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -1px;
  color: #fff;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

/* Avatar Color Selector */
.ah-avatar-color-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ah-avatar-color-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 12px;
}

.ah-avatar-color-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ah-avatar-color-btn {
  width: 32px;
  height: 32px;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, border-color 0.15s;
}

.ah-avatar-color-btn:hover {
  transform: scale(1.1);
}

.ah-avatar-color-btn.is-selected {
  border-color: var(--text-1);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text-1);
}

.ah-profile-picture-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-profile-picture-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

.ah-profile-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.ah-profile-picture-hint {
  font-size: 12px;
  color: var(--text-4);
  margin: 0;
}

.ah-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .ah-profile-grid {
    grid-template-columns: 1fr;
  }
}

.ah-profile-field {
  margin-bottom: 0;
}

.ah-profile-field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-4);
  margin-bottom: 8px;
  font-weight: 400;
}

.ah-profile-field-label svg {
  flex-shrink: 0;
}

.ah-profile-field-value {
  font-size: 15px;
  color: var(--text-1);
  font-weight: 700;
}

.ah-profile-field-value--muted {
  font-weight: 400;
  color: var(--text-3);
  font-style: italic;
}

.ah-profile-field-hint {
  font-size: 12px;
  color: var(--text-4);
  margin-top: 4px;
}

.ah-label-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.ah-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

.ah-loading {
  padding: 48px;
  text-align: center;
  color: var(--text-3);
}

/* Analytics Dashboard */

/* Filter Section */
.ah-analytics-filters {
  background: #fff;
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

.ah-analytics-filters-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 20px;
}

.ah-analytics-filters-header svg {
  color: var(--sfs-red);
}

.ah-analytics-filters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .ah-analytics-filters-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.ah-analytics-filter {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-analytics-filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.ah-analytics-filter-select {
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  color: var(--text-1);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.ah-analytics-filter-select:focus {
  outline: none;
  border-color: var(--sfs-red);
}

/* Stats Cards */
.ah-analytics-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ah-analytics-stats--5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
  .ah-analytics-stats--5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .ah-analytics-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .ah-analytics-stats--5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .ah-analytics-stats {
    grid-template-columns: 1fr;
  }

  .ah-analytics-stats--5 {
    grid-template-columns: 1fr;
  }
}

.ah-analytics-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 20px;
  position: relative;
}

.ah-analytics-stat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ah-analytics-stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ah-analytics-stat-icon--blue {
  background: #3b82f6;
}

.ah-analytics-stat-icon--orange {
  background: #f97316;
}

.ah-analytics-stat-trend {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-analytics-stat-trend--up {
  color: #22c55e;
}

.ah-analytics-stat-trend--down {
  color: #ef4444;
}

.ah-analytics-stat-icon--red {
  background: var(--sfs-red);
}

.ah-analytics-stat-icon--green {
  background: #4caf50;
}

.ah-analytics-stat-icon--teal {
  background: var(--sfs-teal);
}

.ah-analytics-stat-icon--purple {
  background: #9c27b0;
}

.ah-analytics-stat-trend {
  position: absolute;
  top: 20px;
  right: 20px;
}

.ah-analytics-trend-icon--up {
  color: #4caf50;
}

.ah-analytics-trend-icon--down {
  color: var(--sfs-red);
}

.ah-analytics-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
  margin-bottom: 4px;
}

.ah-analytics-stat-label {
  font-size: 13px;
  color: var(--text-3);
}

.ah-analytics-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .ah-analytics-charts {
    grid-template-columns: 1fr;
  }
}

.ah-analytics-pie-container {
  display: flex;
  align-items: center;
  gap: 32px;
}

.ah-analytics-pie-chart {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}

.ah-pie-chart {
  width: 100%;
  height: 100%;
}

.ah-analytics-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-analytics-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.ah-analytics-legend-dot {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.ah-analytics-legend-dot--completed {
  background: var(--sfs-red);
}

.ah-analytics-legend-dot--progress {
  background: #212121;
}

.ah-analytics-legend-dot--notstarted {
  background: #9e9e9e;
}

.ah-analytics-line-container {
  padding: 16px 0;
}

.ah-line-chart {
  width: 100%;
  height: 180px;
}

.ah-analytics-line-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--sfs-red);
}

/* Analytics Clickable Cards */
.ah-analytics-stat-card--clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.ah-analytics-stat-card--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--sfs-red);
}

.ah-analytics-stat-card--clickable:focus {
  outline: none;
  border-color: var(--sfs-red);
}

/* Analytics Modal */
.ah-analytics-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.ah-analytics-modal {
  background: #fff;
  width: 100%;
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.ah-analytics-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ah-analytics-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0;
}

.ah-analytics-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-3);
  transition: color 0.15s ease;
}

.ah-analytics-modal-close:hover {
  color: var(--text-1);
}

.ah-analytics-modal-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.ah-analytics-modal-summary {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 20px 0;
}

.ah-analytics-modal-summary strong {
  color: var(--sfs-red);
  font-weight: 600;
}

.ah-analytics-modal-table-container {
  overflow-x: auto;
}

.ah-analytics-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ah-analytics-modal-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-2);
  font-weight: 600;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.ah-analytics-modal-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
}

.ah-analytics-modal-table tbody tr:hover {
  background: var(--bg-2);
}

.ah-analytics-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ah-analytics-user-avatar {
  width: 36px;
  height: 36px;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.ah-analytics-user-name {
  font-weight: 500;
  color: var(--text-1);
}

.ah-analytics-user-email {
  font-size: 12px;
  color: var(--text-3);
}

.ah-analytics-role-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.ah-analytics-role-badge--admin {
  background: #fee2e2;
  color: #991b1b;
}

.ah-analytics-role-badge--editor {
  background: #dbeafe;
  color: #1e40af;
}

.ah-analytics-role-badge--approver {
  background: #fef3c7;
  color: #92400e;
}

.ah-analytics-role-badge--learner {
  background: #d1fae5;
  color: #065f46;
}

.ah-analytics-progress-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ah-analytics-progress-cell--wide {
  min-width: 200px;
}

.ah-analytics-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-3);
  overflow: hidden;
  min-width: 80px;
}

.ah-analytics-progress-fill {
  height: 100%;
  background: var(--sfs-red);
  transition: width 0.3s ease;
}

.ah-analytics-progress-cell span {
  font-size: 13px;
  font-weight: 500;
  min-width: 40px;
  text-align: right;
}

.ah-analytics-course-title,
.ah-analytics-article-title {
  font-weight: 500;
  color: var(--text-1);
}

.ah-analytics-category-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-3);
  font-size: 12px;
  color: var(--text-2);
}

.ah-analytics-status-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.ah-analytics-status-badge--published {
  background: #d1fae5;
  color: #065f46;
}

.ah-analytics-status-badge--draft {
  background: #fef3c7;
  color: #92400e;
}

.ah-analytics-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-2);
  color: var(--text-2);
}

.ah-analytics-rank--top {
  background: #fef3c7;
  color: #92400e;
}

.ah-analytics-empty {
  text-align: center;
  color: var(--text-3);
  padding: 32px 16px !important;
  font-style: italic;
}

/* Analytics Navigation Tiles */
.ah-analytics-nav-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .ah-analytics-nav-tiles {
    grid-template-columns: 1fr;
  }
}

.ah-analytics-nav-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  min-height: 140px;
  font-family: inherit;
}

.ah-analytics-nav-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ah-analytics-nav-tile--red {
  background: linear-gradient(135deg, #c8102e 0%, #e53e3e 100%);
  color: #fff;
}

.ah-analytics-nav-tile--teal {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  color: #fff;
}

.ah-analytics-nav-tile--dark {
  background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
  color: #fff;
}

.ah-analytics-nav-tile--brown {
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
  color: #fff;
}

.ah-analytics-nav-tile-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 16px;
}

.ah-analytics-nav-tile-icon svg {
  opacity: 0.9;
}

.ah-analytics-nav-tile-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #fff;
}

.ah-analytics-nav-tile-subtitle {
  font-size: 14px;
  margin: 0;
  opacity: 0.85;
  color: #fff;
}

/* Analytics Modal Additional Styles */
.ah-analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .ah-analytics-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ah-analytics-metric-card {
  background: var(--bg-2);
  padding: 20px;
  text-align: center;
}

.ah-analytics-metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--sfs-red);
  margin-bottom: 4px;
}

.ah-analytics-metric-label {
  font-size: 13px;
  color: var(--text-3);
}

.ah-analytics-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin: 24px 0 16px 0;
}

.ah-analytics-score-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #d1fae5;
  color: #065f46;
  font-size: 12px;
  font-weight: 600;
}

.ah-analytics-type-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}

/* Analytics Modal - Enhanced Stat Cards & Layouts */
.ah-analytics-modal-stats {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.ah-analytics-modal-stats--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .ah-analytics-modal-stats--3 {
    grid-template-columns: 1fr;
  }
}

.ah-analytics-modal-stat-card {
  background: #f9fafb;
  padding: 20px;
  position: relative;
}

.ah-analytics-modal-stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 12px;
}

.ah-analytics-modal-stat-icon--blue {
  background: #dbeafe;
  color: #2563eb;
}

.ah-analytics-modal-stat-icon--purple {
  background: #f3e8ff;
  color: #9333ea;
}

.ah-analytics-modal-stat-icon--green {
  background: #dcfce7;
  color: #16a34a;
}

.ah-analytics-modal-stat-icon--orange {
  background: #fed7aa;
  color: #ea580c;
}

.ah-analytics-modal-stat-trend {
  position: absolute;
  top: 20px;
  right: 20px;
}

.ah-analytics-modal-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}

.ah-analytics-modal-stat-label {
  font-size: 14px;
  color: var(--text-3);
}

/* Two Column Layout */
.ah-analytics-modal-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .ah-analytics-modal-two-col {
    grid-template-columns: 1fr;
  }
}

.ah-analytics-modal-section {
  background: #f9fafb;
  padding: 20px;
}

.ah-analytics-modal-section--full {
  background: #f9fafb;
  padding: 20px;
  margin-top: 24px;
}

/* Performers List */
.ah-analytics-performers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-analytics-performer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
}

.ah-analytics-performer-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

.ah-analytics-performer-rank--gold {
  background: #fbbf24;
  color: #fff;
}

.ah-analytics-performer-info {
  flex: 1;
  min-width: 0;
}

.ah-analytics-performer-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-analytics-performer-stats {
  font-size: 12px;
  color: var(--text-3);
}

.ah-analytics-performer-progress {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
}

.ah-analytics-performer-rate {
  text-align: right;
}

.ah-analytics-performer-rate-value {
  font-size: 18px;
  font-weight: 700;
  color: #ea580c;
  display: block;
}

.ah-analytics-performer-rate-label {
  font-size: 11px;
  color: var(--text-3);
}

/* Horizontal Bar Chart */
.ah-horizontal-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-horizontal-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ah-horizontal-bar-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-2);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-horizontal-bar-track {
  flex: 1;
  height: 24px;
  background: transparent;
  border: 1px dashed #d1d5db;
  position: relative;
}

.ah-horizontal-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #6b7280;
  min-width: 2px;
}

/* Chart Legend */
.ah-analytics-chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-2);
}

.ah-analytics-chart-legend--multi {
  gap: 20px;
}

.ah-analytics-chart-legend--multi span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ah-analytics-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Empty States */
.ah-analytics-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: 14px;
}

.ah-analytics-empty-chart {
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d1d5db;
  margin-top: 16px;
}

/* Chart SVGs */
.ah-monthly-line-chart,
.ah-vertical-bar-chart,
.ah-grouped-bar-chart,
.ah-dual-line-chart {
  width: 100%;
  height: auto;
  max-height: 200px;
}

/* Tags & Categories Management */
.ah-tags-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  width: fit-content;
  overflow: hidden;
}

.ah-tags-tab {
  padding: 10px 32px;
  background: #fff;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ah-tags-tab:not(:last-child) {
  border-right: 1px solid var(--border);
}

.ah-tags-tab:hover {
  background: var(--bg-1);
}

.ah-tags-tab.is-active {
  background: var(--bg-1);
  color: var(--text-1);
}

.ah-category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ah-category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-3);
  min-width: 200px;
  max-width: 280px;
}

.ah-category-card--course {
  border-left-color: var(--text-3);
}

.ah-category-card--article {
  border-left-color: var(--sfs-red);
}

.ah-category-card--tag {
  border-left-color: var(--sfs-teal);
}

.ah-category-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-1);
  color: var(--text-3);
  flex-shrink: 0;
}

.ah-category-icon--article {
  background: #fef2f2;
  color: var(--sfs-red);
}

.ah-category-icon--tag {
  background: #f0fdfa;
  color: var(--sfs-teal);
}

.ah-category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

.ah-category-count {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.ah-category-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.ah-icon-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-3);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ah-icon-btn:hover {
  background: var(--bg-1);
  color: var(--text-1);
}

.ah-icon-btn--danger:hover {
  background: #fef2f2;
  color: var(--sfs-red);
}

.ah-text-muted {
  color: var(--text-3);
}

.ah-page-hero-icon--white {
  background: rgba(255, 255, 255, 0.15);
}

/* Submit Content Modal */
.ah-submit-modal {
  max-height: 90vh;
  overflow-y: auto;
}

.ah-modal--lg {
  width: 480px;
  max-width: 95vw;
}

.ah-select--highlight {
  border-color: var(--sfs-red);
}

.ah-alert {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
}

.ah-alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.ah-file-upload-area {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ah-file-upload-area:hover {
  border-color: var(--text-3);
  background: var(--bg-1);
}

.ah-file-upload-icon {
  color: var(--text-3);
}

.ah-file-upload-text {
  color: var(--text-3);
  font-size: 14px;
}

.ah-uploaded-files {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-uploaded-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
}

.ah-uploaded-file-name {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.ah-uploaded-file-remove {
  background: none;
  border: none;
  color: var(--sfs-red);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  margin-left: 8px;
}

.ah-uploaded-file-remove:hover {
  color: #991b1b;
}

/* My Submissions Page */
.ah-submissions-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ah-submissions-stat {
  background: #fff;
  border: 1px solid var(--border);
  padding: 16px 24px;
  min-width: 100px;
  text-align: center;
}

.ah-submissions-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-submissions-stat-label {
  font-size: 13px;
  color: var(--text-3);
}

.ah-submissions-stat--pending .ah-submissions-stat-value {
  color: #f59e0b;
}

.ah-submissions-stat--approved .ah-submissions-stat-value {
  color: #10b981;
}

.ah-submissions-stat--rejected .ah-submissions-stat-value {
  color: #ef4444;
}

.ah-submissions-empty {
  text-align: center;
  padding: 64px 24px;
  background: #fff;
  border: 1px solid var(--border);
}

.ah-submissions-empty svg {
  color: var(--text-4);
  margin-bottom: 16px;
}

.ah-submissions-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 8px;
}

.ah-submissions-empty p {
  color: var(--text-3);
  margin: 0 0 24px;
}

.ah-submissions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ah-submission-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ah-submission-card:hover {
  border-color: var(--text-4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ah-submission-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ah-submission-card-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ah-submission-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
}

.ah-submission-status--pending {
  background: #fef3c7;
  color: #92400e;
}

.ah-submission-status--approved {
  background: #d1fae5;
  color: #065f46;
}

.ah-submission-status--rejected {
  background: #fee2e2;
  color: #991b1b;
}

.ah-submission-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 8px;
}

.ah-submission-card-desc {
  font-size: 14px;
  color: var(--text-3);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ah-submission-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ah-submission-card-date {
  font-size: 13px;
  color: var(--text-4);
}

.ah-submission-delete-button {
  appearance: none;
  border: 1px solid #b91c1c;
  background: #b91c1c;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
}

.ah-submission-delete-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.ah-submission-card-view {
  font-size: 13px;
  color: var(--sfs-red);
  font-weight: 500;
}

/* Progress indicator */
.ah-submission-progress {
  display: flex;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ah-submission-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ah-submission-progress-step span {
  font-size: 11px;
  color: var(--text-4);
  white-space: nowrap;
}

.ah-submission-progress-step--done span {
  color: var(--text-2);
}

.ah-submission-progress-step--rejected span {
  color: #ef4444;
}

.ah-submission-progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.ah-submission-progress-step--done .ah-submission-progress-dot {
  background: #10b981;
}

.ah-submission-progress-step--rejected .ah-submission-progress-dot {
  background: #ef4444;
}

.ah-submission-progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 20px;
}

.ah-submission-progress-line--done {
  background: #10b981;
}

.ah-submission-progress-line--rejected {
  background: #ef4444;
}

/* Submission Detail Modal */
.ah-submission-detail-modal {
  max-width: 560px;
}

.ah-submission-detail-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-1);
  border-radius: 8px;
  margin-bottom: 24px;
}

.ah-submission-detail-status h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 4px;
}

.ah-submission-detail-status p {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
}

.ah-submission-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ah-submission-detail-field {
  margin-bottom: 0;
}

.ah-submission-detail-field--full {
  grid-column: 1 / -1;
}

.ah-submission-detail-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ah-submission-detail-field p {
  font-size: 14px;
  color: var(--text-1);
  margin: 0;
}

.ah-submission-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ah-submission-file {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-2);
}

.ah-submission-admin-notes {
  padding: 12px;
  background: #fef3c7;
  border-radius: 4px;
  border-left: 3px solid #f59e0b;
}

/* Approver Dashboard */
.ah-approver-page {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ah-approver-page .ah-page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ah-approver-hero-stats {
  display: flex;
  gap: 24px;
}

.ah-approver-hero-stat {
  text-align: center;
}

.ah-approver-hero-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
}

.ah-approver-hero-stat-label {
  font-size: 13px;
  opacity: 0.8;
}

.ah-approver-content {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
  padding: 0 !important;
}

@media (max-width: 1024px) {
  .ah-approver-content {
    grid-template-columns: 1fr;
  }
}

.ah-approver-list {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.ah-approver-filters {
  display: flex;
  gap: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: var(--bg-1);
}

.ah-approver-filter {
  padding: 6px 12px;
  font-size: 12px;
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  border-radius: 4px;
}

.ah-approver-filter:hover {
  background: #fff;
  color: var(--text-1);
}

.ah-approver-filter.is-active {
  background: #fff;
  color: var(--text-1);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ah-approver-items {
  flex: 1;
  overflow-y: auto;
}

.ah-approver-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.ah-approver-item:hover {
  background: var(--bg-1);
}

.ah-approver-item.is-selected {
  background: #fef2f2;
  border-left: 3px solid var(--sfs-red);
}

.ah-approver-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ah-approver-item-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-4);
}

.ah-approver-status {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid currentColor;
  border-radius: 0;
}

.ah-approver-status--pending {
  background: #FFF8E6;
  border-color: #A3AD85;
  color: #A3AD85;
}

.ah-approver-status--approved {
  background: #E1F3EE;
  border-color: #59CAA5;
  color: #59CAA5;
}

.ah-approver-status--rejected {
  background: #FFE6E6;
  border-color: #EB3C24;
  color: #EB3C24;
}

.ah-approver-status--changes {
  background: #FFF8E6;
  border-color: #A3AD85;
  color: #A3AD85;
}

.ah-approver-ai-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ah-approver-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 4px;
  line-height: 1.3;
}

.ah-approver-item-meta {
  font-size: 12px;
  color: var(--text-4);
  margin: 0;
}

.ah-approver-item-comments {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}

.ah-approver-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}

.ah-approver-empty svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Detail Panel */
.ah-approver-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-1);
}

.ah-approver-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-4);
}

.ah-approver-detail-empty svg {
  margin-bottom: 16px;
  opacity: 0.3;
}

.ah-approver-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.ah-approver-detail-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 4px 0 8px;
}

.ah-approver-detail-meta {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}

.ah-approver-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.ah-approver-section {
  background: #fff;
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
}

.ah-approver-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

.ah-approver-section p {
  font-size: 14px;
  color: var(--text-1);
  margin: 0;
  line-height: 1.6;
}

/* Audit Trail */
.ah-audit-trail {
  position: relative;
}

.ah-audit-item {
  display: flex;
  gap: 12px;
  padding-bottom: 20px;
  position: relative;
}

.ah-audit-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.ah-audit-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-1);
  color: var(--text-3);
}

.ah-audit-icon--submitted,
.ah-audit-icon--resubmitted {
  background: #dbeafe;
  color: #1d4ed8;
}

.ah-audit-icon--approved {
  background: #d1fae5;
  color: #059669;
}

.ah-audit-icon--rejected {
  background: #fee2e2;
  color: #dc2626;
}

.ah-audit-icon--changes_requested {
  background: #e0e7ff;
  color: #4f46e5;
}

.ah-audit-icon--comment_added {
  background: #f3f4f6;
  color: #6b7280;
}

.ah-audit-icon--publication_assigned {
  background: #e0f2fe;
  color: #0c4a6e;
}

.ah-audit-icon--publication_due_soon {
  background: #dbeafe;
  color: #1d4ed8;
}

.ah-audit-icon--published {
  background: #dcfce7;
  color: #166534;
}

.ah-audit-icon--publication_overdue {
  background: #fef3c7;
  color: #b45309;
}

.ah-audit-content {
  flex: 1;
  min-width: 0;
}

.ah-audit-title {
  font-size: 13px;
  color: var(--text-2);
}

.ah-audit-note {
  font-size: 13px;
  color: var(--text-3);
  font-style: italic;
  margin-top: 4px;
  padding: 8px 12px;
  background: var(--bg-1);
  border-radius: 4px;
}

.ah-audit-time {
  font-size: 11px;
  color: var(--text-4);
  margin-top: 4px;
}

/* Comments */
.ah-comments-container {
  max-height: 400px;
  display: flex;
  flex-direction: column;
}

.ah-comments-empty {
  font-size: 14px;
  color: var(--text-4);
  font-style: italic;
}

.ah-comments-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 16px;
  max-height: 250px;
}

.ah-comment {
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.ah-comment--submitter {
  background: #f3f4f6;
  margin-right: 24px;
}

.ah-comment--reviewer {
  background: #fef2f2;
  margin-left: 24px;
}

.ah-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ah-comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.ah-comment-role {
  font-size: 11px;
  color: var(--text-4);
  text-transform: capitalize;
}

.ah-comment-time {
  font-size: 11px;
  color: var(--text-4);
  margin-left: auto;
}

.ah-comment-body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.ah-comment-input {
  display: flex;
  gap: 8px;
}

.ah-comment-input textarea {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}

.ah-comment-input textarea:focus {
  outline: none;
  border-color: var(--sfs-red);
}

/* Action Footer */
.ah-approver-detail-footer {
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.ah-submission-status--changes {
  background: #e0e7ff;
  color: #4338ca;
}

.ah-stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ah-stage-pill--queue {
  background: #CEE0E1;
  border-color: #0B646B;
  color: #0B646B;
}

.ah-stage-pill--published {
  background: #E1F3EE;
  border-color: #59CAA5;
  color: #59CAA5;
}

.ah-approver-item-header-badges,
.ah-approver-header-badges,
.ah-submission-status-panel-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ah-approver-item-summary {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.6;
}

.ah-approver-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-4);
}

.ah-milestone-track {
  display: grid;
  gap: 12px;
}

.ah-milestone {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ah-milestone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 3px;
  background: #d1d5db;
  box-shadow: 0 0 0 4px #f8fafc;
}

.ah-milestone-copy {
  display: grid;
  gap: 4px;
}

.ah-milestone-copy strong {
  font-size: 14px;
  color: var(--text-1);
}

.ah-milestone-copy span {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}

.ah-milestone--done .ah-milestone-dot {
  background: #059669;
}

.ah-milestone--current .ah-milestone-dot {
  background: var(--sfs-red);
}

.ah-milestone--alert .ah-milestone-dot {
  background: #f59e0b;
}

.ah-approver-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.ah-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.ah-fact-card,
.ah-readout {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: #fafafa;
}

.ah-fact-card span,
.ah-readout span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ah-fact-card strong,
.ah-readout strong {
  font-size: 14px;
  color: var(--text-1);
}

.ah-readout em {
  font-size: 13px;
  font-style: normal;
  color: var(--text-3);
}

.ah-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ah-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 600;
}

.ah-inline-banner {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--sfs-red);
  background: #fff5f2;
}

.ah-inline-banner strong {
  font-size: 14px;
  color: var(--text-1);
}

.ah-inline-banner span {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}

.ah-status-summary {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: 0;
  background: #f8fafc;
}

.ah-status-summary strong {
  font-size: 14px;
  color: var(--text-1);
}

.ah-status-summary span {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}

.ah-status-summary--pending {
  border-color: #A3AD85;
  border-left-color: #A3AD85;
  background: #FFF8E6;
}

.ah-status-summary--approved {
  border-color: #59CAA5;
  border-left-color: #59CAA5;
  background: #E1F3EE;
}

.ah-status-summary--changes {
  border-color: #A3AD85;
  border-left-color: #A3AD85;
  background: #FFF8E6;
}

.ah-status-summary--rejected {
  border-color: #EB3C24;
  border-left-color: #EB3C24;
  background: #FFE6E6;
}

.ah-field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ah-detail-textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}

.ah-detail-textarea:focus {
  outline: none;
  border-color: var(--sfs-red);
}

.ah-simple-stack {
  display: grid;
  gap: 10px;
}

.ah-bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  line-height: 1.7;
}

.ah-resource-grid,
.ah-people-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ah-resource-card,
.ah-person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: #fafafa;
}

.ah-resource-card {
  text-decoration: none;
}

.ah-resource-card span,
.ah-person-card span {
  display: block;
  font-size: 12px;
  color: var(--text-4);
}

.ah-resource-card strong,
.ah-person-card strong {
  display: block;
  font-size: 14px;
  color: var(--text-1);
}

.ah-person-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sfs-red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.ah-person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-submission-detail-modal {
  max-width: 980px;
}

.ah-submission-detail-body {
  display: grid;
  gap: 16px;
}

.ah-submission-status-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
  border-left: 4px solid var(--border);
}

.ah-submission-status-panel h4 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--text-1);
}

.ah-submission-status-panel p {
  margin: 0;
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
}

.ah-submission-status-panel--pending {
  border-left-color: var(--sfs-red);
}

.ah-submission-status-panel--approved {
  border-left-color: #059669;
}

.ah-submission-status-panel--changes_requested {
  border-left-color: #f59e0b;
}

.ah-submission-status-panel--rejected {
  border-left-color: #dc2626;
}

.ah-workflow-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.ah-workflow-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.ah-workflow-metric strong {
  font-size: 18px;
  line-height: 1;
  color: var(--text-1);
}

.ah-workflow-metric span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ah-workflow-metric--warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.ah-workflow-metric--danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.ah-workflow-table td {
  vertical-align: middle;
}

.ah-workflow-stage-cell,
.ah-workflow-owner-cell {
  display: grid;
  gap: 5px;
  font-size: 13px;
}

.ah-workflow-stage-cell strong,
.ah-workflow-owner-cell strong {
  color: var(--text-1);
}

.ah-workflow-stage-cell span,
.ah-workflow-owner-cell span {
  color: var(--text-3);
}

.ah-workflow-stage-chip {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.ah-workflow-stage-panel {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-left: 4px solid var(--border);
  background: #f8fafc;
}

.ah-workflow-stage-panel h4 {
  margin: 4px 0 6px;
  font-size: 20px;
  color: var(--text-1);
}

.ah-workflow-stage-panel p {
  margin: 0;
  max-width: 720px;
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.55;
}

.ah-workflow-stage-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ah-workflow-stage-panel--success {
  border-left-color: #059669;
}

.ah-workflow-stage-panel--warning {
  border-left-color: #f59e0b;
  background: #fffaf0;
}

.ah-workflow-stage-panel--danger {
  border-left-color: #dc2626;
  background: #fff5f5;
}

.ah-workflow-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ah-workflow-meta-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
}

.ah-workflow-meta-tag span {
  font-weight: 800;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ah-workflow-meta-tag strong {
  max-width: 260px;
  overflow: hidden;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-workflow-meta-tag--warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.ah-workflow-meta-tag--danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.ah-workflow-meta-tag--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.ah-workflow-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  background: #fff;
}

.ah-workflow-timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  min-height: 62px;
  padding: 12px;
  border-right: 1px solid var(--border);
}

.ah-workflow-timeline-step:last-child {
  border-right: 0;
}

.ah-workflow-timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #fff;
}

.ah-workflow-timeline-step.is-complete .ah-workflow-timeline-dot {
  border-color: #059669;
  background: #059669;
}

.ah-workflow-timeline-step.is-active {
  background: #fff7ed;
}

.ah-workflow-timeline-step.is-active .ah-workflow-timeline-dot {
  border-color: var(--sfs-red);
  background: var(--sfs-red);
}

.ah-workflow-timeline-step.is-issue {
  background: #fef2f2;
}

.ah-workflow-timeline-step.is-issue .ah-workflow-timeline-dot {
  border-color: #dc2626;
  background: #dc2626;
}

.ah-workflow-timeline-copy {
  display: grid;
  gap: 3px;
}

.ah-workflow-timeline-copy strong {
  color: var(--text-1);
  font-size: 13px;
}

.ah-workflow-timeline-copy em {
  color: var(--text-3);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.ah-workflow-action-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  background: #fff;
}

.ah-workflow-disclosure {
  border: 1px solid var(--border);
  background: #fff;
}

.ah-workflow-disclosure summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-1);
}

.ah-workflow-disclosure summary em {
  color: var(--text-3);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.ah-workflow-disclosure-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}

.ah-submission-discussion-panel {
  margin: 0 24px 24px;
}

.ah-rich-content {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.7;
}

.ah-rich-content > :first-child {
  margin-top: 0;
}

.ah-rich-content > :last-child {
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .ah-approver-overview-grid {
    grid-template-columns: 1fr;
  }

  .ah-submission-status-panel {
    flex-direction: column;
  }

  .ah-workflow-stage-panel {
    flex-direction: column;
  }

  .ah-workflow-timeline {
    grid-template-columns: 1fr;
  }

  .ah-workflow-timeline-step {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .ah-workflow-timeline-step:last-child {
    border-bottom: 0;
  }
}

.ah-approver-feedback {
  margin-bottom: 16px;
}

.ah-approver-feedback label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.ah-approver-feedback textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}

.ah-approver-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ah-btn--approve {
  background: #059669 !important;
  border-color: #059669 !important;
}

.ah-btn--approve:hover {
  background: #047857 !important;
}

.ah-btn--reject {
  background: #fff !important;
  border: 1px solid #dc2626 !important;
  color: #dc2626 !important;
}

.ah-btn--reject:hover {
  background: #fef2f2 !important;
}

.ah-btn--request-changes {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ah-approver-actions .sfs-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ah-approver-content {
  display: block;
  padding: 24px !important;
  overflow: auto;
  background: var(--bg-1);
}

.ah-approver-content--list .ah-approver-detail {
  display: none;
}

.ah-approver-list {
  border: 1px solid var(--border);
  background: #fff;
  overflow: visible;
}

.ah-approver-list .ah-approver-filters {
  border-bottom: 0;
}

.ah-approver-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ah-approver-table {
  min-width: 980px;
  table-layout: fixed;
}

.ah-approver-table thead th {
  padding: 10px 12px;
  border-bottom-width: 1px;
}

.ah-approver-table td {
  padding: 10px 12px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-approver-table th:nth-child(1),
.ah-approver-table td:nth-child(1) {
  width: 32%;
}

.ah-approver-table th:nth-child(2),
.ah-approver-table td:nth-child(2) {
  width: 8%;
}

.ah-approver-table th:nth-child(3),
.ah-approver-table td:nth-child(3) {
  width: 14%;
}

.ah-approver-table th:nth-child(4),
.ah-approver-table td:nth-child(4) {
  width: 16%;
}

.ah-approver-table th:nth-child(5),
.ah-approver-table td:nth-child(5) {
  width: 12%;
}

.ah-approver-table th:nth-child(6),
.ah-approver-table td:nth-child(6) {
  width: 8%;
}

.ah-approver-table th:nth-child(7),
.ah-approver-table td:nth-child(7) {
  width: 10%;
}

.ah-table-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ah-table-sort-btn span:last-child {
  font-size: 10px;
  opacity: 0.55;
}

.ah-approver-table-row {
  cursor: pointer;
}

.ah-approver-table-row td {
  vertical-align: middle;
}

.ah-approver-table-title,
.ah-approver-table-person {
  display: block;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-approver-table-summary,
.ah-approver-table-muted {
  display: block;
  margin-top: 4px;
  color: var(--text-4);
  font-size: 12px;
  line-height: 1.4;
}

.ah-approver-table-badges {
  display: inline-flex;
  max-width: 100%;
  flex-wrap: nowrap;
}

.ah-approver-table .ah-approver-status,
.ah-approver-table .ah-stage-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-approver-table-actions-heading {
  text-align: right !important;
}

.ah-approver-table-actions {
  text-align: right;
  white-space: nowrap;
  overflow: visible !important;
}

.ah-approver-table-actions .ah-table-icon-btn + .ah-table-icon-btn {
  margin-left: 6px;
}

.ah-table-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  padding: 0;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
}

.ah-table-icon-btn:hover {
  background: var(--bg-2);
  color: var(--text-1);
}

.ah-table-icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ah-table-icon-btn--danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.ah-table-icon-btn--danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.ah-approver-detail {
  border: 1px solid var(--border);
  background: var(--bg-1);
}

.ah-approver-detail-toolbar {
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.ah-decision-options {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.ah-decision-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
}

.ah-decision-option strong,
.ah-decision-option span {
  display: block;
}

.ah-decision-option strong {
  color: var(--text-1);
  font-size: 14px;
  margin-bottom: 4px;
}

.ah-decision-option span {
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.45;
}

.ah-decision-option--approve {
  border-left: 4px solid #59CAA5;
}

.ah-decision-option--changes {
  border-left: 4px solid #A3AD85;
}

.ah-decision-option--reject {
  border-left: 4px solid #EB3C24;
}

@media (max-width: 900px) {
  .ah-approver-content {
    padding: 16px !important;
  }

  .ah-decision-option {
    grid-template-columns: 1fr;
  }
}

/* Hero Stats (inline) */
.ah-hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.ah-hero-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.ah-hero-stat-icon {
  opacity: 0.8;
}

.ah-hero-stat-value {
  font-size: 20px;
  font-weight: 700;
}

.ah-hero-stat-label {
  font-size: 13px;
  opacity: 0.8;
}

/* ========================= My Learning Page Enhanced Styles ========================= */
.ah-learning-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 24px;
  max-width: 800px;
}

@media (max-width: 900px) {
  .ah-learning-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .ah-learning-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .ah-learning-stats {
    grid-template-columns: 1fr 1fr;
  }
}

.ah-learning-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 12px;
  background: rgba(40, 40, 40, 0.9);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ah-learning-stat-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
}

.ah-learning-stat-icon svg {
  width: 20px;
  height: 20px;
}

.ah-learning-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.ah-learning-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

/* Overall Progress Section */
.ah-learning-overall-progress {
  margin-top: 20px;
  padding: 16px 20px;
  background: rgba(40, 40, 40, 0.9);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 800px;
}

.ah-learning-overall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ah-learning-overall-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.ah-learning-overall-percent {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.ah-learning-overall-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

.ah-learning-overall-fill {
  height: 100%;
  background: var(--sfs-red);
  border-radius: 3px;
  transition: width 0.5s ease;
  min-width: 4px;
}

/* Learning Tabs */
.ah-learning-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding-bottom: 0;
}

.ah-learning-tab {
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ah-learning-tab:hover {
  background: var(--bg-3);
  color: var(--text-1);
}

.ah-learning-tab.is-active {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
}

/* Course Card Badges */
.ah-course-card-completed-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.ah-course-card-bookmark {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: var(--sfs-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(235, 60, 36, 0.4);
}

/* Bookmark Button for Course/Article Cards */
.ah-bookmark-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.ah-bookmark-btn:hover {
  transform: scale(1.1);
  background: #fff;
  color: var(--sfs-red);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ah-bookmark-btn.is-saved {
  background: var(--sfs-red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(235, 60, 36, 0.4);
}

.ah-bookmark-btn.is-saved:hover {
  background: #c32d17;
  color: #fff;
}

.ah-bookmark-btn svg {
  width: 18px;
  height: 18px;
}

.ah-course-card-shared-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  font-size: 11px;
  color: #fff;
}

/* Article Grid and Cards */
.ah-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.ah-article-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.ah-article-card:hover {
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.ah-article-card-image-wrap {
  position: relative;
}

.ah-article-card-image {
  height: 160px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-article-card-body {
  padding: 16px;
}

.ah-article-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-1);
  line-height: 1.3;
}

.ah-article-card-excerpt {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================= Resource Library / Content Type Tabs ========================= */
.ah-content-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.ah-content-type-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ah-content-type-tab:hover {
  background: var(--bg-3);
  border-color: var(--border-hover);
  color: var(--text-1);
}

.ah-content-type-tab.is-active {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
}

.ah-content-type-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.ah-content-type-tab.is-active .ah-content-type-tab-icon {
  opacity: 1;
}

.ah-content-type-tab-label {
  white-space: nowrap;
}

.ah-content-type-tab-count {
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.ah-content-type-tab.is-active .ah-content-type-tab-count {
  background: rgba(255, 255, 255, 0.2);
}

/* Resource Cards */
.ah-resource-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.ah-resource-card:hover {
  border-color: var(--sfs-red);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.ah-resource-card-image-wrap {
  position: relative;
  width: 100%;
}

.ah-resource-card-image {
  height: 160px;
  width: 100%;
  background: #e5e5e5;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-resource-card-play-icon {
  width: 48px;
  height: 48px;
  background: rgba(235, 60, 36, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ah-resource-card-play-icon svg {
  margin-left: 3px;
}

.ah-resource-card-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-transform: capitalize;
}

.ah-resource-card-type-badge svg {
  width: 12px;
  height: 12px;
}

.ah-resource-card-body {
  padding: 16px;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.ah-resource-card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-1);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ah-resource-card-desc {
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.ah-resource-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.ah-resource-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-4);
}

.ah-resource-meta-item svg {
  opacity: 0.7;
}

/* Resource Library Brand Refinement */
.ah-resource-library-page .ah-page-hero--resource-library {
  position: relative;
  overflow: hidden;
  padding: 44px 24px 42px;
  background: linear-gradient(108deg, #b92a18 0%, #cf321d 40%, var(--sfs-red) 100%);
  border-radius: 0;
}

.ah-resource-library-page .ah-page-hero--resource-library::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at right center, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 46%);
  pointer-events: none;
}

.ah-resource-library-page .ah-page-hero--resource-library::after {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.24);
}

.ah-resource-library-page .ah-page-hero-title,
.ah-resource-library-page .ah-page-hero-subtitle {
  position: relative;
  z-index: 1;
}

.ah-resource-library-page .ah-page-hero-title {
  max-width: 24ch;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.ah-resource-library-page .ah-page-hero-subtitle {
  max-width: 44ch;
  color: rgba(255, 255, 255, 0.92);
  opacity: 1;
}

.ah-resource-library-page .ah-content-type-tab {
  background: #fff;
  border-radius: 0;
  font-weight: 700;
  color: var(--text-2);
}

.ah-resource-library-page .ah-content-type-tab:hover {
  background: var(--bg-1);
  border-color: rgba(235, 60, 36, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.ah-resource-library-page .ah-content-type-tab.is-active {
  background: var(--sfs-light-red);
  border-color: rgba(235, 60, 36, 0.3);
  color: var(--sfs-red);
  box-shadow: inset 4px 0 0 var(--sfs-red);
}

.ah-resource-library-page .ah-content-type-tab-count {
  border-radius: 0;
  background: #f1f1f1;
  color: var(--text-2);
}

.ah-resource-library-page .ah-content-type-tab.is-active .ah-content-type-tab-count {
  background: var(--sfs-red);
  color: #fff;
}

.ah-resource-library-page .ah-search-input-field,
.ah-resource-library-page .ah-filter-select-field {
  min-height: 44px;
  border-radius: 0;
  background: #fff;
}

.ah-resource-library-page .ah-search-input-field:focus,
.ah-resource-library-page .ah-filter-select-field:focus {
  box-shadow: 0 0 0 3px rgba(235, 60, 36, 0.18);
}

.ah-resource-library-page .ah-resource-card {
  border-radius: 0;
  box-shadow: var(--shadow-base);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ah-resource-library-page .ah-resource-card:hover {
  border-color: rgba(235, 60, 36, 0.45);
  transform: translateY(-4px);
}

.ah-resource-library-page .ah-resource-card-image {
  background-color: #eef1f4;
}

.ah-resource-library-page .ah-resource-card-body {
  padding: 18px 16px 16px;
}

.ah-resource-library-page .ah-resource-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.ah-resource-library-page .ah-resource-card-desc {
  color: var(--text-3);
  line-height: 1.5;
}

.ah-resource-library-page .ah-resource-card-type-badge {
  border-radius: 0;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ah-resource-library-page .ah-resource-card-type-badge--article {
  background: var(--sfs-light-red);
  color: var(--sfs-red);
  border-color: rgba(235, 60, 36, 0.22);
}

.ah-resource-library-page .ah-resource-card-type-badge--lesson {
  background: var(--sfs-light-teal);
  color: var(--sfs-teal);
  border-color: rgba(11, 100, 107, 0.2);
}

.ah-resource-library-page .ah-course-tag {
  border-radius: 0;
}

.ah-resource-library-page .ah-course-tag--level {
  background: #fff;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.ah-resource-library-page .ah-course-tag--featured {
  background: var(--sfs-light-red);
  color: var(--sfs-red);
  border: 1px solid rgba(235, 60, 36, 0.18);
}

.ah-resource-library-page .ah-bookmark-btn {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
}

.ah-resource-library-page .ah-bookmark-btn:hover {
  transform: translateY(-1px);
}

.ah-resource-library-page .ah-bookmark-btn.is-saved {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
}

/* Submissions Grid */
.ah-submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.ah-submission-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.ah-submission-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ah-submission-card-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  padding: 4px 8px;
  background: var(--bg-2);
  border-radius: 4px;
}

.ah-submission-card-status {
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
}

.ah-submission-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-1);
}

.ah-submission-card-description {
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ah-submission-card-date {
  font-size: 12px;
  color: var(--text-4);
}

/* Tab Navigation */
.ah-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.ah-tab {
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: -1px;
}

.ah-tab:hover {
  color: var(--text-1);
}

.ah-tab--active {
  color: var(--sfs-red);
  border-bottom-color: var(--sfs-red);
  background: rgba(235, 60, 36, 0.05);
}

.ah-page-content {
  padding-top: 24px;
}

/* Filter Bar */
.ah-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ah-search-input {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.ah-search-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  pointer-events: none;
}

.ah-search-input-field {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: var(--text-1);
  transition: border-color 0.15s ease;
}

.ah-search-input-field:focus {
  outline: none;
  border-color: var(--sfs-red);
}

.ah-search-input-field::placeholder {
  color: var(--text-4);
}

.ah-filter-select {
  position: relative;
  min-width: 160px;
}

.ah-filter-select-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  pointer-events: none;
}

.ah-filter-select-field {
  width: 100%;
  padding: 10px 32px 10px 36px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: var(--text-1);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s ease;
}

.ah-filter-select-field:focus {
  outline: none;
  border-color: var(--sfs-red);
}

/* Active Filter Badge */
.ah-filter-active-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
  border: 1px solid var(--sfs-red);
  border-radius: 8px;
}

.ah-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sfs-red);
  font-weight: 600;
  font-size: 14px;
}

.ah-filter-badge svg {
  fill: var(--sfs-orange);
}

.ah-filter-clear-btn {
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ah-filter-clear-btn:hover {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
}

/* Result Count */
.ah-result-count {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 20px;
}

.ah-result-count strong {
  color: var(--sfs-red);
  font-weight: 600;
}

.ah-translation-status {
  margin-bottom: 20px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(255, 107, 53, 0.18);
  border-left: 4px solid var(--sfs-red);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.06), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.ah-translation-status__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ah-translation-status__title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ah-translation-status__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-translation-status__meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--sfs-red);
  white-space: nowrap;
}

.ah-translation-status__message {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 12px;
}

.ah-translation-status__bar {
  height: 6px;
  background: rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.ah-translation-status__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sfs-red), #ff8b4d);
  transition: width 0.35s ease;
}

.ah-translation-status__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(17, 24, 39, 0.14);
  border-top-color: var(--sfs-red);
  border-radius: 50%;
  animation: ahTranslationSpin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes ahTranslationSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .ah-translation-status__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Empty State */
.ah-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}

.ah-empty-state-icon {
  opacity: 0.3;
  margin-bottom: 16px;
}

.ah-empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-2);
  margin: 0 0 8px;
}

.ah-empty-state-text {
  font-size: 14px;
  margin: 0;
}

/* Article Cards */
.ah-article-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}

.ah-article-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.ah-article-card-image {
  height: 180px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-article-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ah-article-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ah-article-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-3);
  margin-top: auto;
}

.ah-article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ah-article-meta-item svg {
  opacity: 0.6;
}

/* Article Card Tags */
.ah-article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.ah-article-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #e8f4fc;
  color: #2980b9;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ah-article-tag--featured {
  background: var(--sfs-orange, #e67e22);
  color: #fff;
}

.ah-article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-3, #666);
  margin-top: 12px;
}

.ah-article-card-footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e6eef5);
}

.ah-article-footer-tag {
  display: inline-block;
  padding: 4px 8px;
  background: var(--bg-2, #f8f9fa);
  color: var(--text-3, #666);
  font-size: 11px;
}

/* ========================= Article View Page ========================= */
.ah-article-view {
  /* No max-width here - let ah-lesson-layout handle it */
  padding: 0;
}

.ah-article-nav {
  margin-bottom: 24px;
}

.ah-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.ah-back-link:hover {
  color: var(--sfs-teal);
}

.ah-article-hero {
  width: 100%;
  height: 300px;
  background-size: cover;
  background-position: center;
  margin-bottom: 24px;
}

.ah-article-hero-video {
  width: 100%;
  max-width: 100%;
  margin-bottom: 24px;
}

.ah-article-video {
  width: 100%;
  max-height: 500px;
  background: #000;
}

.ah-article-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.ah-article-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
  line-height: 1.3;
}

.ah-article-actions {
  flex-shrink: 0;
}

/* Article Author Section */
.ah-article-author {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--surface-2, #f8f9fa);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.ah-article-author-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: var(--sfs-red);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ah-article-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-article-author-initials {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.ah-article-author-info {
  flex: 1;
  min-width: 0;
}

.ah-article-author-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
}

.ah-article-author-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2, #666);
}

.ah-article-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-1);
}

.ah-article-content p {
  margin-bottom: 16px;
}

.ah-article-content h2,
.ah-article-content h3 {
  margin-top: 32px;
  margin-bottom: 16px;
}

.ah-article-content img {
  max-width: 100%;
  height: auto;
}

/* Article Layout with Notes Sidebar */
.ah-article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

.ah-article-sidebar {
  position: sticky;
  top: 24px;
}

@media (max-width: 900px) {
  .ah-article-layout {
    grid-template-columns: 1fr;
  }

  .ah-article-sidebar {
    position: static;
  }
}

/* Save Button */
.ah-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.2s;
}

.ah-save-btn:hover {
  border-color: var(--sfs-teal);
  color: var(--sfs-teal);
}

.ah-save-btn--saved {
  background: var(--sfs-teal);
  border-color: var(--sfs-teal);
  color: #fff;
}

.ah-save-btn--saved:hover {
  background: var(--sfs-dark-teal);
  border-color: var(--sfs-dark-teal);
  color: #fff;
}

.ah-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Course Save Button Saved State */
.ah-course-start-btn--saved {
  background: var(--sfs-teal);
  border-color: var(--sfs-teal);
  color: #fff;
}

.ah-course-start-btn--saved:hover {
  background: var(--sfs-dark-teal);
  border-color: var(--sfs-dark-teal);
}

/* ========================= Collaboration Hub ========================= */
.ah-collab-hero {
  background: #424242;
  padding: 32px 24px;
  margin: -24px -24px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.ah-collab-hero-icon-box {
  width: 56px;
  height: 56px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  flex-shrink: 0;
}

.ah-collab-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--sfs-red);
  margin: 0 0 4px;
}

.ah-collab-hero-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.ah-collab-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

@media (max-width: 900px) {
  .ah-collab-layout {
    grid-template-columns: 1fr;
  }
}

.ah-collab-main {
  min-width: 0;
}

/* Composer */
.ah-collab-composer {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.ah-collab-composer-header {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.ah-collab-avatar {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
  overflow: hidden;
  flex-shrink: 0;
}

.ah-collab-avatar--red {
  background: var(--sfs-red);
}

.ah-collab-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-collab-login-prompt {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  background: var(--bg-2);
  display: flex;
  align-items: center;
}

.ah-collab-login-link {
  color: var(--text-4);
  text-decoration: none;
  font-size: 14px;
}

.ah-collab-login-link:hover {
  color: var(--sfs-red);
}

.ah-collab-textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}

.ah-collab-textarea:focus {
  outline: none;
  border-color: var(--sfs-red);
}

/* Mention Input */
.ah-mention-input-wrap {
  position: relative;
  flex: 1;
}

.ah-mention-textarea {
  width: 100%;
  border: 1px solid var(--border);
  padding: 12px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}

.ah-mention-textarea:focus {
  outline: none;
  border-color: var(--sfs-red);
}

.ah-mention-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
}

.ah-mention-suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease;
}

.ah-mention-suggestion:last-child {
  border-bottom: none;
}

.ah-mention-suggestion:hover,
.ah-mention-suggestion.is-selected {
  background: var(--bg-2);
}

.ah-mention-avatar {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.ah-mention-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-mention-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.ah-mention-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-mention-user-email {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Highlighted mention in content */
.ah-mention-highlight {
  color: var(--sfs-red);
  font-weight: 600;
  background: rgba(235, 60, 36, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}

.ah-collab-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.ah-collab-type-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text-1, #1a1a2e);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ah-collab-type-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ah-collab-type-btn:hover:not(:disabled) {
  background: var(--bg-2);
  color: var(--text-1, #1a1a2e);
}

.ah-collab-type-btn.is-active {
  background: var(--text-1, #1a1a2e);
  color: #fff;
  border-color: var(--text-1, #1a1a2e);
}

.ah-collab-type-icon {
  display: flex;
  align-items: center;
}

.ah-collab-type-icon svg {
  stroke: currentColor;
}

.ah-collab-poll-builder {
  background: var(--bg-2);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}

.ah-collab-poll-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
}

.ah-collab-add-option {
  background: none;
  border: none;
  color: var(--sfs-teal);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}

.ah-collab-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ah-collab-upload-btns {
  display: flex;
  gap: 8px;
}

.ah-collab-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.12s ease;
}

.ah-collab-upload-btn:hover {
  background: var(--bg-2);
  color: var(--text-1);
}

.ah-collab-upload-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ah-collab-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: var(--bg-2);
  border-radius: 4px;
  font-size: 12px;
}

.ah-collab-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ah-collab-preview--comment {
  max-width: 220px;
}

.ah-collab-preview-image {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.ah-collab-preview-remove {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-3);
  padding: 0 4px;
}

/* Post Button */
.ah-collab-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--sfs-red);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
  margin-left: auto;
}

.ah-collab-post-btn:hover {
  background: #c62828;
}

.ah-collab-post-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Search and Filters */
.ah-collab-search-filter {
  margin-bottom: 24px;
}

.ah-collab-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 12px 16px;
  margin-bottom: 16px;
  position: relative;
}

.ah-collab-search svg {
  color: var(--text-3);
  flex-shrink: 0;
}

.ah-collab-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-1);
  outline: none;
}

.ah-collab-search-input::placeholder {
  color: var(--text-3);
}

.ah-collab-search-clear {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.ah-collab-search-clear:hover {
  color: var(--text-1);
}

/* Filters */
.ah-collab-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.ah-collab-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--text-1, #1a1a2e);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.ah-collab-filter-btn:hover {
  background: var(--bg-2);
  color: var(--text-1, #1a1a2e);
}

.ah-collab-filter-btn.is-active {
  background: var(--sfs-red, #e74c3c);
  color: #fff;
  border-color: var(--sfs-red, #e74c3c);
}

.ah-collab-filter-icon {
  display: flex;
  align-items: center;
}

.ah-collab-filter-icon svg {
  stroke: currentColor;
}

/* Posts */
.ah-collab-posts {
  display: grid;
  gap: 16px;
}

.ah-collab-post {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.ah-collab-post--highlighted {
  border-color: var(--sfs-blue);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2), 0 4px 12px rgba(52, 152, 219, 0.15);
  animation: highlight-pulse 1.5s ease-in-out;
}

@keyframes highlight-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2), 0 4px 12px rgba(52, 152, 219, 0.15);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(52, 152, 219, 0.3), 0 4px 16px rgba(52, 152, 219, 0.25);
  }
}

.ah-collab-post-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.ah-collab-post-meta {
  flex: 1;
}

.ah-collab-post-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
}

.ah-collab-post-time {
  font-size: 12px;
  color: var(--text-3);
}

.ah-collab-post-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-2);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: capitalize;
  margin-left: auto;
}

.ah-collab-post-type-badge svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

.ah-collab-post-type-badge--poll {
  background: #e3f2fd;
  color: #1565c0;
}

.ah-collab-post-type-badge--win {
  background: #fff3e0;
  color: #e65100;
}

.ah-collab-post-type-badge--question {
  background: #fce4ec;
  color: #c2185b;
}

.ah-collab-post-type-badge--tip {
  background: #e8f5e9;
  color: #2e7d32;
}

.ah-collab-post-delete {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  margin-left: 8px;
}

.ah-collab-post-delete:hover {
  color: var(--sfs-red);
}

.ah-collab-post-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  white-space: pre-wrap;
}

.ah-collab-post-media {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.ah-collab-post-gallery {
  display: grid;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-top: 3px solid var(--sfs-red);
  overflow: hidden;
}

.ah-collab-post-gallery--single {
  grid-template-columns: minmax(0, 1fr);
  max-height: clamp(280px, 60vh, 520px);
}

.ah-collab-post-gallery--single .ah-collab-post-image {
  min-height: 0;
  height: clamp(280px, 60vh, 520px);
}

.ah-collab-post-gallery--double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ah-collab-post-gallery--triple {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(140px, 1fr));
}

.ah-collab-post-gallery--triple .ah-collab-post-image--1 {
  grid-row: 1 / span 2;
}

.ah-collab-post-gallery--quad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ah-collab-post-image {
  display: block;
  position: relative;
  min-height: 180px;
  background: var(--bg-2);
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.ah-collab-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.25s ease;
}

.ah-collab-post-image:hover img {
  transform: scale(1.02);
}

.ah-collab-post-image-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 51, 51, 0.58);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ah-collab-post-files {
  display: grid;
  gap: 8px;
}

.ah-collab-post-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fff 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--sfs-teal);
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  min-width: 0;
}

.ah-collab-post-file:hover {
  border-color: var(--sfs-red);
  color: var(--text-1);
}

.ah-collab-post-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-collab-viewer {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 30000;
}

.ah-collab-viewer-shell {
  width: min(1100px, 100%);
  max-height: calc(100vh - 48px);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-top: 4px solid var(--sfs-red);
  box-shadow: var(--shadow-hover);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

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

.ah-collab-viewer-meta {
  display: grid;
  gap: 4px;
}

.ah-collab-viewer-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sfs-red);
}

.ah-collab-viewer-count {
  font-size: 13px;
  color: var(--text-3);
}

.ah-collab-viewer-close,
.ah-collab-viewer-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-1);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.ah-collab-viewer-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.ah-collab-viewer-close:hover,
.ah-collab-viewer-nav:hover {
  border-color: var(--sfs-red);
  color: var(--sfs-red);
  background: var(--bg-2);
}

.ah-collab-viewer-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  min-height: 0;
}

.ah-collab-viewer-image-wrap {
  background: linear-gradient(180deg, #fff 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.ah-collab-viewer-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
}

.ah-collab-viewer-nav {
  width: 48px;
  height: 64px;
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .ah-collab-post-gallery--double,
  .ah-collab-post-gallery--triple,
  .ah-collab-post-gallery--quad {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .ah-collab-post-gallery--triple .ah-collab-post-image--1 {
    grid-row: auto;
  }

  .ah-collab-post-gallery--single {
    max-height: 360px;
  }

  .ah-collab-post-gallery--single .ah-collab-post-image {
    height: 360px;
  }

  .ah-collab-post-image {
    min-height: 220px;
  }

  .ah-collab-viewer {
    padding: 12px;
  }

  .ah-collab-viewer-shell {
    max-height: calc(100vh - 24px);
  }

  .ah-collab-viewer-header {
    padding: 12px 14px;
  }

  .ah-collab-viewer-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .ah-collab-viewer-nav {
    width: 100%;
    height: 44px;
  }

  .ah-collab-viewer-nav--prev {
    order: 2;
  }

  .ah-collab-viewer-nav--next {
    order: 3;
  }

  .ah-collab-viewer-image-wrap {
    order: 1;
  }

  .ah-collab-viewer-image {
    max-height: calc(100vh - 240px);
  }
}

/* Poll */
.ah-collab-poll {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.ah-collab-poll-option {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font-size: 14px;
}

.ah-collab-poll-option:hover {
  border-color: var(--text-3);
}

.ah-collab-poll-option.is-voted {
  border-color: var(--sfs-teal);
  background: rgba(89, 202, 165, 0.1);
}

.ah-collab-poll-option-text {
  position: relative;
  z-index: 1;
  font-weight: 500;
}

.ah-collab-poll-option-votes {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: var(--text-3);
}

.ah-collab-poll-option-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(89, 202, 165, 0.2);
  transition: width 0.3s ease;
}

/* Post Actions */
.ah-collab-post-actions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
}

.ah-collab-comment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.2s;
}

.ah-collab-comment-toggle:hover {
  color: var(--sfs-teal);
}

.ah-collab-comment-toggle svg {
  opacity: 0.7;
}

/* Comments Section */
.ah-collab-comments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ah-collab-comment-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ah-collab-comment-composer {
  margin-bottom: 16px;
}

.ah-collab-comment-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 13px;
  color: var(--text-1);
  outline: none;
  transition: border-color 0.2s;
}

.ah-collab-comment-input:focus {
  border-color: var(--sfs-teal);
}

.ah-collab-comment-input::placeholder {
  color: var(--text-3);
}

.ah-collab-comment-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.ah-collab-comment-attach-btn:hover {
  border-color: var(--sfs-red);
  color: var(--sfs-red);
}

.ah-collab-comment-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--sfs-teal);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.ah-collab-comment-submit:hover:not(:disabled) {
  background: var(--sfs-dark-teal);
}

.ah-collab-comment-submit:disabled {
  background: var(--text-3);
  cursor: not-allowed;
}

.ah-collab-comment-login {
  text-align: center;
  padding: 12px;
  background: var(--bg-2);
  font-size: 13px;
}

.ah-collab-comment-login a {
  color: var(--sfs-teal);
  text-decoration: none;
}

.ah-collab-comment-login a:hover {
  text-decoration: underline;
}

/* Comments List */
.ah-collab-comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-collab-comment-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 12px 44px;
}

.ah-collab-comment {
  display: flex;
  gap: 12px;
}

.ah-collab-avatar--sm {
  width: 32px;
  height: 32px;
  min-width: 32px;
  font-size: 13px;
  font-weight: 500;
}

.ah-collab-comment-body {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-2);
}

.ah-collab-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ah-collab-comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.ah-collab-comment-time {
  font-size: 11px;
  color: var(--text-3);
}

.ah-collab-comment-delete {
  margin-left: auto;
  padding: 0 4px;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--text-3);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}

.ah-collab-comment-delete:hover {
  opacity: 1;
  color: #e74c3c;
}

.ah-collab-comment-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  white-space: pre-wrap;
}

.ah-collab-comment-media {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

/* Empty State */
.ah-collab-empty {
  text-align: center;
  padding: 60px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ah-collab-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.ah-collab-empty-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.ah-collab-empty-text {
  color: var(--text-3);
  margin: 0;
}

.ah-collab-empty-clear-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 10px 18px;
  background: var(--sfs-red);
  border: 1px solid var(--sfs-red);
  border-radius: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ah-collab-empty-clear-filter:hover {
  filter: brightness(0.95);
}

.ah-collab-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-3);
}

/* Sidebar */
.ah-collab-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.ah-collab-stats {
  background: var(--sfs-red);
  color: #fff;
  border-radius: 8px;
  padding: 16px;
}

.ah-collab-stats-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.ah-collab-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.ah-collab-stat-value {
  font-weight: 700;
}

.ah-collab-ideas {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.ah-collab-ideas-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.ah-collab-idea {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.ah-collab-idea:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ah-collab-idea-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--sfs-red);
}

.ah-collab-idea-desc {
  font-size: 13px;
  color: var(--text-3);
}

.ah-collab-guidelines {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.ah-collab-guidelines-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.ah-collab-guidelines-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
}

/* ========================= Login Page ========================= */
.ah-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1a1a1a 0%, #1a1a1a 40%, #f5f5f5 40%, #f5f5f5 100%);
  padding: 24px;
}

.ah-login-card {
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.ah-login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.ah-login-logo-img {
  max-width: 90px;
  height: auto;
}

.ah-login-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 8px;
  line-height: 1.3;
}

.ah-login-title-accent {
  color: var(--text-1);
}

.ah-login-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
  margin: 0 0 24px;
}

.ah-login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.ah-login-alert--error {
  background: rgba(235, 60, 36, 0.1);
  color: var(--sfs-red);
  border: 1px solid rgba(235, 60, 36, 0.2);
}

.ah-login-alert--success {
  background: rgba(89, 202, 165, 0.1);
  color: var(--sfs-teal);
  border: 1px solid rgba(89, 202, 165, 0.2);
}

.ah-login-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.ah-login-or-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.ah-login-or-text {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.ah-login-field {
  margin-bottom: 16px;
}

.ah-login-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
  text-align: center;
}

.ah-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ah-login-input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-4);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.ah-login-input {
  width: 100%;
  padding: 12px 12px 12px 42px;
  border: 1px solid var(--border);
  font-size: 14px;
  transition: border-color 0.15s ease;
  background: #fff;
  color: var(--text-1);
}

.ah-login-input:focus {
  outline: none;
  border-color: var(--sfs-red);
}

.ah-login-input::placeholder {
  color: var(--text-4);
}

.ah-login-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-4);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.ah-login-toggle-pw:hover {
  color: var(--text-2);
}

.ah-login-submit {
  width: 100%;
  padding: 14px;
  background: var(--sfs-red);
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 8px;
}

.ah-login-submit:hover {
  background: #c62828;
}

.ah-login-links {
  margin-top: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-login-link {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.ah-login-link:hover {
  color: var(--sfs-red);
}

.ah-login-links-divider {
  font-size: 13px;
  color: var(--text-3);
}

.ah-login-link-accent {
  color: var(--sfs-red);
  font-weight: 600;
  text-decoration: none;
}

.ah-login-link-accent:hover {
  text-decoration: underline;
}

.ah-register-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Language Flag Dropdown (Topbar) ── */
.ah-login-lang-dropdown-wrap {
  position: relative;
  z-index: 100;
}

.ah-login-lang-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border, #ddd);
  border-radius: 0;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
}

.ah-login-lang-trigger:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--text-4, #bbb);
}

.ah-login-lang-trigger-flag {
  font-size: 20px;
  line-height: 1;
}

/* Dropdown Panel */
.ah-login-lang-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 210px;
  max-height: 360px;
  background: #fff;
  border: 1px solid var(--border, #ddd);
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  animation: ah-lang-dd-in 0.15s ease-out;
}

@keyframes ah-lang-dd-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ah-login-lang-dropdown-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3, #888);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border, #eee);
}

.ah-login-lang-dropdown-header svg {
  opacity: 0.5;
}

.ah-login-lang-dropdown-list {
  overflow-y: auto;
  max-height: 310px;
  padding: 4px 0;
}

.ah-login-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-1, #222);
  transition: background 0.1s ease;
  text-align: left;
}

.ah-login-lang-option:hover {
  background: var(--bg-2, #f5f5f5);
}

.ah-login-lang-option.is-active {
  background: rgba(235, 60, 36, 0.06);
}

.ah-login-lang-option-flag {
  font-size: 18px;
  line-height: 1;
  min-width: 22px;
  text-align: center;
}

.ah-login-lang-option-name {
  flex: 1;
  font-weight: 500;
}

.ah-login-lang-option-code {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-4, #aaa);
  letter-spacing: 0.03em;
}

.ah-login-lang-option-check {
  color: var(--sfs-red, #eb3c24);
  flex-shrink: 0;
}

.ah-login-lang-option.is-active .ah-login-lang-option-name {
  color: var(--sfs-red, #eb3c24);
  font-weight: 600;
}

/* ========================= Home Page Sections ========================= */
.ah-home-section {
  margin-bottom: 40px;
}

.ah-home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.ah-home-section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ah-home-section-dash {
  color: var(--text-1);
  font-weight: 700;
}

.ah-home-section-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
}

.ah-home-view-all {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--sfs-red);
  border-radius: 4px;
  color: var(--sfs-red);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.12s ease;
}

.ah-home-view-all:hover {
  background: var(--sfs-red);
  color: #fff;
}

.ah-tile-meta {
  font-size: 12px;
  color: var(--text-3);
}

/* ============================================================================================================================================================ 
AI Course Creator - Clean Modal Interface
============================================================================================================================================================== */

/* FAB Button */
.ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border: none;
  background: var(--sfs-red);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(235, 60, 36, 0.35);
  z-index: 9999;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ai-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(235, 60, 36, 0.45);
}

.ai-fab-label {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--sfs-teal);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  letter-spacing: 0.02em;
}

/* Overlay */
.ai-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}

/* Modal - Now a full-screen drawer like article CMS */
.ai-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  animation: fadeInUp 0.2s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Panel - Full screen */
.ai-panel {
  width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.ai-panel-head-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

.ai-panel-subtitle {
  font-size: 13px;
  color: var(--text-3);
}

.ai-panel-close {
  padding: 8px 20px;
}

.ai-panel-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  overflow: hidden;
}

.ai-panel-source {
  padding: 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.ai-panel-preview {
  padding: 24px;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* Tabs */
.ai-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--bg-2);
}

.ai-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
}

.ai-tab:hover {
  color: var(--text-1);
  background: #fff;
}

.ai-tab--active {
  background: #fff;
  color: var(--text-1);
  box-shadow: inset 0 -2px 0 var(--sfs-red);
}

/* Tab Content */
.ai-tab-content {
  min-height: 140px;
}

/* Upload Area */
.ai-upload-area {
  border: 2px dashed var(--border);
  background: var(--bg-2);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.ai-upload-area:hover {
  border-color: var(--sfs-teal);
  background: var(--sfs-light-teal);
}

.ai-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.ai-upload-icon {
  color: var(--text-3);
}

.ai-upload-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}

.ai-upload-hint {
  font-size: 12px;
  color: var(--text-4);
}

/* Upload Progress */
.ai-upload-progress {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ai-upload-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--sfs-light-green);
  transition: width 0.2s ease;
}

.ai-upload-progress span {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: var(--text-2);
}

/* Uploaded File */
.ai-uploaded-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  width: 100%;
}

.ai-uploaded-file-icon {
  width: 40px;
  height: 40px;
  background: var(--sfs-light-teal);
  color: var(--sfs-teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-uploaded-file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-uploaded-file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}

.ai-uploaded-file-remove {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--sfs-red);
  cursor: pointer;
  text-align: left;
}

.ai-uploaded-file-remove:hover {
  text-decoration: underline;
}

/* Input Areas */
.ai-input-area {
  position: relative;
  display: flex;
  align-items: center;
}

.ai-input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-4);
  display: flex;
  align-items: center;
}

.ai-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-1);
  background: #fff;
  transition: border-color 0.12s ease;
}

.ai-input:focus {
  outline: none;
  border-color: var(--sfs-teal);
}

.ai-input::placeholder {
  color: var(--placeholder-color);
}

.ai-input--inline {
  padding: 8px 12px;
}

.ai-textarea-area {
  display: flex;
}

.ai-textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  background: #fff;
  resize: vertical;
  line-height: 1.5;
}

.ai-textarea:focus {
  outline: none;
  border-color: var(--sfs-teal);
}

.ai-textarea::placeholder {
  color: var(--placeholder-color);
}

/* Options */
.ai-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.ai-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-option--inline {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.ai-option-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.ai-select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-1);
  background: #fff;
  cursor: pointer;
}

.ai-select:focus {
  outline: none;
  border-color: var(--sfs-teal);
}

.ai-select--inline {
  flex: 1;
  padding: 8px 12px;
}

/* Advanced Options */
.ai-advanced {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-advanced-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  text-align: left;
}

.ai-advanced-toggle:hover {
  color: var(--sfs-teal);
}

.ai-advanced-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

/* Actions */
.ai-actions {
  padding-top: 8px;
}

.ai-action-btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 14px;
}

.ai-action-btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Preview Empty State */
.ai-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  flex: 1;
  padding: 24px;
}

.ai-preview-icons {
  display: flex;
  gap: 8px;
}

.ai-preview-icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.ai-preview-icon-btn:hover {
  border-color: var(--sfs-teal);
  color: var(--sfs-teal);
}

.ai-preview-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-preview-step-num {
  width: 24px;
  height: 24px;
  background: var(--sfs-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-preview-step-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.ai-preview-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
  max-width: 280px;
}

.ai-preview-learn {
  background: none;
  border: 1px solid var(--border);
  padding: 8px 20px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.12s ease;
}

.ai-preview-learn:hover {
  border-color: var(--text-2);
}

/* Preview Notice */
.ai-preview-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--sfs-sand-light);
}

.ai-preview-notice--warning {
  border-left: 3px solid var(--sfs-sand);
}

.ai-preview-notice svg {
  flex-shrink: 0;
  color: var(--sfs-sand);
}

.ai-preview-notice strong {
  display: block;
  font-size: 13px;
  color: var(--text-1);
  margin-bottom: 4px;
}

.ai-preview-notice p {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.4;
}

/* Preview Result */
.ai-preview-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.ai-preview-result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sfs-green);
  font-size: 14px;
  font-weight: 500;
}

.ai-preview-course {
  background: #fff;
  border: 1px solid var(--border);
  padding: 20px;
}

.ai-preview-course-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px 0;
}

.ai-preview-course-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 12px 0;
}

.ai-preview-course-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-4);
  margin-bottom: 12px;
}

.ai-preview-course-outcomes {
  font-size: 13px;
  color: var(--text-2);
}

.ai-preview-course-outcomes strong {
  display: block;
  margin-bottom: 8px;
}

.ai-preview-course-outcomes ul {
  margin: 0;
  padding-left: 20px;
}

.ai-preview-course-outcomes li {
  margin-bottom: 4px;
}

.ai-preview-actions {
  display: flex;
  gap: 8px;
}

.ai-preview-actions .sfs-btn {
  flex: 1;
}

/* Preview Messages */
.ai-preview-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-preview-message {
  padding: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.ai-preview-message--error {
  background: var(--sfs-light-red);
  color: var(--sfs-red);
  border-left: 3px solid var(--sfs-red);
}

.ai-preview-message--assistant {
  background: #fff;
  border: 1px solid var(--border);
}

/* ==== CHAT MODE STYLES ==== */

/* Panel Chat Mode - Keep full-screen as requested */
.ai-panel--chat {
  /* Full screen width always - no max-width restriction */
  width: 100%;
  height: 100%;
}

.ai-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.ai-panel-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-panel-avatar {
  width: 36px;
  height: 36px;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-panel-status {
  font-size: 11px;
  color: var(--text-4);
}

.ai-panel-status--online {
  color: var(--sfs-green);
}

.ai-panel-status--online::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--sfs-green);
  border-radius: 50%;
  margin-right: 6px;
}

.ai-panel-head-actions {
  display: flex;
  gap: 4px;
}

.ai-panel-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.ai-panel-btn:hover {
  color: var(--text-1);
  background: var(--bg-2);
}

.ai-panel-btn--close:hover {
  background: var(--sfs-light-red);
  color: var(--sfs-red);
}

/* Upload View */
.ai-upload-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 24px;
  overflow-y: auto;
}

.ai-upload-zone {
  border: 2px dashed var(--border);
  background: var(--bg-2);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.ai-upload-zone:hover {
  border-color: var(--sfs-teal);
  background: var(--sfs-light-teal);
}

.ai-upload-label-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px;
  cursor: pointer;
  text-align: center;
}

.ai-upload-icon-large {
  color: var(--text-4);
}

.ai-upload-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0;
}

.ai-upload-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}

.ai-upload-btn {
  margin-top: 8px;
}

.ai-upload-progress-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ai-upload-progress-ring {
  position: relative;
  width: 72px;
  height: 72px;
}

.ai-upload-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ai-upload-progress-ring span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.ai-upload-info {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}

.ai-upload-info p {
  margin: 0 0 8px 0;
}

.ai-upload-info ul {
  margin: 0;
  padding-left: 20px;
}

.ai-upload-info li {
  margin-bottom: 4px;
}

/* Chat Messages */
.ai-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-chat-msg {
  display: flex;
  gap: 10px;
  max-width: 90%;
}

.ai-chat-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-chat-msg--assistant {
  align-self: flex-start;
}

.ai-chat-msg-avatar {
  width: 28px;
  height: 28px;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-chat-msg-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-chat-msg-text {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
}

.ai-chat-msg-text p {
  margin: 0 0 8px 0;
}

.ai-chat-msg-text p:last-child {
  margin-bottom: 0;
}

.ai-chat-msg--user .ai-chat-msg-text {
  background: var(--sfs-red);
  color: #fff;
}

.ai-chat-msg--assistant .ai-chat-msg-text {
  background: var(--bg-2);
  color: var(--text-1);
}

.ai-chat-msg-time {
  font-size: 11px;
  color: var(--text-4);
  padding: 0 4px;
}

.ai-chat-msg--user .ai-chat-msg-time {
  text-align: right;
}

/* Thinking State */
.ai-chat-msg--thinking .ai-chat-msg-avatar svg {
  animation: ai-spin 1.5s linear infinite;
}

@keyframes ai-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.ai-chat-thinking {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 4px solid var(--sfs-red);
  border-radius: 0;
  box-shadow: var(--shadow-base);
  font-size: 13px;
  color: var(--text-1);
  font-style: normal;
}

.ai-chat-thinking::before {
  content: 'AI CREATION PROGRESS';
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sfs-red);
}

.ai-chat-thinking-icon {
  display: none;
}

.ai-chat-thinking-text {
  overflow: visible;
  text-overflow: initial;
  white-space: normal;
  max-width: none;
  color: var(--text-1);
  font-weight: 700;
}

.ai-cursor {
  animation: ai-blink 1s step-end infinite;
  color: var(--sfs-red);
}

@keyframes ai-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Quick Replies */
.ai-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 12px;
}

.ai-quick-reply {
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.12s ease;
}

.ai-quick-reply:hover {
  border-color: var(--sfs-teal);
  background: var(--sfs-light-teal);
}

/* Chat Input */
.ai-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.ai-chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  background: var(--bg-2);
  resize: none;
  min-height: 40px;
  max-height: 120px;
}

.ai-chat-input:focus {
  outline: none;
  border-color: var(--sfs-teal);
  background: #fff;
}

.ai-chat-input::placeholder {
  color: var(--placeholder-color);
}

.ai-chat-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-chat-send {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--sfs-red);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.ai-chat-send:hover:not(:disabled) {
  background: #d33527;
}

.ai-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .ai-modal {
    padding: 0;
  }

  .ai-panel {
    max-width: none;
    max-height: none;
    height: 100vh;
  }

  .ai-panel--chat {
    max-width: none;
    height: 100vh;
  }

  .ai-panel-body {
    grid-template-columns: 1fr;
  }

  .ai-panel-source {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .ai-options {
    grid-template-columns: 1fr;
  }

  .ai-fab {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }

  .ai-quick-replies {
    gap: 6px;
  }

  .ai-quick-reply {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ============================================================================================================================================================ 
AI Enrichment Mode - Streaming Agent Dialogue
============================================================================================================================================================== */

.ai-modal--enriching {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-enrichment-panel {
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  border: 1px solid #2d2d4a;
  width: 600px;
  max-width: 95vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-enrichment-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #2d2d4a;
  background: rgba(0, 0, 0, 0.3);
}

.ai-enrichment-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--sfs-red) 0%, #ff6b6b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.ai-enrichment-header h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.ai-enrichment-status {
  color: var(--sfs-teal);
  font-size: 13px;
}

.ai-enrichment-progress {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.ai-enrichment-progress-bar {
  flex: 1;
  height: 8px;
  background: #2d2d4a;
  overflow: hidden;
}

.ai-enrichment-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sfs-teal) 0%, var(--sfs-red) 100%);
  transition: width 0.3s ease;
  position: relative;
}

.ai-enrichment-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

.ai-enrichment-progress-text {
  color: var(--sfs-teal);
  font-weight: 600;
  font-size: 14px;
  min-width: 40px;
  text-align: right;
}

.ai-enrichment-logs {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  max-height: 300px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.2);
}

.ai-enrichment-log {
  display: flex;
  gap: 12px;
  padding: 4px 0;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-enrichment-log-time {
  color: #666;
  font-size: 11px;
  min-width: 70px;
}

.ai-enrichment-log-text {
  color: #e0e0e0;
}

.ai-enrichment-log-text:first-letter {
  font-size: 14px;
}

.ai-enrichment-footer {
  padding: 16px 24px;
  border-top: 1px solid #2d2d4a;
  background: rgba(0, 0, 0, 0.3);
}

.ai-enrichment-spinner {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #888;
  font-size: 13px;
}

.ai-enrichment-spinner .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #2d2d4a;
  border-top-color: var(--sfs-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ai-enrichment-complete {
  color: var(--sfs-teal);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.ai-enrichment-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.ai-enrichment-actions .sfs-btn {
  flex: 1;
  justify-content: center;
}

.ai-enrichment-minimize {
  margin-left: auto;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ai-enrichment-minimize:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================================================================================================================================ 
AI Diagnostic Panel - Debug Trace Mode
============================================================================================================================================================== */

.ai-diagnostic-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 40vh;
  background: #1a1a2e;
  border-top: 2px solid var(--sfs-teal);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
}

.ai-diagnostic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #0f0f1a;
  border-bottom: 1px solid #2d2d4a;
}

.ai-diagnostic-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--sfs-teal);
}

.ai-diagnostic-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-diagnostic-count {
  font-size: 12px;
  color: #888;
}

.ai-diagnostic-clear {
  padding: 4px 12px;
  background: rgba(235, 60, 36, 0.2);
  border: 1px solid rgba(235, 60, 36, 0.4);
  color: #eb3c24;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-diagnostic-clear:hover {
  background: rgba(235, 60, 36, 0.3);
  border-color: #eb3c24;
}

.ai-diagnostic-traces {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.ai-diagnostic-empty {
  padding: 24px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

.ai-diagnostic-trace {
  margin-bottom: 6px;
  background: #0f0f1a;
  border: 1px solid #2d2d4a;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-diagnostic-trace:hover {
  border-color: #4a4a6a;
}

.ai-diagnostic-trace--request {
  border-left: 3px solid #3b82f6;
}

.ai-diagnostic-trace--response {
  border-left: 3px solid #10b981;
}

.ai-diagnostic-trace--error {
  border-left: 3px solid #ef4444;
}

.ai-diagnostic-trace--info {
  border-left: 3px solid #6b7280;
}

.ai-diagnostic-trace-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  flex-wrap: wrap;
}

.ai-diagnostic-badge {
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-diagnostic-badge--request {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.ai-diagnostic-badge--response {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.ai-diagnostic-badge--error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.ai-diagnostic-badge--info {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}

.ai-diagnostic-timestamp {
  font-size: 11px;
  color: #666;
}

.ai-diagnostic-model {
  font-size: 11px;
  color: var(--sfs-teal);
  background: rgba(89, 202, 165, 0.1);
  padding: 2px 8px;
}

.ai-diagnostic-duration {
  font-size: 11px;
  color: #f59e0b;
}

.ai-diagnostic-trace-details {
  padding: 12px 16px;
  border-top: 1px solid #2d2d4a;
  background: rgba(0, 0, 0, 0.2);
}

.ai-diagnostic-field {
  margin-bottom: 12px;
}

.ai-diagnostic-field:last-child {
  margin-bottom: 0;
}

.ai-diagnostic-field label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ai-diagnostic-field code {
  font-size: 12px;
  color: #a5b4fc;
  background: rgba(165, 180, 252, 0.1);
  padding: 2px 6px;
}

.ai-diagnostic-field span {
  font-size: 12px;
  color: #c9c9c9;
}

.ai-diagnostic-code {
  margin: 0;
  padding: 10px 12px;
  background: #0a0a14;
  border: 1px solid #2d2d4a;
  font-size: 11px;
  line-height: 1.5;
  color: #e0e0e0;
  overflow-x: auto;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-diagnostic-error {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

.ai-diagnostic-field--error label {
  color: #ef4444;
}

/* Panel button active state */
.ai-panel-btn--active {
  background: rgba(89, 202, 165, 0.15);
  border-color: var(--sfs-teal);
}

/* ============================================================================================================================================================ 
Course Preview - WYSIWYG View
============================================================================================================================================================== */

.course-preview {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: #fff;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* AI Enrichment Panel - Cursor-style streaming */
.course-enrichment-panel {
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  color: #fff;
  padding: 20px 24px;
  border-bottom: 2px solid var(--sfs-teal);
  max-height: 400px;
  overflow: hidden;
}

.course-enrichment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.course-enrichment-icon {
  width: 36px;
  height: 36px;
  background: rgba(0, 181, 173, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.course-enrichment-icon svg {
  color: var(--sfs-teal);
  width: 20px;
  height: 20px;
}

.course-enrichment-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 181, 173, 0.3);
  border-top-color: var(--sfs-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.course-enrichment-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.course-enrichment-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--sfs-teal);
}

.course-enrichment-phase {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

/* Streaming thoughts container */
.course-enrichment-thoughts {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 11px;
  line-height: 1.5;
  max-height: 150px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  margin-bottom: 12px;
}

.course-enrichment-thought {
  display: flex;
  gap: 8px;
  padding: 2px 0;
  color: rgba(255, 255, 255, 0.6);
  animation: fadeInThought 0.2s ease-out;
}

.course-enrichment-thought--latest {
  color: rgba(255, 255, 255, 0.95);
}

.course-enrichment-thought--typing {
  color: var(--sfs-teal);
}

.course-enrichment-thought-bullet {
  color: var(--sfs-teal);
  font-weight: bold;
  flex-shrink: 0;
}

.course-enrichment-thought-text {
  flex: 1;
  word-break: break-word;
}

.course-enrichment-cursor {
  color: var(--sfs-teal);
  animation: blink 1s step-end infinite;
}

/* Progress steps */
.course-enrichment-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-enrichment-step {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  font-size: 11px;
}

.course-enrichment-step--complete {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.course-enrichment-step--in_progress {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
  animation: pulse-bg 1.5s ease-in-out infinite;
}

@keyframes pulse-bg {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.course-enrichment-step--error {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.course-enrichment-step--pending {
  opacity: 0.5;
}

.course-enrichment-step-icon {
  font-size: 12px;
}

.course-enrichment-step-message {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.course-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.course-preview-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.course-preview-badge {
  background: var(--sfs-teal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.course-preview-status {
  font-size: 13px;
  color: var(--text-2);
}

.course-preview-header-right {
  display: flex;
  gap: 8px;
}

/* Hero */
.course-preview-hero {
  background: linear-gradient(135deg, var(--sfs-red) 0%, #d33527 100%);
  background-size: cover;
  background-position: center;
  padding: 60px 40px;
  color: #fff;
}

.course-preview-hero-content {
  max-width: 800px;
}

.course-preview-hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.course-preview-level {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.course-preview-cert {
  background: var(--sfs-green);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

.course-preview-title {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.course-preview-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin: 0 0 24px 0;
  line-height: 1.5;
  max-width: 600px;
}

.course-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.course-preview-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  opacity: 0.9;
}

/* Body */
.course-preview-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 32px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.course-preview-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Sections */
.course-preview-section {
  background: #fff;
  border: 1px solid var(--border);
  padding: 24px;
}

.course-preview-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sfs-red);
}

.course-preview-section-title svg {
  color: var(--sfs-red);
}

/* Outcomes */
.course-preview-outcomes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.course-preview-outcome {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
}

.course-preview-outcome svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Curriculum */
.course-preview-curriculum {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-preview-module {
  border: 1px solid var(--border);
}

.course-preview-module-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.course-preview-module-number {
  width: 28px;
  height: 28px;
  background: var(--sfs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.course-preview-module-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0;
}

.course-preview-module-count {
  font-size: 12px;
  color: var(--text-3);
}

.course-preview-lessons {
  display: flex;
  flex-direction: column;
}

.course-preview-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.course-preview-lesson:last-child {
  border-bottom: none;
}

.course-preview-lesson:hover {
  background: var(--bg-2);
}

.course-preview-lesson-thumb {
  width: 48px;
  height: 36px;
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
}

.course-preview-lesson-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.course-preview-lesson-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}

.course-preview-lesson-duration {
  font-size: 12px;
  color: var(--text-3);
}

.course-preview-lesson-action {
  color: var(--text-4);
  cursor: pointer;
  transition: color 0.12s ease;
}

.course-preview-lesson:hover .course-preview-lesson-action {
  color: var(--sfs-red);
}

/* Description */
.course-preview-description {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Sidebar */
.course-preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.course-preview-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 80px;
}

.course-preview-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--sfs-red) 0%, var(--sfs-teal) 100%);
  background-size: cover;
  background-position: center;
}

.course-preview-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-preview-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.course-preview-card-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.course-preview-card-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
}

.course-preview-card-stat-label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.course-preview-enroll {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
}

.course-preview-card-cert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sfs-green);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Tags */
.course-preview-tags {
  background: #fff;
  border: 1px solid var(--border);
  padding: 16px;
}

.course-preview-tags-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin: 0 0 12px 0;
}

.course-preview-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-preview-tag {
  background: var(--bg-2);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-2);
}

/* Curriculum hint */
.course-preview-curriculum-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--bg-2);
  border-left: 3px solid var(--sfs-teal);
}

.course-preview-lesson {
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.course-preview-lesson--clickable:hover {
  background: var(--bg-2);
  border-left: 3px solid var(--sfs-red);
}

.course-preview-lesson--clickable:hover .course-preview-lesson-action {
  color: var(--sfs-red);
}

/* ============================================================================================================================================================ 
Lesson Preview Mode
============================================================================================================================================================== */

.lesson-preview {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 52px);
}

.lesson-preview-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 52px);
}

.lesson-preview-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.lesson-preview-toc {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lesson-preview-toc-module {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesson-preview-toc-module-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.lesson-preview-toc-lessons {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lesson-preview-toc-lesson {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease;
  font-size: 13px;
  color: var(--text-2);
}

.lesson-preview-toc-lesson:hover {
  background: var(--bg-1);
  color: var(--text-1);
}

.lesson-preview-toc-lesson--active {
  background: var(--sfs-red);
  color: #fff;
}

.lesson-preview-toc-lesson--active:hover {
  background: #d33527;
  color: #fff;
}

.lesson-preview-toc-lesson-num {
  width: 20px;
  height: 20px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.lesson-preview-toc-lesson--active .lesson-preview-toc-lesson-num {
  background: rgba(255, 255, 255, 0.2);
}

.lesson-preview-toc-lesson-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Lesson Content */
.lesson-preview-main {
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.lesson-preview-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.lesson-preview-module-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--sfs-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.lesson-preview-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.lesson-preview-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-3);
}

/* Lesson Content Styling */
.lesson-preview-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-2);
}

.lesson-preview-content h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  margin: 32px 0 16px 0;
}

.lesson-preview-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin: 28px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sfs-red);
}

.lesson-preview-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  margin: 24px 0 10px 0;
}

.lesson-preview-content p {
  margin: 0 0 16px 0;
}

.lesson-preview-content ul,
.lesson-preview-content ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.lesson-preview-content li {
  margin-bottom: 8px;
}

.lesson-preview-content strong {
  color: var(--text-1);
  font-weight: 600;
}

.lesson-preview-content em {
  font-style: italic;
}

.lesson-preview-content blockquote {
  border-left: 4px solid var(--sfs-teal);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--bg-2);
  font-style: italic;
  color: var(--text-2);
}

.lesson-preview-content code {
  background: var(--bg-2);
  padding: 2px 6px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 14px;
}

.lesson-preview-content pre {
  background: var(--bg-3);
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}

.lesson-preview-content pre code {
  background: none;
  padding: 0;
}

.lesson-preview-content .slide-content {
  background: var(--bg-2);
  padding: 16px 20px;
  margin: 12px 0;
  border-left: 3px solid var(--sfs-teal);
}

.lesson-preview-content .lesson-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lesson-preview-content .lesson-header {
  margin-bottom: 16px;
}

.lesson-preview-content .lesson-body {
  display: flex;
  flex-direction: column;
}

.lesson-preview-content .lesson-takeaways {
  background: linear-gradient(135deg, var(--sfs-green) 0%, #2ecc71 100%);
  color: #fff;
  padding: 20px 24px;
  margin-top: 24px;
}

.lesson-preview-content .lesson-takeaways h3 {
  color: #fff;
  margin-top: 0;
}

.lesson-preview-content .lesson-takeaways ul {
  margin-bottom: 0;
}

/* ============================================= */
/* Interactive Course Elements                   */
/* ============================================= */

/* Learning Objectives */
.lesson-preview-content .lesson-objectives {
  background: linear-gradient(135deg, var(--sfs-teal) 0%, #00d4c8 100%);
  color: #fff;
  padding: 20px 24px;
  margin: 16px 0;
}

.lesson-preview-content .lesson-objectives h3 {
  color: #fff;
  margin: 0 0 12px 0;
  font-size: 18px;
}

.lesson-preview-content .lesson-objectives ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lesson-preview-content .lesson-objectives li {
  padding: 6px 0;
  font-size: 15px;
}

/* Stat Highlight */
.lesson-preview-content .stat-highlight {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-2);
  padding: 24px;
  margin: 20px 0;
  border-left: 4px solid var(--sfs-red);
}

.lesson-preview-content .stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--sfs-red);
  line-height: 1;
}

.lesson-preview-content .stat-text {
  font-size: 16px;
  color: var(--text-2);
  flex: 1;
}

/* Callout Boxes */
.lesson-preview-content .callout {
  padding: 16px 20px;
  margin: 20px 0;
  border-left: 4px solid;
}

.lesson-preview-content .callout-tip {
  background: #fff8e1;
  border-color: #ffc107;
}

.lesson-preview-content .callout-info {
  background: #e3f2fd;
  border-color: #2196f3;
}

.lesson-preview-content .callout-warning {
  background: #fce4ec;
  border-color: #e91e63;
}

.lesson-preview-content .callout-success {
  background: #e8f5e9;
  border-color: #4caf50;
}

.lesson-preview-content .callout strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.lesson-preview-content .callout p {
  margin: 0;
  font-size: 14px;
}

/* Quiz Section */
.lesson-preview-content .lesson-quiz {
  background: var(--bg-2);
  padding: 24px;
  margin: 24px 0;
  border: 1px solid var(--border);
}

.lesson-preview-content .lesson-quiz h3 {
  margin: 0 0 20px 0;
  color: var(--text-1);
}

.lesson-preview-content .quiz-question {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.lesson-preview-content .quiz-question:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.lesson-preview-content .quiz-question-text {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 12px 0;
  color: var(--text-1);
}

.lesson-preview-content .quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-preview-content .quiz-option {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lesson-preview-content .quiz-option:hover {
  background: var(--bg-3);
  border-color: var(--sfs-teal);
}

.lesson-preview-content .quiz-option.selected {
  background: var(--sfs-light-teal);
  border-color: var(--sfs-teal);
  font-weight: 500;
}

.lesson-preview-content .quiz-option.correct {
  background: #e8f5e9;
  border-color: #4caf50;
  color: #2e7d32;
}

.lesson-preview-content .quiz-option.incorrect {
  background: #ffebee;
  border-color: #f44336;
  color: #c62828;
}

.lesson-preview-content .quiz-feedback {
  margin-top: 12px;
  padding: 12px 16px;
  background: #e3f2fd;
  border-left: 3px solid #2196f3;
  font-size: 14px;
}

/* Poll Section */
.lesson-preview-content .lesson-poll {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 24px;
  margin: 24px 0;
}

.lesson-preview-content .lesson-poll h3 {
  color: #fff;
  margin: 0 0 12px 0;
}

.lesson-preview-content .poll-question {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 16px 0;
}

.lesson-preview-content .poll-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-preview-content .poll-option {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lesson-preview-content .poll-option:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lesson-preview-content .poll-option.selected {
  background: #fff;
  color: #667eea;
  font-weight: 600;
}

/* FAQ Section */
.lesson-preview-content .lesson-faq {
  background: var(--bg-2);
  padding: 24px;
  margin: 24px 0;
}

.lesson-preview-content .lesson-faq h3 {
  margin: 0 0 16px 0;
  color: var(--text-1);
}

.lesson-preview-content .faq-item {
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid var(--border);
}

.lesson-preview-content .faq-item summary {
  padding: 14px 16px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lesson-preview-content .faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--sfs-teal);
  font-weight: 300;
}

.lesson-preview-content .faq-item[open] summary::after {
  content: '−';
}

.lesson-preview-content .faq-answer {
  padding: 0 16px 16px 16px;
  font-size: 14px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
}

.lesson-preview-content .faq-answer p {
  margin: 12px 0 0 0;
}

/* Summary/Takeaways Box */
.lesson-preview-content .lesson-summary {
  background: linear-gradient(135deg, var(--sfs-green) 0%, #2ecc71 100%);
  color: #fff;
  padding: 20px 24px;
  margin: 24px 0;
}

.lesson-preview-content .lesson-summary h3 {
  color: #fff;
  margin: 0 0 12px 0;
}

.lesson-preview-content .lesson-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lesson-preview-content .lesson-summary li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.lesson-preview-content .lesson-summary li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* Lesson Section */
.lesson-preview-content .lesson-section {
  margin: 24px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.lesson-preview-content .lesson-section:last-of-type {
  border-bottom: none;
}

/* ============================================= */
/* Progressive Course Builder                    */
/* ============================================= */

.progressive-builder {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.progressive-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

.progressive-builder-header-content {
  flex: 1;
}

.progressive-builder-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

/* AI Thinking Panel - Cursor-style reasoning display */
.ai-thinking-panel {
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  border-bottom: 1px solid rgba(0, 181, 173, 0.3);
  padding: 16px 24px;
  max-height: 280px;
  overflow: hidden;
}

.ai-thinking-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-thinking-icon {
  width: 32px;
  height: 32px;
  background: rgba(0, 181, 173, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-thinking-icon svg {
  color: var(--sfs-teal);
}

.ai-thinking-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 181, 173, 0.3);
  border-top-color: var(--sfs-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.ai-thinking-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-thinking-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--sfs-teal);
}

.ai-thinking-phase {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.ai-thinking-toggle {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
}

.ai-thinking-toggle:hover {
  color: #fff;
}

.ai-thinking-content {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
  max-height: 180px;
  overflow-y: auto;
}

.ai-thinking-line {
  display: flex;
  gap: 8px;
  padding: 3px 0;
  color: rgba(255, 255, 255, 0.6);
  animation: fadeInThought 0.3s ease-out;
}

@keyframes fadeInThought {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-thinking-line--latest {
  color: rgba(255, 255, 255, 0.9);
}

.ai-thinking-line--typing {
  color: var(--sfs-teal);
}

.ai-thinking-bullet {
  color: var(--sfs-teal);
  font-weight: bold;
  flex-shrink: 0;
}

.ai-thinking-text {
  flex: 1;
}

.ai-thinking-cursor {
  color: var(--sfs-teal);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.progressive-builder-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin: 4px 0 0 0;
}

.progressive-builder-actions {
  display: flex;
  gap: 8px;
}

/* Progress Bar */
.progressive-builder-progress {
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.progressive-builder-progress-bar {
  height: 8px;
  background: var(--bg-2);
  overflow: hidden;
}

.progressive-builder-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sfs-teal) 0%, var(--sfs-green) 100%);
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

.progressive-builder-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.3) 50%,
      transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.progressive-builder-progress-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.progressive-builder-progress-percent {
  font-size: 24px;
  font-weight: 700;
  color: var(--sfs-teal);
  min-width: 60px;
}

.progressive-builder-progress-status {
  font-size: 14px;
  color: var(--text-2);
  flex: 1;
}

.progressive-builder-progress-lessons {
  font-size: 13px;
  color: var(--text-3);
  background: var(--bg-2);
  padding: 4px 10px;
}

.progressive-builder-elapsed {
  font-size: 13px;
  color: var(--text-3);
  font-family: 'SF Mono', Monaco, monospace;
}

/* Timeout Warning */
.progressive-builder-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  color: #856404;
  font-size: 14px;
}

.progressive-builder-warning-icon {
  font-size: 20px;
}

/* Error Display */
.progressive-builder-error {
  padding: 20px 24px;
  background: var(--sfs-light-red);
  color: var(--sfs-red);
  display: flex;
  align-items: center;
  gap: 16px;
}

.progressive-builder-error p {
  margin: 0;
  flex: 1;
}

/* Content Area */
.progressive-builder-content {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
}

/* Sidebar */
.progressive-builder-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.progressive-builder-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progressive-builder-sidebar-header h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--text-1);
}

.progressive-builder-level {
  background: var(--sfs-blue);
  color: #fff;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.progressive-builder-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: 13px;
}

/* Module */
.progressive-builder-module {
  border-bottom: 1px solid var(--border);
}

.progressive-builder-module-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  background: var(--bg-3);
}

.progressive-builder-module-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--sfs-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* Lessons */
.progressive-builder-lessons {
  padding: 8px 0;
}

.progressive-builder-lesson {
  display: flex;
  flex-direction: column;
  padding: 10px 20px;
  gap: 6px;
  cursor: default;
  transition: background 0.15s ease;
}

.progressive-builder-lesson.complete {
  cursor: pointer;
}

.progressive-builder-lesson:hover.complete {
  background: var(--bg-3);
}

.progressive-builder-lesson.active {
  background: var(--sfs-light-teal);
}

.progressive-builder-lesson.generating {
  background: var(--sfs-light-blue);
}

.progressive-builder-lesson-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progressive-builder-lesson-status {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-3);
}

.progressive-builder-lesson.complete .progressive-builder-lesson-status {
  color: var(--sfs-green);
}

.progressive-builder-lesson.error .progressive-builder-lesson-status {
  color: var(--sfs-red);
}

.progressive-builder-lesson-title {
  font-size: 13px;
  color: var(--text-2);
  flex: 1;
}

.progressive-builder-lesson.complete .progressive-builder-lesson-title {
  color: var(--text-1);
}

.progressive-builder-lesson-progress {
  height: 3px;
  background: var(--bg-3);
  margin-left: 28px;
  overflow: hidden;
}

.progressive-builder-lesson-progress-fill {
  height: 100%;
  background: var(--sfs-teal);
  transition: width 0.2s ease;
}

.progressive-builder-lesson-features {
  display: flex;
  gap: 4px;
  margin-left: 28px;
  font-size: 12px;
}

/* Main Content Area */
.progressive-builder-main {
  overflow-y: auto;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Placeholders */
.progressive-builder-placeholder {
  text-align: center;
  padding: 60px 40px;
  max-width: 500px;
}

.progressive-builder-placeholder-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.progressive-builder-placeholder h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 12px 0;
}

.progressive-builder-placeholder p {
  font-size: 15px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.6;
}

/* Live Content Generation */
.progressive-builder-live-content {
  width: 100%;
  max-width: 600px;
  padding: 40px;
}

.progressive-builder-live-header {
  text-align: center;
  margin-bottom: 32px;
}

.progressive-builder-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sfs-red);
  color: #fff;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.progressive-builder-live-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.progressive-builder-live-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0;
}

.progressive-builder-live-preview {
  background: var(--bg-2);
  padding: 24px;
}

.progressive-builder-live-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progressive-builder-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
}

.progressive-builder-feature.generating {
  background: var(--sfs-light-blue);
  border-color: var(--sfs-blue);
}

.progressive-builder-feature.pending {
  opacity: 0.5;
}

.progressive-builder-feature-icon {
  font-size: 20px;
}

.progressive-builder-feature span:nth-child(2) {
  flex: 1;
  font-size: 14px;
  color: var(--text-2);
}

.progressive-builder-feature-check {
  color: var(--sfs-green);
  font-weight: 700;
}

.progressive-builder-feature-pending {
  color: var(--text-4);
}

/* Complete State */
.progressive-builder-complete {
  text-align: center;
  padding: 60px 40px;
  max-width: 600px;
}

.progressive-builder-complete-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.progressive-builder-complete h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 12px 0;
}

.progressive-builder-complete p {
  font-size: 16px;
  color: var(--text-3);
  margin: 0 0 32px 0;
}

.progressive-builder-complete-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
}

.progressive-builder-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.progressive-builder-stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--sfs-teal);
}

.progressive-builder-stat-label {
  font-size: 13px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progressive-builder-complete-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.sfs-btn--large {
  padding: 14px 28px;
  font-size: 16px;
}

/* Spinners */
.progressive-builder-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--sfs-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.progressive-builder-spinner-small {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--sfs-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Lesson Hero Image */
.lesson-preview-hero {
  margin: 24px 0;
  overflow: hidden;
}

.lesson-preview-hero-img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
}

/* Media Generation Panel */
.lesson-media-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 20px;
  margin: 16px 0;
}

.lesson-media-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 16px 0;
}

.lesson-media-panel-title svg {
  color: var(--sfs-teal);
}

.lesson-media-prompt {
  margin-bottom: 12px;
}

.lesson-media-prompt input {
  width: 100%;
}

.lesson-media-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.lesson-media-actions .sfs-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lesson-media-preview {
  background: #fff;
  border: 1px solid var(--border);
  padding: 12px;
  margin-bottom: 12px;
}

.lesson-media-preview h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lesson-media-preview-img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  margin-bottom: 8px;
}

.lesson-media-preview-video {
  width: 100%;
  max-height: 200px;
  margin-bottom: 8px;
  background: #000;
}

.lesson-media-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  background: var(--bg-3);
  color: var(--text-3);
  text-align: center;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Lesson Navigation */
.lesson-preview-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.lesson-preview-nav .sfs-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive */
@media (max-width: 900px) {
  .course-preview-body {
    grid-template-columns: 1fr;
  }

  .course-preview-sidebar {
    order: -1;
  }

  .course-preview-card {
    position: static;
  }

  .course-preview-hero {
    padding: 40px 24px;
  }

  .course-preview-title {
    font-size: 28px;
  }

  .course-preview-body {
    padding: 24px;
  }

  .lesson-preview {
    grid-template-columns: 1fr;
  }

  .lesson-preview-sidebar {
    display: none;
  }

  .lesson-preview-main {
    padding: 24px;
  }

  .lesson-preview-title {
    font-size: 24px;
  }
}

/* ============================================================================================================================================================
   LESSON PAGE STYLES - Matching Course Detail Theme
   ============================================================================================================================================================ */

/* Lesson Hero */
/* Lesson Page - New Layout */
.ah-lesson-page {
  padding: 0;
}

.ah-lesson-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}

.ah-lesson-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.ah-lesson-back-link:hover {
  color: var(--sfs-blue);
}

.ah-lesson-back-link svg {
  flex-shrink: 0;
}

.ah-lesson-counter {
  font-size: 14px;
  color: var(--text-3);
}

.ah-lesson-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .ah-lesson-layout {
    grid-template-columns: 1fr;
  }
}

.ah-lesson-main {
  min-width: 0;
}

.ah-lesson-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ah-lesson-type-badge--inline {
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--sfs-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ah-lesson-type-badge--inline svg {
  flex-shrink: 0;
}

.ah-lesson-duration-inline {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 16px;
}

.ah-lesson-video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  background: #000;
  margin-bottom: 24px;
}

.ah-lesson-video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ah-lesson-video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  font-size: 18px;
}

/* Lesson Content Card - White tiled background */
.ah-lesson-content-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

.ah-lesson-body-content {
  color: var(--text-2);
  line-height: 1.7;
  font-size: 15px;
}

.ah-lesson-body-content h1,
.ah-lesson-body-content h2,
.ah-lesson-body-content h3 {
  color: var(--text-1);
  margin: 24px 0 12px;
}

.ah-lesson-body-content h1:first-child,
.ah-lesson-body-content h2:first-child,
.ah-lesson-body-content h3:first-child {
  margin-top: 0;
}

.ah-lesson-body-content p {
  margin: 0 0 16px;
}

.ah-lesson-body-content ul,
.ah-lesson-body-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.ah-lesson-body-content li {
  margin-bottom: 8px;
}

/* Downloadable Resources Panel in Sidebar */
.ah-lesson-resources-panel {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 24px;
}

.ah-lesson-resources-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-1);
}

.ah-lesson-resources-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.ah-lesson-resources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-lesson-resource-item {
  margin: 0;
}

.ah-lesson-resource-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-1);
  transition: background 0.15s, border-color 0.15s;
}

.ah-lesson-resource-link:hover {
  background: var(--bg-3);
  border-color: var(--text-4);
}

.ah-lesson-resource-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--sfs-red);
  color: #fff;
  flex-shrink: 0;
}

.ah-lesson-resource-info {
  flex: 1;
  min-width: 0;
}

.ah-lesson-resource-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-lesson-resource-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  margin-top: 2px;
}

.ah-lesson-resource-download {
  flex-shrink: 0;
  color: var(--text-3);
  transition: color 0.15s;
}

.ah-lesson-resource-link:hover .ah-lesson-resource-download {
  color: var(--sfs-red);
}

/* Notes Panel in Sidebar */
.ah-lesson-notes-panel {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 20px;
}

.ah-lesson-notes-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ah-lesson-notes-icon {
  font-size: 18px;
}

.ah-lesson-notes-svg {
  color: var(--sfs-orange);
  flex-shrink: 0;
}

.ah-lesson-notes-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0;
}

.ah-lesson-notes-textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
}

.ah-lesson-notes-textarea:focus {
  outline: none;
  border-color: var(--sfs-blue);
}

.ah-lesson-notes-status {
  font-size: 12px;
  color: var(--text-4);
  margin-top: 8px;
  line-height: 1.4;
}

/* Actions Panel in Sidebar */
.ah-lesson-actions-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sfs-btn--full {
  width: 100%;
  justify-content: center;
}

.sfs-btn--success {
  background: #059669;
  color: #fff;
  cursor: default;
}

.ah-lesson-hero {
  position: relative;
  padding-bottom: 42%;
  background: #000;
}

/* Lesson Content Section */
.ah-lesson-content {
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Lesson Title */
.ah-lesson-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px;
}

/* Lesson Summary Panel */
.ah-lesson-summary {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

.ah-lesson-duration {
  color: var(--text-3);
  font-size: 14px;
  margin-bottom: 8px;
}

.ah-lesson-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ah-lesson-summary-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .ah-lesson-summary-grid {
    grid-template-columns: 1fr;
  }
}

.ah-lesson-description {
  color: var(--text-2);
  line-height: 1.6;
}

/* What You'll Learn */
.ah-lesson-learn-section {}

.ah-lesson-learn-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-1);
  margin-bottom: 12px;
}

.ah-lesson-learn-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-lesson-learn-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}

.ah-lesson-learn-icon {
  color: var(--sfs-green);
  font-weight: bold;
}

/* Lesson Stats */
.ah-lesson-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.ah-lesson-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 14px;
}

.ah-lesson-stat-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Lesson Progress */
.ah-lesson-progress {
  margin-left: auto;
  min-width: 180px;
}

.ah-lesson-progress-label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 4px;
}

.ah-lesson-progress-bar {
  height: 6px;
  background: var(--border);
}

.ah-lesson-progress-fill {
  height: 6px;
  background: var(--sfs-green);
}

/* Lesson Instructors */
.ah-lesson-instructors {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

.ah-lesson-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 16px;
}

.ah-lesson-instructors-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ah-lesson-instructor {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ah-lesson-instructor-avatar {
  width: 80px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
}

.ah-lesson-instructor-avatar--placeholder {
  background: linear-gradient(135deg, #64748b, #475569);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.ah-lesson-instructor-info {
  flex: 1;
  min-width: 0;
}

.ah-lesson-instructor-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 2px;
}

.ah-lesson-instructor-role {
  color: var(--sfs-primary);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.ah-lesson-instructor-bio {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

/* Lesson Curriculum */
.ah-lesson-curriculum {
  margin: 24px 0;
}

.ah-lesson-curriculum-section {
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: var(--bg-1);
}

.ah-lesson-curriculum-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.ah-lesson-curriculum-header:hover {
  background: var(--bg-2);
}

.ah-lesson-curriculum-meta {
  color: var(--text-3);
  font-size: 12px;
  margin-top: 4px;
}

.ah-lesson-curriculum-toggle {
  color: var(--text-3);
  font-size: 18px;
}

.ah-lesson-curriculum-items {
  padding: 8px 16px 16px;
}

.ah-lesson-curriculum-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.ah-lesson-curriculum-item-info {
  margin-right: 16px;
}

.ah-lesson-curriculum-item-duration {
  color: var(--text-3);
  font-size: 12px;
  margin-top: 4px;
}

/* Lesson Resources */
.ah-lesson-resources-section {
  margin: 24px 0;
}

.ah-lesson-resource-item {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.ah-lesson-resource-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--sfs-primary);
  font-size: 14px;
}

.ah-lesson-resource-link:hover {
  text-decoration: underline;
}

/* Lesson FAQ */
.ah-lesson-faq-section {
  margin: 24px 0;
}

.ah-lesson-faq-list {
  display: grid;
  gap: 8px;
}

.ah-lesson-faq-item {
  border: 1px solid var(--border);
  background: var(--bg-1);
}

.ah-lesson-faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-1);
}

.ah-lesson-faq-question:hover {
  background: var(--bg-2);
}

.ah-lesson-faq-toggle {
  color: var(--text-3);
  font-size: 18px;
}

.ah-lesson-faq-answer {
  padding: 0 16px 16px;
  white-space: pre-wrap;
  color: var(--text-2);
  line-height: 1.6;
}

/* Alert Styles */
.ah-alert {
  padding: 16px;
  border: 1px solid;
  margin-bottom: 16px;
}

.ah-alert--warning {
  border-color: #ffe58f;
  background: #fffbe6;
  color: #d48806;
}

/* Lesson Type Badge */
.ah-lesson-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--sfs-green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.ah-lesson-type-icon {
  font-size: 14px;
}

.ah-lesson-type-label {}

.ah-lesson-duration-hero {
  color: var(--text-3);
  font-size: 14px;
  margin-bottom: 16px;
}

/* My Notes Section */
.ah-lesson-notes {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

.ah-lesson-notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ah-lesson-notes-header .ah-lesson-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.ah-lesson-notes-status {
  font-size: 12px;
  color: var(--text-3);
}

.ah-lesson-notes-status--saved {
  color: var(--sfs-green);
}

.ah-lesson-notes-input {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.ah-lesson-notes-input:focus {
  outline: none;
  border-color: var(--sfs-primary);
}

.ah-lesson-notes-input::placeholder {
  color: var(--text-4);
}

.ah-lesson-notes-hint {
  font-size: 12px;
  color: var(--text-4);
  margin: 8px 0 0;
}

/* Course Likes */
.ah-course-likes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ah-course-like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.ah-course-like-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.ah-course-like-btn--liked {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
}

.ah-course-like-btn--liked:hover {
  background: #fee2e2;
}

.ah-course-like-icon {
  font-size: 16px;
}

.ah-course-like-count {
  font-weight: 500;
}

/* Lesson Completion Status Icons */
.ah-lesson-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.ah-lesson-status-icon--completed {
  color: var(--sfs-green);
}

.ah-lesson-status-icon--pending {
  color: var(--text-4);
}

.ah-lesson-status-icon--unlocked {
  color: var(--sfs-orange);
}

.ah-lesson-status-icon--locked {
  color: var(--text-4);
}

/* Locked Lesson Style */
.ah-curriculum-lesson--locked {
  cursor: not-allowed;
  opacity: 0.6;
}

.ah-curriculum-lesson--locked:hover {
  background: transparent;
}

/* ============================================
   LESSON EDITOR STYLES
   ============================================ */

.ah-lesson-editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.ah-lesson-editor-modal {
  background: var(--bg-1, #fff);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.ah-lesson-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.ah-lesson-editor-header-content {
  flex: 1;
}

.ah-lesson-editor-title {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-2);
  margin: 0;
}

.ah-lesson-editor-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.ah-lesson-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.ah-lesson-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.ah-lesson-card-number {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.ah-lesson-card-delete {
  background: none;
  border: none;
  color: var(--sfs-red, #dc3545);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-lesson-card-delete:hover {
  opacity: 0.8;
}

.ah-lesson-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  .ah-lesson-form-grid {
    grid-template-columns: 1fr;
  }
}

.ah-lesson-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ah-lesson-form-group--wide {
  grid-column: 1 / -1;
}

@media (min-width: 769px) {
  .ah-lesson-form-group--wide {
    grid-column: 1;
  }
}

.ah-lesson-form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.ah-lesson-form-input,
.ah-lesson-form-select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
}

.ah-lesson-form-input:focus,
.ah-lesson-form-select:focus {
  outline: none;
  border-color: var(--sfs-blue);
}

.ah-lesson-form-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.ah-lesson-form-section:last-child {
  border-bottom: none;
}

.ah-lesson-form-hint {
  font-size: 12px;
  color: var(--text-3);
  margin: 4px 0 12px;
}

.ah-lesson-media-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ah-lesson-file-input {
  display: none;
}

.ah-lesson-file-label {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 13px;
  cursor: pointer;
}

.ah-lesson-file-label:hover {
  background: var(--bg-3);
}

.ah-lesson-file-name {
  font-size: 13px;
  color: var(--text-3);
}

.ah-lesson-clear-btn {
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}

.ah-lesson-clear-btn:hover {
  background: var(--bg-2);
}

.ah-lesson-media-preview {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.ah-lesson-resources-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.ah-lesson-resource-item {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 8px;
  align-items: center;
}

.ah-lesson-resource-item--enhanced {
  display: block;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.ah-lesson-resource-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 16px;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .ah-lesson-resource-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.ah-lesson-resource-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ah-lesson-resource-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ah-lesson-resource-field-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}

.ah-lesson-resource-file-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-lesson-resource-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border: 1px dashed var(--border);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ah-lesson-resource-upload-btn:hover {
  border-color: var(--sfs-red);
  color: var(--sfs-red);
  background: #fff5f5;
}

.ah-lesson-resource-upload-btn svg {
  opacity: 0.7;
}

.ah-lesson-resource-file-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 14px;
}

.ah-lesson-resource-file-preview svg {
  color: var(--sfs-red);
  flex-shrink: 0;
}

.ah-lesson-resource-filename {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-lesson-resource-clear-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.ah-lesson-resource-clear-btn:hover {
  color: var(--sfs-red);
}

.ah-lesson-resource-upload-progress {
  height: 4px;
  background: var(--bg-3);
  overflow: hidden;
}

.ah-lesson-resource-progress-bar {
  height: 100%;
  background: var(--sfs-red);
  transition: width 0.2s ease;
}

.ah-lesson-resource-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s ease;
  align-self: center;
}

.ah-lesson-resource-delete-btn:hover {
  background: #fee;
  border-color: var(--sfs-red);
  color: var(--sfs-red);
}

.ah-lesson-remove-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 18px;
  cursor: pointer;
}

.ah-lesson-remove-btn:hover {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
}

.ah-lesson-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: none;
  border: 1px dashed var(--border);
  color: var(--sfs-blue);
  font-size: 13px;
  cursor: pointer;
}

.ah-lesson-add-btn:hover {
  border-color: var(--sfs-blue);
  background: rgba(var(--sfs-blue-rgb, 59, 130, 246), 0.05);
}

/* Rich Text Editor Toolbar */
.ah-lesson-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-bottom: none;
  flex-wrap: wrap;
}

.ah-lesson-toolbar-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-2);
  font-size: 12px;
  min-width: 80px;
}

.ah-lesson-toolbar-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}

.ah-lesson-toolbar-btn:hover {
  background: var(--bg-3);
}

.ah-lesson-toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.ah-lesson-content-editor {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
}

.ah-lesson-content-editor:focus {
  outline: none;
  border-color: var(--sfs-blue);
}

.ah-lesson-content-editor::placeholder {
  color: var(--text-4);
}

.ah-lesson-editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

/* ============================================
   LESSON NAVIGATION BUTTONS
   ============================================ */

.ah-lesson-nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

.ah-lesson-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-1);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ah-lesson-nav-btn:hover {
  background: var(--bg-2);
  border-color: var(--sfs-blue);
  color: var(--sfs-blue);
}

.ah-lesson-nav-btn--next {
  background: var(--sfs-orange);
  border-color: var(--sfs-orange);
  color: #fff;
}

.ah-lesson-nav-btn--next:hover {
  background: var(--sfs-dark-orange, #d35400);
  border-color: var(--sfs-dark-orange, #d35400);
  color: #fff;
}

.ah-lesson-nav-btn svg {
  flex-shrink: 0;
}

/* ============================================
   LESSON DISCUSSIONS SECTION
   ============================================ */

.ah-lesson-discussions {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 24px;
  margin-top: 24px;
}

.ah-lesson-discussions-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 16px;
}

.ah-lesson-discussions-title svg {
  color: var(--sfs-blue);
}

.ah-lesson-discussions-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-3);
  background: var(--bg-2);
  margin-bottom: 16px;
}

.ah-lesson-discussions-empty p {
  margin: 0;
}

.ah-lesson-discussions-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-lesson-discussions-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.ah-lesson-discussions-input:focus {
  outline: none;
  border-color: var(--sfs-blue);
}

.ah-lesson-discussions-form .sfs-btn {
  align-self: flex-end;
}

/* Discussion List */
.ah-lesson-discussions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.ah-lesson-discussion-item {
  display: flex;
  gap: 12px;
}

.ah-lesson-discussion-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
}

.ah-lesson-discussion-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-lesson-discussion-content {
  flex: 1;
  background: var(--bg-2);
  padding: 12px 16px;
  position: relative;
}

.ah-lesson-discussion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ah-lesson-discussion-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
}

.ah-lesson-discussion-time {
  font-size: 12px;
  color: var(--text-3);
}

.ah-lesson-discussion-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ah-lesson-discussion-item:hover .ah-lesson-discussion-delete {
  opacity: 1;
}

.ah-lesson-discussion-delete:hover {
  color: var(--sfs-red);
}

.ah-lesson-discussion-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-1);
  white-space: pre-wrap;
}

/* ============================================
   Instructor Sections - Used in Lessons and Courses
   Matches article author styling for consistency
   ============================================ */
.ah-content-instructors {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.ah-content-instructors--hero {
  margin-top: 16px;
}

/* Course hero: show side by side if multiple instructors */
.ah-content-instructors--hero {
  flex-direction: row;
  flex-wrap: wrap;
}

.ah-content-instructors--hero .ah-content-instructor {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
}

.ah-content-instructor {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px;
  background: var(--surface-2, #f8f9fa);
  border: 1px solid var(--border);
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.ah-content-instructor:hover {
  background: var(--surface-3, #f0f1f2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ah-content-instructor-header {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 1;
  min-width: 200px;
}

.ah-content-instructor-expand-hint {
  font-size: 12px;
  color: var(--text-3, #888);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.ah-content-instructor:hover .ah-content-instructor-expand-hint {
  color: var(--sfs-red);
}

.ah-content-instructor-expand-hint svg {
  transition: transform 0.2s ease;
}

.ah-content-instructor--expanded .ah-content-instructor-expand-hint svg {
  transform: rotate(180deg);
}

.ah-content-instructor-bio {
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2, #666);
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  display: none;
}

.ah-content-instructor--expanded .ah-content-instructor-bio {
  display: block;
}

.ah-content-instructor-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: var(--sfs-red);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
}

.ah-content-instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-content-instructor-initials {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.ah-content-instructor-info {
  flex: 1;
  min-width: 0;
}

.ah-content-instructor-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}

.ah-content-instructor-title {
  font-size: 14px;
  color: var(--sfs-red);
  font-weight: 500;
  margin-bottom: 8px;
}

.ah-content-instructor-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2, #666);
}

@media (max-width: 600px) {
  .ah-content-instructors--hero .ah-content-instructor {
    min-width: 100%;
    max-width: 100%;
  }
}

/* ============================================
   LIKE BUTTON COMPONENT
   ============================================ */

.ah-like-button-container {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.ah-like-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.ah-like-button:hover {
  border-color: #ef4444;
  background: #fef2f2;
}

.ah-like-button--liked {
  background: #fef2f2;
  border-color: #ef4444;
}

.ah-like-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ah-like-icon {
  line-height: 1;
}

.ah-like-count-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.ah-like-count-btn:hover:not(:disabled) {
  color: #ef4444;
  text-decoration: underline;
}

.ah-like-count-btn:disabled {
  cursor: default;
}

.ah-like-count {
  font-weight: 600;
  color: var(--text-1);
}

.ah-like-label {
  color: var(--text-2);
}

/* Likers Popover (Facebook-style) */
.ah-likers-popover {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  width: 280px;
  max-height: 320px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.ah-likers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.ah-likers-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
}

.ah-likers-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-3);
  padding: 0;
  line-height: 1;
}

.ah-likers-close:hover {
  color: var(--text-1);
}

.ah-likers-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.ah-likers-loading,
.ah-likers-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}

.ah-liker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  transition: background 0.15s ease;
}

.ah-liker-item:hover {
  background: var(--bg-2);
}

.ah-liker-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sfs-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ah-liker-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-liker-initials {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.ah-liker-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}

/* ============================================
   SHARE MODAL COMPONENT
   ============================================ */

.ah-share-modal {
  width: 100%;
  max-width: 520px;
}

.ah-share-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.ah-share-tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.ah-share-tab:hover {
  color: var(--text-1);
  background: var(--bg-2);
}

.ah-share-tab--active {
  color: var(--sfs-red);
  border-bottom-color: var(--sfs-red);
}

.ah-share-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 16px;
}

.ah-share-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sfs-green, #22c55e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}

.ah-share-success-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
}

.ah-share-search {
  margin-bottom: 16px;
}

.ah-share-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ah-share-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 12px;
  background: var(--sfs-red);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.ah-share-pill button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
}

.ah-share-pill button:hover {
  opacity: 1;
}

.ah-share-user-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.ah-share-no-users {
  padding: 24px;
  text-align: center;
  color: var(--text-3);
}

.ah-share-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--border);
}

.ah-share-user-item:last-child {
  border-bottom: none;
}

.ah-share-user-item:hover {
  background: var(--bg-2);
}

.ah-share-user-item--selected {
  background: #fef2f2;
}

.ah-share-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sfs-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ah-share-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-share-user-initials {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.ah-share-user-info {
  flex: 1;
  min-width: 0;
}

.ah-share-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}

.ah-share-user-email {
  font-size: 12px;
  color: var(--text-3);
}

.ah-share-user-check {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sfs-red);
  font-weight: bold;
  font-size: 16px;
}

.ah-share-invite {
  margin-bottom: 16px;
}

.ah-share-invite-note {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}

.ah-share-message {
  margin-top: 16px;
}

.ah-share-message textarea {
  resize: vertical;
  min-height: 60px;
}

.ah-share-footer-actions {
  display: flex;
  gap: 8px;
}

/* Social Actions Bar (for content pages) */
.ah-social-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 24px 0;
}

.ah-share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.ah-share-btn:hover {
  border-color: var(--sfs-blue, #3b82f6);
  color: var(--sfs-blue, #3b82f6);
  background: #eff6ff;
}

/* ============================================================================================================================================================
   ARTICLE VIEW - Tabs, Discussions, and Resources
   ============================================================================================================================================================ */

/* Article Tabs */
.ah-article-tabs {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.ah-article-tabs-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.ah-article-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.ah-article-tab:hover {
  color: var(--text-1);
  background: var(--bg-2);
}

.ah-article-tab--active {
  color: var(--sfs-red);
  border-bottom-color: var(--sfs-red);
}

.ah-article-tabs-content {
  padding: 20px 0;
}

/* Discussion Form */
.ah-discussion-form {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.ah-discussion-form-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sfs-teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-discussion-form-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-discussion-form-initials {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.ah-discussion-form-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-discussion-form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  min-height: 80px;
}

.ah-discussion-form-textarea:focus {
  outline: none;
  border-color: var(--sfs-blue);
}

.ah-discussion-form-submit {
  align-self: flex-end;
  padding: 10px 20px;
  background: var(--sfs-red);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ah-discussion-form-submit:hover:not(:disabled) {
  background: #c52a18;
}

.ah-discussion-form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Discussion Login Prompt */
.ah-discussion-login-prompt {
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  color: var(--text-2);
  font-size: 14px;
}

.ah-discussion-login-prompt a {
  color: var(--sfs-blue);
  text-decoration: none;
  font-weight: 500;
}

.ah-discussion-login-prompt a:hover {
  text-decoration: underline;
}

/* Discussion List */
.ah-discussion-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ah-discussion-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px dashed var(--border);
}

.ah-discussion-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.ah-discussion-item-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sfs-teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-discussion-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-discussion-item-initials {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.ah-discussion-item-content {
  flex: 1;
  min-width: 0;
}

.ah-discussion-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.ah-discussion-item-author {
  font-weight: 600;
  color: var(--text-1);
  font-size: 14px;
}

.ah-discussion-item-date {
  font-size: 12px;
  color: var(--text-3);
}

.ah-discussion-item-delete {
  margin-left: auto;
  padding: 4px 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  transition: color 0.2s ease;
}

.ah-discussion-item-delete:hover {
  color: var(--sfs-red);
}

.ah-discussion-item-text {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Article Resources */
.ah-article-resources {
  padding: 0;
}

.ah-resources-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px dashed var(--border);
}

.ah-resources-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-resource-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-1);
  transition: all 0.2s ease;
}

.ah-resource-item:hover {
  background: var(--bg-2);
  border-color: var(--sfs-red);
}

.ah-resource-item svg {
  flex-shrink: 0;
  color: var(--sfs-red);
}

.ah-resource-item-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ah-resource-item-download {
  color: var(--text-3);
  transition: color 0.2s ease;
}

.ah-resource-item:hover .ah-resource-item-download {
  color: var(--sfs-red);
}

/* Article Hero */
.ah-article-hero {
  width: 100%;
  height: 300px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-3);
  margin-bottom: 24px;
}

/* Article Header */
.ah-article-header {
  margin-bottom: 24px;
}

.ah-article-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px;
  line-height: 1.3;
}

.ah-article-actions {
  margin-bottom: 16px;
}

/* Article Content */
.ah-article-content {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.75;
}

.ah-article-content h1,
.ah-article-content h2,
.ah-article-content h3,
.ah-article-content h4 {
  color: var(--text-1);
  margin: 28px 0 12px;
}

.ah-article-content h1:first-child,
.ah-article-content h2:first-child,
.ah-article-content h3:first-child,
.ah-article-content h4:first-child {
  margin-top: 0;
}

.ah-article-content p {
  margin: 0 0 16px;
}

.ah-article-content ul,
.ah-article-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.ah-article-content li {
  margin-bottom: 8px;
}

.ah-article-content img,
.ah-article-content video {
  max-width: 100%;
  height: auto;
  margin: 16px 0;
}

.ah-article-content blockquote {
  margin: 16px 0;
  padding: 16px 24px;
  border-left: 4px solid var(--sfs-red);
  background: var(--bg-2);
  color: var(--text-2);
  font-style: italic;
}

/* Content Instructors (Author Section) */
.ah-content-instructors {
  margin: 24px 0;
}

.ah-content-instructor {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 16px;
  transition: background 0.2s ease;
}

.ah-content-instructor:hover {
  background: var(--bg-3);
}

.ah-content-instructor-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ah-content-instructor-avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sfs-teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-content-instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-content-instructor-initials {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.ah-content-instructor-info {
  flex: 1;
  min-width: 0;
}

.ah-content-instructor-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}

.ah-content-instructor-title {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

.ah-content-instructor-expand-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--sfs-blue);
  margin-left: auto;
}

.ah-content-instructor-bio {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  display: none;
}

.ah-content-instructor--expanded .ah-content-instructor-bio {
  display: block;
}

.ah-content-instructor--expanded .ah-content-instructor-expand-hint svg {
  transform: rotate(180deg);
}

/* Save Button */
.ah-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.ah-save-btn:hover:not(:disabled) {
  border-color: var(--sfs-orange);
  color: var(--sfs-orange);
  background: #fff9f5;
}

.ah-save-btn--saved {
  border-color: var(--sfs-green);
  color: var(--sfs-green);
  background: #e1f3ee;
}

.ah-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   GROUPS FEATURE
   SFS Brand: sharp corners, red/teal palette, 300/700 weights
   ═══════════════════════════════════════════════════════════════ */

/* Hero Section */
.ah-groups-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 40px;
  background: linear-gradient(135deg, var(--sfs-red) 0%, #c0281c 100%);
  color: #fff;
}

.ah-groups-hero-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-groups-hero-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.ah-groups-hero-subtitle {
  font-size: 15px;
  font-weight: 300;
  margin: 4px 0 0 0;
  opacity: 0.85;
}

/* Toolbar */
.ah-groups-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.ah-groups-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  flex: 1;
}

.ah-groups-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 14px;
  min-width: 220px;
  transition: border-color 0.15s ease;
}

.ah-groups-search-wrap:focus-within {
  border-color: var(--sfs-teal);
}

.ah-groups-search-wrap svg {
  color: var(--text-4);
  flex-shrink: 0;
}

.ah-groups-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  width: 100%;
}

.ah-groups-search-input::placeholder {
  color: var(--text-4);
}

.ah-groups-filters {
  display: flex;
  gap: 4px;
}

.ah-groups-filter-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ah-groups-filter-btn:hover {
  background: var(--bg-2);
  color: var(--text-1);
}

.ah-groups-filter-btn.is-active {
  background: var(--sfs-red);
  color: #fff;
  border-color: var(--sfs-red);
  font-weight: 700;
}

/* Buttons */
.ah-groups-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--sfs-red);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.ah-groups-btn-primary:hover:not(:disabled) {
  background: #c0281c;
  transform: translateY(-1px);
}

.ah-groups-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ah-groups-btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.ah-groups-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #fff;
  color: var(--text-1);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ah-groups-btn-secondary:hover {
  background: var(--bg-2);
  border-color: var(--text-4);
}

.ah-groups-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #fff;
  color: #e74c3c;
  border: 1px solid #f5c6cb;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ah-groups-btn-danger:hover {
  background: #fdedec;
  border-color: #e74c3c;
}

.ah-groups-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ah-groups-btn-icon:hover {
  background: rgba(255, 255, 255, 0.25);
}

.ah-groups-btn-icon.is-active {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Grid */
.ah-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Card */
.ah-groups-card {
  background: #fff;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.ah-groups-card:hover {
  border-color: var(--sfs-red);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.ah-groups-card-banner {
  height: 110px;
  background: linear-gradient(135deg, var(--sfs-red) 0%, var(--sfs-teal) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px;
}

.ah-groups-card-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.35) 100%);
}

.ah-groups-card-vis-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ah-groups-card-body {
  padding: 16px 18px 18px;
}

.ah-groups-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.ah-groups-card-desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-3);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.ah-groups-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

.ah-groups-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 300;
  color: var(--text-3);
}

.ah-groups-card-stat svg {
  opacity: 0.6;
}

.ah-groups-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ah-groups-card-owner {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-4);
}

.ah-groups-card-joined-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--sfs-green);
  background: rgba(46, 204, 113, 0.1);
  padding: 3px 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Loading and Empty States */
.ah-groups-loading {
  text-align: center;
  padding: 64px 20px;
  font-size: 15px;
  color: var(--text-3);
  font-weight: 300;
}

.ah-groups-empty {
  text-align: center;
  padding: 64px 20px;
}

.ah-groups-empty svg {
  margin-bottom: 12px;
}

.ah-groups-empty h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 6px 0;
}

.ah-groups-empty p {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-3);
  margin: 0;
}

/* Modal */
.ah-groups-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  animation: groups-fade-in 0.15s ease;
}

@keyframes groups-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.ah-groups-modal {
  background: #fff;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: groups-slide-up 0.2s ease;
}

@keyframes groups-slide-up {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ah-groups-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--sfs-red);
}

.ah-groups-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.ah-groups-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.ah-groups-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.ah-groups-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-groups-modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

.ah-groups-field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 2px;
}

.ah-groups-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.ah-groups-input:focus {
  border-color: var(--sfs-red);
}

.ah-groups-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  outline: none;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.ah-groups-textarea:focus {
  border-color: var(--sfs-red);
}

.ah-groups-visibility-toggle {
  display: flex;
  gap: 0;
}

.ah-groups-vis-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ah-groups-vis-btn:first-child {
  border-right: none;
}

.ah-groups-vis-btn.is-active {
  background: var(--sfs-red);
  border-color: var(--sfs-red);
  color: #fff;
  font-weight: 700;
}

.ah-groups-vis-hint {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-4);
  margin: 0;
  line-height: 1.5;
}

/* GROUP DETAIL VIEW */

/* Detail Banner */
.ah-groups-detail-banner {
  position: relative;
  padding: 40px 40px 32px;
  background: linear-gradient(135deg, var(--sfs-red) 0%, #c0281c 60%, var(--sfs-teal) 100%);
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.ah-groups-detail-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.ah-groups-detail-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ah-groups-detail-back:hover {
  background: rgba(0, 0, 0, 0.55);
}

.ah-groups-detail-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.ah-groups-detail-banner-info {
  flex: 1;
}

.ah-groups-detail-title {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

.ah-groups-detail-vis {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 300;
  opacity: 0.85;
}

.ah-groups-detail-sep {
  margin: 0 4px;
}

.ah-groups-detail-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ah-groups-detail-desc {
  padding: 16px 40px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-2);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

/* Detail Layout */
.ah-groups-detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  padding: 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.ah-groups-detail-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ah-groups-detail-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

/* Post Composer */
.ah-groups-composer {
  background: #fff;
  border: 1px solid var(--border);
  padding: 18px;
}

.ah-groups-composer-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.ah-groups-post-input {
  flex: 1;
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  resize: none;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.ah-groups-post-input:focus {
  border-color: var(--sfs-teal);
}

.ah-groups-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ah-groups-join-prompt {
  background: #fff;
  border: 1px solid var(--border);
  padding: 24px;
  text-align: center;
}

.ah-groups-join-prompt p {
  margin: 0 0 14px 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-2);
}

.ah-groups-join-prompt a {
  color: var(--sfs-red);
  font-weight: 700;
  text-decoration: none;
}

/* Avatar */
.ah-groups-avatar {
  width: 38px;
  height: 38px;
  background: var(--sfs-red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.ah-groups-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-groups-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

/* Posts */
.ah-groups-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-groups-empty-posts {
  text-align: center;
  padding: 48px 20px;
}

.ah-groups-empty-posts h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-2);
  margin: 8px 0 4px 0;
}

.ah-groups-empty-posts p {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-4);
  margin: 0;
}

.ah-groups-post {
  background: #fff;
  border: 1px solid var(--border);
  padding: 18px;
  transition: border-color 0.15s ease;
}

.ah-groups-post:hover {
  border-color: #d0d0d0;
}

.ah-groups-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ah-groups-post-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ah-groups-post-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-groups-post-time {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-4);
}

.ah-groups-post-menu {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-4);
  cursor: pointer;
  transition: color 0.12s ease;
}

.ah-groups-post-menu:hover {
  color: #e74c3c;
}

.ah-groups-post-content {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-1);
  line-height: 1.65;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ah-groups-post-image {
  margin-top: 12px;
}

.ah-groups-post-image img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.ah-groups-post-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--sfs-teal);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.12s ease;
}

.ah-groups-post-file:hover {
  background: var(--bg-3);
}

.ah-groups-post-actions {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ah-groups-comment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.12s ease;
}

.ah-groups-comment-toggle:hover {
  color: var(--sfs-red);
}

/* Comments */
.ah-groups-comments {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ah-groups-comment-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ah-groups-comment-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-groups-comment-input {
  flex: 1;
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-1);
  outline: none;
  font-family: inherit;
  resize: none;
  transition: border-color 0.15s ease;
}

.ah-groups-comment-input:focus {
  border-color: var(--sfs-teal);
}

.ah-groups-comment-attach-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
  flex-shrink: 0;
}

.ah-groups-comment-attach-btn:hover {
  border-color: var(--sfs-red);
  color: var(--sfs-red);
}

.ah-groups-comment-send {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sfs-red);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.12s ease;
  flex-shrink: 0;
}

.ah-groups-comment-send:hover:not(:disabled) {
  background: #c0281c;
}

.ah-groups-comment-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ah-groups-comment-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ah-groups-comment {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-2);
}

.ah-groups-comment-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ah-groups-comment-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}

.ah-groups-comment-text {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ah-groups-comment-media {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.ah-groups-comment-time {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-4);
}

.ah-groups-comment-del {
  background: transparent;
  border: none;
  color: var(--text-4);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.12s ease;
}

.ah-groups-comment-del:hover {
  color: #e74c3c;
}

/* Members Sidebar */
.ah-groups-members-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 18px;
}

.ah-groups-members-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--sfs-red);
}

.ah-groups-members-count {
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-2);
  padding: 2px 8px;
  color: var(--text-3);
}

.ah-groups-members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}

.ah-groups-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.ah-groups-member-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ah-groups-member-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-groups-member-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  display: inline-block;
  width: fit-content;
}

.ah-groups-member-role--owner {
  background: rgba(235, 60, 36, 0.1);
  color: var(--sfs-red);
}

.ah-groups-member-role--admin {
  background: rgba(0, 169, 157, 0.1);
  color: var(--sfs-teal);
}

/* Responsive */
@media (max-width: 900px) {
  .ah-groups-detail-layout {
    grid-template-columns: 1fr;
    padding: 16px 20px;
  }

  .ah-groups-detail-sidebar {
    position: static;
  }

  .ah-groups-detail-banner {
    padding: 30px 20px 24px;
    min-height: 100px;
  }

  .ah-groups-detail-title {
    font-size: 22px;
  }

  .ah-groups-detail-desc {
    padding: 14px 20px;
  }

  .ah-groups-grid {
    grid-template-columns: 1fr;
  }

  .ah-groups-hero {
    padding: 24px 20px;
  }

  .ah-groups-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ═══════════════════════════════════════════════════════════════
   EMOJI PICKER
   ═══════════════════════════════════════════════════════════════ */

.ah-emoji-picker-wrap {
  position: relative;
  display: inline-flex;
}

.ah-emoji-picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.ah-emoji-picker-trigger:hover {
  background: var(--bg-2, #f0f0f0);
}

.ah-emoji-picker-popup {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid var(--border, #e6eef5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  width: 280px;
  animation: emoji-popup-in 0.15s ease;
}

@keyframes emoji-popup-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ah-emoji-picker-tabs {
  display: flex;
  border-bottom: 1px solid var(--border, #e6eef5);
  padding: 4px 4px 0;
}

.ah-emoji-picker-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.ah-emoji-picker-tab:hover {
  background: var(--bg-2, #f5f5f5);
}

.ah-emoji-picker-tab.is-active {
  border-bottom-color: var(--sfs-red, #eb3c24);
}

.ah-emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px;
  gap: 4px;
}

.ah-emoji-picker-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.ah-emoji-picker-emoji:hover {
  background: var(--bg-2, #f0f0f0);
  transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════════════════
   REACTION PICKER (Facebook-style)
   ═══════════════════════════════════════════════════════════════ */

.ah-reaction-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ah-reaction-trigger-wrap {
  position: relative;
}

.ah-reaction-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-3, #666);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.ah-reaction-trigger:hover {
  background: var(--bg-2, #f0f0f0);
  color: var(--text-1, #1a1a2e);
}

.ah-reaction-trigger.is-reacted {
  color: var(--sfs-red, #eb3c24);
  font-weight: 600;
}

.ah-reaction-trigger-emoji {
  font-size: 16px;
  line-height: 1;
}

.ah-reaction-trigger-label {
  font-size: 13px;
}

/* Floating reaction picker */
.ah-reaction-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 6px;
  display: flex;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--border, #e6eef5);
  border-radius: 28px;
  padding: 6px 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  animation: reaction-popup-in 0.2s ease;
}

@keyframes reaction-popup-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ah-reaction-picker-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.ah-reaction-picker-emoji:hover {
  transform: scale(1.35);
}

.ah-reaction-picker-emoji.is-selected {
  background: var(--bg-2, #f0f0f0);
}

/* Reaction summary */
.ah-reaction-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ah-reaction-count {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--bg-2, #f5f5f5);
  border: 1px solid var(--border, #e6eef5);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-2, #444);
  cursor: default;
}

.ah-reaction-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 1001;
  pointer-events: none;
  animation: reaction-tooltip-in 0.15s ease;
}

@keyframes reaction-tooltip-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
.ah-groups-thread-modal {
  max-width: 760px;
}

.ah-groups-thread-panel,
.ah-groups-stream-section {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.08);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.ah-groups-thread-panel-header,
.ah-groups-stream-header,
.ah-groups-composer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ah-groups-section-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8f1d1d;
  margin-bottom: 4px;
}

.ah-groups-section-title,
.ah-groups-composer-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  color: #1f2937;
}

.ah-groups-section-copy,
.ah-groups-composer-copy {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.ah-groups-thread-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ah-groups-thread-filter {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #374151;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ah-groups-thread-filter.is-active {
  background: #c8102e;
  border-color: #c8102e;
  color: #fff;
}

.ah-groups-stream-count {
  min-width: 40px;
  padding: 8px 10px;
  background: #f8d7da;
  color: #8f1d1d;
  font-weight: 800;
  text-align: center;
}

.ah-groups-post--thread {
  border-left: 4px solid #c8102e;
}

.ah-groups-thread-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.ah-groups-thread-topic {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 8px;
}

.ah-groups-thread-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: #111827;
}

.ah-groups-banner-builder {
  display: grid;
  gap: 12px;
}

.ah-groups-banner-preview {
  min-height: 160px;
  background: linear-gradient(135deg, #7a1f1f 0%, #c8102e 55%, #223843 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.ah-groups-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ah-groups-btn-with-spinner {
  justify-content: center;
}

.ah-groups-inline-spinner {
  flex-shrink: 0;
}

.ah-groups-banner-status {
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  background: var(--bg-2);
}

.ah-groups-banner-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ah-groups-banner-status--loading {
  background: var(--sfs-sand-light);
  border-color: var(--sfs-sand);
}

.ah-groups-banner-status--success {
  background: var(--sfs-light-green);
  border-color: var(--sfs-green);
  color: #0d4d39;
}

.ah-groups-banner-status--error {
  background: var(--sfs-light-red);
  border-color: var(--sfs-red);
  color: #8f2215;
}

.ah-groups-banner-progress {
  margin-top: 12px;
}

.ah-groups-banner-progress-bar {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(200, 16, 46, 0.14);
}

.ah-groups-banner-progress-fill {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c8102e 0%, #f04e37 100%);
  animation: ah-groups-banner-progress-slide 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

@keyframes ah-groups-banner-progress-slide {
  0% {
    transform: translateX(-115%);
  }
  100% {
    transform: translateX(265%);
  }
}

.ah-groups-empty-posts--compact {
  margin: 0;
}

.ah-groups-detail .ah-badge {
  border-radius: 0;
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 6px 12px;
}

.ah-groups-detail .ah-emoji-picker-trigger {
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-2);
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

.ah-groups-detail .ah-emoji-picker-trigger:hover {
  background: var(--bg-2);
  border-color: var(--sfs-red);
}

.ah-groups-detail .ah-collab-action-btn.ah-reaction-trigger,
.ah-groups-detail .ah-reaction-trigger {
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-2);
  font-weight: 700;
}

.ah-groups-detail .ah-collab-action-btn.ah-reaction-trigger:hover,
.ah-groups-detail .ah-reaction-trigger:hover {
  background: var(--bg-2);
  border-color: var(--sfs-red);
  color: var(--text-1);
}

.ah-groups-detail .ah-mention-highlight {
  border-radius: 0;
  background: var(--sfs-light-red);
  color: var(--sfs-red);
  padding: 2px 6px;
}

.ah-groups-member-role-select {
  font-size: 11px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg-1);
  color: var(--text-2);
  cursor: pointer;
}

.ah-groups-sidebar-invite {
  width: 100%;
  margin-top: 10px;
  padding: 10px 0;
  background: var(--sfs-red);
  color: #fff;
  border: 1px solid var(--sfs-red);
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.ah-groups-sidebar-invite:hover {
  background: #c0281c;
  border-color: #c0281c;
}
