:root {
  --bg: #0F141B;
  --surface: #171F2A;
  --surface-elev: #1C2634;
  --surface-row-alt: #141B25;
  --border: #2A3442;
  --border-strong: #384659;
  --text: #EEF2F7;
  --text-muted: #A8B4C4;
  --accent: #73B9FF;
  --accent-hover: #8DC7FF;
  --accent-ink: #0A111A;
  --green: #34D399;
  --green-bg: rgba(52, 211, 153, 0.12);
  --green-border: rgba(52, 211, 153, 0.32);
  --danger: #F87171;
  --danger-text: #FCA5A5;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --danger-border: rgba(248, 113, 113, 0.35);
  --warn-text: #FBBF24;
  --warn-bg: rgba(251, 191, 36, 0.1);
  --warn-border: rgba(251, 191, 36, 0.3);
  --radius: 6px;
  --radius-lg: 8px;
  --font-sans: 'Geist Variable', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono Variable', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.num {
  font-variant-numeric: tabular-nums;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
}

.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Containers & layout */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  padding: 20px 0 40px;
}

/* Header / Navigation */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 50;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.12s ease, background-color 0.12s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background-color: var(--surface-elev);
  text-decoration: none;
}

.nav-link.is-active {
  color: var(--accent);
  background-color: rgba(115, 185, 255, 0.1);
}

.header-search {
  flex: 1;
  max-width: 340px;
  min-width: 160px;
}

.header-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.header-search .header-search-input {
  padding-left: 32px;
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  text-decoration: none;
}

.icon-nav-btn:hover,
.icon-nav-btn.is-active {
  color: var(--accent);
  border-color: var(--border-strong);
  text-decoration: none;
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.profile-menu-wrap {
  position: relative;
}

.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.profile-trigger:hover,
.profile-trigger.is-active {
  border-color: var(--border-strong);
  color: var(--accent);
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 210px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  z-index: 100;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--surface-elev);
  color: var(--accent);
  text-decoration: none;
}

.dropdown-staff {
  color: var(--accent);
}

.dropdown-logout {
  color: var(--danger-text);
}

.dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.ratio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12.5px;
  text-decoration: none;
}

.ratio-pill:hover {
  border-color: var(--border-strong);
  text-decoration: none;
}

.ratio-label {
  color: var(--text-muted);
}

.ratio-val {
  font-weight: 600;
  color: var(--text);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.profile-link:hover,
.profile-link.is-active {
  color: var(--accent);
  background: var(--surface-elev);
  text-decoration: none;
}

.logout-form {
  margin: 0;
}

.btn-icon-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-icon-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-elev);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg);
  padding: 16px 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
}

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

/* Auth page (C411 50/50 split-screen avec image floutée + panneau épuré) */
.page-auth {
  min-height: 100vh;
  margin: 0;
  background-color: var(--bg);
}

.auth-split {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.auth-artwork-pane {
  position: relative;
  flex: 0 0 50%;
  width: 50%;
  min-height: 100vh;
  overflow: hidden;
  background-color: #080C12;
  border-right: 1px solid var(--border);
}

.auth-artwork-img {
  position: absolute;
  inset: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  object-fit: cover;
  object-position: center 20%;
  filter: blur(5px) brightness(0.84) saturate(1.06);
  transform: scale(1.03);
}

.auth-artwork-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 21, 0.28) 0%,
    rgba(10, 14, 21, 0.52) 52%,
    rgba(10, 14, 21, 0.94) 100%
  );
}

.auth-artwork-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px 48px 54px 48px;
  z-index: 2;
}

.auth-artwork-copy h2 {
  margin: 0 0 8px 0;
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.auth-artwork-copy p {
  margin: 0;
  font-size: 16px;
  color: rgba(238, 242, 247, 0.9);
  max-width: 440px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}

.auth-form-pane {
  position: relative;
  flex: 1 1 50%;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg);
}

.auth-mobile-backdrop {
  display: none;
}

.auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 18px 24px;
}

.auth-panel {
  width: 100%;
  max-width: 400px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.auth-panel--c411 {
  background-color: transparent;
  border-color: transparent;
  padding: 12px 10px;
}

.auth-header {
  margin-bottom: 20px;
}

.auth-header--centered {
  text-align: center;
  margin-bottom: 22px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-brand--centered {
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  text-decoration: none;
}

.auth-brand--centered:hover {
  text-decoration: none;
  opacity: 0.92;
}

.auth-brand-name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-brand-name--lg {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.auth-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}

.auth-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.auth-help-text {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-input {
  min-height: 40px;
  background-color: #131A24;
  border-color: var(--border-strong);
}

.auth-submit-btn {
  min-height: 40px;
  font-weight: 650;
  gap: 8px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--border);
}

.auth-secondary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-create-btn {
  min-height: 38px;
  gap: 7px;
  background-color: #131A24;
  border-color: var(--border-strong);
}

.auth-alt-invite {
  text-align: center;
  font-size: 12.5px;
}

.auth-closed-pill {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.auth-forgot-wrap {
  margin-top: 14px;
  text-align: center;
}

.auth-forgot-link {
  font-size: 13px;
  color: var(--accent);
}

.auth-tips-card {
  margin-top: 22px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
}

.auth-tips-title {
  margin: 0 0 6px 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.auth-tips-text {
  margin: 0 0 12px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  min-height: 39px;
}

.auth-tip-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.auth-tip-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background-color: var(--border-strong);
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.auth-tip-dot.is-active {
  width: 18px;
  background-color: var(--accent);
}

.auth-mini-footer {
  position: relative;
  z-index: 1;
  padding: 14px 20px 20px 20px;
  text-align: center;
}

.auth-mini-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12px;
}

.auth-mini-links a {
  color: var(--text-muted);
}

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

.auth-links {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.auth-secondary-link {
  color: var(--accent);
}

@media (max-width: 959px) {
  .auth-artwork-pane {
    display: none;
  }

  .auth-mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background-image: linear-gradient(180deg, rgba(15, 20, 27, 0.72) 0%, rgba(15, 20, 27, 0.90) 100%), url('/images/login-bg.jpg');
    background-size: cover;
    background-position: center 20%;
    filter: blur(4px);
    z-index: 0;
    pointer-events: none;
  }

  .auth-panel--c411 {
    background-color: rgba(23, 31, 42, 0.86);
    border: 1px solid var(--border);
    padding: 24px 18px;
    backdrop-filter: blur(10px);
  }
}

.guest-readonly-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.guest-readonly-banner > span {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 13px;
}

.guest-readonly-banner > span svg {
  flex-shrink: 0;
  color: var(--accent);
}

.guest-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Crédit & Ratio UI */
.credit-pill.is-depleted {
  border-color: var(--danger-border);
  background-color: var(--danger-bg);
  color: var(--danger-text);
}

.credit-pill.is-depleted .ratio-label,
.credit-pill.is-depleted .ratio-val {
  color: var(--danger-text);
}

.credit-negative {
  color: var(--danger-text);
}

.credit-help-banner {
  margin-bottom: 18px;
  font-size: 13px;
}

.admin-credit-form {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.admin-credit-amount {
  width: 78px;
}

.admin-credit-reason {
  width: 140px;
}

@media (max-width: 720px) {
  .header-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}

.faq-entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-q {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--accent);
}

.faq-a {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.portal-faq-headrow {
  margin-bottom: 12px;
}

.portal-faq-headrow .portal-faq-heading {
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .faq-list {
    grid-template-columns: 1fr;
  }
}

/* Form controls */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.field-aux-link {
  font-size: 12.5px;
  color: var(--accent);
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.req {
  color: var(--accent);
}

.input {
  width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  background-color: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.12s ease;
}

.input::placeholder {
  color: #6E7D91;
}

.input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(115, 185, 255, 0.2);
}

.input-sm {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 13px;
}

.input-xs {
  min-height: 28px;
  padding: 3px 7px;
  font-size: 12px;
}

.textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.input-file {
  padding: 6px 8px;
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password {
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--text);
  background: var(--surface-elev);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 550;
  font-size: 13.5px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12.5px;
}

.btn-xs {
  min-height: 26px;
  padding: 3px 8px;
  font-size: 12px;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: var(--surface-elev);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background-color: #232F40;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background-color: var(--surface-elev);
}

.btn-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.btn-danger:hover {
  background-color: rgba(248, 113, 113, 0.22);
}

/* Alerts & cards */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  min-width: 0;
  max-width: 100%;
}

.card-narrow {
  max-width: 640px;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-md {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-block {
  margin-top: 20px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 13px;
  margin-bottom: 14px;
}

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

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

.page-head {
  margin-bottom: 18px;
}

.page-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.page-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

.section-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.subtext {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Catalog search & filters (T411 density + clean lines) */
.search-toolbar {
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  padding-left: 34px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.filter-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.filter-actions {
  display: flex;
  align-items: center;
}

.advanced-filters {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.advanced-filters[hidden] {
  display: none;
}

.status-banner {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 13px;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.results-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-heading {
  font-weight: 600;
  color: var(--text);
}

.results-count {
  color: var(--text-muted);
}

.reset-link {
  font-size: 12.5px;
  color: var(--accent);
}

/* Catalog dense table */
.table-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.catalog-table thead th {
  text-align: left;
  padding: 9px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--surface-elev);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
}

.th-sort:hover,
.th-sort.is-sorted {
  color: var(--accent);
  text-decoration: none;
}

.catalog-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.cat-row:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

.col-cat {
  width: 108px;
  white-space: nowrap;
}

.col-title {
  width: 100%;
  min-width: 240px;
}

.col-lang,
.col-qual {
  white-space: nowrap;
  color: var(--text-muted);
}

.col-size,
.col-date,
.col-seed,
.col-leech {
  white-space: nowrap;
  text-align: right;
}

.catalog-table thead th.col-size,
.catalog-table thead th.col-date,
.catalog-table thead th.col-seed,
.catalog-table thead th.col-leech {
  text-align: right;
}

.col-act {
  width: 40px;
  text-align: right;
  white-space: nowrap;
}

.title-cell-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.torrent-title-link {
  color: var(--text);
  font-weight: 550;
  text-decoration: none;
}

.torrent-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.meta-year {
  color: var(--text-muted);
  font-size: 12.5px;
}

.cat-badge {
  display: inline-block;
  padding: 2px 7px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.tag-demo {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-versions-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(115, 185, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(115, 185, 255, 0.28);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.btn-versions-toggle:hover {
  background: rgba(115, 185, 255, 0.18);
}

.btn-versions-toggle[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

.version-subrow {
  background-color: var(--surface-row-alt);
}

.version-subrow[hidden] {
  display: none;
}

.subrow-main {
  display: flex;
  align-items: center;
  gap: 7px;
}

.subrow-marker {
  color: var(--text-muted);
}

.subrow-label {
  color: var(--accent);
  font-size: 12.5px;
}

.btn-icon-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--accent);
  border: 1px solid var(--border);
  background: var(--bg);
}

.btn-icon-dl:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.seeders-pos {
  color: var(--green);
  font-weight: 600;
}

.seeders-zero {
  color: var(--text-muted);
}

.leechers-val {
  color: var(--text-muted);
}

.mobile-meta-line {
  display: none;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state h2 {
  margin: 0;
  font-size: 17px;
}

.empty-state p {
  margin: 0 0 6px;
  color: var(--text-muted);
}

.empty-icon {
  color: var(--text-muted);
}

.pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pagination-info {
  color: var(--text-muted);
  font-size: 13px;
}

/* Fiche Detail */
.breadcrumb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.back-link:hover {
  color: var(--accent);
}

.detail-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fiche-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.fiche-cover {
  width: 130px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}

.fiche-cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.fiche-head-main {
  flex: 1;
  min-width: 0;
}

.fiche-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.fiche-author {
  font-size: 12.5px;
  color: var(--text-muted);
}

.fiche-title {
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.versions-table-wrap,
.files-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.versions-table,
.files-table,
.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.versions-table th,
.files-table th,
.simple-table th {
  position: relative;
  text-align: left;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-elev);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.versions-table td,
.files-table td,
.simple-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.versions-table tbody tr:last-child td,
.files-table tbody tr:last-child td,
.simple-table tbody tr:last-child td {
  border-bottom: none;
}

.version-name {
  font-weight: 550;
  color: var(--text);
}

.version-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

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

.no-seeder-inline {
  font-size: 11.5px;
  color: var(--warn-text);
  margin-left: 4px;
}

.notice-zero-seeders {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  color: var(--warn-text);
  font-size: 12.5px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.fiche-description {
  color: var(--text);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.tech-list {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.tech-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.tech-row:last-child {
  border-bottom: none;
}

.tech-row dt {
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.tech-row dd {
  margin: 0;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}

.tech-hash {
  font-size: 12px;
}

.file-path-cell {
  word-break: break-all;
}

.file-size-cell {
  text-align: right;
  white-space: nowrap;
}

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

.screenshot-item {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.screenshot-item img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
}

/* Onboarding after publish */
.publish-onboarding {
  margin-bottom: 16px;
  border-color: var(--green-border);
}

.onboarding-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.onboarding-head h2 {
  margin: 0 0 2px;
  font-size: 16px;
}

.onboarding-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
}

.status-pill-wait {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
}

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

.onboarding-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onboarding-dl {
  margin-left: 6px;
}

/* Publish page */
.publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mode-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.field-grid-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
}

.field-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.legal-reminder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text-muted);
}

.guide-steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.guide-steps strong {
  color: var(--text);
}

.announce-box {
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.announce-masked {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

.announce-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Activity, Profile & Admin */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 20px;
  font-weight: 650;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invite-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.invite-create-form .input {
  width: auto;
  min-width: 150px;
  flex: 1 1 160px;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.actions-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-green {
  display: inline-block;
  padding: 2px 7px;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
}

.pill-muted {
  display: inline-block;
  padding: 2px 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 11.5px;
}

.empty-inline {
  color: var(--text-muted);
  font-size: 13px;
}

.rule-block h2 {
  margin: 0 0 4px;
  font-size: 15px;
}

.rule-block p {
  margin: 0;
  color: var(--text-muted);
}

/* Additional Community, Home, Catalog Tabs, Moderation & Utility Styles */
.text-right {
  text-align: right;
}

.auth-closed-note {
  color: var(--text-muted);
  font-size: 13px;
}

.accent-icon {
  color: var(--accent);
}

.warn-val {
  color: var(--warn-text);
}

.error-inline {
  color: var(--danger-text);
}

.pill-warn {
  display: inline-block;
  padding: 2px 7px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
}

.pill-danger {
  display: inline-block;
  padding: 2px 7px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
}

/* Member Home Dashboard */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.home-main,
.home-sidebar {
  min-width: 0;
}

.announcement-card {
  border-color: rgba(115, 185, 255, 0.35);
  background: linear-gradient(180deg, rgba(115, 185, 255, 0.06), transparent 80%), var(--surface);
}

.announcement-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.announcement-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.announcement-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
}

.announcement-body {
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
}

.section-heading-lg {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.section-more-link {
  font-size: 12.5px;
  color: var(--accent);
}

.section-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.showcase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.showcase-cover-link {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  text-decoration: none;
}

.showcase-cover-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.showcase-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg),
    var(--bg) 10px,
    rgba(255, 255, 255, 0.015) 10px,
    rgba(255, 255, 255, 0.015) 20px
  );
}

.showcase-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.showcase-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.meta-versions {
  font-size: 11px;
  color: var(--accent);
}

.showcase-title {
  margin: 0;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
}

.showcase-title a {
  color: var(--text);
}

.showcase-title a:hover {
  color: var(--accent);
}

.showcase-stats {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mini-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-sublist {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.sidebar-sublist-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.compact-list-card {
  padding: 8px 14px;
}

.compact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.compact-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.compact-list-item:last-child {
  border-bottom: none;
}

.compact-item-main {
  min-width: 0;
}

/* Catalog Views, Favorites & Legend */
.catalog-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.segmented-tabs,
.display-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.seg-tab {
  padding: 5px 11px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}

.seg-tab:hover {
  color: var(--text);
  text-decoration: none;
}

.seg-tab.is-active {
  background: rgba(115, 185, 255, 0.14);
  color: var(--accent);
}

.results-right-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.tech-legend {
  font-size: 12px;
  color: var(--text-muted);
}

.col-comp {
  white-space: nowrap;
  text-align: right;
  color: var(--text-muted);
}

.catalog-table thead th.col-comp {
  text-align: right;
}

.btn-icon-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-icon-fav:hover {
  color: var(--accent);
  border-color: var(--border);
}

.btn-icon-fav.is-favorited {
  color: #FBBF24;
}

.version-inline-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
}

.filter-row-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px auto;
  gap: 10px;
}

/* Comments, Forum & Notifications */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-author {
  font-weight: 600;
  color: var(--text);
}

.comment-body,
.forum-post-body {
  font-size: 13.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.forum-post-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.forum-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mod-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.notif-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notif-item.is-unread {
  border-color: rgba(115, 185, 255, 0.45);
}

.notif-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.notif-msg {
  margin: 4px 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* Admin Queue & Operational Indicators */
.stat-value-sm {
  font-size: 15px;
  font-weight: 600;
}

.sub-heading {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mod-queue-item {
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mod-queue-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Mobile Responsive (~390px) — Zero horizontal overflow */
@media (max-width: 768px) {
  .container,
  .header-inner,
  .footer-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .header-inner {
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 8px;
  }

  .header-left {
    order: 1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .header-nav {
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 8px;
  }

  .header-nav .nav-link {
    padding: 5px 8px;
    font-size: 13px;
  }

  .header-search {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .header-right {
    order: 2;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .nav-link {
    padding: 5px 7px;
    font-size: 13px;
  }

  .ratio-pill {
    padding: 3px 7px;
    font-size: 12px;
  }

  .profile-name {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .catalog-top-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .segmented-tabs,
  .display-switch {
    flex-wrap: wrap;
  }

  .filter-row-compact {
    grid-template-columns: 1fr;
  }

  .home-layout {
    grid-template-columns: 1fr;
  }

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

  .admin-settings-grid {
    grid-template-columns: 1fr;
  }

  .mod-queue-item {
    flex-direction: column;
    align-items: stretch;
  }

  .search-row {
    flex-direction: column;
  }

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

  .filter-actions {
    grid-column: 1 / -1;
  }

  .filter-actions .btn {
    width: 100%;
  }

  .advanced-filters {
    grid-template-columns: 1fr;
  }

  /* Two-line compact catalog rows on mobile */
  .catalog-table thead {
    display: none;
  }

  .catalog-table,
  .catalog-table tbody {
    display: block;
    width: 100%;
  }

  .catalog-table tr.cat-row,
  .catalog-table tr.version-subrow {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
  }

  .catalog-table tr.version-subrow[hidden] {
    display: none;
  }

  .catalog-table tr:last-child {
    border-bottom: none;
  }

  .catalog-table td.col-cat,
  .catalog-table td.col-lang,
  .catalog-table td.col-qual,
  .catalog-table td.col-size,
  .catalog-table td.col-date,
  .catalog-table td.col-comp,
  .catalog-table td.col-seed,
  .catalog-table td.col-leech,
  .catalog-table td.col-act {
    display: none;
  }

  .catalog-table td.col-title {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    border-bottom: none;
  }

  .mobile-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 10px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
  }

  .mobile-dl-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--accent);
  }

  .fiche-header {
    flex-direction: column;
    align-items: stretch;
  }

  .fiche-head-main {
    width: 100%;
    min-width: 0;
  }

  .fiche-cover {
    width: 110px;
  }

  .versions-table thead {
    display: none;
  }

  .versions-table,
  .versions-table tbody {
    display: block;
    width: 100%;
  }

  .versions-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
  }

  .versions-table tr:last-child {
    border-bottom: none;
  }

  .versions-table td {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border-bottom: none;
    font-size: 12.5px;
  }

  .versions-table td[data-label]::before {
    content: attr(data-label) " :";
    color: var(--text-muted);
    font-weight: 400;
  }

  .versions-table td:first-child {
    display: block;
    flex: 1 0 100%;
  }

  .versions-table td.version-actions {
    flex: 1 0 100%;
    margin-top: 4px;
    text-align: left;
  }

  .versions-table td.version-actions .btn {
    width: 100%;
  }

  .detail-grid,
  .publish-layout,
  .profile-grid,
  .field-grid-title,
  .field-grid-2,
  .field-grid-3 {
    grid-template-columns: 1fr;
  }

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

  .table-card > .simple-table {
    min-width: 560px;
  }
}

/* ==========================================================================
   PORTAIL COMMUNAUTAIRE (/) — STRUCTURE T411 ADAPTÉE EN SOMBRE ARDOISE
   ========================================================================== */

.btn-xs {
  padding: 5px 10px;
  font-size: 12px;
  min-height: 28px;
}

.btn-success {
  background-color: var(--green);
  color: #062116;
  border-color: transparent;
  font-weight: 600;
}

.btn-success:hover {
  background-color: #4ade80;
  text-decoration: none;
}

.btn-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
}

.btn-icon-inline:hover {
  color: var(--danger-text);
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.text-ok {
  color: var(--green);
}

.text-accent {
  color: var(--accent);
}

.portal-shell {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Deux étages de navigation portail */
.portal-header {
  background: linear-gradient(180deg, #162131 0%, #111924 100%);
  border-bottom: 1px solid var(--border);
}

.portal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 10px 0;
  flex-wrap: wrap;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.portal-brand-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(115, 185, 255, 0.12);
  border: 1px solid rgba(115, 185, 255, 0.28);
  padding: 1px 7px;
  border-radius: 4px;
}

.portal-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 4px 10px 4px 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

.portal-capsule-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  min-width: 0;
}

.portal-capsule-input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12.5px;
  padding: 5px 10px;
  width: 190px;
  min-width: 0;
}

.portal-capsule-input:focus {
  outline: none;
}

.portal-capsule-submit {
  background: var(--surface-elev);
  border: none;
  border-left: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-capsule-submit:hover {
  background: rgba(115, 185, 255, 0.14);
}

.portal-capsule-account {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  flex-wrap: wrap;
}

.portal-cap-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.portal-cap-link:hover,
.portal-cap-primary {
  color: var(--accent);
  font-weight: 600;
}

.portal-cap-staff {
  color: var(--green);
}

.portal-cap-sep {
  color: var(--border-strong);
}

.portal-inline-logout {
  display: inline;
  margin: 0;
}

.portal-cap-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.portal-nav-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 2px;
}

.portal-tab {
  display: inline-block;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
}

.portal-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

.portal-tab.is-active {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
  font-weight: 600;
}

.portal-header-accent {
  height: 2px;
  background: linear-gradient(90deg, rgba(115, 185, 255, 0.15) 0%, var(--accent) 50%, rgba(115, 185, 255, 0.15) 100%);
}

/* Corps principal portail */
.portal-main {
  padding: 24px 0 32px 0;
}

.portal-main-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.portal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
}

.portal-card-bar {
  background: linear-gradient(180deg, #1E2E44 0%, #172334 100%);
  border-bottom: 2px solid var(--accent);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-card-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
}

.portal-bar-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
}

.portal-bar-badge.status-badge--ok {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green);
}

.portal-bar-badge.status-badge--accent {
  background: rgba(115, 185, 255, 0.14);
  border-color: rgba(115, 185, 255, 0.35);
  color: var(--accent);
}

.portal-bar-badge.status-badge--muted {
  background: var(--bg);
  color: var(--text-muted);
}

.portal-card-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Alerte officielle verte sobre */
.portal-news-banner {
  background: rgba(52, 211, 153, 0.07);
  border: 1px solid var(--green-border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.portal-news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.portal-news-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green);
}

.portal-news-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 4px;
}

.portal-news-copy {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.portal-news-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Hero centré */
.portal-hero {
  text-align: center;
  padding: 6px 10px;
}

.portal-hero-title {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--text);
}

.portal-hero-sub {
  margin: 0 auto;
  max-width: 720px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Barre statut infrastructure */
.portal-status-strip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-status-items {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-status-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
}

.portal-status-label {
  font-weight: 600;
  color: var(--text);
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.portal-pill--ok {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.portal-pill--info {
  background: rgba(115, 185, 255, 0.1);
  border: 1px solid rgba(115, 185, 255, 0.28);
  color: var(--accent);
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.portal-status-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* Manifeste */
.portal-manifesto {
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.portal-manifesto-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.portal-manifesto p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Grille des 3 piliers */
.portal-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.portal-pillar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
}

.portal-pillar--blue { border-left: 4px solid var(--accent); }
.portal-pillar--green { border-left: 4px solid var(--green); }
.portal-pillar--indigo { border-left: 4px solid #818CF8; }

.portal-pillar-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 6px;
}

.portal-pillar p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Bloc CTA principal */
.portal-cta-box {
  background: linear-gradient(180deg, rgba(115, 185, 255, 0.08) 0%, rgba(15, 20, 27, 0.65) 100%);
  border: 1px solid rgba(115, 185, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  text-align: center;
}

.portal-cta-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 750;
  color: var(--text);
  margin-bottom: 8px;
}

.portal-cta-copy {
  max-width: 660px;
  margin: 0 auto 16px auto;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.portal-cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-cta-foot {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.portal-cta-foot strong {
  color: var(--text);
}

.portal-cat-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.portal-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.portal-cat-chip strong {
  color: var(--accent);
}

/* Sous-cartes Objectifs & Feuille de route */
.portal-subcard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.portal-subcard--blue {
  border-color: rgba(115, 185, 255, 0.35);
}

.portal-subcard-bar {
  background: #1A2B40;
  border-bottom: 1px solid rgba(115, 185, 255, 0.3);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-subcard-bar--slate {
  background: var(--surface-elev);
  border-bottom: 1px solid var(--border);
}

.portal-subcard-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.portal-subcard-link,
.portal-bar-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(115, 185, 255, 0.12);
  border: 1px solid rgba(115, 185, 255, 0.25);
  padding: 2px 9px;
  border-radius: 4px;
}

.portal-subcard-body {
  padding: 18px 20px;
}

.portal-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.portal-progress-head strong {
  color: var(--text);
}

.portal-progress-pct {
  font-weight: 700;
  color: var(--accent);
}

.portal-progress {
  display: block;
  width: 100%;
  height: 12px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface-elev);
  overflow: hidden;
  margin-bottom: 16px;
}

.portal-progress::-webkit-progress-bar {
  background-color: var(--surface-elev);
  border-radius: 999px;
}

.portal-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  border-radius: 999px;
}

.portal-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  border-radius: 999px;
}

.portal-tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.portal-tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 11px 13px;
}

.portal-tier.is-reached {
  border-color: var(--green-border);
  border-top-color: var(--green);
  background: rgba(52, 211, 153, 0.06);
}

.portal-tier-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}

.portal-tier-code {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
}

.portal-tier-state {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--surface-elev);
  color: var(--text-muted);
  white-space: nowrap;
}

.portal-tier.is-reached .portal-tier-state {
  background: var(--green-bg);
  color: var(--green);
}

.portal-tier p {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* 2 colonnes Feuille de route */
.portal-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.portal-roadmap-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.portal-col-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 700;
}

.portal-col-heading--ok { color: var(--green); }
.portal-col-heading--blue { color: var(--accent); }

.portal-bullet-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.portal-bullet-list strong {
  color: var(--text);
}

/* FAQ */
.portal-faq-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px 0;
  font-size: 14.5px;
  font-weight: 750;
  color: var(--text);
}

.portal-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.portal-faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.portal-faq-item h3 {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
}

.portal-faq-item p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Shoutbox */
.portal-shout-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-shout-body {
  padding: 18px 20px;
}

.portal-shout-list {
  min-height: 160px;
  max-height: 250px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-shout-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 12px;
  font-size: 12.5px;
}

.portal-shout-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  background: var(--surface-row-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12.5px;
}

.portal-shout-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.portal-shout-time {
  font-size: 11px;
  color: var(--text-muted);
}

.shout-role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

.shout-role--admin {
  background: rgba(248, 113, 113, 0.16);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.shout-role--modo {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.shout-role--member {
  background: rgba(115, 185, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(115, 185, 255, 0.25);
}

.portal-shout-user {
  font-weight: 600;
  color: var(--text);
}

.portal-shout-msg {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  word-break: break-word;
}

.portal-shout-actions {
  flex-shrink: 0;
}

.portal-shout-form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.portal-shout-input {
  flex: 1 1 auto;
  min-width: 0;
}

.portal-shout-error {
  margin-top: 8px;
  font-size: 12px;
  color: var(--danger-text);
}

.portal-shout-guest-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  color: var(--text-muted);
}

.portal-shout-lock-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-shout-lock-copy strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 4px;
}

.portal-shout-lock-copy p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
}

.portal-shout-guest-bar {
  margin-top: 12px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.portal-card-bar-left svg,
.portal-news-title svg,
.portal-manifesto-head svg,
.portal-shout-guest-bar svg {
  flex-shrink: 0;
}

.portal-shout-guest-bar > span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.45;
}

.portal-shout-guest-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Bandeau stats réseau au-dessus du pied de page */
.portal-footer-stats-wrap {
  padding: 0 0 18px 0;
}

.portal-footer-stats {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.portal-stats-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.portal-stats-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.portal-stats-metrics > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.portal-stats-metrics strong {
  color: var(--text);
}

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

@media (max-width: 720px) {
  .portal-shell {
    padding: 0 12px;
  }

  .portal-card-body {
    padding: 16px 14px;
    gap: 16px;
  }

  .portal-hero-title {
    font-size: 19px;
  }

  .portal-pillars-grid,
  .portal-tiers-grid,
  .portal-two-col,
  .portal-faq-grid {
    grid-template-columns: 1fr;
  }

  .portal-capsule {
    width: 100%;
    padding: 6px 8px;
  }

  .portal-capsule-search {
    flex: 1 1 100%;
  }

  .portal-capsule-input {
    width: 100%;
  }

  .portal-tab {
    padding: 6px 9px;
    font-size: 12px;
  }

  .portal-shout-row {
    flex-wrap: wrap;
  }

  .portal-shout-form {
    flex-direction: column;
  }

  .portal-shout-guest-state {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Security hardening cards (2FA, admin step-up, security posture) */
.totp-setup-box {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft, #f8fafc);
}

.security-banner-card {
  border-left: 4px solid var(--accent, #16a34a);
}

.security-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface, #ffffff);
  color: var(--text);
}

.security-badge--ok {
  border-color: rgba(22, 163, 74, 0.35);
  color: #15803d;
  background: rgba(22, 163, 74, 0.08);
}

.security-badge--warn {
  border-color: rgba(217, 119, 6, 0.35);
  color: #b45309;
  background: rgba(217, 119, 6, 0.08);
}
