/* FantaAsta DIY - Mantra Edition - High Contrast TV Theme */

:root {
  --bg-color: #0b0f19;
  --panel-bg: rgba(23, 31, 48, 0.85);
  --panel-border: rgba(255, 255, 255, 0.12);
  --card-bg: rgba(30, 41, 59, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 10% 20%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(236, 72, 153, 0.15) 0px, transparent 50%);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Header Navbar */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  z-index: 100;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.app-title span.badge-mantra {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.btn {
  background: rgba(51, 65, 85, 0.8);
  color: var(--text-main);
  border: 1px solid var(--panel-border);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: rgba(71, 85, 105, 1);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #10b981;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: #ef4444;
}

.btn-warning {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #f59e0b;
}

.btn-icon {
  padding: 8px 14px;
  font-size: 1.15rem;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.btn-hero-call {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 2px solid #34d399;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
  padding: 10px 22px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  letter-spacing: 0.5px;
  animation: pulse-glow 2s infinite alternate;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-hero-call:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.7);
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
  100% { box-shadow: 0 0 22px rgba(52, 211, 153, 0.8); }
}

/* Quick Call Bar (Always Visible Main Screen) */
.quick-call-bar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  padding: 10px 24px;
  z-index: 90;
}

.quick-call-inner {
  max-width: 1920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.quick-call-label {
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent-gold);
  white-space: nowrap;
}

.quick-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 600px;
}

.quick-base-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quick-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 350px;
  overflow-y: auto;
  background: #1e293b;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  z-index: 200;
  margin-top: 4px;
  display: none;
}

.quick-search-dropdown.active {
  display: block;
}

.quick-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s ease;
}

.quick-dropdown-item:hover {
  background: rgba(59, 130, 246, 0.25);
}

.quick-dropdown-item .p-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Main TV Display Layout */
.tv-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  flex: 1;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

/* Active Player Auction Stage */
.auction-stage {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  min-height: 340px;
  overflow: hidden;
}

.player-card-hero {
  text-align: center;
  width: 100%;
}

.player-name-hero {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 8px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  letter-spacing: -0.5px;
}

.player-details-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.role-tag {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.role-tag.por { background: #eab308; color: #000; }
.role-tag.dc { background: #3b82f6; color: #fff; }
.role-tag.dd, .role-tag.ds { background: #60a5fa; color: #000; }
.role-tag.e, .role-tag.m { background: #10b981; color: #fff; }
.role-tag.c, .role-tag.t { background: #34d399; color: #000; }
.role-tag.w, .role-tag.a { background: #f97316; color: #fff; }
.role-tag.pc { background: #ef4444; color: #fff; }
.role-tag.default { background: #8b5cf6; color: #fff; }

.team-tag {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-muted);
}

.quote-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 1rem;
  color: var(--text-muted);
}

/* Middle Stage Row: Timer on Left, Offer on Right */
.hero-stage-middle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 680px;
  margin: 10px auto 0 auto;
}

/* Enormous Countdown Timer Box on the Left (User Request) */
.hero-timer-box {
  background: rgba(15, 23, 42, 0.9);
  border: 3px solid var(--accent-gold);
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.hero-timer-box.timer-low {
  border-color: var(--accent-red);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.7);
  animation: pulse-timer 0.5s infinite alternate;
}

.hero-timer-box.timer-paused {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.icon-timer-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.icon-timer-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.icon-timer-btn-skip:hover {
  color: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

@keyframes pulse-timer {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.hero-timer-label {
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-timer-val {
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent-gold);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
  margin: 2px 0;
}

.hero-timer-box.timer-low .hero-timer-val {
  color: var(--accent-red);
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.7);
}

.hero-timer-unit {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Enormous Offer & Winning Bidder Display */
.offer-box-hero {
  flex: 1;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 14px 20px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.offer-box-hero.flash-bid {
  transform: scale(1.04);
  box-shadow: 0 0 40px var(--winner-color, #2563eb);
}

.offer-amount-hero {
  font-size: 4.8rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
}

.winner-banner-hero {
  margin-top: 8px;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  transition: background 0.3s ease;
}

/* Top Right Corner Last Called Box (User Request - Clickable for History) */
.last-called-hero-box {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid var(--panel-border);
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 170px;
  max-width: 240px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  text-align: right;
  z-index: 10;
  cursor: pointer;
  transition: all 0.2s ease;
}

.last-called-hero-box:hover {
  border-color: var(--accent-gold);
  background: rgba(30, 41, 59, 0.95);
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.last-called-hero-box.empty {
  padding: 8px 12px;
}

.last-called-header {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.last-called-body {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.last-called-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.last-called-price {
  font-weight: 800;
  color: var(--accent-gold);
  font-size: 0.9rem;
}

.last-called-footer {
  font-size: 0.75rem;
  margin-top: 2px;
}

/* History Modal Content Items */
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  transition: background 0.15s ease;
}

.history-item:hover {
  background: rgba(51, 65, 85, 0.7);
}

.history-index {
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--text-muted);
  width: 36px;
}

.history-player-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-player-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
}

.history-team {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.history-result {
  text-align: right;
}

.history-sold {
  font-weight: 800;
  color: var(--accent-gold);
  font-size: 0.95rem;
}

.history-passed {
  font-weight: 700;
  color: var(--accent-red);
  font-size: 0.85rem;
}

/* Idle State Prompt */
.idle-stage-hero {
  text-align: center;
  color: var(--text-muted);
}
.idle-stage-hero h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

/* Compact 2-Row Participants Roster Grid */
.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.participant-card {
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  border: 2px solid var(--panel-border);
  border-radius: 14px;
  padding: 10px 12px;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.participant-card.winning {
  border-color: var(--p-color, #3b82f6);
  box-shadow: 0 0 20px var(--p-color, #3b82f6);
  transform: translateY(-2px);
}

.participant-card-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.participant-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.participant-color-pill {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.participant-name {
  font-size: 1.15rem;
  font-weight: 800;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.key-badge {
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--text-muted);
}

.pencil-edit-icon {
  cursor: pointer;
  opacity: 0.65;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  margin-left: 4px;
}

.pencil-edit-icon:hover {
  opacity: 1;
  transform: scale(1.25);
  color: var(--accent-gold);
}

/* Drag & Drop Edit Mode for Participants Grid */
.participant-card.editable-mode {
  cursor: grab;
  border-style: dashed !important;
  border-color: var(--accent-gold) !important;
  background: rgba(30, 41, 59, 0.85) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3) !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.participant-card.editable-mode:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.5) !important;
}

.participant-card.dragging {
  opacity: 0.35 !important;
  transform: scale(0.96) !important;
  cursor: grabbing !important;
}

.participant-name-edit-input {
  background: #0f172a;
  border: 1.5px solid var(--accent-gold);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 6px;
  width: 100%;
  max-width: 145px;
  outline: none;
}

.participant-name-edit-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.drag-handle-badge {
  font-size: 0.85rem;
  color: var(--accent-gold);
  cursor: grab;
  user-select: none;
  margin-right: 4px;
}

.participant-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  font-size: 0.8rem;
}

.stat-item {
  background: rgba(15, 23, 42, 0.7);
  padding: 4px 6px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-item label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.stat-item .val {
  font-weight: 800;
  font-size: 0.95rem;
}

.stat-item.credits .val {
  color: var(--accent-gold);
}

.warning-min-mov {
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

/* Card Bottom Roster List Section (Unified Photo 1 + Photo 2) */
.participant-card-bottom {
  background: rgba(10, 15, 26, 0.6);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.card-roster-header {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
}

.card-roster-list {
  max-height: 110px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}

/* Thin Custom Scrollbar */
.card-roster-list::-webkit-scrollbar {
  width: 4px;
}
.card-roster-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.card-roster-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.card-roster-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

.card-roster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.5);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.card-roster-item .role-tag {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 4px;
  box-shadow: none;
}

.card-roster-name {
  font-weight: 700;
  color: #f8fafc;
  flex: 1;
  margin-left: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-roster-price {
  font-weight: 800;
  color: var(--accent-gold);
  font-size: 0.85rem;
  margin-left: 4px;
}

.roster-empty-msg {
  font-size: 0.8rem;
  color: #64748b;
  font-style: italic;
  padding: 6px 0;
  text-align: center;
}
  align-items: center;
}

.roster-mini-list {
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roster-mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Admin Controls Drawer / Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-card {
  background: #1e293b;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-header {
  padding: 20px 24px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  line-height: 1;
}

.modal-close:hover {
  background: #ef4444;
  border-color: #f87171;
  color: #ffffff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.7);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Form inputs & tables */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--panel-border);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: #3b82f6;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.player-search-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.player-search-table th, .player-search-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.player-search-table th {
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.player-search-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

/* Canvas Confetti */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2000;
}

/* Premium Material/iOS Pill Toggle Switch for Nomination Mode */
.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.85);
  padding: 12px 24px;
  border-radius: 40px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.switch-label {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.switch-label.active-scelta {
  color: #f59e0b;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  transform: scale(1.05);
}

.switch-label.active-random {
  color: #f472b6;
  text-shadow: 0 0 12px rgba(244, 114, 182, 0.7);
  transform: scale(1.05);
}

/* Custom Pill Switch (Material / iOS Capsule Toggle) */
.custom-pill-switch {
  position: relative !important;
  display: inline-block !important;
  width: 74px !important;
  height: 36px !important;
  cursor: pointer !important;
  vertical-align: middle !important;
  margin: 0 4px !important;
}

.custom-pill-switch input {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.pill-slider {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-radius: 36px !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45) !important;
  display: block !important;
}

.pill-slider:before {
  position: absolute !important;
  content: "" !important;
  height: 28px !important;
  width: 28px !important;
  left: 4px !important;
  top: 4px !important;
  background-color: #ffffff !important;
  border-radius: 50% !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4) !important;
}

/* State when checked (Random mode) */
.custom-pill-switch input:checked + .pill-slider {
  background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.55) !important;
}

.custom-pill-switch input:checked + .pill-slider:before {
  transform: translateX(38px) !important;
}

/* Button style when Random Mode is Active */
.btn-hero-call.random-mode {
  background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
  border-color: #f472b6 !important;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.5) !important;
}

.btn-hero-call.random-mode:hover {
  background: linear-gradient(135deg, #db2777, #7c3aed) !important;
  box-shadow: 0 6px 22px rgba(236, 72, 153, 0.8) !important;
}

/* Admin Only UI Elements Security Scoping */
.admin-only-ui {
  display: none !important;
}

body.role-admin .admin-only-ui {
  display: inline-flex !important;
}

/* User Role Badges (Minimal Clean Text, No Heavy Button Box) */
.badge-role {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  user-select: none;
  cursor: default;
}

.badge-role-admin {
  color: #f1f5f9 !important;
  font-weight: 800 !important;
}

.badge-role-team {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

.badge-role-guest {
  color: #94a3b8 !important;
}

/* Quick Login Team Buttons */
.quick-team-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--panel-border);
  color: #e2e8f0;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: all 0.2s ease;
}

.quick-team-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--accent-gold);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Team Viewer Container (Mobile Optimized) */
.team-viewer-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.team-single-box {
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  border: 2px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.team-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--panel-border);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.team-box-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffffff;
}

.team-box-color-pill {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.team-box-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.team-stat-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.team-stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.team-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Icon Only Header Buttons (Without box/border, Pure White SVG & High Visibility) */
.icon-only-btn {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #ffffff !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  opacity: 1 !important;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6)) !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
  user-select: none;
}

.icon-only-btn svg {
  stroke: #ffffff;
  display: block;
}

.icon-only-btn:hover {
  opacity: 1 !important;
  transform: scale(1.2) !important;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) !important;
  background: none !important;
}

.icon-only-btn:focus, .icon-only-btn:active {
  outline: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* Mobile-Friendly Compact Login Modal Styling */
.login-card {
  max-width: 480px;
  width: 94%;
  padding: 18px 20px;
  text-align: center;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  border-radius: 18px;
}

.login-header {
  margin-bottom: 14px;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.team-selection-section {
  text-align: left;
}

.team-selection-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.teams-login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

@media (max-width: 600px) {
  .login-card {
    padding: 12px 12px;
    width: 96%;
    max-height: 92vh;
    overflow-y: auto;
  }
  .login-header {
    margin-bottom: 8px;
  }
  .login-subtitle {
    display: none;
  }
  .login-title {
    font-size: 1.15rem;
  }
  .teams-login-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: 360px;
    gap: 8px;
  }
  .quick-team-btn {
    padding: 12px 10px;
    font-size: 0.95rem;
  }
}

/* History Icon Button (Top Right of Auction Stage) */
.history-icon-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--panel-border);
  color: #fff;
  font-size: 1.2rem;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
}

.history-icon-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: var(--accent-gold);
  transform: scale(1.1);
}

/* Comprehensive Mobile Size Reduction for Team View */
@media (max-width: 768px) {
  .team-viewer-container {
    padding: 4px 6px;
    gap: 8px;
  }

  .team-single-box {
    padding: 10px;
    border-radius: 12px;
  }

  .team-box-header {
    padding-bottom: 6px;
    margin-bottom: 8px;
  }

  .team-box-title {
    font-size: 1.05rem;
  }

  .team-box-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
  }

  .team-stat-card {
    padding: 6px 4px;
    border-radius: 8px;
  }

  .team-stat-value {
    font-size: 1.1rem;
  }

  .team-stat-label {
    font-size: 0.65rem;
  }

  /* Compact Player Card Hero on Mobile */
  .player-card-hero {
    padding: 10px 8px;
    gap: 6px;
  }

  .player-name-hero {
    font-size: 1.35rem;
  }

  .player-details-row {
    font-size: 0.75rem;
    gap: 4px;
  }

  .hero-stage-middle {
    gap: 8px;
    margin-top: 6px;
  }

  .hero-timer-box {
    padding: 4px 8px;
    min-width: 60px;
    border-radius: 10px;
  }

  .hero-timer-val {
    font-size: 1.8rem;
  }

  .hero-timer-label, .hero-timer-unit {
    font-size: 0.6rem;
  }

  .offer-amount-hero {
    font-size: 2.1rem;
  }

  .winner-banner-hero {
    font-size: 0.8rem;
    padding: 3px 6px;
  }

  .player-search-table th, .player-search-table td {
    padding: 5px 6px;
    font-size: 0.82rem;
  }

  .idle-stage-hero h2 {
    font-size: 1.4rem;
  }

  /* Top Header Mobile Overflow Prevention */
  .app-header {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 6px 10px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app-title {
    gap: 6px;
  }

  .app-title span:nth-child(2) {
    font-size: 1.05rem !important;
  }

  .badge-mantra, #session-title-display {
    display: none !important;
  }

  .header-actions {
    gap: 6px;
    flex-wrap: nowrap;
    margin-left: auto;
  }

  .badge-role {
    font-size: 0.72rem;
    padding: 3px 8px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .icon-only-btn {
    font-size: 1.05rem !important;
  }

  /* Mobile Auto-Adaptation & Responsive Styling for Team Viewer */
  .team-viewer-container {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    display: flex;
    flex-direction: column;
    gap: 8px !important;
  }

  .team-single-box {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 10px !important;
    box-sizing: border-box;
    width: 100% !important;
  }

  .team-box-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
  }

  .team-stat-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 4px !important;
    text-align: center;
    box-sizing: border-box;
  }

  .team-stat-value {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
  }

  .team-stat-label {
    font-size: 0.6rem !important;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 2px;
  }

  .badge-role {
    font-size: 1.05rem !important;
    padding: 4px 10px !important;
    max-width: none !important;
  }

  .team-box-title, .team-box-title span {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px !important;
    line-height: 1.2 !important;
  }

  .team-box-color-pill {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
  }
}

/* Modern Toggle Switch (Admin Pencil Mode) */
.modern-toggle-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  margin-left: 6px;
  flex-shrink: 0;
  vertical-align: middle;
}

.modern-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: #94a3b8;
  transition: all 0.25s ease;
  border-radius: 50%;
}

.modern-toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.modern-toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
  background-color: #ffffff;
}

.modern-phone-badge {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 6px #3b82f6;
  margin-left: 6px;
  flex-shrink: 0;
}

.phone-icon-only-badge {
  font-size: 0.95rem;
  line-height: 1;
  margin-right: 2px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.7));
}

.phone-bid-active-pill {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #60a5fa;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* Phone Bidding +1 Button Under Offer Box */
.phone-bid-box-wrapper {
  margin-top: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.phone-plus-one-btn {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 1px;
  border: none;
  outline: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.phone-plus-one-btn.active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.5);
}

.phone-plus-one-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.7);
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.phone-plus-one-btn.active:active {
  transform: translateY(1px) scale(0.98);
}

.phone-plus-one-btn.spento {
  background: rgba(30, 41, 59, 0.4);
  color: #475569;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: not-allowed;
  opacity: 0.35;
  box-shadow: none;
  pointer-events: none;
}

.phone-toggle-btn {
  padding: 4px 9px;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.phone-toggle-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 255, 255, 0.35);
  color: #f8fafc;
}

.phone-toggle-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.45));
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.phone-toggle-btn.active:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.5), rgba(5, 150, 105, 0.6));
  color: #ffffff;
}

/* ==========================================================================
   2-STEP LOGIN & DEDICATED ADMIN SELECTION CARD STYLES
   ========================================================================== */

.admin-login-hero-box {
  width: 100%;
}

.btn-admin-selection-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 2px solid rgba(245, 158, 11, 0.45);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(245, 158, 11, 0.2);
  user-select: none;
}

.btn-admin-selection-card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25), inset 0 1px 1px rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.95), rgba(20, 29, 48, 0.98));
}

.btn-admin-selection-card:active {
  transform: translateY(0) scale(0.99);
}

.admin-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.admin-arrow-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-admin-selection-card:hover .admin-arrow-badge {
  background: #f59e0b;
  color: #0f172a;
  transform: translateX(3px);
}

/* Login Target Pill in Password Step */
.login-target-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Password Input Toggle Button */
.btn-eye-toggle {
  transition: transform 0.15s ease, opacity 0.15s ease;
  user-select: none;
}

.btn-eye-toggle:hover {
  transform: scale(1.15);
  opacity: 1 !important;
}

.btn-eye-toggle:active {
  transform: scale(0.95);
}

/* Top Left Corner Svincolati Box (Desktop / TV View) */
.svincolati-hero-box {
  position: absolute;
  top: 14px;
  left: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid var(--panel-border);
  border-radius: 12px;
  padding: 8px 14px;
  min-width: 170px;
  max-width: 240px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  text-align: left;
  z-index: 10;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.svincolati-hero-box:hover {
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.95);
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
}

.svincolati-header {
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.svincolati-count-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 900;
}

.svincolati-body {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.svincolati-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Svincolati Icon Button (Mobile / Team View - Top Left) */
.svincolati-icon-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--panel-border);
  color: #fff;
  font-size: 1.1rem;
  padding: 5px 9px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 5px;
}

.svincolati-icon-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: #38bdf8;
  transform: scale(1.08);
}

.svincolati-badge-mini {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 1px 5px;
  border-radius: 8px;
}

/* SVINCOLATI MODAL STYLES */
.svincolati-modal-card {
  max-width: 1100px;
  width: 96%;
  max-height: 92vh;
  border-radius: 20px;
  background: #131d31;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.15);
}

.svincolati-modal-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-bottom: 2px solid #38bdf8;
  padding: 16px 24px;
}

.svincolati-pill-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.5);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.svincolati-modal-body {
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: hidden;
  max-height: calc(92vh - 80px);
}

/* Search bar */
.svincolati-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.svincolati-search-input-wrapper {
  position: relative;
  flex: 1;
}

.svincolati-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.svincolati-search-input {
  padding-left: 42px;
  padding-right: 36px;
  font-size: 1.02rem;
  border-radius: 12px;
  background: #0b1220;
  border: 1.5px solid var(--panel-border);
  transition: all 0.2s ease;
}

.svincolati-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
  background: #0f172a;
}

.svincolati-search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.svincolati-search-clear-btn:hover {
  background: #ef4444;
  color: #fff;
}

.svincolati-reset-btn {
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Quick Role Chips */
.svincolati-role-chips-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.svincolati-chips-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.svincolati-role-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.role-chip {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--panel-border);
  color: #cbd5e1;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  letter-spacing: 0.3px;
}

.role-chip:hover {
  transform: translateY(-1px);
  border-color: #38bdf8;
  color: #fff;
  background: rgba(51, 65, 85, 0.9);
}

.role-chip.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.role-chip.role-por.active {
  background: #eab308;
  color: #000;
  border-color: #eab308;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.5);
}

.role-chip.role-dc.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.role-chip.role-dd-ds.active {
  background: #60a5fa;
  color: #000;
  border-color: #60a5fa;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.5);
}

.role-chip.role-e-m.active {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.role-chip.role-c-t.active {
  background: #34d399;
  color: #000;
  border-color: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
}

.role-chip.role-w-a.active {
  background: #f97316;
  color: #fff;
  border-color: #f97316;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

.role-chip.role-pc.active {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

/* Filters Grid */
.svincolati-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
}

.svincolati-filters-grid label {
  font-size: 0.78rem;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.svincolati-filters-grid select {
  padding: 8px 10px;
  font-size: 0.88rem;
  border-radius: 8px;
}

/* Summary Bar */
.svincolati-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px;
  flex-wrap: wrap;
  gap: 8px;
}

.svincolati-summary-text {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.svincolati-role-breakdown {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.svincolati-breakdown-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

/* Table Container & Table */
.svincolati-table-container {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  max-height: 480px;
}

.svincolati-table {
  width: 100%;
  border-collapse: collapse;
}

.svincolati-table thead {
  position: sticky;
  top: 0;
  background: #0f172a;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.svincolati-table th {
  padding: 10px 12px;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 800;
  border-bottom: 2px solid var(--panel-border);
}

.svincolati-table td {
  padding: 9px 12px;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.svincolati-table tr:hover td {
  background: rgba(56, 189, 248, 0.08);
}

.svincolato-player-name {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.2px;
}

.svincolato-team-badge {
  font-weight: 600;
  color: #94a3b8;
  font-size: 0.88rem;
}

.svincolato-price {
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--accent-gold);
}

.svincolato-fvmp {
  font-weight: 700;
  font-size: 0.95rem;
  color: #38bdf8;
}

.badge-status-avail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-status-passed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Mobile Responsive for Svincolati Modal */
@media (max-width: 768px) {
  .svincolati-hero-box {
    padding: 6px 10px;
    min-width: 120px;
    max-width: 150px;
    top: 10px;
    left: 10px;
  }
  .svincolati-subtext {
    display: none;
  }
  .svincolati-filters-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
  }
  .svincolati-modal-body {
    padding: 12px 14px;
  }
  .svincolati-table th, .svincolati-table td {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
  .svincolati-search-input {
    font-size: 0.9rem;
    padding: 8px 10px 8px 34px;
  }
}

/* --- MODALITÀ SVINCOLI & GESTIONE ASTA DI RIPARAZIONE --- */
.card-roster-item.svincoli-item {
  border-left: 2px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.btn-svincola-row {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 5px;
  padding: 2px 7px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-svincola-row:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.06);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

#svincoli-mode-toggle-btn.active {
  background: rgba(239, 68, 68, 0.25) !important;
  border: 1.5px solid #ef4444 !important;
  color: #fca5a5 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
  animation: pulse-svincoli-btn 1.4s infinite alternate;
}

@keyframes pulse-svincoli-btn {
  0% { transform: scale(1); box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
  100% { transform: scale(1.12); box-shadow: 0 0 16px rgba(239, 68, 68, 0.85); }
}

.svincoli-mode-banner {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(15, 23, 42, 0.95));
  border: 1.5px solid #ef4444;
  color: #fee2e2;
  padding: 10px 18px;
  border-radius: 12px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
  animation: fadeInBanner 0.3s ease-out;
}

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

.btn-quick-refund {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-refund:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #6ee7b7;
  transform: translateY(-1px);
}


