/* Media Featured customer dashboard app shell */
:root {
  --mf-primary: #ff3553;
  --mf-primary-hover: #e72a46;
  --mf-secondary: #ff8c42;
  --mf-gradient: linear-gradient(135deg, var(--mf-primary), var(--mf-secondary));
  --mf-heading: #0f172a;
  --mf-body: #1e293b;
  --mf-muted: #64748b;
  --mf-border: #e2e8f0;
  --mf-surface: #ffffff;
  --mf-bg: #f1f5f9;
  --mf-sidebar-w: 260px;
  --mf-sidebar-collapsed: 72px;
  --mf-header-h: 64px;
  --mf-shadow: 0 1px 3px rgb(15 23 42 / 0.06), 0 4px 16px rgb(15 23 42 / 0.04);
}

html {
  box-sizing: border-box;
}

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

html,
body.mf-app {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--mf-bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mf-body);
  -webkit-font-smoothing: antialiased;
}

body.mf-app #wpadminbar {
  display: none !important;
}

.mf-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;
}

/* Layout: full-width header, sidebar + content below */
.mf-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.mf-app__overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--mf-header-h);
  background: rgb(15 23 42 / 0.45);
  z-index: 40;
}

.mf-app__overlay.is-visible {
  display: block;
}

.mf-app__body {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  min-height: calc(100vh - var(--mf-header-h));
}

.mf-sidebar {
  flex-shrink: 0;
  align-self: stretch;
  width: var(--mf-sidebar-w);
  min-height: 100%;
  background: var(--mf-surface);
  border-right: 1px solid var(--mf-border);
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, transform 0.22s ease;
}

.mf-sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.75rem 0.65rem;
}

.mf-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding-top: 0.25rem;
}

.mf-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mf-sidebar__divider {
  height: 1px;
  background: var(--mf-border);
  margin: 0.5rem 0.35rem;
}

.mf-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--mf-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.mf-sidebar__link:hover {
  background: var(--mf-bg);
  color: var(--mf-heading);
}

.mf-sidebar__link.is-active {
  background: rgb(255 53 83 / 0.08);
  color: var(--mf-primary);
}

.mf-sidebar__link.is-active .mf-sidebar__icon {
  color: var(--mf-primary);
}

.mf-sidebar__icon {
  flex-shrink: 0;
  display: flex;
  color: var(--mf-muted);
}

.mf-sidebar__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mf-sidebar__collapse {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--mf-border);
  border-radius: 8px;
  background: var(--mf-bg);
  color: var(--mf-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.mf-sidebar__collapse:hover {
  color: var(--mf-heading);
  border-color: #cbd5e1;
}

.mf-sidebar__collapse-icon {
  transition: transform 0.22s ease;
}

/* Collapsed desktop */
body.mf-app.is-sidebar-collapsed .mf-sidebar {
  width: var(--mf-sidebar-collapsed);
}

body.mf-app.is-sidebar-collapsed .mf-sidebar__label,
body.mf-app.is-sidebar-collapsed .mf-sidebar__collapse-text {
  display: none;
}

body.mf-app.is-sidebar-collapsed .mf-sidebar__collapse-icon {
  transform: rotate(180deg);
}

body.mf-app.is-sidebar-collapsed .mf-sidebar__link {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Header — full width above sidebar */
.mf-header {
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  height: var(--mf-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem;
  background: var(--mf-surface);
  border-bottom: 1px solid var(--mf-border);
  box-shadow: var(--mf-shadow);
  overflow: hidden;
}

.mf-header__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 0;
}

.mf-header__menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--mf-border);
  border-radius: 8px;
  background: var(--mf-surface);
  color: var(--mf-heading);
  cursor: pointer;
}

.mf-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--mf-heading);
  font-weight: 800;
  font-size: 1.05rem;
}

.mf-header__logo img {
  height: 28px;
  width: auto;
  display: block;
}

.mf-header__logo-text span {
  color: var(--mf-primary);
}

.mf-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

/* Credits pill */
.mf-header-credits {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
  flex-shrink: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--mf-border);
  background: var(--mf-bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.mf-header-credits:hover {
  border-color: #cbd5e1;
  box-shadow: var(--mf-shadow);
}

.mf-header-credits.is-empty {
  opacity: 0.85;
}

.mf-header-credits__icon {
  display: flex;
  color: var(--mf-primary);
}

.mf-header-credits__body {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
}

.mf-header-credits__count {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--mf-heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-header-credits__meta {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--mf-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-header .mf-btn-gradient {
  flex-shrink: 0;
}

/* Gradient CTA */
.mf-btn-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.15rem;
  border: none;
  border-radius: 8px;
  background: var(--mf-gradient);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 16px rgb(255 53 83 / 0.28);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.mf-btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgb(255 53 83 / 0.35);
  color: #fff;
}

.mf-btn-gradient.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

/* Main content */
.mf-main {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.mf-page__head {
  margin-bottom: 1.25rem;
}

.mf-page__title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 900;
  color: var(--mf-heading);
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.mf-page__sub {
  margin: 0;
  color: var(--mf-muted);
  font-size: 0.92rem;
}

.mf-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.mf-card {
  background: var(--mf-surface);
  border: 1px solid var(--mf-border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--mf-shadow);
  margin-bottom: 1rem;
}

.mf-card--highlight {
  border-color: rgb(255 53 83 / 0.2);
  background: linear-gradient(180deg, #fff 0%, #fff7f8 100%);
}

.mf-card__title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--mf-heading);
  margin: 0 0 0.75rem;
}

.mf-card__title-row {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.mf-card__title-row .mf-card__title {
  margin: 0;
}

.mf-card__title--article {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.mf-article-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.mf-article-card__head-main {
  min-width: 0;
  flex: 1;
}

.mf-article-card__head .mf-card__meta {
  margin: 0;
}

.mf-article-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
}

.mf-article-badge--in-progress {
  background: #f1f5f9;
  color: #475569;
}

.mf-article-badge--review-required {
  background: var(--mf-gradient);
  color: #fff;
}

.mf-article-badge--publishing {
  background: #e0e7ff;
  color: #4338ca;
}

.mf-article-badge--published {
  background: #dcfce7;
  color: #15803d;
}

.mf-article-badge--not-published {
  background: #fef3c7;
  color: #b45309;
}

.mf-card__subtitle {
  font-size: 0.85rem;
  font-weight: 800;
  margin: 1rem 0 0.5rem;
  color: var(--mf-heading);
}

.mf-card__actions {
  margin: 1rem 0 0;
}

.mf-card__review-btn {
  display: inline-flex;
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
  text-decoration: none;
}

.mf-card__meta {
  font-size: 0.85rem;
  color: var(--mf-muted);
  margin: 0.25rem 0 0;
}

.mf-card__action {
  margin-top: 1rem;
}

.mf-stat-lg {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--mf-primary);
  line-height: 1;
  margin: 0;
}

.mf-quick-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mf-quick-links a {
  color: var(--mf-primary);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}

.mf-quick-links a:hover {
  text-decoration: underline;
}

.mf-empty {
  color: var(--mf-muted);
  margin: 0;
}

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

.mf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.mf-table th,
.mf-table td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--mf-border);
}

.mf-table th {
  font-weight: 800;
  color: var(--mf-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mf-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--mf-bg);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mf-heading);
}

.mf-link-btn {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--mf-primary);
  text-decoration: none;
}

.mf-field {
  margin-bottom: 1rem;
}

.mf-field label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--mf-heading);
  margin-bottom: 0.35rem;
}

.mf-field input,
.mf-field textarea {
  width: 100%;
  padding: 0.72rem 0.75rem;
  border: 1px solid var(--mf-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
}

.mf-field input:focus,
.mf-field textarea:focus {
  outline: none;
  border-color: var(--mf-primary);
  box-shadow: 0 0 0 3px rgb(255 53 83 / 0.12);
}

.mf-form__grid {
  display: grid;
  gap: 0 1rem;
}

.mf-form__grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .mf-form__grid--2 {
    grid-template-columns: 1fr;
  }
}

.mf-notice {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--mf-border);
  background: var(--mf-surface);
  color: var(--mf-body);
}

.mf-notice.is-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.mf-notice.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

/* Status tracker */
.mf-status-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0;
}

.mf-status-track--pipeline {
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.35rem 0;
  position: relative;
}

.mf-status-track--pipeline .mf-status-track__rail {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: #e2e8f0;
  border-radius: 1px;
  z-index: 0;
  pointer-events: none;
}

.mf-status-track--pipeline .mf-status-step {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  text-align: center;
  white-space: nowrap;
  border: 2px solid var(--mf-surface, #fff);
  box-shadow: 0 0 0 1px rgb(15 23 42 / 0.04);
}

.mf-status-step {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: var(--mf-bg);
  color: var(--mf-muted);
}

.mf-status-step.is-done {
  background: #dcfce7;
  color: #15803d;
}

.mf-status-step.is-current {
  background: var(--mf-gradient);
  color: #fff;
}

.mf-status-track--pipeline .mf-status-step.is-done {
  background: #ecfdf5;
  color: #15803d;
}

.mf-status-track--pipeline .mf-status-step__dot {
  display: none;
}

@media (max-width: 768px) {
  .mf-status-track--pipeline {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0;
  }

  .mf-status-track--pipeline .mf-status-track__rail {
    display: block;
    left: 10%;
    right: 10%;
    height: 2px;
  }

  .mf-status-track--pipeline .mf-status-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .mf-status-track--pipeline .mf-status-step.is-current {
    flex: 1 1 auto;
    max-width: 58%;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    background: var(--mf-gradient);
    color: #fff;
    box-shadow: 0 0 0 2px var(--mf-surface, #fff);
  }

  .mf-status-track--pipeline .mf-status-step.is-current .mf-status-step__label {
    display: inline;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .mf-status-track--pipeline .mf-status-step:not(.is-current) .mf-status-step__label {
    display: none;
  }

  .mf-status-track--pipeline .mf-status-step:not(.is-current) .mf-status-step__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    box-shadow: 0 0 0 2px var(--mf-surface, #fff);
    flex-shrink: 0;
  }

  .mf-status-track--pipeline .mf-status-step.is-done:not(.is-current) .mf-status-step__dot {
    width: 14px;
    height: 14px;
    background: #22c55e;
  }

  .mf-status-track--pipeline .mf-status-step.is-done:not(.is-current) .mf-status-step__dot::after {
    content: "";
    display: block;
    width: 3px;
    height: 6px;
    margin-top: -1px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
  }
}

/* Header: tighten before credits + CTA overflow */
@media (max-width: 1280px) {
  .mf-header-credits__meta {
    display: none;
  }
}

/* Mobile */
@media (max-width: 960px) {
  .mf-grid--2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mf-app__body {
    position: relative;
  }

  .mf-sidebar {
    position: fixed;
    top: var(--mf-header-h);
    left: 0;
    z-index: 45;
    height: calc(100vh - var(--mf-header-h));
    transform: translateX(-100%);
    width: var(--mf-sidebar-w) !important;
    box-shadow: var(--mf-shadow);
  }

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

  body.mf-app.is-sidebar-open .mf-app__overlay {
    display: block;
  }

  .mf-main {
    width: 100%;
  }

  .mf-header__menu-btn {
    display: inline-flex;
  }

  .mf-sidebar__collapse {
    display: none;
  }

  body.mf-app.is-sidebar-collapsed .mf-sidebar__label {
    display: block;
  }

  body.mf-app.is-sidebar-collapsed .mf-sidebar {
    width: var(--mf-sidebar-w) !important;
  }
}

@media (max-width: 520px) {
  .mf-header {
    padding: 0 0.85rem;
  }

  body.mf-app:not(.mf-app--login) .mf-header__logo-text {
    display: none;
  }

  .mf-header-credits {
    padding: 0.4rem 0.6rem;
  }

  .mf-btn-gradient {
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
  }
}

/* Login page */
body.mf-app--login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mf-header--login {
  justify-content: center;
}

.mf-header--login .mf-header__logo {
  margin: 0 auto;
}

.mf-login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  background:
    radial-gradient(circle at top right, rgb(255 53 83 / 0.06), transparent 42%),
    var(--mf-bg);
}

.mf-login {
  width: 100%;
  max-width: 420px;
}

.mf-login-card {
  background: var(--mf-surface);
  border: 1px solid var(--mf-border);
  border-radius: 16px;
  box-shadow: var(--mf-shadow);
  padding: 1.75rem 1.5rem 1.5rem;
}

.mf-login-card__head {
  text-align: center;
  margin-bottom: 1.35rem;
}

.mf-login-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--mf-heading);
}

.mf-login-card__sub {
  margin: 0;
  color: var(--mf-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.mf-login-card__notice {
  margin-bottom: 1rem;
}

.mf-login-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}

.mf-login-form__remember {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--mf-muted);
  cursor: pointer;
}

.mf-login-form__remember input {
  width: auto;
  margin: 0;
  accent-color: var(--mf-primary);
}

.mf-login-form__lost {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--mf-primary);
  text-decoration: none;
}

.mf-login-form__lost:hover {
  text-decoration: underline;
}

.mf-login-form__submit {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}

.mf-login-card__footer {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.86rem;
}

.mf-login-card__footer a {
  color: var(--mf-primary);
  font-weight: 700;
  text-decoration: none;
}

.mf-login-card__footer a:hover {
  text-decoration: underline;
}

.mf-login-card__code {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mf-primary);
}

.mf-login-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mf-login-card__actions .mf-btn-gradient {
  text-align: center;
  text-decoration: none;
}

.mf-login-card__secondary {
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--mf-muted);
  text-decoration: none;
}

.mf-login-card__secondary:hover {
  color: var(--mf-heading);
}
