         /* =====================================
           RESET E LAYOUT BASE
           ===================================== */
         * { margin: 0; padding: 0; box-sizing: border-box; }
  
         body:not(.configure-dashboard-mode) { 
           font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
           background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
           min-height: 100vh;
           color: #333;
           padding: 20px;
         }
  
         body:not(.configure-dashboard-mode) .container {
           width: min(1400px, calc(100vw - 48px));
           max-width: 1400px;
           margin: 0 auto; 
           background: rgba(255, 255, 255, 0.95);
           backdrop-filter: blur(10px);
           border-radius: 20px;
           overflow: hidden;
           box-shadow: 0 20px 50px rgba(0,0,0,0.3);
         }
  
         /* =====================================
           HEADER
           ===================================== */
         body:not(.configure-dashboard-mode) .header {
           background: linear-gradient(45deg, #FF6B35, #F7931E);
           color: white;
           padding: 30px;
           text-align: center;
         }
  
         body:not(.configure-dashboard-mode) .header h1 {
           font-size: 2.2rem;
           margin-bottom: 10px;
           font-weight: 300;
         }
  
         /* =====================================
           LANGUAGE SWITCHER
           ===================================== */
         body:not(.configure-dashboard-mode) .language-switcher {
           position: fixed;
           top: 20px;
           right: 20px;
           background: rgba(255, 255, 255, 0.9);
           border-radius: 8px;
           padding: 8px;
           box-shadow: 0 4px 12px rgba(0,0,0,0.1);
           z-index: 1000;
         }
  
         body:not(.configure-dashboard-mode) .language-switcher select {
           border: none;
           background: transparent;
           font-weight: 600;
           cursor: pointer;
         }
  
         /* =====================================
           FORM SECTIONS E INPUTS
           ===================================== */
         body:not(.configure-dashboard-mode) .config-form {
           padding: 40px 48px 24px;
         }
  
         .form-group {
           margin-bottom: 30px;
         }
  
         .form-group label {
           display: block;
           font-weight: 600;
           margin-bottom: 8px;
           color: #2c3e50;
           font-size: 1.1rem;
         }
  
         .form-control {
           width: 100%;
           padding: 12px 15px;
           border: 2px solid #e9ecef;
           border-radius: 10px;
           font-size: 1rem;
           transition: border-color 0.3s ease;
         }
  
         .form-control:focus {
           outline: none;
           border-color: var(--configure-accent, #667eea);
           box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
         }
  
         /* =====================================
           FIELD STATES
           ===================================== */
         .checking-field {
           border-color: #ffc107 !important;
           background-color: #fff8e1 !important;
           transition: all 0.3s ease;
         }
  
         .valid-field {
           border-color: #28a745 !important;
           background-color: #f8fff9 !important;
           transition: all 0.3s ease;
         }
  
         .required-field {
           border-color: #dc3545 !important;
           background-color: #fff5f5 !important;
           transition: all 0.3s ease;
         }
  
         /* =====================================
           PLATFORMS GRID (SELEZIONE)
           ===================================== */
         .source-panel {
           border: 1px solid #e5e7eb;
           border-radius: 14px;
           background: linear-gradient(180deg, rgba(248, 249, 250, 0.92), rgba(255, 255, 255, 0.98));
           overflow: hidden;
           margin-top: 14px;
         }

         .source-panel-toggle {
           width: 100%;
           display: flex;
           align-items: center;
           justify-content: space-between;
           gap: 16px;
           border: none;
           background: transparent;
           padding: 16px 18px;
           text-align: left;
           cursor: pointer;
         }

         .source-panel-toggle-main {
           min-width: 0;
           flex: 1;
         }

         .source-panel-toggle-side {
           display: flex;
           align-items: center;
           gap: 10px;
           flex-shrink: 0;
         }

         .source-inline-genres {
           display: inline-flex;
           align-items: center;
           gap: 6px;
           flex-wrap: wrap;
           justify-content: flex-end;
         }

         .source-inline-genre-tag {
           display: inline-flex;
           align-items: center;
           padding: 5px 9px;
           border-radius: 999px;
           background: #edf4fb;
           color: #23415f;
           font-size: 0.77rem;
           font-weight: 700;
           line-height: 1;
           white-space: nowrap;
           text-transform: none;
         }

         .source-panel-count {
           min-width: 28px;
           height: 28px;
           padding: 0 10px;
           border-radius: 999px;
           background: #eef1f4;
           color: #243447;
           font-size: 0.85rem;
           font-weight: 700;
           display: inline-flex;
           align-items: center;
           justify-content: center;
         }

         .source-panel-title {
           font-size: 1rem;
           font-weight: 700;
           color: #243447;
         }

         .source-panel-title.has-logo {
           display: flex;
           align-items: center;
           gap: 9px;
         }

         .source-panel-logo {
           height: 22px;
           width: auto;
           flex-shrink: 0;
           display: block;
         }

         .source-panel-description {
           margin-top: 4px;
           font-size: 0.84rem;
           color: #5f6b76;
         }

         .source-panel-icon {
           font-size: 1.45rem;
           font-weight: 700;
           line-height: 1;
           color: #5f6b76;
           flex-shrink: 0;
         }

         .source-panel-content {
           padding: 0 18px 18px;
           border-top: 1px solid #eef1f4;
         }

         .platforms-grid {
           display: grid;
           grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
           gap: 18px;
           margin-top: 15px;
         }

         .source-lists-grid {
           display: flex;
           flex-direction: column;
           gap: 16px;
           margin-top: 4px;
         }

         .source-list-section-title {
           margin-bottom: 10px;
           font-size: 0.88rem;
           font-weight: 700;
           color: #5b6570;
           text-transform: uppercase;
           letter-spacing: 0.4px;
         }

         .source-lists-grid-inner {
           display: grid;
           grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
           gap: 18px;
         }

         .source-list-card {
           display: flex;
           align-items: flex-start;
           gap: 12px;
           padding: 14px;
           border: 2px solid #e5e7eb;
           border-radius: 12px;
           background: #fff;
           cursor: pointer;
           transition: all 0.2s ease;
         }

         .source-list-card:hover {
           border-color: #b31717;
           box-shadow: 0 6px 18px rgba(179, 23, 23, 0.12);
         }

         .source-list-card.selected {
           border-color: #b31717;
           background: rgba(179, 23, 23, 0.06);
         }

         .source-list-card input[type="checkbox"] {
           margin-top: 2px;
           accent-color: #b31717;
           width: 18px;
           height: 18px;
           cursor: pointer;
           flex-shrink: 0;
         }

         .source-list-icon {
           font-size: 1.4rem;
           line-height: 1;
         }

         .source-list-content {
           min-width: 0;
         }

         .source-list-title {
           font-weight: 700;
           color: #243447;
         }

         .source-list-subtitle {
           margin-top: 4px;
           font-size: 0.8rem;
           color: #6b7280;
         }

         .source-empty-state {
           padding: 18px;
           border: 1px dashed #d1d5db;
           border-radius: 12px;
           background: #fff;
           color: #6b7280;
         }
  
         .platform-card {
           background: #f8f9fa;
           border: 2px solid transparent;
           border-radius: 12px;
           padding: 15px;
           cursor: pointer;
           transition: all 0.3s ease;
           text-align: center;
           position: relative;
         }
  
         .platform-card.unified {
           --platform-color: #667eea;
           --platform-color-rgb: 102, 126, 234;
         }
  
         .platform-card.separate {
           --platform-color: #6f42c1;
           --platform-color-rgb: 111, 66, 193;
         }
  
         .platform-card:hover {
           border-color: var(--platform-color);
           transform: translateY(-2px);
           box-shadow: 0 5px 15px rgba(var(--platform-color-rgb), 0.2);
         }
  
         .platform-card.selected {
           border-color: var(--platform-color);
           background: rgba(var(--platform-color-rgb), 0.1);
         }
  
         .platform-card.unified {
           border-left: 4px solid #667eea;
           background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
         }
  
         .platform-card.separate {
           border-left: 4px solid #6f42c1;
           background: linear-gradient(135deg, rgba(111, 66, 193, 0.05), rgba(103, 58, 183, 0.05));
         }

         .platform-card.popular-global {
           --platform-color: #4ce4cc;
           --platform-color-rgb: 76, 228, 204;
           border-left: 4px solid #4ce4cc;
           background: linear-gradient(135deg, rgba(76, 228, 204, 0.05), rgba(76, 228, 204, 0.08));
         }

         .platform-card.popular-global:hover {
           border-color: #4ce4cc;
           transform: translateY(-2px);
           box-shadow: 0 5px 15px rgba(76, 228, 204, 0.2);
         }

         .platform-card.popular-global.selected {
           border-color: #4ce4cc;
           background: rgba(76, 228, 204, 0.1);
         }

         .card-header-clickable {
           cursor: pointer;
           padding-bottom: 4px;
         }

         .card-header-clickable:hover .platform-emoji {
           transform: scale(1.1);
           display: inline-block;
           transition: transform 0.15s;
         }

         .card-list-toggles {
           display: flex;
           flex-wrap: wrap;
           gap: 4px 8px;
           margin-top: 8px;
           justify-content: center;
           cursor: default;
         }

         .card-list-toggle {
           display: inline-flex;
           align-items: center;
           gap: 6px;
           font-size: 0.82rem;
           font-weight: 600;
           color: #444;
           cursor: pointer;
           padding: 5px 9px;
           border-radius: 10px;
           background: rgba(255,255,255,0.6);
           border: 1px solid rgba(0,0,0,0.1);
           transition: background 0.15s;
           user-select: none;
           white-space: nowrap;
         }

         .card-list-toggle:hover {
           background: rgba(255,255,255,0.9);
         }

         .card-list-toggle.disabled {
           opacity: 0.4;
           cursor: not-allowed;
         }

         .card-list-toggle input[type="checkbox"] {
           margin: 0;
           cursor: pointer;
           accent-color: var(--platform-color, #6f42c1);
           width: 16px;
           height: 16px;
           flex-shrink: 0;
         }

         .platform-card.selected .card-list-toggle {
           background: rgba(255,255,255,0.4);
         }

         .platform-toggles.dynamic-lists {
           display: flex;
           flex-wrap: wrap;
           gap: 6px 12px;
           align-items: center;
         }

         .platform-emoji {
           font-size: 2rem;
           margin-bottom: 8px;
           display: block;
         }
  
         .platform-name {
           font-weight: 600;
           color: #2c3e50;
         }
  
         .platform-country {
           font-size: 0.7rem;
           color: #666;
           margin-top: 2px;
         }
  
         .platform-type-help {
           font-size: 0.7rem;
           color: #666;
           margin-top: 5px;
           text-align: center;
           line-height: 1.2;
         }
  
         /* =====================================
           CARD BADGES
           ===================================== */
         .card-badge {
           position: absolute;
           top: 8px;
           right: 8px;
           padding: 4px 8px;
           border-radius: 12px;
           font-size: 0.7rem;
           font-weight: bold;
           text-transform: uppercase;
           letter-spacing: 0.5px;
         }

         .card-unified-badge {
           background: linear-gradient(45deg, #667eea, #764ba2);
           color: white;
         }
  
         .card-separate-badge {
           background: linear-gradient(45deg, #6f42c1, #673ab7);
           color: white;
         }
  
         /* =====================================
           SELECTED PLATFORMS SECTION
           ===================================== */
         .selected-platforms-section {
           background: #f8f9fa;
           border-radius: 10px;
           padding: 20px;
           margin-top: 20px;
           border-left: 4px solid var(--configure-accent, #667eea);
         }

         .selected-platforms-list {
           min-height: 76px;
           background: transparent;
           border: none;
           border-radius: 0;
           padding: 4px 0;
           margin-top: 15px;
           transition: all 0.3s ease;
         }

         .source-selection-group + .source-selection-group {
           margin-top: 16px;
           padding-top: 16px;
           border-top: 1px solid #eef1f4;
         }

         .source-selection-header {
           margin-bottom: 10px;
         }

         .source-selection-title {
           font-size: 0.95rem;
           font-weight: 700;
           color: #243447;
         }

         .source-selection-subtitle {
           margin-top: 2px;
           font-size: 0.8rem;
           color: #697784;
         }
  
         .selected-platforms-list.drag-over {
           background: transparent;
         }
  
         .selected-platforms-list.empty {
           display: flex;
           align-items: center;
           justify-content: center;
           color: #6c757d;
           font-style: italic;
           min-height: 92px;
         }

         /* =====================================
           SELECTED PLATFORM ITEMS (LAYOUT PRINCIPALE)
           ===================================== */
         .selected-platform-item {
           display: grid;
           grid-template-columns: minmax(0, 1fr) auto;
           align-items: center;
           gap: 12px;
           background: white;
           border: 2px solid color-mix(in srgb, var(--group-color, #d7deea) 18%, transparent);
           border-radius: 12px;
           padding: 12px 84px 12px 38px;
           margin: 8px 0;
           transition: all 0.2s ease;
           box-sizing: border-box;
           min-height: 72px;
           position: relative;
           box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
           overflow: visible;
         }

         .selected-platform-item::before {
           content: "";
           position: absolute;
           top: 0;
           bottom: 0;
           left: 0;
           width: 28px;
           border-radius: 12px 0 0 12px;
           background: var(--group-color, #d7deea);
         }

         .selected-platform-position {
           position: absolute;
           z-index: 2;
           top: 0;
           bottom: 0;
           left: 0;
           width: 28px;
           display: flex;
           align-items: center;
           justify-content: center;
           color: white;
           font-size: 14px;
           font-weight: 800;
           text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
           pointer-events: none;
         }

         .selected-platform-item.active {
           border-left-width: 0;
         }
  
         .selected-platform-item:hover {
           border-color: var(--group-color, #667eea);
           background: #fff;
           box-shadow: 0 6px 15px rgba(15, 23, 42, 0.1);
           transform: translateY(-1px);
           z-index: 5;
         }
  
         /* DRAG STATE */
         .selected-platform-item.dragging {
           opacity: 0.55;
           transform: rotate(2deg) scale(0.98);
           box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
         }

         .selected-platform-item.drop-target-before,
         .selected-platform-item.drop-target-after {
           overflow: visible;
         }

         .selected-platform-item.drop-target-before::after,
         .selected-platform-item.drop-target-after::after {
           content: "";
           position: absolute;
           left: 14px;
           right: 14px;
           height: 4px;
           border-radius: 999px;
           background: linear-gradient(90deg, var(--group-color, #667eea), color-mix(in srgb, var(--group-color, #667eea) 50%, white));
           box-shadow: 0 0 0 4px color-mix(in srgb, var(--group-color, #667eea) 18%, transparent);
           z-index: 4;
         }

         .selected-platform-item.drop-target-before::after {
           top: -8px;
         }

         .selected-platform-item.drop-target-after::after {
           bottom: -8px;
         }
  
         /* =====================================
           ELEMENTI DELLA PLATFORM ITEM
           ===================================== */
         .platform-drag-handle {
           color: #9aa0a6;
           font-size: 1.9rem;
           line-height: 1;
           user-select: none;
           pointer-events: none;
         }

         .selected-platform-drag-handle {
           position: absolute;
           top: 50%;
           right: 66px;
           transform: translateY(-50%);
           z-index: 2;
         }

         .platform-mobile-order-controls {
           grid-column: 2;
           display: none;
           flex-direction: column;
           gap: 5px;
           flex-shrink: 0;
           justify-self: end;
         }

         .platform-order-btn {
           background: #667eea;
           color: white;
           border: none;
           border-radius: 4px;
           padding: 4px 8px;
           font-size: 18px;
           cursor: pointer;
           line-height: 1;
           transition: background 0.2s ease;
         }

         .platform-order-btn:hover:not(:disabled) {
           background: #5568d3;
         }

         .platform-order-btn:disabled {
           background: #ccc;
           cursor: not-allowed;
         }

         .selected-platform-info {
           grid-column: 1;
           display: flex;
           align-items: center;
           gap: 12px;
           min-width: 0;
           justify-self: stretch;
           text-align: left;
         }
  
         .selected-platform-emoji {
           width: 42px;
           height: 42px;
           display: inline-flex;
           align-items: center;
           justify-content: center;
           border-radius: 12px;
           border: 1px solid color-mix(in srgb, var(--group-color, #d7deea) 28%, transparent);
           background: color-mix(in srgb, var(--group-color, #d7deea) 10%, white);
           font-size: 1.35rem;
           flex-shrink: 0;
         }
  
         .selected-platform-details {
           flex: 1;
           min-width: 0;
           text-align: left;
         }
  
         .selected-platform-source {
           font-size: 11px;
           color: var(--group-color, #667eea);
           font-weight: 700;
           margin-bottom: 6px;
           display: block;
           text-transform: uppercase;
           letter-spacing: 0.04em;
           text-align: left;
         }

         .selected-platform-name-row {
           display: flex;
           align-items: baseline;
           gap: 8px;
           min-width: 0;
           justify-content: flex-start;
           text-align: left;
         }

         .selected-platform-name {
           font-weight: 600;
           color: #333;
           font-size: 15px;
           min-width: 0;
           flex: 0 1 auto;
           text-align: left;
         }

         .selected-platform-type {
           font-size: 12px;
           color: #777;
           line-height: 1.4;
           white-space: nowrap;
           text-align: left;
         }
  
         .platform-remove-btn {
           position: absolute;
           top: 50%;
           right: 12px;
           transform: translateY(-50%);
           background: #fff5f5;
           color: #b42318;
           border: 1px solid #fecaca;
           border-radius: 10px;
           width: 36px;
           height: 36px;
           padding: 0;
           display: flex;
           align-items: center;
           justify-content: center;
            cursor: pointer;
           font-size: 1.1rem;
           line-height: 1;
           white-space: nowrap;
           transition: all 0.2s ease;
           flex-shrink: 0;
          }
  
         .platform-remove-btn:hover {
           background: #fee2e2;
           border-color: #fca5a5;
           transform: translateY(calc(-50% - 1px));
         }
  
         /* =====================================
           TOGGLES PER PIATTAFORME SEPARATE
           ===================================== */
         .platform-toggles {
           grid-area: toggles;
           display: flex;
           align-items: center;
           gap: 12px;
           justify-self: center;
         }
  
         .toggle-group {
           display: flex;
           align-items: center;
           gap: 8px;
         }
  
         .toggle-label {
           display: flex;
           align-items: center;
           gap: 4px;
           cursor: pointer;
           padding: 4px 8px;
           border-radius: 6px;
           transition: background-color 0.2s ease;
           font-size: 0.75rem;
           white-space: nowrap;
         }
  
         .toggle-label:hover {
           background: rgba(102, 126, 234, 0.1);
         }
  
         .toggle-checkbox {
           width: 14px;
           height: 14px;
           accent-color: var(--configure-accent, #667eea);
           cursor: pointer;
           margin: 0;
         }
  
         .toggle-text {
           font-size: 0.7rem;
           font-weight: 600;
           color: #495057;
           white-space: nowrap;
           line-height: 1;
         }
  
         .toggle-label:has(.toggle-checkbox:checked) .toggle-text {
           color: var(--configure-accent, #667eea);
         }
  
         /* =====================================
           INDICATORS (BADGE UNIFIED/SEPARATE)
           ===================================== */
         .unified-indicator-container {
           grid-area: indicator;
           display: flex;
           flex-direction: column;
           align-items: center;
           gap: 4px;
           justify-self: center;
         }
  
         .unified-indicator, .separate-indicator {
           padding: 2px 8px;
           border-radius: 12px;
           font-size: 0.65rem;
           font-weight: bold;
           text-transform: uppercase;
           letter-spacing: 0.5px;
           white-space: nowrap;
         }
  
         .unified-indicator {
           background: linear-gradient(45deg, #667eea, #764ba2);
           color: white;
         }
  
         .separate-indicator {
           background: linear-gradient(45deg, #6f42c1, #673ab7);
           color: white;
         }
  
         .unified-notice {
           text-align: center;
         }
  
         .unified-text {
           font-size: 0.6rem;
           color: #d63031;
           font-weight: 600;
           font-style: italic;
           text-align: center;
           line-height: 1.1;
         }
  
         /* =====================================
           DRAG PLACEHOLDER
           ===================================== */
         .drag-placeholder {
           height: 4px;
           background: var(--configure-accent, #667eea);
           border-radius: 2px;
           margin: 4px 0;
           opacity: 0;
           transition: opacity 0.2s ease;
         }
  
         .drag-placeholder.active {
           opacity: 1;
         }
  
         /* =====================================
           BUTTONS E FORM ELEMENTS
           ===================================== */
         .checkbox-wrapper {
           display: flex;
           align-items: center;
           gap: 10px;
           margin-top: 15px;
         }
  
         .checkbox {
           width: 20px;
           height: 20px;
           accent-color: var(--configure-accent, #667eea);
         }

         /* =====================================
           MODERN TOGGLE (allineato a TOP Posters API)
           ===================================== */
         .poster-toggle-field {
           margin-top: 15px;
         }

         .poster-toggle-field + .poster-toggle-field {
           margin-top: 14px;
         }

         .poster-toggle-field .modern-toggle-input {
           position: absolute;
           width: 1px;
           height: 1px;
           opacity: 0;
           pointer-events: none;
         }

         .poster-toggle-field .modern-toggle {
           position: relative;
           display: flex;
           align-items: center;
           gap: 14px;
           width: 100%;
           min-height: 68px;
           margin: 0;
           padding: 12px 14px;
           border: 1px solid var(--configure-border, rgba(102, 126, 234, 0.18));
           border-radius: 18px;
           background:
             linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
             radial-gradient(circle at 10% 10%, rgba(102, 126, 234, 0.16), transparent 30%);
           box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
           cursor: pointer;
           transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
         }

         .poster-toggle-field .modern-toggle:hover {
           border-color: rgba(102, 126, 234, 0.36);
           box-shadow: 0 16px 34px rgba(17, 24, 39, 0.12);
           transform: translateY(-1px);
         }

         .poster-toggle-field .modern-toggle-input:focus-visible + .modern-toggle {
           outline: 3px solid rgba(102, 126, 234, 0.28);
           outline-offset: 3px;
         }

         .poster-toggle-field .modern-toggle-input:disabled + .modern-toggle {
           opacity: 0.55;
           cursor: not-allowed;
           transform: none;
         }

         .poster-toggle-field .modern-toggle__track {
           position: relative;
           flex: 0 0 68px;
           width: 68px;
           height: 38px;
           border-radius: 999px;
           background: linear-gradient(135deg, #111827, #374151);
           box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.28), 0 8px 18px rgba(17, 24, 39, 0.18);
           transition: background 0.24s ease, box-shadow 0.24s ease;
         }

         .poster-toggle-field .modern-toggle__thumb {
           position: absolute;
           top: 4px;
           left: 4px;
           display: grid;
           place-items: center;
           width: 30px;
           height: 30px;
           border-radius: 50%;
           background: linear-gradient(135deg, #ffffff, #eef2ff);
           color: var(--configure-accent, #667eea);
           box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
           transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.24s ease;
         }

         .poster-toggle-field .modern-toggle__thumb::after {
           content: "";
           width: 12px;
           height: 12px;
           border-radius: 50%;
           background: currentColor;
           opacity: 0.18;
         }

         .poster-toggle-field .modern-toggle__icon {
           display: none;
         }

         .poster-toggle-field .modern-toggle__content {
           display: flex;
           flex-direction: column;
           gap: 3px;
           min-width: 0;
         }

         .poster-toggle-field .modern-toggle__title {
           color: var(--configure-text, #1f2937);
           font-size: 14px;
           font-weight: 700;
           letter-spacing: -0.01em;
         }

         .poster-toggle-field .modern-toggle__hint {
           color: var(--configure-muted, #6b7280);
           font-size: 12px;
           font-weight: 500;
           line-height: 1.35;
         }

         .poster-toggle-field .modern-toggle-input:checked + .modern-toggle {
           border-color: rgba(102, 126, 234, 0.42);
           background:
             linear-gradient(135deg, rgba(245, 243, 255, 0.98), rgba(255, 255, 255, 0.95)),
             radial-gradient(circle at 12% 18%, rgba(118, 75, 162, 0.24), transparent 34%);
         }

         .poster-toggle-field .modern-toggle-input:checked + .modern-toggle .modern-toggle__track {
           background: linear-gradient(135deg, var(--configure-brand-start, #667eea), var(--configure-brand-end, #764ba2));
           box-shadow: inset 0 2px 8px rgba(76, 29, 149, 0.22), 0 10px 24px rgba(102, 126, 234, 0.32);
         }

         .poster-toggle-field .modern-toggle-input:checked + .modern-toggle .modern-toggle__thumb {
           color: var(--configure-accent, #667eea);
           transform: translateX(30px) rotate(8deg);
         }

         /* =====================================
           POSTER OPTIONS
           ===================================== */
         .poster-option {
           display: flex;
           align-items: center;
           gap: 12px;
           padding: 15px;
           border: 2px solid #e9ecef;
           border-radius: 10px;
           cursor: pointer;
           transition: all 0.3s ease;
         }

         .poster-option:hover {
           border-color: var(--configure-accent, #667eea);
           background: rgba(102, 126, 234, 0.05);
         }

         .poster-option input[type="radio"] {
           width: 18px;
           height: 18px;
           accent-color: var(--configure-accent, #667eea);
           cursor: pointer;
         }

         .poster-option:has(input:checked) {
           border-color: var(--configure-accent, #667eea);
           background: rgba(102, 126, 234, 0.1);
           box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
         }
         
         /* Rimosso: ora permettiamo di cliccare anche per vedere l'anteprima */

         .poster-option-content {
           flex: 1;
         }

         .poster-option-title {
           font-weight: 600;
           color: #2c3e50;
           margin-bottom: 4px;
         }

         .poster-option-desc {
           font-size: 0.85rem;
           color: #6c757d;
           line-height: 1.4;
         }
         
         .premium-crown-badge {
           font-size: 1.2rem;
           cursor: help;
           position: relative;
           padding: 4px;
           transition: transform 0.2s ease;
         }
         
         .premium-crown-badge:hover {
           transform: scale(1.2);
         }
         
         .premium-tooltip {
           display: none;
           position: absolute;
           top: 100%;
           right: 0;
           margin-top: 8px;
           background: #000000;
           color: white;
           padding: 12px 16px;
           border-radius: 8px;
           font-size: 0.75rem;
           white-space: nowrap;
           box-shadow: 0 4px 12px rgba(0,0,0,0.5);
           z-index: 1000;
           line-height: 1.4;
         }
         
         .premium-tooltip::before {
           content: '';
           position: absolute;
           bottom: 100%;
           right: 15px;
           border: 6px solid transparent;
           border-bottom-color: #000000;
         }
         
         #api-key-tooltip::before {
           right: auto;
           left: 15px;
         }
         
         .premium-crown-badge:hover .premium-tooltip {
           display: block;
         }
  
         .btn {
           padding: 12px 24px;
           border: none;
           border-radius: 8px;
           font-weight: 600;
           font-size: 1rem;
           cursor: pointer;
           transition: all 0.3s ease;
           text-decoration: none;
           display: inline-flex;
           align-items: center;
           gap: 8px;
         }
  
         .btn-primary {
           background: linear-gradient(135deg, var(--configure-brand-start, #667eea) 0%, var(--configure-brand-end, #764ba2) 100%);
           color: white;
         }

         .btn-primary:hover {
           transform: translateY(-2px);
           box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
         }
  
         .btn-secondary {
           background: #6c757d;
           color: white;
         }
  
         .btn-secondary:hover {
           background: #545b62;
         }
  
         .btn-success {
           background: #28a745;
           color: white;
         }
  
         .btn-success:hover {
           background: #1e7e34;
         }
  
         .btn-small {
           padding: 6px 12px;
           font-size: 0.9rem;
         }
  
         .btn:disabled {
           opacity: 0.6;
           cursor: not-allowed;
           transform: none !important;
         }
  
         /* =====================================
           PREVIEW E SUMMARY
           ===================================== */
          .config-summary {
            background: rgba(102, 126, 234, 0.06);
            border: 1px solid rgba(102, 126, 234, 0.22);
            border-radius: 12px;
            padding: 15px;
            margin: 20px 0;
          }
  
         .preview-section {
           background: #f8f9fa;
           border-radius: 10px;
           padding: 20px;
           margin-top: 20px;
           border-left: 4px solid var(--configure-accent, #667eea);
         }

         .guide-section {
           padding-top: 18px;
           padding-bottom: 18px;
           border-left: none;
           background: transparent;
           padding-left: 0;
           padding-right: 0;
         }

         .guide-accordion {
           border: 1px solid rgba(52, 152, 219, 0.25);
           border-radius: 12px;
           background: rgba(52, 152, 219, 0.05);
         }

         .guide-summary {
           list-style: none;
           display: flex;
           align-items: center;
           justify-content: space-between;
           gap: 16px;
           cursor: pointer;
           padding: 16px 18px;
         }

         .guide-summary::-webkit-details-marker {
           display: none;
         }

         .guide-summary-text {
           min-width: 0;
         }

         .guide-summary-hint {
           display: block;
           margin-top: 4px;
           font-size: 0.82rem;
           color: #6c7a86;
         }

         .guide-summary-icon {
           font-size: 1.15rem;
           color: #3498db;
           transition: transform 0.2s ease;
           flex-shrink: 0;
         }

         .guide-accordion[open] .guide-summary-icon {
           transform: rotate(90deg);
         }

         .guide-info-box {
           margin: 0;
           border-top-left-radius: 0;
           border-top-right-radius: 0;
           border-top: 1px solid rgba(52, 152, 219, 0.2);
           background: transparent;
           border-left: none;
           border-right: none;
           border-bottom: none;
         }
  
         .preview-url {
           background: white;
           border: 1px solid rgba(102, 126, 234, 0.25);
           border-radius: 10px;
           padding: 15px;
           font-family: monospace;
           font-size: 0.9rem;
           word-break: break-all;
           margin: 10px 0;
           color: #495057;
         }
  
         .catalog-breakdown {
           display: flex;
           gap: 12px;
           flex-wrap: wrap;
           margin-top: 8px;
         }
  
         .catalog-type {
           background: rgba(102, 126, 234, 0.1);
           color: var(--configure-accent, #667eea);
           padding: 4px 10px;
           border-radius: 12px;
           font-size: 0.85rem;
           font-weight: 600;
           border: 1px solid rgba(102, 126, 234, 0.28);
         }
  
         .buttons {
           display: flex;
           gap: 15px;
           margin-top: 30px;
           flex-wrap: wrap;
           justify-content: center;
         }
  
         .info-box {
           background: rgba(52, 152, 219, 0.1);
           border: 1px solid rgba(52, 152, 219, 0.3);
           border-radius: 8px;
           padding: 20px;
           margin: 20px 0 0;
           color: #2c3e50;
         }

         .account-profile-header {
           display: flex;
           justify-content: space-between;
           align-items: flex-start;
           gap: 16px;
         }

         .account-profile-main {
           display: flex;
           align-items: center;
           gap: 15px;
           min-width: 0;
         }

         .account-logout-btn {
           background: white;
           color: #dc3545;
           border: 1px solid #dc3545;
           padding: 5px 12px;
           font-size: 0.8rem;
           flex-shrink: 0;
         }
  
         .info-box h4 {
           color: #3498db;
           margin-bottom: 15px;
         }
  
         .info-box ol {
           margin-left: 20px;
           line-height: 1.6;
         }
  
         .info-box ol li {
           margin-bottom: 8px;
           padding-left: 5px;
         }
  
         /* =====================================
           FORM SECTIONS
           ===================================== */
         .form-section {
           margin-bottom: 35px;
           padding: 25px;
           background: #f8f9fa;
           border-radius: 12px;
           border-left: 4px solid #007bff;
         }
  
         .section-title {
           font-size: 1.2rem;
           font-weight: 600;
           color: #2c3e50;
           margin-bottom: 15px;
           display: flex;
           align-items: center;
           gap: 8px;
         }
  
         /* =====================================
           ANIMATIONS
           ===================================== */
         @keyframes slideIn {
           from {
             opacity: 0;
             transform: translateX(-20px);
           }
           to {
             opacity: 1;
             transform: translateX(0);
           }
         }
  
         .selected-platform-item {
           animation: slideIn 0.3s ease;
         }
  
         @keyframes slideInRight {
           from { transform: translateX(100%); opacity: 0; }
           to { transform: translateX(0); opacity: 1; }
         }
  
         @keyframes slideOutRight {
           from { transform: translateX(0); opacity: 1; }
           to { transform: translateX(100%); opacity: 0; }
         }
  
         /* =====================================
           RESPONSIVE DESIGN
           ===================================== */
         @media (max-width: 768px) {
           body:not(.configure-dashboard-mode) {
             padding: 0;
           }

           body:not(.configure-dashboard-mode) .container { 
             width: 100%;
             max-width: 100%;
             min-height: 100vh;
             border-radius: 0;
           }

           body:not(.configure-dashboard-mode) .header {
             padding: 24px 16px;
           }
           
           body:not(.configure-dashboard-mode) .config-form { 
             padding: 16px 16px 12px;
           }

           .form-section {
             margin-bottom: 20px;
             padding: 16px;
           }

           .section-title {
             font-size: 1.05rem;
             line-height: 1.3;
           }

           .source-panel-toggle {
             padding: 14px 16px;
             gap: 12px;
           }

           .source-panel-title {
             font-size: 0.95rem;
           }

           .source-panel-description {
             font-size: 0.78rem;
           }

           .source-panel-count {
             min-width: 30px;
             height: 30px;
             font-size: 0.82rem;
           }

           .source-panel-icon {
             font-size: 1.7rem;
           }

           .source-panel-content {
             display: flex;
             flex-direction: column;
           }

           .source-panel-actions {
             order: -1;
             margin: 12px 0 16px !important;
             padding-top: 8px;
             display: flex;
             flex-direction: column;
             gap: 10px;
           }

           .source-panel-actions .btn {
             margin-left: 0 !important;
           }

           .guide-summary {
             padding: 14px 16px;
             align-items: flex-start;
           }

           .guide-summary-icon {
             margin-top: 2px;
           }
           
           .platforms-grid { 
             grid-template-columns: 1fr; 
           }

           .source-lists-grid-inner {
             grid-template-columns: 1fr;
           }

           .poster-layout {
             grid-template-columns: 1fr !important;
             gap: 16px !important;
           }

           .poster-preview-column {
             position: static !important;
             top: auto !important;
           }

           .poster-preview-column > div {
             max-width: 280px;
             margin: 0 auto;
           }

           .api-key-info-grid {
             grid-template-columns: 1fr !important;
             gap: 4px !important;
           }

           #list-country {
             max-width: none !important;
           }

           #login-form > div[style*="display: flex"],
           .buttons,
           .preview-section .buttons {
             flex-direction: column !important;
             align-items: stretch !important;
           }

           .btn,
           .btn-small {
             width: 100%;
             justify-content: center;
           }

           .premium-tooltip,
           #api-key-tooltip {
             width: min(320px, calc(100vw - 24px)) !important;
             max-width: min(320px, calc(100vw - 24px)) !important;
             left: 50% !important;
             right: auto !important;
             transform: translateX(-50%);
             white-space: normal;
           }

           .premium-tooltip::before,
           #api-key-tooltip::before {
             left: 50% !important;
             right: auto !important;
             transform: translateX(-50%);
           }
           
           .buttons { 
             flex-direction: column; 
             align-items: stretch; 
           }
           
           /* Layout mobile per gli elementi della piattaforma */
           .selected-platform-item {
             display: grid;
             grid-template-columns: minmax(0, 1fr) auto;
             gap: 10px;
             padding: 12px 56px 12px 34px;
             align-items: center;
           }

           .selected-platforms-list {
             padding: 4px 0;
           }

           .selected-platform-drag-handle {
             display: none !important;
           }

           .platform-mobile-order-controls {
             grid-column: 2;
             display: flex;
           }

           .selected-platform-item::before {
             left: 0;
             width: 22px;
           }

           .selected-platform-position {
             left: 0;
             width: 22px;
             font-size: 12px;
           }

           .selected-platform-item.active {
             border-left-width: 0;
           }

           .selected-platform-item {
             gap: 8px;
             padding: 10px 56px 10px 34px;
           }


           .selected-platform-name-row {
             flex-wrap: wrap;
             gap: 4px 8px;
           }

           .selected-platform-details,
           .selected-platform-info {
             min-width: 0;
           }

           .selected-platform-name,
           .selected-platform-country,
           .source-list-title,
           .source-list-subtitle,
           .platform-name,
           .platform-country {
             overflow-wrap: anywhere;
           }
           
           .platform-order-number {
             font-size: 0.7rem;
             width: 20px;
             height: 20px;
           }
           
           .toggle-group {
             flex-direction: column;
             gap: 4px;
             align-items: flex-start;
           }
           
           .toggle-label {
             padding: 6px 8px;
           }
           
           .toggle-text {
             font-size: 0.75rem;
           }
           
           .unified-text {
             font-size: 0.55rem;
           }

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

           .account-profile-main {
             align-items: flex-start;
           }

           .account-logout-btn {
             width: 100%;
             justify-content: center;
           }

           .preview-section .buttons a.btn,
           .preview-section .buttons button.btn {
             display: flex !important;
           }
         }
  
         @media (max-width: 480px) {
           body:not(.configure-dashboard-mode) .header h1 { 
             font-size: 1.8rem; 
           }

           body:not(.configure-dashboard-mode) .header p {
             font-size: 0.92rem;
           }
           
           body:not(.configure-dashboard-mode) .language-switcher {
             top: 10px;
             right: 10px;
             padding: 6px;
           }
           
           .selected-platform-name {
             font-size: 0.9rem;
           }
           
           .selected-platform-country {
             font-size: 0.7rem;
           }

           .form-section {
             padding: 14px;
             border-radius: 10px;
           }

           .card-list-toggle {
             width: 100%;
             justify-content: center;
           }
         }
:root {
  --configure-bg: #f4f6ff;
  --configure-surface: rgba(255, 255, 255, 0.96);
  --configure-surface-strong: #ffffff;
  --configure-text: #111827;
  --configure-muted: #6b7280;
  --configure-border: rgba(102, 126, 234, 0.18);
  --configure-border-strong: rgba(102, 126, 234, 0.3);
  --configure-shadow: 0 18px 38px rgba(17, 24, 39, 0.08);
  --configure-shadow-strong: 0 22px 48px rgba(17, 24, 39, 0.14);
  --configure-brand-start: #667eea;
  --configure-brand-end: #764ba2;
  --configure-accent: #667eea;
  --configure-accent-strong: #5a6fd6;
  --configure-danger: #dc3545;
  --configure-warning: #f59e0b;
  --configure-success: #22c55e;
  --configure-frame-width: 1200px;
}

body.configure-dashboard-mode {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #FFC0CB;
  color: var(--configure-text);
  padding: 0;
}

.configure-dashboard-shell {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transform: translateY(0);
  will-change: transform;
  pointer-events: none;
}

.configure-dashboard-header {
  background: linear-gradient(135deg, var(--configure-brand-start) 0%, var(--configure-brand-end) 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.configure-dashboard-header__content {
  max-width: var(--configure-frame-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
}

.configure-dashboard-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  cursor: pointer;
}

.configure-dashboard-brand__mark {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.configure-dashboard-brand__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.configure-dashboard-brand__copy strong {
  font-size: 22px;
}

.configure-dashboard-brand__copy span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.configure-dashboard-header__actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.configure-dashboard-mode .language-switcher {
  position: static;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.configure-dashboard-mode .language-switcher select {
  background: rgba(255, 255, 255, 0.92);
  color: #4b5563;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 8px 18px rgba(44, 30, 78, 0.16);
}

.configure-dashboard-tab-bar {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a3d92 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 20px rgba(44, 30, 78, 0.16);
  display: flex;
  justify-content: center;
  will-change: transform;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.configure-dashboard-tab-bar__shell {
  width: min(var(--configure-frame-width), 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  min-width: 0;
}

.configure-dashboard-tab-bar__inner {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding-top: 2px;
  margin-top: -2px;
  scrollbar-width: none;
}

.configure-dashboard-tab-bar__inner::-webkit-scrollbar {
  display: none;
}

.configure-dashboard-tab-btn {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.configure-dashboard-tab-btn__label {
  line-height: inherit;
}

.configure-dashboard-tab-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.configure-dashboard-tab-btn.active {
  background: rgba(255, 255, 255, 0.94);
  color: #764ba2;
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(44, 30, 78, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.configure-dashboard-tab-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.configure-dashboard-tab-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  color: #5c3e90;
  border: 1px solid rgba(255, 255, 255, 0.92);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(44, 30, 78, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.configure-dashboard-tab-action:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #fff;
  color: #4f2d82;
  box-shadow: 0 10px 22px rgba(44, 30, 78, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.configure-dashboard-tab-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.configure-dashboard-mode .container {
  width: 100%;
  max-width: var(--configure-frame-width);
  margin: 30px auto;
  padding: 0 20px;
  padding-top: calc(159px + env(safe-area-inset-top, 0px));
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.configure-dashboard-mode .config-form {
  display: block;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.configure-dashboard-panel {
  display: none;
}

.configure-dashboard-panel.active {
  display: block;
}

.configure-card,
.configure-summary-card,
.configure-hero-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.configure-dashboard-mode .form-section,
.configure-dashboard-mode .preview-section {
  background: white;
  border: none;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.configure-dashboard-mode .guide-section {
  background: white;
}

.configure-dashboard-mode .configure-page-copy-card {
  padding: 24px 25px;
}

.configure-dashboard-mode .configure-page-intro-card {
  display: grid;
  gap: 20px;
}

.configure-dashboard-mode .configure-page-intro-card__accordion {
  margin: 0;
}

.configure-page-copy {
  display: grid;
  gap: 10px;
}

.configure-page-copy__title {
  margin: 0;
}

.configure-page-copy__subtitle {
  margin: 0;
  color: var(--configure-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.configure-dashboard-mode .configure-account-section {
  margin-bottom: 20px;
}

.configure-dashboard-mode .configure-account-hero {
  padding: 24px !important;
  background:
    linear-gradient(135deg, rgba(248, 250, 255, 0.98), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at 10% 10%, rgba(118, 75, 162, 0.14), transparent 30%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 18px 38px rgba(17, 24, 39, 0.07) !important;
}

.configure-dashboard-mode .configure-account-hero__header,
.configure-dashboard-mode .configure-account-api-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.configure-dashboard-mode .configure-account-hero__intro,
.configure-dashboard-mode .configure-account-api-card__intro {
  max-width: 720px;
}

.configure-dashboard-mode .configure-account-hero__title,
.configure-dashboard-mode .configure-account-api-card__title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #111827;
}

.configure-dashboard-mode .configure-account-hero__hint,
.configure-dashboard-mode .configure-account-api-card__hint {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
  max-width: 720px;
}

.configure-dashboard-mode .configure-account-hero__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.configure-dashboard-mode .configure-account-hero__stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.configure-dashboard-mode .configure-account-profile-shell {
  display: grid;
  gap: 0;
}

.configure-dashboard-mode .api-status-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(102, 126, 234, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(245, 243, 255, 0.98), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at 12% 18%, rgba(118, 75, 162, 0.18), transparent 34%);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.configure-dashboard-mode .api-status-card--plan {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.configure-dashboard-mode .api-status-card--premium {
  border-color: rgba(102, 126, 234, 0.35);
  background:
    linear-gradient(135deg, rgba(245, 243, 255, 0.98), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at 12% 18%, rgba(118, 75, 162, 0.16), transparent 34%);
}

.configure-dashboard-mode .api-status-card--pro {
  border-color: rgba(240, 147, 251, 0.35);
  background:
    linear-gradient(135deg, rgba(253, 242, 248, 0.98), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at 12% 18%, rgba(245, 87, 108, 0.16), transparent 34%);
}

.configure-dashboard-mode .api-status-card--free {
  border-color: rgba(79, 172, 254, 0.32);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at 12% 18%, rgba(79, 172, 254, 0.16), transparent 34%);
}

.configure-dashboard-mode .api-status-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.configure-dashboard-mode .api-status-card__header .api-status-card__label-group {
  flex: 1;
  min-width: 0;
}

.configure-dashboard-mode .api-status-card__label-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.configure-dashboard-mode .api-status-card__label-group--plan {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 2px;
}

.configure-dashboard-mode .api-status-card__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
  line-height: 1;
}

.configure-dashboard-mode .api-status-card__title {
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.configure-dashboard-mode .api-status-card__hint {
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.configure-dashboard-mode .api-status-card__meta {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.configure-dashboard-mode .api-status-card__meta strong {
  color: inherit;
  font-weight: 800;
}

.configure-dashboard-mode .api-status-card__icon {
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 17px;
  box-shadow: inset 0 2px 8px rgba(76, 29, 149, 0.22), 0 10px 24px rgba(102, 126, 234, 0.26);
}

.configure-dashboard-mode .api-status-card--pro .api-status-card__icon {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  box-shadow: inset 0 2px 8px rgba(190, 24, 93, 0.2), 0 10px 24px rgba(245, 87, 108, 0.24);
}

.configure-dashboard-mode .api-status-card--free .api-status-card__icon {
  background: linear-gradient(135deg, #4facfe, #00c2ff);
  box-shadow: inset 0 2px 8px rgba(3, 105, 161, 0.18), 0 10px 24px rgba(79, 172, 254, 0.24);
}

.configure-dashboard-mode .api-status-card--plan .api-status-card__eyebrow {
  font-size: 11px;
}

.configure-dashboard-mode .api-status-card--plan .api-status-card__title {
  font-size: 15px;
}

.configure-dashboard-mode .api-status-card--plan .api-status-card__header {
  align-items: center;
}

@media (min-width: 769px) {
  .configure-dashboard-mode .api-status-card--plan .api-status-card__header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
  }

  .configure-dashboard-mode .api-status-card--plan .api-status-card__icon {
    grid-column: 1;
  }

  .configure-dashboard-mode .api-status-card--plan .api-status-card__label-group--plan {
    grid-column: 2;
    padding-left: 0;
  }

  .configure-dashboard-mode .api-status-card--plan .api-status-card__hint,
  .configure-dashboard-mode .api-status-card--plan .api-status-card__meta {
    margin-left: 52px;
  }
}

.configure-dashboard-mode .configure-section-header {
  margin-bottom: 18px !important;
}

.configure-dashboard-mode .configure-section-header--compact {
  margin-bottom: 16px !important;
}

.configure-dashboard-mode .configure-account-box {
  margin-bottom: 0 !important;
  padding: 22px !important;
  border-radius: 22px !important;
  box-sizing: border-box;
  border: 1px solid rgba(162, 176, 255, 0.28);
  box-shadow: 0 18px 34px rgba(17, 24, 39, 0.06);
}

.configure-dashboard-mode .configure-account-box:last-of-type {
  margin-bottom: 0 !important;
}

.configure-dashboard-mode .configure-account-box--uuid {
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96)) !important;
  border-color: rgba(96, 165, 250, 0.42) !important;
}

.configure-dashboard-mode .configure-account-box--login,
.configure-dashboard-mode .configure-account-box--profile {
  background:
    linear-gradient(135deg, rgba(248, 250, 255, 0.98), rgba(255, 255, 255, 0.96)) !important;
  border-color: rgba(102, 126, 234, 0.18) !important;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.07);
}

.configure-dashboard-mode .configure-account-box--profile {
  background:
    linear-gradient(145deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at 10% 10%, rgba(102, 126, 234, 0.12), transparent 32%) !important;
  border-color: rgba(96, 165, 250, 0.26) !important;
  box-shadow: 0 22px 42px rgba(48, 87, 191, 0.12);
}

.configure-dashboard-mode .configure-account-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px !important;
}

.configure-dashboard-mode .configure-account-form {
  margin-bottom: 0;
  display: grid;
  gap: 14px;
}

.configure-dashboard-mode .configure-account-form > :last-child {
  margin-bottom: 0 !important;
}

.configure-dashboard-mode .configure-account-form__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.configure-dashboard-mode .configure-account-primary-btn {
  width: 100%;
}

.configure-dashboard-mode .configure-account-label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 0.95rem;
  font-weight: 700;
}

.configure-dashboard-mode .configure-account-inline-status {
  margin-top: 2px;
  font-size: 0.92rem;
  min-height: 20px;
}

.configure-dashboard-mode .configure-account-footnote {
  margin-top: 18px !important;
  padding-top: 0 !important;
  margin-bottom: 0 !important;
  border-top: none;
  color: #667085;
  line-height: 1.65;
}

.configure-dashboard-mode .configure-account-footnote--list {
  display: grid;
  gap: 4px;
}

.configure-dashboard-mode .configure-account-status {
  margin-bottom: 0 !important;
  border-radius: 22px;
  padding: 20px;
}

.configure-dashboard-mode .configure-account-status--verified {
  background: linear-gradient(160deg, rgba(236, 253, 243, 0.98), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(34, 197, 94, 0.32);
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.08);
}

.configure-dashboard-mode .configure-account-status__title {
  margin-bottom: 12px;
  color: #166534;
  font-size: 1rem;
  font-weight: 800;
}

.configure-dashboard-mode .account-link-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #5c3e90;
  border: 1px solid rgba(102, 126, 234, 0.22);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(44, 30, 78, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.configure-dashboard-mode .account-link-badge:hover {
  transform: translateY(-1px);
  background: #fff;
  color: #4f2d82;
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 10px 22px rgba(44, 30, 78, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.configure-dashboard-mode .account-link-badge--secondary {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(245, 243, 255, 0.96));
}

.configure-dashboard-mode .configure-account-inline-action {
  text-decoration: none;
}

.configure-dashboard-mode .configure-account-box__header {
  margin-bottom: 12px;
}

.configure-dashboard-mode .configure-account-box {
  padding: 18px !important;
}

.configure-dashboard-mode .configure-account-box__label-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.configure-dashboard-mode .configure-account-box__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.18), rgba(118, 75, 162, 0.18));
  font-size: 1.25rem;
  flex-shrink: 0;
}

.configure-dashboard-mode .configure-account-box__title {
  color: #182230;
  font-size: 1.15rem;
  font-weight: 800;
}

.configure-dashboard-mode .configure-account-box__hint {
  margin-top: 4px;
  color: #667085;
  font-size: 0.92rem;
  line-height: 1.6;
}

.configure-dashboard-mode .configure-account-codebox {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(255, 255, 255, 0.96);
  color: #1d4ed8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  word-break: break-all;
}

.configure-dashboard-mode .configure-account-profile-main {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-height: 104px;
}

.configure-dashboard-mode .configure-account-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 16px;
  align-items: stretch;
}

.configure-dashboard-mode .configure-account-profile-logo {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.configure-dashboard-mode .configure-account-profile-copy {
  min-width: 0;
  flex: 1;
}

.configure-dashboard-mode .configure-account-profile-name {
  color: #1d4ed8;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.configure-dashboard-mode .configure-account-profile-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.configure-dashboard-mode .configure-account-profile-meta {
  margin-top: 8px;
  color: #546e7a;
  font-size: 0.95rem;
  line-height: 1.5;
}

.configure-dashboard-mode .configure-account-profile-meta--api strong {
  display: inline-block;
  max-width: 100%;
  color: #111827;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.configure-dashboard-mode .configure-account-profile-grid > .api-status-card {
  align-self: stretch;
}

.configure-dashboard-mode .account-logout-btn {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(236, 241, 255, 0.96));
  color: #4f46e5;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.14);
}

.configure-dashboard-mode .account-logout-btn:hover {
  transform: translateY(-1px);
}

.configure-dashboard-mode .configure-account-api-card {
  padding: 24px;
}

.configure-dashboard-mode .configure-account-api-card__body {
  display: grid;
  gap: 20px;
}

.configure-dashboard-mode .configure-account-api-key-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 22px;
  min-height: 104px;
  border-radius: 24px;
  border: 1px solid rgba(162, 176, 255, 0.24);
  background: linear-gradient(160deg, rgba(248, 250, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.configure-dashboard-mode .configure-account-api-key-box__icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.22), rgba(118, 75, 162, 0.22));
  font-size: 1.4rem;
}

.configure-dashboard-mode .configure-account-api-key-box__content {
  min-width: 0;
}

.configure-dashboard-mode .configure-account-api-input {
  min-height: 56px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.configure-dashboard-mode .configure-account-api-help {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #667085;
  line-height: 1.6;
}

.configure-dashboard-mode .api-key-info-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px 12px;
  font-size: 0.9rem;
}

.configure-dashboard-mode .api-key-info-grid > :nth-child(odd) {
  color: #667085;
}

.configure-dashboard-mode .api-key-info-grid > :nth-child(even) {
  color: #182230;
  font-weight: 700;
  line-height: 1.5;
}

.configure-dashboard-mode .configure-secret-panel {
  margin-top: 4px;
}

.configure-dashboard-mode .configure-secret-panel[hidden] {
  display: none !important;
}

.configure-dashboard-mode .configure-secret-panel--revealed {
  display: block;
}

.configure-dashboard-mode .section-title,
.configure-dashboard-mode .preview-section h4 {
  color: var(--configure-text);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.configure-dashboard-mode .form-control {
  border: 1px solid var(--configure-border-strong);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.configure-dashboard-mode .form-control:focus {
  border-color: rgba(102, 126, 234, 0.62);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.14);
}

.configure-dashboard-mode .btn-primary,
.configure-dashboard-mode .btn.btn-primary {
  background: linear-gradient(135deg, var(--configure-brand-start) 0%, var(--configure-brand-end) 100%);
  color: white;
  border: none;
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.24);
}

.configure-dashboard-mode .btn-secondary,
.configure-dashboard-mode .btn.btn-secondary {
  background: #e5e7eb;
  color: #374151;
  border: none;
}

.configure-dashboard-mode .btn-primary:hover,
.configure-dashboard-mode .btn-secondary:hover,
.configure-dashboard-mode .btn.btn-primary:hover,
.configure-dashboard-mode .btn.btn-secondary:hover {
  transform: translateY(-1px);
}

.configure-dashboard-mode .checkbox,
.configure-dashboard-mode .toggle-checkbox,
.configure-dashboard-mode input[type="checkbox"],
.configure-dashboard-mode input[type="radio"] {
  accent-color: var(--configure-accent);
}

.configure-dashboard-mode .poster-option,
.configure-dashboard-mode .platform-card,
.configure-dashboard-mode .source-list-card,
.configure-dashboard-mode .source-panel {
  border-color: var(--configure-border);
  box-shadow: none;
}

.configure-dashboard-mode .poster-option:hover,
.configure-dashboard-mode .platform-card:hover,
.configure-dashboard-mode .source-list-card:hover {
  border-color: rgba(102, 126, 234, 0.42);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
}

.configure-dashboard-mode .poster-option:has(input:checked),
.configure-dashboard-mode .platform-card.selected,
.configure-dashboard-mode .source-list-card.selected {
  border-color: rgba(102, 126, 234, 0.52);
  background:
    linear-gradient(135deg, rgba(245, 243, 255, 0.98), rgba(255, 255, 255, 0.95)),
    radial-gradient(circle at 12% 18%, rgba(118, 75, 162, 0.16), transparent 34%);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.1);
}

.configure-dashboard-mode #modern-poster-option,
.configure-dashboard-mode .platform-card.unified {
  border-left-color: var(--configure-accent) !important;
  background:
    linear-gradient(135deg, rgba(245, 243, 255, 0.98), rgba(255, 255, 255, 0.95)),
    radial-gradient(circle at 12% 18%, rgba(118, 75, 162, 0.18), transparent 34%) !important;
}

.configure-dashboard-mode .card-separate-badge,
.configure-dashboard-mode .separate-indicator {
  background: linear-gradient(135deg, var(--configure-brand-start), var(--configure-brand-end));
}

.configure-dashboard-mode .card-unified-badge,
.configure-dashboard-mode .unified-indicator {
  background: linear-gradient(135deg, var(--configure-brand-start), var(--configure-brand-end));
}

.configure-dashboard-action-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 960;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  padding: 14px 18px;
  border: 1px solid rgba(102, 126, 234, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248, 250, 255, 0.96)),
    radial-gradient(circle at 10% 10%, rgba(118, 75, 162, 0.1), transparent 32%);
  box-shadow: var(--configure-shadow-strong);
  backdrop-filter: blur(16px);
}

.configure-dashboard-action-bar__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.configure-dashboard-action-bar__eyebrow {
  color: #9ca3af;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.configure-dashboard-action-bar__value {
  color: var(--configure-text);
  font-size: 0.95rem;
  font-weight: 600;
}

.configure-dashboard-action-bar__buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.configure-dashboard-action-btn {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
}

.configure-dashboard-mode .preview-section .buttons {
  display: none;
}

@media (max-width: 900px) {
  .configure-dashboard-mode .configure-account-profile-grid {
    grid-template-columns: 1fr;
  }

  .configure-dashboard-action-bar {
    width: calc(100% - 24px);
    padding: 14px;
  }
}

@media (max-width: 768px) {
  .configure-dashboard-header {
    padding: 20px 14px 18px;
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
  }

  .configure-dashboard-brand__mark {
    width: 42px;
    height: 42px;
  }

  .configure-dashboard-brand__copy strong {
    font-size: 18px;
  }

  .configure-dashboard-brand__copy span {
    font-size: 13px;
  }

  .configure-dashboard-action-bar {
    display: flex;
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
    width: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .configure-dashboard-action-bar__buttons {
    width: 100%;
  }

  .configure-dashboard-action-btn {
    flex: 1;
    justify-content: center;
  }

  .configure-dashboard-tab-bar__shell {
    padding: 10px 14px;
  }

  .configure-dashboard-tab-actions {
    display: none;
  }

  .configure-dashboard-mode .container {
    padding-top: calc(151px + env(safe-area-inset-top, 0px));
    padding-bottom: 150px;
  }

  .configure-dashboard-mode .form-section,
  .configure-dashboard-mode .preview-section {
    padding: 20px;
    border-radius: 12px;
  }

  .configure-dashboard-mode .configure-account-box {
    padding: 16px !important;
  }

  .configure-dashboard-mode .configure-account-hero {
    padding: 22px !important;
  }

  .configure-dashboard-mode .configure-account-hero__header,
  .configure-dashboard-mode .configure-account-api-card__header,
  .configure-dashboard-mode .configure-account-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .configure-dashboard-mode .configure-account-hero__title,
  .configure-dashboard-mode .configure-account-api-card__title {
    font-size: 1.65rem;
  }

  .configure-dashboard-mode .configure-account-profile-main,
  .configure-dashboard-mode .configure-account-api-key-box {
    grid-template-columns: 1fr;
    display: grid;
  }

  .configure-dashboard-mode .configure-account-profile-main {
    align-items: start;
  }

  .configure-dashboard-mode .configure-account-profile-logo {
    width: 56px;
    height: 56px;
  }

  .configure-dashboard-mode .configure-account-profile-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .configure-dashboard-mode .configure-account-api-card {
    padding: 22px;
  }

  .configure-dashboard-mode .configure-account-api-help {
    align-items: flex-start;
  }

  .configure-dashboard-mode .api-key-info-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .configure-dashboard-mode .account-link-badge {
    width: 100%;
  }
}

.configure-dashboard-mode #account-status-card {
  padding: 14px 16px !important;
  gap: 6px !important;
  border-radius: 18px !important;
}

.configure-dashboard-mode #account-status-card .api-status-card__header {
  gap: 14px !important;
}

.configure-dashboard-mode #account-status-card .api-status-card__label-group--plan {
  gap: 2px !important;
}

.configure-dashboard-mode #account-status-card .api-status-card__hint,
.configure-dashboard-mode #account-status-card .api-status-card__meta {
  margin-top: 0 !important;
}

@media (min-width: 769px) {
  .configure-dashboard-mode #account-status-card .api-status-card__hint,
  .configure-dashboard-mode #account-status-card .api-status-card__meta {
    margin-left: 52px !important;
  }
}

.configure-dashboard-mode #account-status-card .api-status-card__eyebrow {
  font-size: 11px !important;
}

.configure-dashboard-mode #account-status-card .api-status-card__title {
  font-size: 15px !important;
}
