/* ===================================================================
   FANTA-AUCTION 2026/2027 - PREMIUM LIGHT DESIGN SYSTEM (TEMA BIANCO)
   Modern, Ultra-clean, High-contrast & Glassmorphic Light Theme
   =================================================================== */

:root {
  /* Surfaces & Backgrounds */
  --bg-primary: #f8fafc;        /* Slate 50 - Ultra-clean soft white */
  --bg-secondary: #f1f5f9;      /* Slate 100 */
  --bg-card: #ffffff;           /* Crisp Pure White */
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --border-card: #e2e8f0;       /* Slate 200 */
  --border-subtle: #f1f5f9;     /* Slate 100 */
  --border-focus: #0284c7;      /* Sky 600 */

  /* Typography Colors */
  --text-main: #0f172a;         /* Slate 900 - Deep, readable text */
  --text-secondary: #334155;    /* Slate 700 */
  --text-muted: #475569;        /* Slate 600 - High contrast WCAG AAA */
  --text-dim: #64748b;          /* Slate 500 - Crisp readability on white */

  /* Ruoli Fantacalcio (Calibrati con contrasto WCAG AAA su sfondo chiaro) */
  --role-p: #b45309;            /* Amber 700 */
  --role-p-bg: #fef3c7;         /* Amber 100 */
  --role-p-border: #fde68a;     /* Amber 200 */
  
  --role-d: #047857;            /* Emerald 700 */
  --role-d-bg: #d1fae5;         /* Emerald 100 */
  --role-d-border: #a7f3d0;     /* Emerald 200 */
  
  --role-c: #0369a1;            /* Sky 700 */
  --role-c-bg: #e0f2fe;         /* Sky 100 */
  --role-c-border: #bae6fd;     /* Sky 200 */
  
  --role-a: #b91c1c;            /* Red 700 */
  --role-a-bg: #fee2e2;         /* Red 100 */
  --role-a-border: #fecaca;     /* Red 200 */

  /* Status Colors */
  --status-ok: #16a34a;
  --status-doubt: #d97706;
  --status-inj: #dc2626;

  /* Accent Colors */
  --accent-blue: #0284c7;
  --accent-gold: #b45309;
  --accent-purple: #7c3aed;
  --accent-cyan: #0284c7;

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition-fast: 0.18s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(2, 132, 199, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(124, 58, 237, 0.03) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(5, 150, 105, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-card);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 8px rgba(217, 119, 6, 0.25));
}

.brand-title h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f172a 40%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  border: 1px solid #0284c7;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  filter: brightness(1.05);
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--border-card);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--text-main);
}

.btn-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.btn-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* Budget Cards Dashboard */
.budget-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.budget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.budget-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.budget-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.budget-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #0f172a;
}

.budget-card-value span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-bar-container {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.bar-total { background: linear-gradient(90deg, #0284c7, #6366f1); }
.bar-p { background: var(--role-p); }
.bar-d { background: var(--role-d); }
.bar-c { background: var(--role-c); }
.bar-a { background: var(--role-a); }

/* Control Bar (Filters & Search) */
.controls-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
}

.search-and-status {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-box input:focus {
  background: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.9rem;
}

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

.btn-group {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
}

.filter-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-main);
}

.filter-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-btn.role-p.active { background: var(--role-p-bg); color: var(--role-p); font-weight: 700; }
.filter-btn.role-d.active { background: var(--role-d-bg); color: var(--role-d); font-weight: 700; }
.filter-btn.role-c.active { background: var(--role-c-bg); color: var(--role-c); font-weight: 700; }
.filter-btn.role-a.active { background: var(--role-a-bg); color: var(--role-a); font-weight: 700; }

/* Table Container */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

.fanta-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.fanta-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
}

.fanta-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  background: #ffffff;
}

.fanta-table tbody tr {
  transition: var(--transition-fast);
}

.fanta-table tbody tr:hover td {
  background: #f8fafc;
}

.fanta-table tr.bought-me td {
  background: #ecfdf5;
}

.fanta-table tr.bought-me td:first-child {
  border-left: 3px solid #059669;
}

.fanta-table tr.bought-other td {
  opacity: 0.5;
  background: #f8fafc;
  filter: grayscale(0.5);
}

/* Badges */
.badge-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.8rem;
}

.badge-role.P { background: var(--role-p-bg); color: var(--role-p); border: 1px solid var(--role-p-border); }
.badge-role.D { background: var(--role-d-bg); color: var(--role-d); border: 1px solid var(--role-d-border); }
.badge-role.C { background: var(--role-c-bg); color: var(--role-c); border: 1px solid var(--role-c-border); }
.badge-role.A { background: var(--role-a-bg); color: var(--role-a); border: 1px solid var(--role-a-border); }

.badge-cat {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-cat-interactive {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.badge-cat-interactive:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  filter: brightness(0.96);
}

.badge-cat-interactive .info-icon {
  font-size: 0.65rem;
  opacity: 0.75;
}

.badge-cat-interactive:hover .info-icon {
  opacity: 1;
}

.cat-certezza {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.cat-normale {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.cat-scommessa {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

/* Category Rationale Modal */
.category-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.category-banner {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.category-banner-certezza {
  background: #fefce8;
  border-color: #fde047;
  color: #854d0e;
}

.category-banner-scommessa {
  background: #faf5ff;
  border-color: #d8b4fe;
  color: #581c87;
}

.category-banner-normale {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.category-subtitle {
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-motivation-text {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-main);
}

.category-points-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .category-points-grid {
    grid-template-columns: 1fr;
  }
}

.category-points-box {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.category-points-box.pros {
  border-left: 3px solid #16a34a;
}

.category-points-box.risks {
  border-left: 3px solid #f59e0b;
}

.category-points-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-points-box.pros .category-points-title {
  color: #15803d;
}

.category-points-box.risks .category-points-title {
  color: #b45309;
}

.category-points-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.category-points-list li {
  margin-bottom: 4px;
}

.category-advice-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 0.82rem;
  color: #0369a1;
  line-height: 1.4;
}

.category-advice-title {
  font-weight: 800;
  font-size: 0.76rem;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-ok .status-dot { background: var(--status-ok); }
.status-ok { color: #15803d; }

.status-doubt .status-dot { background: var(--status-doubt); }
.status-doubt { color: #b45309; }

.status-inj .status-dot { background: var(--status-inj); }
.status-inj { color: #b91c1c; }

/* Badge % Titolarità */
.badge-titolarita {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  white-space: nowrap;
}

.titolarita-high {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.titolarita-good {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.titolarita-med {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.titolarita-low {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.titolarita-out {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Match Breakdown Sub-row (Tit / Sub / Pan) */
.titolarita-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.match-breakdown-sub {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.70rem;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 1px 6px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  cursor: help;
  transition: var(--transition-fast);
}

.match-breakdown-sub:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.mb-pill {
  display: inline-block;
  font-weight: 800;
}
.mb-tit {
  color: #15803d; /* Deep emerald for starter */
}
.mb-sub {
  color: #0369a1; /* Deep ocean blue for sub */
}
.mb-pan {
  color: #475569; /* Slate 600 for bench */
}
.mb-sep {
  color: #94a3b8;
  font-size: 0.65rem;
}

/* Player Name Cell */
.player-info-cell {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.95rem;
}

.player-team {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.player-notes {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Number metrics */
.metric-val {
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

.metric-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Action Buttons in table */
.action-cell {
  white-space: nowrap;
}

.btn-buy-me {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  margin-right: 4px;
  transition: var(--transition-fast);
}

.btn-buy-me:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.btn-buy-other {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-buy-other:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-reset-item {
  background: transparent;
  color: var(--text-dim);
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 5px;
}

.btn-reset-item:hover {
  color: #dc2626;
}

/* Editable click hint */
.editable-click {
  cursor: pointer;
  border-bottom: 1px dashed #cbd5e1;
  transition: var(--transition-fast);
}

.editable-click:hover {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
}

.modal-backdrop.open,
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-modal);
  transform: translateY(15px);
  transition: transform 0.2s ease;
  color: var(--text-main);
}

.modal-backdrop.open .modal-card,
.modal-backdrop.active .modal-card {
  transform: translateY(0);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: #0f172a;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* My Squad Drawer / Tab */
.squad-modal-card {
  max-width: 860px;
  max-height: 85vh;
  overflow-y: auto;
}

.squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.squad-column {
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  padding: 12px;
}

.squad-column-title {
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 8px;
}

.squad-player-item {
  padding: 6px 8px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

/* Responsive */
@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .controls-bar {
    padding: 12px;
  }
  .fanta-table th, .fanta-table td {
    padding: 10px 8px;
  }
}

/* ===================================================================
   AI AUCTION ADVISOR STYLES (LIGHT THEME)
   =================================================================== */

.advisor-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.advisor-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #0284c7, #7c3aed);
}

.advisor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.advisor-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.advisor-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 8px rgba(2, 132, 199, 0.25));
}

.advisor-title h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.advisor-title p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.advisor-quick-stats {
  display: flex;
  gap: 10px;
}

.stat-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  display: flex;
  gap: 6px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

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

.advisor-diagnosis {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.86rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.diagnosis-badge {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.rec-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.rec-card:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.rec-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.rec-player-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: #0f172a;
}

.rec-player-team {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.rec-stats-row {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #f8fafc;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid #f1f5f9;
}

.rec-stats-row strong {
  color: #0f172a;
}

.rec-reason {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
}

.rec-bid-price {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.rec-bid-price strong {
  font-size: 1.05rem;
  color: #b45309;
}

.btn-rec-buy {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-rec-buy:hover {
  background: #059669;
  color: #ffffff;
}

/* ===================================================================
   CLINICAL & INJURY SEVERITY BADGES & MEDICAL MODAL
   =================================================================== */

.badge-medical {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.badge-medical:hover {
  transform: scale(1.04);
}

.badge-medical.severity-Grave {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.badge-medical.severity-Moderato {
  background: #ffedd5;
  border-color: #fed7aa;
  color: #c2410c;
}

.badge-medical.severity-Leggero {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}

.badge-medical.severity-Nessuno {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

/* Medical Modal Content Styling */
.med-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
}

.med-player-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.med-player-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.med-severity-pill {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.med-section-block {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.med-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.med-diagnosis-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #334155;
}

.med-return-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #0369a1;
  font-size: 0.88rem;
}

.med-advice-banner {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 600;
}

.med-advice-banner.advice-danger {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.med-advice-banner.advice-warning {
  background: #ffedd5;
  border: 1px solid #fed7aa;
  color: #c2410c;
}

.med-advice-banner.advice-opportunity {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.med-advice-banner.advice-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

/* ===================================================================
   TEAM CRESTS & FLAGS
   =================================================================== */
.team-crest-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.22));
}

.team-badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===================================================================
   TEAM CONCENTRATION RISK DETECTOR ("LA MIA ROSA")
   =================================================================== */
.squad-team-risk-container {
  margin: 14px 0 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
}

.squad-team-risk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.squad-team-risk-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-risk-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.team-risk-badge:hover {
  transform: translateY(-1px);
}

.team-risk-safe {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.team-risk-warning {
  border-color: #fde047;
  background: #fefce8;
  color: #854d0e;
  font-weight: 700;
}

.team-risk-danger {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.team-risk-alert-msg {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.4;
}

.risk-alert-warning {
  background: #fefce8;
  border-left: 3px solid #eab308;
  color: #854d0e;
}

.risk-alert-danger {
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  color: #991b1b;
}

/* ===================================================================
   HIERARCHY & BACKUP PAIRINGS
   =================================================================== */
.buy-backups-container {
  margin: 12px 0 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
}

.buy-backups-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 800;
  color: #0369a1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.backup-pill-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.backup-pill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
}

.backup-pill-status {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.backup-status-free {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.backup-status-bought-me {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.backup-status-bought-other {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.squad-backup-badge {
  font-size: 0.72rem;
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.squad-backup-covered {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.squad-backup-missing {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

/* ===================================================================
   SLOT LIMIT CONTROLS
   =================================================================== */
.btn-buy-disabled {
  background: #f1f5f9 !important;
  color: var(--text-dim) !important;
  cursor: not-allowed !important;
  border-color: #cbd5e1 !important;
  filter: grayscale(1);
  box-shadow: none !important;
}

/* ===================================================================
   IAP (INDICE ACQUISTO PERFETTO) BADGES & METRICS
   =================================================================== */
.badge-iap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform var(--transition-fast), filter var(--transition-fast), box-shadow var(--transition-fast);
}

.badge-iap:hover {
  transform: scale(1.07);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.iap-musthave {
  background: #fef9c3;
  border: 1px solid #fde047;
  color: #92400e;
}

.iap-recommended {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.iap-occasion {
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  color: #0369a1;
}

.iap-risky {
  background: #ffedd5;
  border: 1px solid #fed7aa;
  color: #c2410c;
}

.iap-avoid {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ===================================================================
   FANTA-SIMULATOR DASHBOARD WIDGET & MODAL
   =================================================================== */
.simulator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.simulator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0284c7, #f59e0b, #7c3aed);
}

.simulator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.simulator-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.simulator-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.simulator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.simulator-stat-box {
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.sim-stat-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sim-stat-val-large {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}

.sim-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.sim-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.sim-projection-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: #0369a1;
}

.btn-simulate-completion {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: 1px solid #0284c7;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.btn-simulate-completion:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.simulation-results-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
}

.sim-list-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.sim-player-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sim-player-chip.is-owned {
  background: #f0fdf4;
  border-color: #86efac;
}

.sim-tag-owned {
  background: #15803d;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sim-tag-suggested {
  background: #0284c7;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sim-adaptive-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0284c7;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: #1e293b;
}

.sim-adaptive-title {
  font-weight: 800;
  color: #0369a1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.sim-adaptive-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}


/* ===================================================================
   IAP MODAL BREAKDOWN STYLES (LIGHT THEME)
   =================================================================== */
.iap-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.iap-verdict-box {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.iap-verdict-musthave {
  background: #fefce8;
  border: 1px solid #fef08a;
  color: #854d0e;
}

.iap-verdict-recommended {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.iap-verdict-occasion {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.iap-verdict-risky {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.iap-verdict-avoid {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.iap-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.iap-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  border: 1px solid #e2e8f0;
}

.iap-factor-val {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--accent-cyan);
}

.iap-formula-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  text-align: center;
  color: #334155;
}

/* ===================================================================
   TEAM SELECT & PENALTY TAKER SYSTEM (GERARCHIA RIGORISTI)
   =================================================================== */
.team-filter-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-select {
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.filter-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-penalty-filter {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-penalty-filter.active {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde047 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2) !important;
}

.badge-penalty {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.badge-penalty-1 {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde047;
}

.badge-penalty-2 {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

/* Penalty Grid Modal */
.penalty-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.penalty-team-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.penalty-team-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.penalty-team-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.penalty-team-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
}

.penalty-slot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.82rem;
}

.penalty-slot-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.penalty-player-name {
  font-weight: 700;
  color: var(--text-main);
}

/* Dual Stats Display (4ª Giornata / Totale) */
.dual-stat-cell {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.stat-current {
  font-weight: 800;
  color: #0f172a;
  font-size: 0.95rem;
}

.stat-divider {
  font-weight: 500;
  color: #94a3b8;
  font-size: 0.8rem;
}

.stat-tot {
  font-weight: 600;
  color: #64748b;
  font-size: 0.82rem;
}

/* ===================================================================
   LIVE CALL QUICK ACTION BUTTON IN TABLE
   =================================================================== */
.btn-live-call {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-live-call:hover {
  background: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
  transform: translateY(-1px);
}

/* ===================================================================
   CAMPETTO TATTICO INTERATTIVO (LINEUP PITCH)
   =================================================================== */
.pitch-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
}

.pitch-formation-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pitch-mod-btn {
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pitch-mod-btn:hover {
  border-color: #15803d;
  color: #15803d;
}

.pitch-mod-btn.active {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.35);
}

.pitch-metrics-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pitch-metric-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.soccer-pitch-wrapper {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 3px solid #ffffff;
  background: #14532d;
}

.soccer-pitch {
  position: relative;
  width: 100%;
  height: 610px;
  background: repeating-linear-gradient(
    to bottom,
    #15803d 0,
    #15803d 61px,
    #166534 61px,
    #166534 122px
  );
  box-sizing: border-box;
  overflow: hidden;
}

/* Pitch Markings (Regulation Lines) */
.pitch-halfway {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

.pitch-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  pointer-events: none;
}

.pitch-center-spot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
}

.pitch-box-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52%;
  height: 90px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-top: none;
  pointer-events: none;
}

.pitch-goal-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26%;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-top: none;
  pointer-events: none;
}

.pitch-box-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52%;
  height: 90px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-bottom: none;
  pointer-events: none;
}

.pitch-goal-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26%;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-bottom: none;
  pointer-events: none;
}

/* Tactical Players Layer */
.pitch-players-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 10px;
  box-sizing: border-box;
}

.pitch-tactical-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  min-height: 75px;
}

.pitch-player-token {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 4px 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 86px;
  max-width: 115px;
  flex: 1 1 0;
  margin: 0 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.pitch-player-token:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  border-color: #0284c7;
}

.pitch-player-token.is-empty {
  background: rgba(255, 255, 255, 0.35);
  border: 2px dashed rgba(255, 255, 255, 0.85);
  box-shadow: none;
  cursor: default;
  color: #ffffff;
  padding: 10px 6px;
}

.pitch-token-top {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  justify-content: center;
}

.pitch-token-name {
  font-weight: 800;
  font-size: 0.74rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75px;
}

.pitch-token-bottom {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.64rem;
  justify-content: center;
  width: 100%;
}

/* Bench list */
.pitch-bench-container {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.pitch-bench-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pitch-bench-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pitch-bench-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  box-shadow: var(--shadow-sm);
}

/* ===================================================================
   LIVE AUCTION ADVISOR STYLES
   =================================================================== */
.live-auction-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
}

.live-auction-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease;
}

.live-auction-dropdown-item:hover {
  background: #f0f9ff;
}

.live-player-header-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.live-gauge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.live-gauge-card {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.live-gauge-card.deal {
  background: #f0fdf4;
  border-color: #86efac;
}

.live-gauge-card.target {
  background: #fffbeb;
  border-color: #fde68a;
}

.live-gauge-card.max {
  background: #fef2f2;
  border-color: #fca5a5;
}

.live-verdict-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
}

.live-verdict-banner.buy {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.live-verdict-banner.fair {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.live-verdict-banner.bluff {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.live-verdict-banner.pass {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.live-bidding-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.btn-stepper {
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-stepper:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* ==========================================================================
   SCHEDA CONSIGLIO FANTA-INFLUENCER & GUIDA STRATEGICA ASTA
   ========================================================================== */

.live-influencer-card {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #cbd5e1;
  border-left: 4px solid #4f46e5;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.badge-influencer-tier {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-influencer-tier.must-have {
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #facc15;
}

.badge-influencer-tier.value-pick {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.badge-influencer-tier.sleeper {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.badge-influencer-tier.hype-trap {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  animation: pulse-border 2s infinite;
}

.badge-influencer-tier.bench-safe {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.badge-influencer-tier.regular {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* TABS GUIDA STRATEGICA */
.strategy-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.strategy-tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid transparent;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.strategy-tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.strategy-tab-btn.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4338ca;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.strategy-alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.45;
}

.strategy-alert-box.info {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #312e81;
}

/* GRIGLIA REPARTI GUIDA */
.strategy-dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.strategy-dept-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.strategy-dept-card.role-p { border-top: 4px solid var(--role-p); }
.strategy-dept-card.role-d { border-top: 4px solid var(--role-d); }
.strategy-dept-card.role-c { border-top: 4px solid var(--role-c); }
.strategy-dept-card.role-a { border-top: 4px solid var(--role-a); }

.dept-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.strategy-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #334155;
}

.strategy-list li {
  margin-bottom: 8px;
}

.strategy-player-row {
  padding: 9px 12px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.strategy-player-row.danger {
  border-left: 3px solid #ef4444;
}

.strategy-player-row.info {
  border-left: 3px solid #3b82f6;
}

.strategy-player-row.warning {
  border-left: 3px solid #eab308;
}

.strategy-trick-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.trick-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.trick-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: #0f172a;
  margin-bottom: 4px;
}

.trick-desc {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.45;
}

/* ==========================================================================
   SCHERMATA DI LOGIN GRAFICA IN-APP
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: fadeInDown 0.25s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  font-size: 2.8rem;
  margin-bottom: 6px;
}

.login-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.login-subtitle {
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

.login-remember {
  margin-bottom: 18px;
}

.login-error-box {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  text-align: center;
}

.btn-login-submit {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 999px;
}

.btn-logout {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #ef4444;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-logout:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}




