@import url('./design-tokens.css');

/**
 * Custom Portal Layout CSS
 * Works with NeoBrutalismCSS - adds layout structure only
 */

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */

:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 64px;
  --sidebar-transition: 0.3s ease;
}

/* =============================================
   PORTAL LAYOUT - Sidebar + Topbar + Main
   ============================================= */

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

.f9t10-portal-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: #F2F9FF;
}

/* Sidebar: 3-zone layout — fixed top (brand+client), scrollable middle (nav),
   fixed bottom (footer). Only the middle zone scrolls. */
.f9t10-portal-sidebar {
  width: var(--sidebar-width);
  background-color: #fff;
  border-right: 2px solid #000;
  overflow: hidden;
  padding: 1.5rem 0 0;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
}

.f9t10-portal-sidebar > .f9t10-sidebar-brand,
.f9t10-portal-sidebar > .f9t10-sidebar-section {
  flex-shrink: 0;
}

.f9t10-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.f9t10-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.f9t10-sidebar-nav::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.f9t10-sidebar-footer {
  flex-shrink: 0;
  padding: 0.75rem 0;
  border-top: 2px solid #000;
}

.f9t10-sidebar-brand {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 2px solid #000;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.f9t10-sidebar-brand h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.f9t10-sidebar-brand a {
  color: inherit;
  text-decoration: none;
}

.f9t10-sidebar-nav ul,
.f9t10-sidebar-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.f9t10-sidebar-nav li,
.f9t10-sidebar-footer li {
  margin: 0;
}

.f9t10-sidebar-nav a,
.f9t10-sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.5rem;
  color: #333;
  text-decoration: none;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
  font-size: 1rem;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.f9t10-sidebar-nav a:hover,
.f9t10-sidebar-footer a:hover {
  background-color: #F2F9FF;
  border-left-color: #000;
  padding-left: 1.75rem;
}

.f9t10-sidebar-nav li.active a,
.f9t10-sidebar-footer li.active a {
  background-color: #f0f0f0;
  border-left-color: #000;
  font-weight: 600;
}

/* Main Area */
.f9t10-portal-main-area {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow: clip;
}

/* Topbar */
.f9t10-portal-topbar {
  background-color: transparent;
  border-bottom: none;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  box-shadow: none;
}

.f9t10-portal-topbar h1 {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.f9t10-topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.f9t10-welcome-message {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

/* Section wrapper */
.f9t10-sidebar-section {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}

.f9t10-sidebar-client-selector {
  padding: 0rem 1.5rem 1rem;
  margin-bottom: 0;
  text-align: center;
}

.f9t10-sidebar-client-selector .f9t10-section-label-row {
  margin-bottom: 0.6rem;
}

.f9t10-client-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  text-align: left;
}

#f9t10-client-dropdown-header {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #000;
  background-color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
}

/* Section label for menu sections like PROJECTS */
.f9t10-section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #666;
  margin: 0 1.5rem 0.35rem 1.5rem;
  text-transform: uppercase;
}


/* Navigation section spacing */
.f9t10-nav-section {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* No projects message styling */
.f9t10-no-projects span {
  display: block;
  padding: 0.85rem 1.5rem;
  color: #999;
  font-size: 0.9rem;
  font-style: italic;
}

/* =============================================
   Project items — accordion with color indicator
   ============================================= */
.f9t10-project-item {
  position: relative;
}

.f9t10-project-header {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Project link — contains color square + name, takes the full row */
.f9t10-sidebar-nav .f9t10-project-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0 0.6rem 1.5rem;
  color: #333;
  text-decoration: none;
  border-left: 4px solid transparent;
  transition: background 0.15s ease, border-left-color 0.15s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.f9t10-project-color {
  width: 10px;
  height: 10px;
  border: 1.5px solid #000;
  background: var(--project-color, #000);
  flex-shrink: 0;
}

.f9t10-sidebar-nav .f9t10-project-link-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.f9t10-sidebar-nav .f9t10-project-link:hover {
  background-color: #f7f7f7;
}

/* Toggle chevron button (right side) — Astra theme styles all <button>
   with a colored bg on hover/focus; we fully reset here. */
.f9t10-portal-sidebar .f9t10-project-toggle,
.f9t10-portal-sidebar .f9t10-project-toggle:hover,
.f9t10-portal-sidebar .f9t10-project-toggle:focus,
.f9t10-portal-sidebar .f9t10-project-toggle:active {
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
  padding: 0.6rem 1rem;
  cursor: pointer;
  color: #666;
  line-height: 0;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.f9t10-portal-sidebar .f9t10-project-toggle:hover,
.f9t10-portal-sidebar .f9t10-project-toggle:focus-visible {
  color: #000;
}

.f9t10-project-toggle .f9t10-toggle-icon {
  display: inline-flex;
  transition: transform 0.15s cubic-bezier(0.77, 0, 0.18, 1);
}

.f9t10-project-toggle[aria-expanded="true"] .f9t10-toggle-icon {
  transform: rotate(90deg);
}

.f9t10-project-toggle[data-force-open="true"] {
  cursor: default;
  opacity: 0.35;
}

/* Active project — colored left border matches project color */
.f9t10-sidebar-nav .f9t10-project-item.active .f9t10-project-link {
  background-color: #f0f0f0;
  border-left-color: var(--project-color, #000);
  font-weight: 700;
  color: #000;
}

/* Submenu container (expanded below the project row) */
.f9t10-plan-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #fafafa;
}

.f9t10-plan-submenu.expanded {
  max-height: 1500px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

/* Sub-label "PIANI EDITORIALI" with + button — same button style as other
   sidebar-action +, kept consistent across the sidebar. */
.f9t10-plan-sublabel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.25rem 0.4rem 2.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
}

.f9t10-plan-sublabel > a {
  margin-left: auto;
}

/* Plan list wrapper — the <ul> inside submenu */
.f9t10-plan-submenu > ul {
  list-style: none;
  margin: 0;
  padding: 0 0 6px 0;
}

.f9t10-plan-item {
  margin: 0;
}

/* Plan row — status dot + name + progress % */
.f9t10-sidebar-nav .f9t10-plan-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.35rem 1.25rem 0.35rem 2.5rem;
  color: #333;
  text-decoration: none;
  border-left: 4px solid transparent;
  font-size: 0.82rem;
  font-weight: 400;
  transition: background 0.15s ease;
}

.f9t10-sidebar-nav .f9t10-plan-item a:hover {
  background: #f0f0f0;
  padding-left: 2.5rem;
  border-left-color: transparent;
}

.f9t10-sidebar-nav .f9t10-plan-item.active a {
  background: #fff;
  border-left: 4px solid var(--project-color, #000);
  padding-left: 2.25rem;
  font-weight: 700;
  color: #000;
}

.f9t10-plan-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #000;
  flex-shrink: 0;
  background: #999;
}

.f9t10-plan-status-dot.status-draft     { background: #999; }
.f9t10-plan-status-dot.status-active    { background: #0077b6; }
.f9t10-plan-status-dot.status-reviewed  { background: #fdfd96; }
.f9t10-plan-status-dot.status-published { background: #40d39c; }
.f9t10-plan-status-dot.status-rejected  { background: #dc341e; }

.f9t10-plan-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty state inside an expanded project with no plans */
.f9t10-plan-empty {
  padding: 0.35rem 1.25rem 0.5rem 2.5rem;
  color: #999;
  font-size: 0.8rem;
  font-style: italic;
}

.f9t10-topbar-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.f9t10-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.f9t10-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  border: 2px solid #000;
  margin-top: 0.5rem;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.f9t10-topbar-user:hover .f9t10-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.f9t10-user-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.f9t10-user-dropdown li {
  margin: 0;
}

.f9t10-user-dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.f9t10-user-dropdown a:hover {
  background-color: #f5f5f5;
  padding-left: 1.25rem;
}

/* Main Content */
.f9t10-portal-main {
  flex: 1;
  overflow-y: visible;
  padding: 1.5rem;
  position: relative;
}

/* =============================================
   NAV ICON & TEXT STYLES
   ============================================= */

.f9t10-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.f9t10-nav-icon svg {
  display: block;
}

.f9t10-nav-text {
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--sidebar-transition), width var(--sidebar-transition);
}

/* Section icons (CLIENT, PROJECTS, DEBUG labels) */
.f9t10-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.f9t10-section-icon svg {
  display: block;
}

.f9t10-section-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.f9t10-section-label-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* =============================================
   SIDEBAR TOGGLE (Desktop chevron in sidebar)
   ============================================= */

.f9t10-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  flex-shrink: 0;
  font-size: inherit;
  font-family: inherit;
  font-weight: normal;
  text-transform: none;
  line-height: 1;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease;
}

.f9t10-sidebar-toggle:hover,
.f9t10-sidebar-toggle:focus {
  background-color: #f0f0f0;
  box-shadow: none;
  transform: none;
}

.f9t10-toggle-chevron {
  display: block;
  transition: transform var(--sidebar-transition);
}

/* =============================================
   SIDEBAR TOGGLE MOBILE (Hamburger in topbar)
   ============================================= */

.f9t10-sidebar-toggle-mobile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.f9t10-sidebar-toggle-mobile:hover {
  background-color: #f0f0f0;
}

.f9t10-hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #000;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.f9t10-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Sidebar overlay (mobile backdrop) */
.f9t10-sidebar-overlay {
  display: none;
}

/* Sidebar + main area transitions */
.f9t10-portal-sidebar,
.f9t10-portal-main-area {
  transition: width var(--sidebar-transition), margin-left var(--sidebar-transition);
}

/* =============================================
   DESKTOP: COLLAPSED SIDEBAR (icon-only 64px)
   ============================================= */

body.sidebar-collapsed .f9t10-portal-sidebar {
  width: 64px !important;
  overflow-x: hidden;
}

body.sidebar-collapsed .f9t10-portal-main-area {
  margin-left: 64px !important;
}

/* Flip chevron when collapsed */
body.sidebar-collapsed .f9t10-toggle-chevron {
  transform: scaleX(-1);
}

/* Hide brand name */
body.sidebar-collapsed .f9t10-sidebar-brand h2 {
  display: none;
}

/* Hide nav text */
body.sidebar-collapsed .f9t10-nav-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* Center nav icons */
body.sidebar-collapsed .f9t10-sidebar-nav a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  border-left-color: transparent;
}

body.sidebar-collapsed .f9t10-sidebar-nav a:hover {
  padding-left: 0;
  padding-right: 0;
}

/* Active state: background only, no left border in collapsed */
body.sidebar-collapsed .f9t10-sidebar-nav li.active a {
  border-left-color: transparent;
  background-color: #f0f0f0;
}

/* Hide client selector content */
body.sidebar-collapsed .f9t10-sidebar-client-selector {
  padding: 0 0.5rem 1rem;
}

body.sidebar-collapsed #f9t10-client-dropdown-header,
body.sidebar-collapsed .f9t10-client-name-single,
body.sidebar-collapsed .f9t10-client-label {
  display: none;
}

/* Hide "+" add buttons */
body.sidebar-collapsed .f9t10-sidebar-add-btn {
  display: none;
}

/* Section label text: hide, show icon centered */
body.sidebar-collapsed .f9t10-section-text {
  display: none;
}

body.sidebar-collapsed .f9t10-section-label {
  text-align: center;
  margin-left: 0;
}

body.sidebar-collapsed .f9t10-section-label-row {
  justify-content: center;
}

/* Section icon centered in collapsed state */
body.sidebar-collapsed .f9t10-section-icon {
  margin: 0 auto;
}

/* Hide project items (text-heavy, not icon-friendly) */
body.sidebar-collapsed .f9t10-project-item {
  display: none;
}

body.sidebar-collapsed .f9t10-no-projects {
  display: none;
}

/* Hide plan submenus */
body.sidebar-collapsed .f9t10-plan-submenu {
  display: none;
}

/* Center the sidebar toggle button */
body.sidebar-collapsed .f9t10-sidebar-brand {
  justify-content: center;
}

/* =============================================
   CSS TOOLTIPS (collapsed sidebar only)
   ============================================= */

body.sidebar-collapsed .f9t10-sidebar-nav a::after {
  content: attr(title);
  position: absolute;
  left: calc(var(--sidebar-collapsed-width) - 4px);
  top: 50%;
  transform: translateY(-50%);
  background: #000;
  color: #fff;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  border: 2px solid #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 1000;
}

body.sidebar-collapsed .f9t10-sidebar-nav a:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Tooltips for section labels */
body.sidebar-collapsed .f9t10-section-label-row[title]::after {
  content: attr(title);
  position: absolute;
  left: calc(var(--sidebar-collapsed-width) - 4px);
  top: 50%;
  transform: translateY(-50%);
  background: #000;
  color: #fff;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  border: 2px solid #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 1000;
}

body.sidebar-collapsed .f9t10-section-label-row[title] {
  position: relative;
}

body.sidebar-collapsed .f9t10-section-label-row[title]:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Hide mobile hamburger on desktop */
@media (min-width: 769px) {
  .f9t10-sidebar-toggle-mobile {
    display: none;
  }
}


/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  .f9t10-portal-wrapper {
    flex-direction: column;
  }

  .f9t10-portal-sidebar {
    position: fixed;
    width: 260px;
    height: 100%;
    top: 0;
    left: 0;
    bottom: 0;
    border-right: 2px solid #000;
    border-bottom: none;
    padding: 1.5rem 0;
    overflow-y: auto;
    transform: translateX(-100%);
    z-index: 1100;
  }

  body.sidebar-open .f9t10-portal-sidebar {
    transform: translateX(0);
  }

  /* Reset desktop collapse on mobile: sidebar always hidden via translateX */
  body.sidebar-collapsed .f9t10-portal-sidebar {
    width: 260px;
    transform: translateX(-100%);
  }

  /* On mobile, sidebar-open + sidebar-collapsed should still show full sidebar */
  body.sidebar-open.sidebar-collapsed .f9t10-portal-sidebar {
    transform: translateX(0);
  }

  body.sidebar-collapsed .f9t10-portal-main-area,
  .f9t10-portal-main-area {
    margin-left: 0;
  }

  /* Reset all collapsed-state hiding on mobile */
  body.sidebar-collapsed .f9t10-sidebar-brand h2,
  body.sidebar-collapsed .f9t10-section-text,
  body.sidebar-collapsed .f9t10-sidebar-add-btn,
  body.sidebar-collapsed .f9t10-client-label,
  body.sidebar-collapsed #f9t10-client-dropdown-header,
  body.sidebar-collapsed .f9t10-client-name-single,
  body.sidebar-collapsed .f9t10-project-item,
  body.sidebar-collapsed .f9t10-no-projects {
    display: revert;
  }

  body.sidebar-collapsed .f9t10-nav-text {
    opacity: 1;
    width: auto;
  }

  body.sidebar-collapsed .f9t10-sidebar-nav a {
    justify-content: flex-start;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  body.sidebar-collapsed .f9t10-sidebar-nav a::after {
    display: none;
  }

  body.sidebar-collapsed .f9t10-sidebar-brand {
    justify-content: space-between;
  }

  /* Hide desktop chevron toggle on mobile */
  .f9t10-sidebar-toggle {
    display: none;
  }

  /* Show mobile hamburger */
  .f9t10-sidebar-toggle-mobile {
    display: flex;
  }

  /* Overlay backdrop */
  .f9t10-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1050;
  }

  body.sidebar-open .f9t10-sidebar-overlay {
    display: block;
  }

  /* Hamburger → X animation when sidebar open */
  body.sidebar-open .f9t10-hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.sidebar-open .f9t10-hamburger-line:nth-child(2) {
    opacity: 0;
  }

  body.sidebar-open .f9t10-hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Reset sidebar nav to vertical on mobile (not horizontal) */
  .f9t10-sidebar-nav {
    display: block;
  }

  .f9t10-sidebar-nav ul,
.f9t10-sidebar-footer ul {
    display: block;
  }

  .f9t10-sidebar-nav li {
    flex: none;
  }

  .f9t10-sidebar-nav a {
    text-align: left;
    border-left: 4px solid transparent;
    border-bottom: none;
  }

  .f9t10-sidebar-nav a:hover {
    border-left-color: #000;
    border-bottom: none;
  }

  .f9t10-sidebar-nav li.active a {
    border-left-color: #000;
    border-bottom: none;
  }

  .f9t10-sidebar-brand {
    border-bottom: 2px solid #000;
    margin-bottom: 1.5rem;
  }

  .f9t10-portal-main {
    padding: 1rem;
  }
}

/* =============================================
   GRID LAYOUTS (using NeoBrutalismCSS base)
   ============================================= */

.f9t10-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.f9t10-stat-tile {
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.f9t10-stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 4px 6px 0 #000;
}

.f9t10-articles {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.f9t10-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.f9t10-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.f9t10-edps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .f9t10-dashboard-stats,
  .f9t10-articles-grid,
  .f9t10-projects-grid,
  .f9t10-edps-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */

.f9t10-dashboard-content {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.f9t10-dashboard-section {
  flex: 1 1 0;
  min-width: 0;
}

.f9t10-dashboard-section .f9t10-article-list,
.f9t10-dashboard-section .f9t10-project-list {
  width: 100%;
}

.f9t10-dashboard-section .nb-card {
  width: 100%;
  max-width: none;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */

.f9t10-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #000;
}

.f9t10-no-results {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #666;
}

.f9t10-loading {
  text-align: center;
  padding: 2rem;
}

/* =============================================
   WARNING BUTTON - NeoBrutalismCSS Extension
   ============================================= */

/* Warning button - Yellow neo-brutalist style */
.nb-button.warning {
  background-color: #FFD700; /* Giallo oro */
  color: #000;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  font-weight: bold;
  transition: all 0.2s;
}

.nb-button.warning:hover {
  background-color: #FFC700; /* Leggermente più scuro */
  box-shadow: 2px 2px 0 #000;
  transform: translate(2px, 2px);
}

.nb-button.warning:active {
  box-shadow: 0 0 0 #000;
  transform: translate(4px, 4px);
}

/* Cyan/Turquoise Button for "MODIFICA" */
.nb-button.cyan {
  background-color: #00BCD4; /* Material Design Cyan */
  color: #000;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.2s;
  padding: 0.5rem 1.25rem !important;
  font-size: 0.875rem !important;
}

.nb-button.cyan:hover {
  box-shadow: 2px 2px 0 #000;
  transform: translate(2px, 2px);
}

.nb-button.cyan:active {
  box-shadow: 0 0 0 #000;
  transform: translate(4px, 4px);
}

/* Full-width nb-card override for brand identity, project detail, and plan edit sections */
.f9t10-brand-identity .nb-card,
.f9t10-project-detail .nb-card,
.f9t10-plan-edit .nb-card,
.f9t10-plan-edit .f9t10-ai-fill-card,
.f9t10-danger-zone {
  width: 100% !important;
  max-width: none !important;
}

/* =============================================
   BADGES - NeoBrutalismCSS
   ============================================= */

.badge {
  display: inline-block;
}

.badge-text {
  margin: 0;
  padding: 0;
}

/* =============================================
   DIALOG AS MODAL OVERLAY - NeoBrutalismCSS
   ============================================= */

/* Dialog overlay backdrop - fills .f9t10-portal-main */
.nb-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Dialog shown state */
.nb-dialog.show {
  display: flex;
}

/* Dialog content box */
.nb-dialog form {
  background-color: #fff;
  border: 3px solid #000;
  max-width: 500px;
  width: 90%;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

/* Header styling */
.nb-dialog .nb-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 2px solid #000;
}

.nb-dialog .nb-dialog-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.nb-dialog .nb-dialog-header button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
}

/* Body styling */
.nb-dialog .nb-dialog-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 60vh;
}

/* Footer styling */
.nb-dialog .nb-dialog-footer {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 2px solid #000;
  justify-content: flex-end;
}

.nb-dialog .nb-dialog-footer button {
  margin: 0;
  border-radius: 0 !important;
}

/* =============================================
   CARD ACTIONS - Button Alignment & Compactness
   ============================================= */

   /* TODO: abuso terribile di !important, magari ripulire */

.nb-card-actions {
  display: flex !important;
  gap: 0.75rem !important;
  flex-wrap: wrap !important;
}

.nb-card-actions button.nb-button,
.nb-card-actions a.nb-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 36px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  line-height: 1 !important;
  text-decoration: none !important;
  height: auto !important;
  flex: 1 !important;
  min-width: 100px !important;
  border-radius: 0 !important;
  text-transform: uppercase !important;
}

@media (max-width: 768px) {
  /* View Details anchor - appears first, full width */
  .nb-card-actions a.nb-button {
    flex-basis: 100% !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.8rem !important;
    order: 1 !important;
  }

  /* Request Review and Block Publication come second, stay together */
  .nb-card-actions button.nb-button {
    flex: 1 1 calc(50% - 0.375rem) !important;
    min-width: 60px !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.8rem !important;
    order: 2 !important;
  }
}

/* =============================================
   CALENDAR VIEW
   ============================================= */

.f9t10-calendar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: calc(100vh - 300px);
}

.f9t10-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.f9t10-calendar-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.f9t10-calendar-filters {
  display: flex;
  gap: 1rem;
}

.f9t10-calendar-filters select {
  min-width: 180px;
}

#f9t10-calendar-container {
  flex: 1;
  min-height: 500px;
  background-color: #fff;
  border: 2px solid #000;
  padding: 1.5rem;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

/* FullCalendar overrides for consistent styling */
#f9t10-calendar-container .fc {
  font-family: inherit;
}

#f9t10-calendar-container .fc-button-primary {
  background-color: #000;
  border-color: #000;
  color: #fff;
}

#f9t10-calendar-container .fc-button-primary:hover {
  background-color: #333;
  border-color: #333;
}

#f9t10-calendar-container .fc-button-primary.fc-button-active {
  background-color: #000;
  border-color: #000;
}

#f9t10-calendar-container .fc-daygrid-day.fc-day-other {
  background-color: #f9f9f9;
}

#f9t10-calendar-container .fc-col-header-cell {
  background-color: #f2f9ff;
  font-weight: 600;
}

/* Testo bianco su tutti gli eventi calendario */
#f9t10-calendar-container .fc-event .fc-event-title,
#f9t10-calendar-container .fc-event .fc-list-event-title {
  color: #fff !important;
}

/* Bordo tratteggiato per eventi pianificati da EDP */
#f9t10-calendar-container .article-planned {
  border-style: dashed !important;
}

/* --- Legenda colori PED --- */
.f9t10-calendar-legend-bar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0;
}

.f9t10-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.f9t10-cal-legend-item:hover .f9t10-cal-legend-label {
  text-decoration: underline;
}

.f9t10-cal-legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #000;
  border-radius: 2px;
  flex-shrink: 0;
}

.f9t10-cal-legend-label {
  color: #111;
}

/* =============================================
   EDP DETAIL TABLE - NeoBrutalism Table Style
   ============================================= */

.f9t10-articles-table-wrapper {
  overflow-x: auto;
  margin-top: 0;
  background: #fff;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
}

.f9t10-articles-table-wrapper .nb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  margin: 0;
}

.f9t10-articles-table-wrapper .nb-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #f5f5f5;
  color: #333;
  border-bottom: 2px solid #000;
  position: static;
}

.f9t10-articles-table-wrapper .nb-table thead th:last-child {
  text-align: right;
}

.f9t10-articles-table-wrapper .nb-table tbody td {
  padding: 14px;
  vertical-align: middle;
  border-bottom: 1px solid #eee;
}

.f9t10-articles-table-wrapper .nb-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Row subline: dates under the article title with colored dots ── */
.f9t10-row-subline {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #888;
}

.f9t10-row-subline-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.f9t10-row-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.f9t10-row-dot-gen { background: #ff9800; }
.f9t10-row-dot-pub { background: #1565c0; }

/* ── Date pills (shared across article tables & plan detail) ── */
.f9t10-date-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}
.f9t10-date-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
}
.f9t10-date-pill-gen {
  background: #fff3e0;
  color: #e65100;
}
.f9t10-date-pill-pub {
  background: #e3f2fd;
  color: #1565c0;
}
.f9t10-edp-detail {
  max-width: 100%;
}

.f9t10-edp-detail-header {
  margin-bottom: 2rem;
}

.f9t10-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #666;
}

.f9t10-breadcrumb a {
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid #000;
  transition: all 0.2s ease;
}

.f9t10-breadcrumb a:hover {
  background-color: #f2f9ff;
}

.f9t10-breadcrumb-separator {
  color: #999;
}

.f9t10-edp-detail-header h1 {
  margin: 0 0 1rem 0;
  font-size: 2rem;
  font-weight: 700;
}

.f9t10-edp-project-name {
  margin: 0 0 1.5rem 0;
  font-size: 1rem;
  color: #666;
}

.f9t10-edp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #000;
}

.f9t10-edp-meta-item {
  display: flex;
  flex-direction: column;
}

.f9t10-edp-meta-item strong {
  font-weight: 600;
  color: #000;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.f9t10-edp-meta-item span {
  font-size: 1.1rem;
  margin-top: 0.25rem;
  color: #333;
}

.f9t10-edp-articles h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #000;
}

/* =============================================
   ARTICLE CARD — shared view + edit (.f9t10-ac-*)
   Used by plan-detail.php (VIEW, read-only) and by
   the JS renderDetail() in plan-articles-editor.php (EDIT).
   ============================================= */

/* ---- Card shell ---- */
.f9t10-ac-card {
  background: #fff;
  border: 3.5px solid #000;
  box-shadow: 6px 6px 0 #000;
  margin-top: 1rem;
}

/* ---- Card header: type chip · title · meta pills · actions ---- */
.f9t10-ac-header {
  padding: 18px 20px;
  border-bottom: 3px solid #000;
  background: #fff;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
}

.f9t10-ac-typechip {
  width: 44px;
  height: 44px;
  border: 2.5px solid #000;
  background: #fff;
  border-radius: 50%;
  box-shadow: 3px 3px 0 #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lexend Mega", sans-serif;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
}

.f9t10-ac-typechip-post   { background: #e8f0fe; }
.f9t10-ac-typechip-social { background: #fff3cd; }

/* Readable subtype badge in the list row: platform + social format */
.f9t10-ac-subtype {
  font-family: "Lexend Mega", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 2px solid #000;
  border-radius: 999px;
  white-space: nowrap;
  color: #000;
}
.f9t10-ac-subtype-post   { background: #e8f0fe; }
.f9t10-ac-subtype-social { background: #fff3cd; }

.f9t10-ac-titleblock { min-width: 0; }

.f9t10-ac-title {
  font-family: "Lexend Mega", sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: #000;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f9t10-ac-title-input {
  width: 100%;
  border: 2px solid transparent;
  background: transparent;
  font-family: "Lexend Mega", sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: #000;
  padding: 4px 6px;
  border-radius: 0;
  outline: none;
}
.f9t10-ac-title-input:hover { border-color: #e0e0e0; }
.f9t10-ac-title-input:focus { border-color: #000; background: #fffef0; }

.f9t10-ac-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #333;
}

.f9t10-ac-index {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: #666;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.f9t10-ac-meta-dot {
  width: 3px;
  height: 3px;
  background: #ccc;
  border-radius: 50%;
  display: inline-block;
}

/* Date pills in the header */
.f9t10-ac-datepill {
  padding: 2px 7px;
  border: 1.5px solid #000;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 0;
}
.f9t10-ac-datepill-gen { background: #fff3e0; color: #e65100; }
.f9t10-ac-datepill-pub { background: #e3f2fd; color: #1565c0; }
.f9t10-ac-datepill-skip { background: #fff8e1; color: #b26a00; }

/* Status chips */
.f9t10-ac-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1.5px solid #000;
  border-radius: 50px;
  font-family: "Lexend Mega", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  background: #e0e0e0;
  color: #333;
}
.f9t10-ac-chip-created   { background: #d4edda; color: #155724; }
.f9t10-ac-chip-pending   { background: #fff; color: #333; }
.f9t10-ac-chip-editorial { background: #28a745; color: #fff; }
.f9t10-ac-chip-editorial[data-status="planned"]         { background: #e0e0e0; color: #333; }
.f9t10-ac-chip-editorial[data-status="generated"]       { background: #cfe8ff; color: #003d80; }
.f9t10-ac-chip-editorial[data-status="reviewed"]        { background: #fff3cd; color: #7a5c00; }
.f9t10-ac-chip-editorial[data-status="approved"]        { background: #d4edda; color: #155724; }
.f9t10-ac-chip-editorial[data-status="published"]       { background: #28a745; color: #fff; }
.f9t10-ac-chip-editorial[data-status="editor-rejected"] { background: #ffe5d0; color: #7a3200; }
.f9t10-ac-chip-editorial[data-status="client-rejected"] { background: #fde8e8; color: #7a0000; }

/* Header actions */
.f9t10-ac-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.f9t10-ac-icon-btn {
  width: 34px;
  height: 34px;
  border: 2px solid #000;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #000;
  transition: transform 0.1s cubic-bezier(0.77, 0, 0.18, 1),
              box-shadow 0.1s cubic-bezier(0.77, 0, 0.18, 1);
}
.f9t10-ac-icon-btn:hover {
  box-shadow: 0 0 0 #000;
  transform: translate(2px, 2px);
}

.f9t10-ac-mode-btn {
  padding: 8px 14px;
  border: 2.5px solid #000;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
  color: #000;
  font-family: "Lexend Mega", sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s cubic-bezier(0.77, 0, 0.18, 1),
              box-shadow 0.1s cubic-bezier(0.77, 0, 0.18, 1);
}
.f9t10-ac-mode-btn:hover {
  box-shadow: 1px 1px 0 #000;
  transform: translate(2px, 2px);
}
.f9t10-ac-mode-btn[data-mode="edit"] { background: #fdfd96; }
.f9t10-ac-mode-btn[aria-disabled="true"] {
  cursor: default;
  opacity: 0.55;
  box-shadow: 3px 3px 0 #000;
  transform: none;
}

/* ---- Sections ---- */
.f9t10-ac-section { border-bottom: 2px solid #000; }
.f9t10-ac-section:last-of-type { border-bottom: none; }

.f9t10-ac-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 10px;
  border-bottom: 2px solid #000;
  background: #fafafa;
}

.f9t10-ac-section-head-label {
  font-family: "Lexend Mega", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
}

.f9t10-ac-section-head-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: #666;
  font-weight: 600;
  margin-left: auto;
}

.f9t10-ac-section-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

/* ---- Field primitive ---- */
.f9t10-ac-field { grid-column: span 1; min-width: 0; }
.f9t10-ac-field.span-2 { grid-column: span 2; }

.f9t10-ac-field-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.f9t10-ac-field-label > .label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
}
.f9t10-ac-field-label > .hint {
  font-family: "Geist", sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #999;
}

/* Read-only value primitives */
.f9t10-ac-value {
  padding: 6px 0;
  font-size: 13px;
  color: #333;
  line-height: 1.55;
  word-break: break-word;
}
.f9t10-ac-value-empty { color: #999; font-style: italic; }

.f9t10-ac-value-slug {
  display: block;
  padding: 8px 10px;
  background: #fafafa;
  border: 1.5px solid #e0e0e0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: #333;
  word-break: break-all;
  line-height: 1.5;
}

.f9t10-ac-value-mono {
  padding: 10px 12px;
  margin: 0;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: #333;
  white-space: pre-wrap;
  line-height: 1.65;
}

.f9t10-ac-value-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 2px solid #000;
}
.f9t10-ac-toggle-box {
  width: 14px;
  height: 14px;
  border: 2px solid #000;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  flex-shrink: 0;
}
.f9t10-ac-value-toggle.is-on .f9t10-ac-toggle-box { background: #40d39c; }
.f9t10-ac-toggle-text {
  font-size: 13px;
  color: #333;
  font-weight: 500;
}
.f9t10-ac-toggle-hint {
  font-size: 11px;
  color: #999;
  margin-left: auto;
}

/* ---- Edit-mode inputs ---- */
.f9t10-ac-input,
.f9t10-ac-select,
.f9t10-ac-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 2px solid #000;
  background: #fff;
  font-size: 13px;
  font-family: "Geist", sans-serif;
  color: #000;
  border-radius: 0;
  outline: none;
}
.f9t10-ac-input:focus,
.f9t10-ac-select:focus,
.f9t10-ac-textarea:focus {
  background: #fffef0;
  box-shadow: inset 0 0 0 2px #000;
}

.f9t10-ac-textarea {
  resize: vertical;
  line-height: 1.5;
  min-height: 60px;
}
.f9t10-ac-textarea.is-mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
}

/* Edit toggle — clickable version of .f9t10-ac-value-toggle */
label.f9t10-ac-value-toggle { cursor: pointer; margin: 0; position: relative; }
label.f9t10-ac-value-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ---- Footer ---- */
.f9t10-portal-footer{
  padding: 0 1.5rem;
}
.f9t10-ac-footer {
  padding: 14px 20px;
  border-top: 2px solid #000;
  background: #fafafa;
  display: flex;
  align-items: center;
  gap: 14px;
}

.f9t10-ac-footer-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: #0077b6;
  text-decoration: none;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.f9t10-ac-footer-link:hover { text-decoration: underline; }

.f9t10-ac-footer-spacer { margin-left: auto; }

.f9t10-ac-dirty {
  font-size: 11px;
  color: #666;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 10px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .f9t10-ac-header {
    grid-template-columns: 44px 1fr;
  }
  .f9t10-ac-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .f9t10-ac-section-body {
    grid-template-columns: 1fr;
  }
  .f9t10-ac-field.span-2 { grid-column: span 1; }
}

/* ---- Card list (replaces nb-table on plan-detail VIEW) ---- */
.f9t10-ac-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.f9t10-ac-card-list .f9t10-ac-card {
  margin-top: 0;
}

/* Default collapsed state in VIEW mode (card-list only) — only header is visible.
   In edit mode the card lives inside .f9t10-ae-detail, where sections must stay
   visible: this rule does not match there. */
.f9t10-ac-card-list .f9t10-ac-card .f9t10-ac-section,
.f9t10-ac-card-list .f9t10-ac-card .f9t10-ac-footer {
  display: none;
}
.f9t10-ac-card-list .f9t10-ac-card.is-expanded .f9t10-ac-section {
  display: block;
}
.f9t10-ac-card-list .f9t10-ac-card.is-expanded .f9t10-ac-footer {
  display: flex;
}

/* Toggle chevron rotates when expanded (VIEW mode only) */
.f9t10-ac-card-list .f9t10-ac-icon-btn.f9t10-toggle-details svg {
  transition: transform 150ms ease;
}
.f9t10-ac-card-list .f9t10-ac-card.is-expanded .f9t10-ac-icon-btn.f9t10-toggle-details svg {
  transform: rotate(180deg);
}

/* Days gap pill in card meta */
.f9t10-ac-gap {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  color: #444;
  letter-spacing: 0.04em;
}

/* "View Article →" link in card actions (replaces Edit button when created) */
.f9t10-ac-view-link {
  font-family: "Karla", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1f6feb;
  text-decoration: none;
  white-space: nowrap;
}
.f9t10-ac-view-link:hover {
  text-decoration: underline;
}

.f9t10-created-link {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.f9t10-created-link a {
  color: #000;
  text-decoration: underline;
  transition: all 0.2s ease;
}

.f9t10-created-link a:hover {
  background-color: #f2f9ff;
  padding: 0 0.25rem;
}

/* =============================================
   NOTIFICATIONS - Dialog-like Layout
   ============================================= */

.f9t10-notifications-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Map .f9t10-notification-item to nb-dialog structure */
.f9t10-notification-item {
  background-color: #fff;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

/* Map .f9t10-notification-header to nb-dialog-header */
.f9t10-notification-item .f9t10-notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 2px solid #000;
}

.f9t10-notification-item .f9t10-notification-header h4 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Map date, content, actions to nb-dialog-body */
.f9t10-notification-item .f9t10-notification-content {
  padding: 1.5rem;
}

.f9t10-notification-item .f9t10-notification-content p {
  margin: 0;
  line-height: 1.5;
}

.f9t10-notification-date {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

.f9t10-notification-item .f9t10-notification-actions {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 2px solid #000;
  justify-content: flex-end;
}

/* =============================================
   BRAND IDENTITY PAGE - UI/UX Improvements
   ============================================= */

/* Card header with edit button */
.nb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.nb-card-header .nb-card-title {
  margin: 0;
  flex: 1;
  text-transform: uppercase;
  font-weight: 700;
}

/* Standardize edit button appearance */
.f9t10-brand-identity .nb-button.blue {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  text-transform: uppercase;
}

/* Badge grid layout for tags */
.f9t10-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.f9t10-brand-identity .badge {
  margin: 0;
}

/* Buyer Personas card improvements */
.f9t10-persona-card {
  height: 100%;
  background: #fff !important;
}

.f9t10-persona-card .nb-card-content {
  padding: 1.5rem;
}

.f9t10-persona-section {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.f9t10-persona-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.f9t10-persona-label {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 0.25rem;
}

.f9t10-persona-section p {
  margin: 0;
  line-height: 1.5;
  color: #333;
}

/* Personas grid */
.f9t10-personas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Brand details grid (Brand Name + Settore) */
.f9t10-brand-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.f9t10-brand-detail-item {
  display: flex;
  flex-direction: column;
}

.f9t10-brand-detail-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #666;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.f9t10-brand-detail-value {
  font-size: 1rem;
  font-weight: 500;
  color: #000;
}

/* Collapsible details styling */
.f9t10-collapsible-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0;
  border: 2px solid #000;
  background: #fff;
  position: relative;
}

.f9t10-collapsible-summary::-webkit-details-marker {
  display: none;
}

.f9t10-collapsible-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 2rem;
}

.f9t10-collapsible-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  transition: transform 0.2s ease;
}

details[open] .f9t10-collapsible-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.f9t10-collapsible-content {
  padding: 1rem;
  border: 2px solid #000;
  border-top: none;
  background: #f9f9f9;
}

/* Section with left border */
.f9t10-brand-identity .f9t10-section-bordered {
  border-left: 4px solid #000;
  padding-left: 1.5rem;
}

/* =============================================
   BRAND IDENTITY - Hero Section
   ============================================= */

.f9t10-brand-hero {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 0;
}

.f9t10-brand-hero-left {
  padding: 1.5rem;
  border-right: 2px solid #000;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.f9t10-brand-hero-right {
  padding: 1.5rem;
}

.f9t10-brand-hero-right .nb-card-header {
  margin-bottom: 0.75rem;
}

.f9t10-brand-hero-right p {
  margin: 0;
  line-height: 1.6;
  color: #333;
}

@media (max-width: 768px) {
  .f9t10-brand-hero {
    grid-template-columns: 1fr;
  }

  .f9t10-brand-hero-left {
    border-right: none;
    border-bottom: 2px solid #000;
  }
}

/* =============================================
   BRAND IDENTITY - Target & Personas Section
   ============================================= */

.f9t10-target-section .f9t10-audience-intro {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.f9t10-target-section .f9t10-audience-intro p {
  margin: 0;
  line-height: 1.6;
  color: #333;
}

/* =============================================
   BRAND IDENTITY - AI Configuration Section
   ============================================= */

.f9t10-config-section {
  margin-top: 1rem;
}

.f9t10-config-section .nb-card {
  background: #f9f9f9;
  border-color: #ccc;
}

.f9t10-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #f0f0f0;
  border: 2px solid #ccc;
  cursor: pointer;
  user-select: none;
}

.f9t10-config-header:hover {
  background: #e8e8e8;
}

.f9t10-config-header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.f9t10-config-header .f9t10-config-arrow {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.f9t10-config-section details[open] .f9t10-config-arrow {
  transform: rotate(180deg);
}

.f9t10-config-content {
  border: 2px solid #ccc;
  border-top: none;
  padding: 1.5rem;
  background: #fff;
}

.f9t10-config-content .nb-card {
  background: #fff;
  border-color: #000;
  margin-bottom: 1.5rem;
}

.f9t10-config-content .nb-card:last-child {
  margin-bottom: 0;
}

/* Config section cards have lighter header styling */
.f9t10-config-content .nb-card-header .nb-card-title {
  font-size: 1rem;
}

/* Marquee notification styling */
.f9t10-brand-identity .nb-marquee {
  border-radius: 0;
}

.f9t10-brand-identity .nb-marquee a:hover {
  text-decoration-thickness: 2px;
}

/* =============================================
   PROJECT DETAIL - Grid Layouts
   ============================================= */

.f9t10-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.f9t10-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.f9t10-persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.f9t10-destinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .f9t10-info-grid,
  .f9t10-stats-grid,
  .f9t10-persona-grid,
  .f9t10-destinations-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   PROJECT DETAIL - Accordion Component
   ============================================= */

.f9t10-accordion {
  width: 100%;
}

.f9t10-accordion-header {
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0;
  border: 2px solid #000;
  background: #fff;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.f9t10-accordion-header::-webkit-details-marker {
  display: none;
}

.f9t10-accordion-preview {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 2rem;
}

.f9t10-accordion-arrow {
  flex-shrink: 0;
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.f9t10-accordion[open] .f9t10-accordion-arrow {
  transform: rotate(180deg);
}

.f9t10-accordion-content {
  padding: 1rem;
  border: 2px solid #000;
  border-top: none;
  background: #f9f9f9;
  white-space: pre-wrap;
}

/* =============================================
   PROJECT DETAIL - Destination Cards
   ============================================= */

.nb-card.f9t10-destination-card.is-enabled {
  border-color: #2ecc71 !important;
  box-shadow: 4px 4px 0 #2ecc71 !important;
}

.nb-card.f9t10-destination-card.is-disabled {
  border-color: #e74c3c !important;
  box-shadow: 4px 4px 0 #e74c3c !important;
}

.f9t10-status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 0.5rem;
  vertical-align: middle;
  border-radius: 2px;
}

.nb-card.f9t10-destination-card.is-enabled .f9t10-status-indicator {
  background: #2ecc71;
}

.nb-card.f9t10-destination-card.is-disabled .f9t10-status-indicator {
  background: #e74c3c;
}

.f9t10-destination-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1.5px solid #000;
  border-radius: 2px;
}

.f9t10-destination-badge--auto-approve {
  background: #fff7d6;
  color: #5a4500;
}

/* =============================================
   PROJECT DETAIL - Progress Bar Component
   ============================================= */

.f9t10-progress-bar {
  background-color: #f0f0f0;
  border: 2px solid #000;
  height: 24px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.f9t10-progress-bar-fill {
  background-color: #007cba;
  height: 100%;
  transition: width 0.3s ease;
}

.f9t10-progress-text {
  text-align: center;
  font-size: 0.9rem;
  margin: 0;
}

/* =============================================
   PROJECT DETAIL - Layout Iteration 2
   ============================================= */

/* Basic Info Hero Grid */
.f9t10-project-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .f9t10-project-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Funnel Mix Segmented Bar */
.f9t10-funnel-bar-container {
  display: flex;
  border: 2px solid #000;
  height: 80px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.f9t10-funnel-segment {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-right: 2px solid #000;
  padding: 1rem 0.5rem;
  transition: background-color 0.2s ease;
}

.f9t10-funnel-segment:last-child {
  border-right: none;
}

.f9t10-funnel-segment:hover {
  opacity: 0.9;
}

.f9t10-funnel-percent {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.f9t10-funnel-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Segment colors with left border accent */
.f9t10-funnel-bar-container .f9t10-funnel-segment.awareness {
  background: #e3f2fd !important;
  border-left: 4px solid #2196F3 !important;
}

.f9t10-funnel-bar-container .f9t10-funnel-segment.consideration {
  background: #fff3e0 !important;
  border-left: 4px solid #FF9800 !important;
}

.f9t10-funnel-bar-container .f9t10-funnel-segment.decision {
  background: #e8f5e9 !important;
  border-left: 4px solid #4CAF50 !important;
}

.f9t10-funnel-total {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin: 0.5rem 0 0 0;
}

/* Data Ingestion Table */
.f9t10-data-ingestion-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #000;
  margin: 0;
  table-layout: fixed;
}

/* 1:3 ratio — TYPE narrow, URL takes the remaining space */
.f9t10-data-ingestion-table th,
.f9t10-data-ingestion-table td {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.f9t10-data-ingestion-table th:nth-child(1),
.f9t10-data-ingestion-table td:nth-child(1) {
  width: 25%;
}

.f9t10-data-ingestion-table th:nth-child(2),
.f9t10-data-ingestion-table td:nth-child(2) {
  width: 75%;
}

.f9t10-data-ingestion-table thead {
  background: #f5f5f5;
  border-bottom: 2px solid #000;
}

.f9t10-data-ingestion-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  border-right: 2px solid #000;
}

.f9t10-data-ingestion-table th:last-child {
  border-right: none;
}

.f9t10-data-ingestion-table td {
  padding: 0.75rem 1rem;
  border-right: 1px solid #ddd;
}

.f9t10-data-ingestion-table td:last-child {
  border-right: none;
}

.f9t10-data-ingestion-table tbody tr {
  border-bottom: 1px solid #ddd;
}

.f9t10-data-ingestion-table tbody tr:last-child {
  border-bottom: none;
}

.f9t10-data-ingestion-table tbody tr:hover {
  background: #f9f9f9;
}

.f9t10-data-ingestion-table a {
  color: #2196F3;
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s ease;
}

.f9t10-data-ingestion-table a:hover {
  text-decoration: underline;
  color: #1976D2;
}

.f9t10-ingestion-type-cell {
  font-weight: 500;
}

/* Content Plans - Table Layout */
.f9t10-plans-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #000;
  margin: 1rem 0 0 0;
}

.f9t10-plans-table thead {
  background: #f9f9f9;
}

.f9t10-plans-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  border-bottom: 2px solid #000;
  border-right: 1px solid #ddd;
}

.f9t10-plans-table th:last-child {
  border-right: none;
}

.f9t10-plans-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid #ddd;
  vertical-align: middle;
}

.f9t10-plans-table td:last-child {
  border-right: none;
}

.f9t10-plans-table tbody tr:last-child td {
  border-bottom: none;
}

.f9t10-plans-table tbody tr:hover {
  background: #f9f9f9;
}

.f9t10-plan-name {
  font-weight: 500;
}

.f9t10-plan-date {
  font-size: 0.9rem;
  color: #666;
  white-space: nowrap;
}

.f9t10-plan-articles {
  font-size: 0.9rem;
  text-align: center;
  white-space: nowrap;
}

.f9t10-plan-progress-cell {
  min-width: 150px;
}

.f9t10-plan-progress-cell .f9t10-progress-bar {
  margin-bottom: 0.25rem;
}

.f9t10-plan-progress-cell .f9t10-progress-text {
  display: inline-block;
  font-size: 0.85rem;
  color: #666;
}

.f9t10-plan-action {
  text-align: center;
  white-space: nowrap;
}

.f9t10-plan-action .nb-button {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .f9t10-plans-table,
  .f9t10-plans-table thead,
  .f9t10-plans-table tbody,
  .f9t10-plans-table th,
  .f9t10-plans-table td,
  .f9t10-plans-table tr {
    display: block;
  }

  .f9t10-plans-table thead {
    display: none;
  }

  .f9t10-plans-table tr {
    margin-bottom: 1rem;
    border: 2px solid #000;
  }

  .f9t10-plans-table td {
    border: none;
    border-bottom: 1px solid #ddd;
    position: relative;
    padding-left: 40%;
    text-align: right;
  }

  .f9t10-plans-table td:last-child {
    border-bottom: none;
  }

  .f9t10-plans-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 35%;
    padding-left: 1rem;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.75rem;
  }

  .f9t10-plan-progress-cell {
    min-width: auto;
  }
}

/* =============================================
   PERSONA MULTI-OBJECT EDITOR
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600;700&family=Karla:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600;700&family=Karla:wght@400;700&display=swap');

.f9t10-persona-editor-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: #fafafa;
  border: 3px solid #000;
}

/* Persona Card */
.f9t10-persona-card-editable {
  background: #fff;
  border: 3px solid #000;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
}

.f9t10-persona-card-editable:hover {
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.15);
}

.f9t10-persona-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 3px solid #000;
  background: #f0f0f0;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
}

.f9t10-persona-card-title {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #000;
}

.f9t10-persona-actions {
  display: flex;
  gap: 0.5rem;
}

.f9t10-action-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid #000;
  background: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.1s ease;
  font-family: var(--font-body);
}

.f9t10-action-btn:hover {
  background: #000;
  color: #fff;
}

.f9t10-action-btn.f9t10-delete:hover {
  background: #ff0000;
  border-color: #ff0000;
  color: #fff;
}

.f9t10-action-btn:active {
  transform: scale(0.95);
}

/* Card Content */
.f9t10-persona-card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.f9t10-persona-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.f9t10-persona-field-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #000;
  display: block;
}

.f9t10-persona-field-input {
  padding: 0.5rem;
  border: 2px solid #000;
  font-family: 'Karla', sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  background: #fff;
  color: #000;
  resize: vertical;
  transition: all 0.1s ease;
}

.f9t10-persona-field-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #000;
  background: #fffef0;
}

.f9t10-persona-field-input::placeholder {
  color: #999;
  font-style: italic;
}

/* Add Persona Button */
.f9t10-add-persona-btn,
.f9t10-template-btn {
  padding: 0.85rem 1.25rem;
  border: 3px solid #000;
  background: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.1s ease;
  align-self: flex-start;
}

.f9t10-add-persona-btn {
  background: #000;
  color: #fff;
}

.f9t10-add-persona-btn:hover {
  background: #333;
  border-color: #333;
}

.f9t10-add-persona-btn:active {
  transform: translate(2px, 2px);
}

.f9t10-template-btn {
  background: #fff;
  color: #000;
  border-color: #000;
}

.f9t10-template-btn:hover {
  background: #f0f0f0;
  border-color: #000;
}

.f9t10-template-btn:active {
  transform: translate(1px, 1px);
}

.f9t10-btn-icon {
  margin-right: 0.5rem;
  font-size: 1.2rem;
  display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .f9t10-persona-editor-container {
    padding: 1rem;
    gap: 1rem;
  }

  .f9t10-persona-card-header {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .f9t10-persona-actions {
    align-self: flex-end;
    gap: 0.25rem;
  }

  .f9t10-action-btn {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .f9t10-persona-card-content {
    padding: 1rem;
    gap: 1rem;
  }

  .f9t10-persona-field-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* ================================================
   Tag List Editor Styles (Products, Competitors, Keywords, Topics)
   ================================================ */

.f9t10-tag-list-editor-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0;
}

.f9t10-tag-list-instructions {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #666;
  display: block;
  margin-bottom: 0.5rem;
}

.f9t10-tag-list-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.f9t10-tag-list-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #000;
  display: block;
}

.f9t10-tag-list-input {
  padding: 0.75rem;
  border: 2px solid #000;
  font-family: 'Karla', sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
  background: #fff;
  color: #000;
  resize: none;
  transition: all 0.1s ease;
}

.f9t10-tag-list-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #000;
  background: #fffef0;
}

.f9t10-tag-list-input::placeholder {
  color: #999;
  font-style: italic;
}

.f9t10-tag-list-input:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.f9t10-tag-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 2.5rem;
  padding: 0.75rem;
  border: 2px dashed #000;
  background: #fafafa;
}

.f9t10-tag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: #d5f0ff;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  color: #003d80;
  font-family: 'Karla', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  animation: slideIn 0.15s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.f9t10-tag-text {
  display: block;
  max-width: 200px;
  word-break: break-word;
  line-height: 1.3;
}

.f9t10-tag-delete {
  background: none;
  border: none;
  color: #003d80;
  opacity: 0.55;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.1s ease;
  flex-shrink: 0;
}

.f9t10-tag-delete:hover {
  color: #003d80;
  opacity: 1;
  transform: scale(1.15);
}

.f9t10-tag-delete:active {
  transform: scale(0.95);
}

.f9t10-tag-list-empty {
  margin: 0;
  color: #999;
  font-style: italic;
  font-size: 0.9rem;
  flex: 1;
  display: flex;
  align-items: center;
}

/* Responsive Tag Design */
@media (max-width: 768px) {
  .f9t10-tag-item {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }

  .f9t10-tag-text {
    max-width: 120px;
  }

  .f9t10-tag-list-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* =============================================
   ARTICLES PAGE - Card Grid Layout
   ============================================= */

.f9t10-articles {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1rem;
  padding: 0;
  width: 100%;
}

/* Sidebar Filters */
.f9t10-articles-sidebar {
  background-color: #fff;
  border: 2px solid #000;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 1rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.f9t10-articles-sidebar-header {
  border-bottom: 2px solid #000;
  padding-bottom: 1rem;
  margin-bottom: 0.5rem;
}

.f9t10-articles-count-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666;
}

.f9t10-articles-count-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  display: block;
  line-height: 1;
  margin-bottom: 0.2rem;
}

/* Filter Groups */
.f9t10-articles-filters-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.f9t10-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666;
  display: block;
}

.f9t10-filter-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #000;
  font-size: 0.9rem;
  background-color: #fff;
  color: #000;
}

.f9t10-filter-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #000;
  background-color: #fffef0;
}

/* Date Filter Compact */
.f9t10-date-filters-compact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.f9t10-date-input {
  padding: 0.75rem;
  border: 2px solid #000;
  font-size: 0.9rem;
  background-color: #fff;
  color: #000;
}

.f9t10-date-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #000;
  background-color: #fffef0;
}

/* Date Preset Buttons */
.f9t10-date-presets {
  display: flex;
  gap: 0.5rem;
}

.f9t10-preset-btn {
  flex: 1;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.75rem !important;
  height: auto !important;
  min-height: 36px !important;
}

/* Reset Filters Button */
.f9t10-reset-filters {
  padding: 0.75rem 1rem;
  border: 2px solid #000;
  background-color: #f5f5f5;
  color: #000;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.f9t10-reset-filters:hover {
  background-color: #e8e8e8;
  border-color: #000;
}

.f9t10-reset-filters:active {
  transform: translate(1px, 1px);
}

/* Main Content Area */
.f9t10-articles-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.f9t10-articles-list {
  width: 100%;
  margin: 0;
  padding-top: 0;
}


/* Responsive - Tablet */
@media (max-width: 1024px) {
  .f9t10-articles {
    grid-template-columns: 1fr 240px;
    gap: 1.5rem;
  }

  .f9t10-articles-sidebar {
    padding: 1rem;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .f9t10-articles {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .f9t10-articles-sidebar {
    position: relative;
    top: auto;
    padding: 1rem;
    border: 2px solid #000;
    margin-bottom: 1rem;
  }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
  .f9t10-articles-sidebar {
    padding: 1rem;
  }

  .f9t10-filter-input,
  .f9t10-date-input {
    padding: 0.65rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* =============================================
   EDITORIAL STATUS BADGES
   ============================================= */

.f9t10-editorial-status-badge {
  border: 2px solid #000;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75em;
  padding: 0.2em 0.6em;
  display: inline-block;
  margin-left: 0.5em;
  vertical-align: middle;
}

.f9t10-editorial-status-badge .badge-text {
  margin: 0;
  line-height: 1;
}

.f9t10-editorial-status-planned {
  background-color: #e0e0e0;
  color: #333;
}

.f9t10-editorial-status-generated {
  background-color: #cfe8ff;
  color: #003d80;
}

.f9t10-editorial-status-reviewed {
  background-color: #fff3cd;
  color: #7a5c00;
}

.f9t10-editorial-status-approved {
  background-color: #d4edda;
  color: #155724;
}

.f9t10-editorial-status-published {
  background-color: #28a745;
  color: #fff;
}

.f9t10-editorial-status-editor-rejected {
  background-color: #ffe5d0;
  color: #7a3200;
}

.f9t10-editorial-status-client-rejected {
  background-color: #fde8e8;
  color: #7a0000;
}

/* Editorial status control in sidebar */
.f9t10-editorial-status-control {
  margin-bottom: 1em;
}

/* Sidebar "+" add buttons */
.f9t10-sidebar-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: auto; /* push to the rightmost of the section label row */
  border: 2px solid #000;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

/* Override nav-level styles (.f9t10-sidebar-nav a has specificity 0,1,1 — this wins at 0,2,0) */
.f9t10-sidebar-nav .f9t10-sidebar-add-btn,
.f9t10-sidebar-nav .f9t10-sidebar-add-btn:hover {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  border: 2px solid #000;
  border-left: 2px solid #000;
  font-size: 14px;
  flex-shrink: 0;
}

.f9t10-sidebar-add-btn:hover {
  background: #000;
  color: #fff;
  text-decoration: none;
}

/* Sidebar action variant — green with hard shadow & press effect */
.f9t10-sidebar-action {
  background: var(--f9-green);
  box-shadow: 2px 2px 0 #000;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s, color 0.15s;
}

.f9t10-sidebar-action:hover,
.f9t10-sidebar-nav .f9t10-sidebar-action:hover {
  background: var(--f9-green-hover);
  color: #000;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}

.f9t10-sidebar-action:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Single client name display */
.f9t10-client-name-single {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 4px 0;
  color: #333;
}

/* Danger Zone card */
.f9t10-danger-zone {
  margin-top: 3rem;
  border: 3px solid #e74c3c;
  background: linear-gradient(135deg, #fff5f5 0%, #fee8e8 100%);
}

.f9t10-danger-zone .f9t10-ai-card-title {
  color: #e74c3c;
}

.f9t10-danger-zone .f9t10-ai-fill-body p {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
}

/* AI card titles — uppercase */
.f9t10-ai-card-title {
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Hide ACF unique_id columns in repeater tables (header + cells) */
.acf-th[data-type="unique_id"],
.acf-field-unique-id,
td.acf-field[data-type="unique_id"] {
	display: none !important;
}

/* Hide link_localization and articles_regenerate columns in localizations repeater */
.acf-th[data-name="link_localization"],
.acf-field[data-name="link_localization"],
.acf-th[data-name="articles_regenerate"],
.acf-field[data-name="articles_regenerate"] {
	display: none !important;
}

/* Fix column widths in localizations repeater after hiding columns */
.acf-field[data-name="localizations"] > .acf-input > .acf-repeater > table > thead > tr > .acf-th {
	width: auto !important;
}

/* =============================================
   AUTH PAGES (Login, Password Recovery, Register)
   ============================================= */

.f9t10-auth-page {
  margin: 0;
  padding: 0;
  background-color: #F2F9FF;
  font-family: var(--font-body);
  min-height: 100vh;
}

.f9t10-auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.f9t10-auth-card {
  background: #fff;
  border: 3px solid #000;
  box-shadow: 8px 8px 0 #000;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
}

/* Logo */
.f9t10-auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.f9t10-logo-svg {
  width: 200px;
  height: 48px;
  display: inline-block;
}

.f9t10-auth-subtitle {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #666;
  margin-top: 0.5rem;
}

/* Messages */
.f9t10-auth-message {
  padding: 1rem;
  border: 2px solid #000;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.f9t10-auth-message strong {
  display: block;
  margin-bottom: 0.25rem;
}

.f9t10-auth-message p {
  margin: 0.5rem 0 0 0;
}

.f9t10-auth-message-error {
  background-color: #fde8e8;
  border-color: #e74c3c;
  color: #7a0000;
}

.f9t10-auth-message-success {
  background-color: #d4edda;
  border-color: #2ecc71;
  color: #155724;
}

.f9t10-auth-message-info {
  background-color: #e3f2fd;
  border-color: #2196F3;
  color: #003d80;
}

/* Description text */
.f9t10-auth-description {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

/* Form */
.f9t10-auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.f9t10-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.f9t10-auth-field label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000;
}

.f9t10-auth-field input {
  padding: 0.85rem;
  border: 2px solid #000;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #000;
  transition: all 0.15s ease;
}

.f9t10-auth-field input:focus {
  outline: none;
  box-shadow: 4px 4px 0 #000;
  background: #fffef0;
}

/* Options row */
.f9t10-auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.f9t10-auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #333;
}

.f9t10-auth-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid #000;
  cursor: pointer;
  accent-color: #000;
}

/* Submit button */
.f9t10-auth-submit {
  padding: 1rem;
  border: 3px solid #000;
  background: #000;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.f9t10-auth-submit:hover {
  background: #333;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  transform: translate(2px, 2px);
}

.f9t10-auth-submit:active {
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
  transform: translate(4px, 4px);
}

/* Hint text */
.f9t10-auth-hint {
  font-size: 0.8rem;
  color: #666;
  margin: -0.5rem 0 0 0;
}

/* Links */
.f9t10-auth-links {
  text-align: center;
  margin-top: 1.5rem;
}

.f9t10-auth-links a {
  color: #000;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid #000;
  padding-bottom: 1px;
  transition: all 0.15s ease;
}

.f9t10-auth-links a:hover {
  background-color: #F2F9FF;
  padding: 2px 4px;
}

/* Register section */
.f9t10-auth-register {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #000;
}

.f9t10-auth-register p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

.f9t10-auth-register a {
  color: #000;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid #000;
}

.f9t10-auth-register a:hover {
  background-color: #F2F9FF;
}

/* Footer */
.f9t10-auth-footer {
  margin-top: 2rem;
  text-align: center;
}

.f9t10-auth-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: #999;
}

/* =============================================
   FIRST PROJECT CTA (sidebar)
   ============================================= */

.f9t10-first-project-cta {
  list-style: none;
  padding: 0.5rem 1rem;
}

.f9t10-first-project-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border: 2px dashed #000;
  background: #fffef0;
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

.f9t10-first-project-link:hover {
  background: #000;
  color: #fff;
  border-style: solid;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
}

.f9t10-first-project-link:hover .f9t10-first-project-icon {
  background: #fff;
  color: #000;
}

.f9t10-first-project-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 2px solid currentColor;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  transition: all 0.15s ease;
}

.f9t10-first-project-text {
  line-height: 1.3;
}

/* Hide CTA when sidebar is collapsed */
body.sidebar-collapsed .f9t10-first-project-cta {
  display: none;
}

/* Show CTA on mobile even if sidebar is collapsed */
@media (max-width: 768px) {
  body.sidebar-collapsed .f9t10-first-project-cta {
    display: revert;
  }
}

/* Auth page responsive */
@media (max-width: 480px) {
  .f9t10-auth-card {
    padding: 1.5rem;
    box-shadow: 6px 6px 0 #000;
  }

  .f9t10-auth-field input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Public pages (unauthenticated, no sidebar) */
.f9t10-portal-wrapper--public .f9t10-portal-main-area {
  margin-left: 0;
}

.f9t10-portal-wrapper--public .f9t10-portal-container {
  padding: 2rem 20%;
}

@media (max-width: 1200px) {
  .f9t10-portal-wrapper--public .f9t10-portal-container {
    padding: 2rem 5%;
  }
}

@media (max-width: 768px) {
  .f9t10-portal-wrapper--public .f9t10-portal-container {
    padding: 1.5rem 1rem;
  }
}

/* =============================================
   HEALTH CHECKS - Field List
   ============================================= */

.f9t10-hc-field-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.f9t10-hc-field-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

.f9t10-hc-field-list li:last-child {
  border-bottom: none;
}

.f9t10-hc-field-list .hc-icon-ok {
  color: #2ecc71;
  font-weight: 700;
  font-size: 1rem;
}

.f9t10-hc-field-list .hc-icon-miss {
  color: #e74c3c;
  font-weight: 700;
  font-size: 1rem;
}

/* =============================================
   HEALTH CHECKS - Project Completeness Table
   ============================================= */

.f9t10-hc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.f9t10-hc-table th,
.f9t10-hc-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #000;
  text-align: left;
  vertical-align: top;
}

.f9t10-hc-table th {
  font-weight: 700;
  background: #f5f5f5;
  border-bottom: 2px solid #000;
}

.f9t10-hc-table tr:last-child td {
  border-bottom: none;
}

.f9t10-hc-empty-fields {
  font-size: 0.8rem;
  color: #666;
}

.f9t10-hc-row-critical {
  background-color: #fff5f5;
}

.f9t10-hc-row-critical td {
  border-bottom-color: #fcc;
}

/* Article detail — "Not set" date indicator (Generation / Publish dates) */
.f9t10-date-not-set {
  color: #c0392b;
  font-style: italic;
  background: #fff5f5;
  padding: 0 0.4rem;
  border-radius: 4px;
  border: 1px dashed #e74c3c;
}

/* Copy-to-clipboard feedback — the button flashes green while "Copied!" shows.
   Was inline in article-detail.php; shared now that project-detail uses it too. */
.f9t10-copy-btn.copied { background: #2e7d32 !important; color: #fff !important; border-color: #2e7d32 !important; }

/* ═══════════════════════════════════════════════════════════════════
   Centro Configurazione — il blocco fisso della Panoramica.
   Da design_handoff_centro_configurazione/configurazione-guidata.css:
   stessi valori, classi portate nella convenzione del plugin (f9t10-).
   Le variabili sono quelle di design-tokens.css, non literal.
   ═══════════════════════════════════════════════════════════════════ */

.f9t10-cfg {
  background: var(--surface, #fff);
  border: var(--bw-3-5, 3.5px) solid var(--border, #000);
  box-shadow: var(--sh-xl, 8px 8px 0 #000);
  border-radius: 0;
  margin-bottom: var(--sp-6, 1.5rem);
}

/* ---------- header ---------- */
.f9t10-cfg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4, 1rem);
  padding: 16px 20px;
  background: #f0f0f0;
  border-bottom: var(--bw-2, 2.5px) solid var(--border, #000);
}
.f9t10-cfg__title {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: var(--fs-12, .75rem);
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--fg1, #000);
}
.f9t10-cfg__hint { font-size: var(--fs-13, .8125rem); color: var(--fg3, #666); }

/* progress (solo stato A) */
.f9t10-cfg__progress { display: flex; align-items: center; gap: 12px; }
.f9t10-cfg__progress-label { font-size: var(--fs-13, .8125rem); font-weight: 600; color: var(--fg2, #333); }
.f9t10-cfg__bar { width: 120px; height: 12px; border: 2px solid var(--border, #000); background: #fff; }
.f9t10-cfg__bar > span { display: block; height: 100%; background: var(--f9-blue, #0077b6); }

/* ---------- griglia step ---------- */
.f9t10-cfg__steps { display: grid; grid-template-columns: repeat(3, 1fr); }
.f9t10-cfg__step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px;
  border-right: 2px solid var(--border-muted, #e0e0e0);
}
.f9t10-cfg__step:last-child { border-right: 0; }

.f9t10-cfg__step--todo    { background: var(--surface-input-focus, #fffef0); }
.f9t10-cfg__step--warning { background: #fff5f0; }

.f9t10-cfg__step-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.f9t10-cfg__index {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: var(--fs-12, .75rem);
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--fg3, #666);
}
.f9t10-cfg__step-name {
  font-family: var(--font-display, "Lexend Mega", sans-serif);
  font-weight: 900;
  font-size: var(--fs-15, .9375rem);
  text-transform: uppercase;
  line-height: 1.3;
}
.f9t10-cfg__step-desc { margin: 0; font-size: var(--fs-14, .875rem); color: var(--fg3, #666); text-wrap: pretty; }
.f9t10-cfg__actions { margin-top: auto; padding-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }

/* step bloccato */
.f9t10-cfg__step--locked .f9t10-cfg__index,
.f9t10-cfg__step--locked .f9t10-cfg__step-name,
.f9t10-cfg__step--locked .f9t10-cfg__step-desc { color: var(--fg4, #999); }

/* ---------- badge ---------- */
.f9t10-cfg__badge {
  border: 2px solid var(--border, #000);
  border-radius: var(--r-pill, 50px);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.f9t10-cfg__badge--done    { background: var(--status-approved-bg, #d4edda);  color: var(--status-approved-fg, #155724); }
.f9t10-cfg__badge--info    { background: var(--status-generated-bg, #cfe8ff); color: var(--status-generated-fg, #003d80); }
.f9t10-cfg__badge--warning { background: var(--f9-orange, #ff5733);           color: #fff; }
.f9t10-cfg__badge--locked  { background: var(--border-muted, #e0e0e0); color: var(--fg2, #333); border-color: var(--fg4, #999); }

/* ---------- pulsanti ---------- */
.f9t10-cfg__btn {
  font-family: var(--font-display, "Lexend Mega", sans-serif);
  font-weight: 900;
  font-size: var(--fs-12, .75rem);
  text-transform: uppercase;
  background: #fff;
  color: var(--fg1, #000);
  border: var(--bw-2, 2.5px) solid var(--border, #000);
  box-shadow: var(--sh-md, 4px 4px 0 #000);
  border-radius: 0;
  padding: 10px 14px;
  cursor: pointer;
  transition: all var(--t-base, .15s) var(--ease-brutal, cubic-bezier(.77, 0, .18, 1));
}
.f9t10-cfg__btn:hover  { box-shadow: var(--sh-hover, 2px 2px 0 #000); transform: translate(2px, 2px); }
.f9t10-cfg__btn:active { box-shadow: none; transform: translate(4px, 4px); }

.f9t10-cfg__btn--primary { background: var(--f9-blue, #0077b6); color: #fff; }
.f9t10-cfg__btn--warning { background: var(--f9-orange, #ff5733); color: #fff; }

.f9t10-cfg__btn[disabled],
.f9t10-cfg__btn[disabled]:hover {
  background: var(--border-muted, #e0e0e0);
  color: var(--fg4, #999);
  border-color: var(--fg4, #999);
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* ---------- stato C: righe compatte ---------- */
.f9t10-cfg--calm .f9t10-cfg__step { flex-direction: row; align-items: center; gap: 14px; padding: 18px 20px; }
.f9t10-cfg--calm .f9t10-cfg__step-body { flex: 1; min-width: 0; }
.f9t10-cfg--calm .f9t10-cfg__step-name { font-size: var(--fs-13, .8125rem); }
.f9t10-cfg--calm .f9t10-cfg__step-meta { font-size: var(--fs-13, .8125rem); color: var(--fg3, #666); }
.f9t10-cfg--calm .f9t10-cfg__actions { margin-top: 0; padding-top: 0; }
.f9t10-cfg--calm .f9t10-cfg__btn { font-size: 11px; padding: 8px 12px; }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  .f9t10-cfg { border-width: var(--bw-1, 2px); box-shadow: var(--sh-lg, 5px 5px 0 #000); }
  .f9t10-cfg__steps { grid-template-columns: 1fr; }
  .f9t10-cfg__step { border-right: 0; border-bottom: 2px solid var(--border-muted, #e0e0e0); }
  .f9t10-cfg__step:last-child { border-bottom: 0; }
  .f9t10-cfg--calm .f9t10-cfg__step { flex-direction: column; align-items: flex-start; }
  .f9t10-cfg__head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Anteprima del piano nell'ultimo passo del wizard PED: i primi titoli, per
   rispondere a «cosa mi ha scritto?» senza dover aprire il piano. */
.f9t10-onb-plan-preview { margin: .9rem 0 1.2rem; padding: 0 0 0 1.1rem; list-style: disc; display: flex; flex-direction: column; gap: .35rem; }
.f9t10-onb-plan-preview li { font-size: var(--fs-14, .875rem); color: var(--fg2, #333); line-height: 1.45; }
.f9t10-onb-plan-preview .f9t10-onb-plan-more { list-style: none; margin-left: -1.1rem; color: var(--fg3, #666); font-style: italic; }
.f9t10-onb-plan-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--status-generated-bg, #cfe8ff); color: var(--status-generated-fg, #003d80); border: 1px solid var(--border, #000); border-radius: var(--r-pill, 50px); padding: 1px 7px; }

/* Passo 1 del wizard PED: per cosa verranno prodotti i contenuti. */
.f9t10-onb-plan-targets { margin: 0 0 1rem; font-size: var(--fs-14, .875rem); color: var(--fg2, #333); line-height: 1.5; }
.f9t10-onb-plan-targets.is-empty { color: #b26a00; font-weight: 600; }
.f9t10-onb-plan-targets-list { margin: -.6rem 0 1.1rem 1.1rem; padding: 0; list-style: disc; display: flex; flex-direction: column; gap: .25rem; font-size: var(--fs-14, .875rem); color: var(--fg2, #333); }
