/* Sticky table header for Player Performance */
.sticky-player-header th {
   position: sticky;
   top: var(--top-nav-height, 56px);
   z-index: 12;
   background: #0d152a;
}

/* Base palette */
:root {
   --bg-primary: #101624;
   --bg-secondary: #182033;
   --bg-tertiary: #232B3E;
   --text-primary: #F4F7FA;
   --text-secondary: #B0B8C1;
   --border-subtle: #273043;
   --accent-primary: #1FB6FF;
   --accent-secondary: #FFB340;
   --accent-danger: #EF4444;
   --accent-warning: #FACC15;
   --accent-success: #22C55E;

   --bg-base: var(--bg-primary);
   --bg-panel: var(--bg-secondary);
   --bg-surface: var(--bg-tertiary);
   --border-soft: var(--border-subtle);
   --text-muted: var(--text-secondary);
   --accent: var(--accent-primary);
   --accent-strong: #1FB6FF;
   --radius-sm: 6px;
   --radius-md: 12px;
   --input-bg: var(--bg-secondary);
   --input-border: #364152;
   --input-border-focus: var(--accent-primary);
   --top-nav-height: 56px;
   --top-nav-offset: 0;
   --top-nav-shadow: 0 2px 8px rgba(16, 22, 36, 0.08);
}

body {
   background-color: var(--bg-base);
   color: var(--text-primary);
   font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
   display: flex;
   min-height: 100vh;
   flex-direction: column;
   margin: 0;
}

body.has-top-nav {
   --top-nav-offset: var(--top-nav-height);
}

a {
   color: var(--text-primary);
}

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

.text-muted {
   color: var(--text-muted) !important;
}

/* Utility spacing */
.p-2 {
   padding: 0.5rem !important;
}

.p-3 {
   padding: 1rem !important;
}

.p-4 {
   padding: 1.5rem !important;
}

.px-2 {
   padding-left: 0.5rem !important;
   padding-right: 0.5rem !important;
}

.px-3 {
   padding-left: 1rem !important;
   padding-right: 1rem !important;
}

.py-2 {
   padding-top: 0.5rem !important;
   padding-bottom: 0.5rem !important;
}

.py-3 {
   padding-top: 1rem !important;
   padding-bottom: 1rem !important;
}

.mb-6 {
   margin-bottom: 2.5rem !important;
}

.gap-3 {
   gap: 1rem !important;
}

.gap-4 {
   gap: 1.5rem !important;
}

/* Typography */
.text-xs {
   font-size: 0.75rem !important;
   letter-spacing: 0.04em;
}

.text-sm {
   font-size: 0.875rem !important;
}

.text-muted-alt {
   color: var(--text-muted) !important;
}

.heading {
   font-weight: 600;
}

/* Surfaces */
.bg-panel {
   background-color: var(--bg-panel) !important;
}

.bg-surface {
   background-color: var(--bg-surface) !important;
}

.border-soft {
   border: 1px solid var(--border-soft) !important;
}

.rounded-sm {
   border-radius: var(--radius-sm) !important;
}

.rounded-md {
   border-radius: var(--radius-md) !important;
}

/* Buttons */
.btn-flat {
   border: 1px solid var(--border-soft);
   background: var(--bg-surface);
   color: var(--text-primary);
   border-radius: var(--radius-sm);
}

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

.btn-primary-soft {
   background: var(--accent);
   color: #0b1020;
   border: 1px solid var(--accent);
   border-radius: var(--radius-sm);
}

.btn-primary-soft:hover {
   background: var(--accent-strong);
   border-color: var(--accent-strong);
   color: #0b1020;
}

.btn-secondary-soft {
   background: var(--bg-surface);
   color: var(--text-primary);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
}

.btn-secondary-soft:hover {
   border-color: var(--accent);
   color: var(--accent);
}

.btn-icon {
   width: 36px;
   height: 36px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: 10px;
   border: 1px solid var(--border-soft);
   background: rgba(255, 255, 255, 0.04);
   color: var(--text-primary);
   transition: color 0.12s ease, border-color 0.12s ease, transform 0.08s ease
}

.btn-icon:hover {
   color: var(--accent);
   border-color: rgba(59, 130, 246, 0.65);
   transform: translateY(-1px);
}

.btn-icon-primary {
   background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(37, 99, 235, 0.18));
   border-color: rgba(59, 130, 246, 0.5);
   color: #cce4ff;
}

.btn-icon-secondary {
   background: rgba(255, 255, 255, 0.04);
}

.btn-icon-danger {
   background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(185, 28, 28, 0.16));
   border-color: rgba(239, 68, 68, 0.45);
   color: #fecdd3;
}

.btn-icon-danger:hover {
   color: #fecdd3;
   border-color: rgba(248, 113, 113, 0.7);
}

/* Wizard */
.wizard-nav {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
   gap: 12px;
}

.wizard-step-card {
   display: flex;
   align-items: center;
   gap: 14px;
   padding: 16px 18px;
   border: 2px solid rgba(255, 255, 255, 0.08);
   border-radius: 12px;
   background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(15, 23, 42, 0.6);
   backdrop-filter: blur(8px);
   transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
   cursor: pointer;
   position: relative;
   overflow: hidden;
}

.wizard-step-card::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 2px;
   background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
   opacity: 0;
   transition: opacity 0.3s ease;
}

.wizard-step-card:hover:not(.is-active) {
   border-color: rgba(59, 130, 246, 0.3);
   background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(59, 130, 246, 0.02) 100%), rgba(15, 23, 42, 0.7);
   transform: translateY(-2px);
}

.wizard-nav-wrapper {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 1rem;
   flex-wrap: wrap;
}

.wizard-nav-wrapper .wizard-nav {
   flex: 1;
}

.wizard-actions {
   display: flex;
   align-items: center;
   gap: 0.5rem;
}

.wizard-step-card.is-active {
   border-color: rgba(59, 130, 246, 0.7);
   background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%), rgba(15, 23, 42, 0.9);
   box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
   transform: translateY(-2px);
}

.wizard-step-card.is-active::before {
   opacity: 1;
}

.wizard-actions .btn {
   white-space: nowrap;
}

/* Enhanced wizard button styles */
.wizard-step-panel .btn-primary-soft {
   background: linear-gradient(135deg, rgba(31, 182, 255, 0.25) 0%, rgba(37, 99, 235, 0.2) 100%);
   border: 1.5px solid rgba(31, 182, 255, 0.4);
   color: var(--text-primary);
   font-weight: 600;
   padding: 10px 20px;
   border-radius: 8px;
   transition: all 0.2s ease;
}

/* Collapse functionality for optional fields */
.collapse {
   display: none;
}

.collapse.show {
   display: block;
   animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
   from {
      opacity: 0;
      transform: translateY(-10px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

.wizard-step-panel .btn-primary-soft:hover {
   background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(37, 99, 235, 0.3) 100%);
   border-color: rgba(59, 130, 246, 0.6);
   transform: translateY(-1px);
   box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.wizard-step-panel .btn-secondary-soft {
   background: rgba(255, 255, 255, 0.04);
   border: 1.5px solid rgba(255, 255, 255, 0.12);
   color: rgba(255, 255, 255, 0.85);
   font-weight: 600;
   padding: 10px 20px;
   border-radius: 8px;
   transition: all 0.2s ease;
}

.wizard-step-panel .btn-secondary-soft:hover {
   background: rgba(255, 255, 255, 0.08);
   border-color: rgba(255, 255, 255, 0.2);
   transform: translateY(-1px);
}

.wizard-step-panel .btn-link {
   color: rgba(59, 130, 246, 0.9);
   font-size: 13px;
   font-weight: 600;
   transition: color 0.2s ease;
}

.wizard-step-panel .btn-link:hover {
   color: rgba(96, 165, 250, 1);
}

.wizard-step-index {
   width: 38px;
   height: 38px;
   border-radius: 50%;
   border: 2px solid rgba(255, 255, 255, 0.12);
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-weight: 800;
   font-size: 15px;
   color: rgba(255, 255, 255, 0.4);
   background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
   flex-shrink: 0;
   transition: all 0.2s ease;
}

.wizard-step-card.is-active .wizard-step-index {
   color: var(--text-primary);
   border-color: rgba(31, 182, 255, 0.8);
   background: linear-gradient(135deg, rgba(31, 182, 255, 0.4) 0%, rgba(37, 99, 235, 0.3) 100%);
   box-shadow: 0 0 0 4px rgba(31, 182, 255, 0.12);
}

.wizard-step-title {
   font-weight: 700;
}

.wizard-step-panel {
   display: none;
}

.wizard-step-panel.is-active {
   display: block;
   animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
   from {
      opacity: 0;
      transform: translateY(10px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

.wizard-step-panel .panel {
   background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(15, 23, 42, 0.6);
   border: 1.5px solid rgba(255, 255, 255, 0.08);
   border-radius: 12px;
   backdrop-filter: blur(12px);
}

.wizard-step-panel .panel-body {
   padding: 24px;
}

.wizard-source-option {
   display: flex;
   gap: 12px;
   padding: 14px 16px;
   border: 2px solid rgba(255, 255, 255, 0.08);
   border-radius: 10px;
   background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(15, 23, 42, 0.4);
   cursor: pointer;
   min-width: 240px;
   transition: all 0.2s ease;
}

.wizard-source-option input {
   margin-top: 2px;
   width: 18px;
   height: 18px;
   cursor: pointer;
}

.wizard-source-option:hover {
   border-color: rgba(59, 130, 246, 0.4);
   background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%), rgba(15, 23, 42, 0.5);
   transform: translateY(-1px);
}

.wizard-source-option input:checked~.wizard-source-copy {
   color: var(--text-primary);
}

.wizard-source-option:has(input:checked) {
   border-color: rgba(31, 182, 255, 0.7);
   background: linear-gradient(135deg, rgba(31, 182, 255, 0.12) 0%, rgba(31, 182, 255, 0.04) 100%), rgba(16, 22, 36, 0.6);
}

.wizard-source-copy .text-sm {
   color: var(--text-muted);
}

.wizard-status {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   padding: 6px 10px;
   border-radius: 999px;
   font-size: 12px;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   border: 1px solid var(--border-soft);
}

.wizard-status-pending {
   color: var(--text-muted);
}

.wizard-status-active {
   color: #cde3ff;
   border-color: rgba(59, 130, 246, 0.6);
}

.wizard-status-success {
   color: #bbf7d0;
   border-color: rgba(34, 197, 94, 0.5);
}

.wizard-status-failed {
   color: #fecdd3;
   border-color: rgba(248, 113, 113, 0.6);
}

.summary-card {
   background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.06)), var(--bg-panel);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-md);
}

.login-page {
   min-height: calc(100vh - 48px);
   width: 100%;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 2rem 1rem;
}

.login-columns {
   display: flex;
   align-items: stretch;
   justify-content: center;
   gap: 2.5rem;
   flex-wrap: wrap;
   width: min(840px, 100%);
}

.login-card {
   width: min(420px, 100%);
   background: rgba(15, 23, 42, 0.9);
   border: 1px solid rgba(148, 163, 184, 0.2);
   border-radius: var(--radius-md);
   padding: 2rem;
}

.login-card-brand img {
   border-radius: 8px;
   filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
}

.login-form .form-label {
   font-weight: 600;
   color: var(--text-muted);
}

.login-input {
   background: var(--input-bg);
   border: 1px solid var(--input-border);
   border-radius: var(--radius-sm);
   color: var(--text-primary);
   transition: border-color 0.15s ease
}

.login-input:focus {
   border-color: var(--accent);
   background: #0b152d;
   color: var(--text-primary);
}

.login-card-foot a {
   color: var(--accent);
}

.login-panel {
   max-width: 360px;
   border: 1px solid rgba(148, 163, 184, 0.2);
   border-radius: var(--radius-md);
   padding: 2rem;
   background: linear-gradient(145deg, rgba(37, 99, 235, 0.4), rgba(15, 23, 42, 0.8));
}

.login-panel h2 {
   color: #f8fafc;
}

.login-feature-list li {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   margin-bottom: 0.85rem;
   color: var(--text-muted);
}

.login-feature-list li i {
   width: 32px;
   height: 32px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: 8px;
   background: rgba(255, 255, 255, 0.08);
   color: var(--accent);
}

@media (max-width: 768px) {
   .login-columns {
      gap: 1.5rem;
   }

   .login-panel {
      width: 100%;
   }
}

.summary-chip {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   padding: 4px 8px;
   border-radius: 999px;
   font-size: 11px;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   color: var(--text-muted);
   border: 1px solid var(--border-soft);
}

.summary-chip-home {
   background: rgba(59, 130, 246, 0.14);
   color: #cde3ff;
   border-color: rgba(59, 130, 246, 0.4);
}

.summary-chip-away {
   background: rgba(236, 72, 153, 0.14);
   color: #ffd9ef;
   border-color: rgba(236, 72, 153, 0.4);
}

.summary-value {
   font-size: 1.6rem;
   font-weight: 700;
   color: var(--text-primary);
}

.timeline-list {
   display: flex;
   flex-direction: column;
   gap: 12px;
}

.timeline-period {
   display: flex;
   flex-direction: column;
   gap: 6px;
}

.timeline-period-label {
   font-size: 0.85rem;
   letter-spacing: 0.02em;
   color: var(--text-muted);
   margin-bottom: 8px;
}

.timeline-row {
   display: grid;
   grid-template-columns: 90px 1fr 120px 90px;
   align-items: center;
   gap: 12px;
   padding: 10px 12px;
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   text-decoration: none;
   color: inherit;
   background: rgba(255, 255, 255, 0.02);
   transition: border-color 0.12s ease, transform 0.08s ease, background 0.12s ease;
}

.timeline-row:hover {
   border-color: rgba(59, 130, 246, 0.4);
   transform: translateY(-1px);
   background: rgba(59, 130, 246, 0.04);
}

.timeline-time .text-xs {
   color: var(--text-muted);
}

.timeline-title {
   font-weight: 600;
   color: var(--text-primary);
}

.timeline-main .text-xs {
   color: var(--text-muted);
}

.timeline-team {
   text-align: right;
}

.timeline-jump {
   text-align: right;
}

.team-badge {
   display: inline-flex;
   align-items: center;
   padding: 4px 10px;
   border-radius: 999px;
   font-size: 12px;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   border: 1px solid var(--border-soft);
}

.badge-home {
   background: rgba(59, 130, 246, 0.18);
   color: #cde3ff;
   border-color: rgba(59, 130, 246, 0.4);
}

.badge-away {
   background: rgba(236, 72, 153, 0.18);
   color: #ffd9ef;
   border-color: rgba(236, 72, 153, 0.4);
}

.badge-unknown {
   background: rgba(148, 163, 184, 0.16);
   color: #cbd5e1;
   border-color: rgba(148, 163, 184, 0.4);
}

.summary-score {
   display: grid;
   grid-template-columns: 1fr auto 1fr;
   align-items: center;
   gap: 18px;
   padding: 16px 20px;
   border: 1px solid var(--border-soft);
   border-radius: 14px;
   background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08), transparent 35%),
      radial-gradient(circle at 80% 0%, rgba(236, 72, 153, 0.08), transparent 30%),
      var(--surface);
}

.summary-score-card {
   width: 100%;
}

.summary-team {
   display: flex;
   flex-direction: column;
   gap: 4px;
}

.summary-team-label {
   font-size: 0.75rem;
   letter-spacing: 0.12em;
   text-transform: uppercase;
   color: var(--text-muted);
   font-weight: 700;
}

.summary-team-name {
   font-size: 1.1rem;
   font-weight: 700;
   color: var(--text-primary);
   line-height: 1.25;
}

.summary-scoreline {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 6px;
   min-width: 140px;
}

.summary-score-digits {
   display: flex;
   align-items: baseline;
   gap: 10px;
}

.score-separator {
   color: var(--text-muted);
   font-size: 1.4rem;
   font-weight: 700;
}

.summary-scoreline .score-number {
   font-size: 2.4rem;
   font-weight: 800;
   color: var(--text-primary);
   letter-spacing: 0.02em;
}

@media (max-width: 768px) {
   .summary-score {
      grid-template-columns: 1fr;
      text-align: left;
      gap: 12px;
   }

   .summary-scoreline {
      align-items: flex-start;
   }
}

.yellowCard-ico {
   color: #ffcd00;
}

.redCard-ico {
   color: #dc0000;
}

.match-events-summary {
   display: flex;
   flex-direction: column;
   align-items: center;
   text-align: center;
   gap: 16px;
}

.event-summary-section {
   width: 100%;
   display: flex;
   justify-content: center;
}

.events-column-wrapper {
   display: flex;
   justify-content: space-between;
   width: 100%;
   max-width: 500px;
}

.events-column {
   flex: 1;
   display: flex;
   flex-direction: column;
   gap: 8px;
}

.events-column:first-child {
   text-align: left;
   padding-right: 16px;
   border-right: 1px solid var(--border-soft);
}

.events-column:last-child {
   text-align: right;
   padding-left: 16px;
}

/* Event summary timeline (match overview + stats modal parity) */
.event-summary-timeline {
   display: flex;
   flex-direction: column;
   gap: 18px;
}

.event-summary-half {
   display: flex;
   flex-direction: column;
   gap: 12px;
}

.event-summary-half-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 8px 12px;
   border-radius: 10px;
   background: rgba(15, 23, 42, 0.6);
   border: 1px solid rgba(148, 163, 184, 0.18);
}

.event-summary-half-label {
   font-size: 12px;
   font-weight: 700;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   color: #e2e8f0;
}

.event-summary-half-score {
   font-size: 12px;
   font-weight: 700;
   color: #cbd5f5;
}

.event-summary-half-grid {
   display: grid;
   grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
   gap: 16px;
}

.event-summary-column {
   display: flex;
   flex-direction: column;
   gap: 8px;
}

.event-summary-item {
   display: flex;
   align-items: center;
   gap: 8px;
   font-size: 12px;
   color: #e2e8f0;
}

.event-summary-item--away {
   justify-content: flex-end;
   text-align: right;
}

.event-summary-time {
   font-weight: 700;
   color: #93c5fd;
   min-width: 42px;
}

.event-summary-scoreline {
   font-weight: 700;
   color: #e2e8f0;
   min-width: 40px;
   text-align: center;
}

.event-summary-label {
   font-weight: 600;
   color: #f8fafc;
}

.event-summary-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 22px;
   height: 22px;
   border-radius: 6px;
   background: rgba(148, 163, 184, 0.15);
   color: #f8fafc;
   font-size: 12px;
}

.event-summary-icon--sub {
   background: rgba(16, 185, 129, 0.2);
   color: #34d399;
}

.event-summary-icon--goal {
   background: rgba(59, 130, 246, 0.2);
   color: #93c5fd;
}

.event-summary-icon--card {
   width: 14px;
   height: 18px;
   border-radius: 3px;
}

.event-summary-icon--yellow {
   background: #facc15;
}

.event-summary-icon--red {
   background: #ef4444;
}

.event-summary-icon--shot-on {
   background: rgba(34, 197, 94, 0.2);
   color: #34d399;
}

.event-summary-icon--shot-off {
   background: rgba(248, 113, 113, 0.2);
   color: #f87171;
}

.event-summary-icon--shot {
   background: rgba(148, 163, 184, 0.2);
   color: #cbd5f5;
}

@media (max-width: 768px) {
   .event-summary-half-grid {
      grid-template-columns: 1fr;
   }

   .event-summary-item--away {
      justify-content: flex-start;
      text-align: left;
   }
}

.comparison-row {
   display: grid;
   grid-template-columns: 1fr 140px 1fr;
   align-items: center;
   gap: 14px;
   padding: 8px 0;
}

.comparison-row .side {
   display: grid;
   grid-template-columns: auto 1fr;
   align-items: center;
   gap: 8px;
}

.comparison-row .value-away {
   grid-template-columns: 1fr auto;
}

.bar-wrap {
   position: relative;
   width: 100%;
   background: #1f2937;
   border-radius: 999px;
   height: 12px;
   overflow: hidden;
}

.bar {
   position: absolute;
   left: 0;
   top: 0;
   height: 100%;
   border-radius: 999px;
   opacity: 0.85;
   transition: width 0.25s ease;
}

.bar-home {
   right: auto;
   background: #f97316;
}

.bar-away {
   left: auto;
   right: 0;
   background: #3b82f6;
}

.value-number {
   font-weight: 700;
   font-size: 1rem;
}

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

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

.metric-label {
   text-align: center;
   font-weight: 600;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   color: var(--text-muted);
   font-size: 0.85rem;
}

@media (max-width: 900px) {
   .comparison-row {
      grid-template-columns: 1fr;
      gap: 10px;
   }

   .comparison-row .side,
   .comparison-row .value-away {
      grid-template-columns: auto 1fr;
   }

   .comparison-row .value-away {
      grid-template-columns: 1fr auto;
   }

   .metric-label {
      order: -1;
   }
}

/* Inputs */
.input-dark,
.select-dark,
.textarea-dark {
   background-color: rgba(15, 23, 42, 0.6) !important;
   border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
   color: #e2e8f0 !important;
   border-radius: 8px !important;
   padding: 10px 14px !important;
   font-size: 14px !important;
   transition: all 0.2s ease !important;
}

.input-dark:focus,
.select-dark:focus,
.textarea-dark:focus {
   background-color: rgba(15, 23, 42, 0.8) !important;
   border-color: rgba(59, 130, 246, 0.5) !important;
   box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
   outline: none !important;
}

.input-dark:hover:not(:focus),
.select-dark:hover:not(:focus),
.textarea-dark:hover:not(:focus) {
   border-color: rgba(255, 255, 255, 0.15) !important;
}

.select-dark option {
   background-color: #0f172a;
   color: #e2e8f0;
}

.form-label {
   color: rgba(255, 255, 255, 0.7) !important;
   font-size: 13px;
   font-weight: 600;
   letter-spacing: 0.01em;
   margin-bottom: 6px;
}

.text-light.form-label {
   color: rgba(255, 255, 255, 0.85) !important;
}

.form-text {
   color: rgba(255, 255, 255, 0.5) !important;
   font-size: 12px;
   margin-top: 6px;
}

/* Form Sections */
.form-section {
   display: flex;
   flex-direction: column;
}

.form-section-title {
   font-size: 14px;
   text-transform: uppercase;
   letter-spacing: 0.05em;
   color: rgba(255, 255, 255, 0.9);
}

/* Tables */
.table-dark {
   color: var(--text-primary);
   background-color: var(--bg-panel);
}

.table-dark th,
.table-dark td {
   border-color: var(--border-soft);
}

.table-dark thead {
   background: #0d152a;
}

.table-dark tbody tr {
   border-bottom: 1px solid var(--border-soft);
}

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

/* Manager dashboards */
.filters-panel {
   display: flex;
   flex-direction: column;
   gap: 1rem;
}

.filters-panel form {
   flex: 1;
}

.filters-panel .filter-group {
   padding-bottom: 1rem;
   border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.filters-panel .filter-group:last-child {
   border-bottom: none;
   padding-bottom: 0;
}

.filter-actions button {
   min-height: 44px;
}

.manager-list-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 1rem;
   border-bottom: 1px solid var(--border-soft);
   padding-bottom: 1rem;
}

.manager-table thead th {
   font-size: 0.75rem;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   border-bottom: 1px solid var(--border-soft);
   color: var(--text-muted);
}

.manager-table tbody tr {
   border-top: 1px solid var(--border-soft);
}

.manager-table tbody tr:first-child {
   border-top: none;
}

.manager-table tbody tr:hover {
   background: rgba(255, 255, 255, 0.02);
}

.manager-table td {
   vertical-align: middle;
}

.tag-pill {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 0.2rem 0.75rem;
   border-radius: 999px;
   border: 1px solid rgba(255, 255, 255, 0.15);
   background: rgba(255, 255, 255, 0.04);
   font-size: 0.66rem;
   text-transform: uppercase;
   letter-spacing: 0.04em;
}

.tag-pill+.tag-pill {
   margin-left: 0.35rem;
}

.avatar-badge {
   width: 42px;
   height: 42px;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.05);
   border: 1px solid rgba(255, 255, 255, 0.1);
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-weight: 700;
   letter-spacing: 0.04em;
}

.avatar-badge.small {
   width: 36px;
   height: 36px;
   font-size: 0.8rem;
}

.manager-footer {
   border-top: 1px solid var(--border-soft);
   padding-top: 1rem;
}

.pagination-chips {
   display: flex;
   align-items: center;
   gap: 0.4rem;
}

.pagination-chip {
   width: 34px;
   height: 34px;
   border-radius: 999px;
   border: 1px solid var(--border-soft);
   background: rgba(255, 255, 255, 0.04);
   color: var(--text-muted);
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-size: 0.8rem;
   transition: border-color 0.2s ease, color 0.2s ease;
}

.pagination-chip:hover {
   border-color: rgba(59, 130, 246, 0.6);
   color: var(--accent);
}

.pagination-chip.active {
   border-color: var(--accent);
   color: var(--accent);
}

@media (max-width: 992px) {
   .manager-list-header {
      flex-direction: column;
      align-items: flex-start;
   }

   .filters-panel {
      flex-direction: column;
   }
}

/* Matches library */
.library-layout {
   display: flex;
   flex-direction: column;
   gap: 1.25rem;
   padding-bottom: 1rem;
}

.library-layout button,
.library-layout .btn {
   border-radius: 10px;
}

.library-layout__header {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 1rem;
   flex-wrap: wrap;
}

.library-layout__eyebrow {
   margin: 0;
   color: var(--text-muted);
   letter-spacing: 0.35em;
   font-size: 0.75rem;
   text-transform: uppercase;
}

.library-layout__title {
   margin: 0.15rem 0 0;
   font-size: 2rem;
}

.library-layout__description {
   margin: 0.25rem 0 0;
   color: var(--text-muted);
   font-size: 0.95rem;
}

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

.library-layout__toolbar {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 1rem;
   flex-wrap: wrap;
}

.library-batch {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   font-size: 0.75rem;
   letter-spacing: 0.08em;
   text-transform: uppercase;
}

.library-batch__state {
   color: var(--text-muted);
   font-weight: 600;
}

.library-batch__actions {
   display: flex;
   gap: 0.5rem;
}

.library-batch__button {
   border: 1px solid var(--border-soft);
   border-radius: 999px;
   padding: 0.35rem 0.9rem;
   background: transparent;
   color: var(--text-muted);
   font-weight: 600;
   letter-spacing: 0.08em;
   font-size: 0.7rem;
   text-transform: uppercase;
   cursor: pointer;
   transition: border-color 0.2s ease, color 0.2s ease;
}

.library-batch__button:hover:not(:disabled) {
   border-color: var(--accent);
   color: var(--accent);
}

.library-batch__button--danger {
   border-color: var(--accent-danger);
   color: var(--accent-danger);
}

.library-batch__button:disabled {
   opacity: 0.4;
   cursor: not-allowed;
}

.library-search {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   border: 1px solid var(--border-soft);
   border-radius: 10px;
   padding: 0.25rem 0.85rem;
   background: var(--bg-secondary);
}

.library-search input {
   border: none;
   background: transparent;
   outline: none;
   color: var(--text-primary);
   font-size: 0.95rem;
   width: 220px;
}

.library-search__submit {
   border: none;
   background: var(--accent);
   color: #0b1020;
   border-radius: 10px;
   font-weight: 600;
   padding: 0.35rem 0.9rem;
   letter-spacing: 0.08em;
   cursor: pointer;
}

.library-search__submit:hover {
   background: var(--accent-strong);
}

.library-tabs-row {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 1rem;
   flex-wrap: wrap;
}

.library-tabs-row .library-tabs {
   flex: 1;
}

.library-search--tabs {
   margin-left: auto;
}

.library-tabs-row__right {
   display: flex;
   align-items: center;
   gap: 0.65rem;
   margin-left: auto;
}

.library-create-button {
   box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
   white-space: nowrap;
   padding: 0.35rem 1rem;
}

.library-tabs {
   display: flex;
   gap: 0.45rem;
   flex-wrap: wrap;
   align-items: center;
}

.library-tab {
   border: 1px solid rgba(255, 255, 255, 0.15);
   border-radius: 999px;
   padding: 0.35rem 0.95rem;
   font-size: 0.75rem;
   letter-spacing: 0.12em;
   text-transform: uppercase;
   color: var(--text-muted);
   transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.library-tab--active {
   border-color: var(--accent);
   color: var(--accent);
   background: rgba(46, 196, 182, 0.12);
}

.library-tab__count {
   margin-left: 0.35rem;
   font-size: 0.65rem;
   color: var(--text-muted);
}

.library-summary {
   margin: 0;
   color: var(--text-muted);
   font-size: 0.8rem;
   letter-spacing: 0.08em;
   text-transform: uppercase;
}

.library-empty-state {
   border: 1px solid rgba(255, 255, 255, 0.15);
   border-radius: 14px;
   padding: 1rem 1.25rem;
   background: rgba(255, 255, 255, 0.02);
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 1rem;
   flex-wrap: wrap;
}

.library-list {
   display: flex;
   flex-direction: column;
   gap: 0.75rem;
}

.library-row {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.75rem;
   padding: 0.75rem 1rem;
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 14px;
   background: var(--bg-panel);
   transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.library-row:hover {
   border-color: rgba(46, 196, 182, 0.8);
   background: rgba(46, 196, 182, 0.08);
   box-shadow: 0 24px 45px rgba(0, 0, 0, 0.35);
}

.library-row__main {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   flex: 1;
}

.library-row__select {
   display: flex;
   align-items: center;
   justify-content: center;
}

.library-row__select input {
   width: 18px;
   height: 18px;
   accent-color: var(--accent);
}

.library-row__link {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   flex: 1;
   text-decoration: none;
   color: inherit;
}

.library-row__thumbnail {
   position: relative;
   width: 160px;
   height: 95px;
   border-radius: 12px;
   background: rgba(255, 255, 255, 0.02);
   overflow: hidden;
   display: flex;
   align-items: center;
   justify-content: center;
}

.library-row__thumbnail img {
   width: 100%;
   height: 100%;
   object-fit: cover;
}

.library-row__placeholder {
   font-size: 0.75rem;
   color: var(--text-muted);
}

.library-row__duration {
   position: absolute;
   bottom: 8px;
   right: 8px;
   background: rgba(11, 18, 48, 0.75);
   color: #fff;
   font-size: 0.7rem;
   letter-spacing: 0.15em;
   padding: 0.1rem 0.65rem;
   border-radius: 999px;
}

.library-row__details {
   display: flex;
   flex-direction: column;
   gap: 0.35rem;
}

.library-row__title {
   display: flex;
   align-items: center;
   gap: 0.5rem;
}

.library-row__title h3 {
   margin: 0;
   font-size: 1.1rem;
}

.status-badge {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 0.2rem 0.65rem;
   border-radius: 999px;
   font-size: 0.65rem;
   letter-spacing: 0.1em;
   text-transform: uppercase;
   font-weight: 600;
   border: 1px solid transparent;
}

.status-badge--ready {
   color: var(--accent-success);
   border-color: rgba(76, 175, 80, 0.5);
}

.status-badge--draft {
   color: var(--accent-warning);
   border-color: rgba(255, 183, 3, 0.5);
}

.status-badge--status {
   color: var(--text-muted);
   border-color: rgba(255, 255, 255, 0.2);
}

.library-row__meta {
   margin: 0;
   display: flex;
   align-items: center;
   gap: 0.35rem;
   font-size: 0.8rem;
   color: var(--text-muted);
}

.library-row__meta-separator {
   color: var(--text-muted);
}

.library-row__meta--muted {
   font-size: 0.75rem;
   color: var(--text-muted);
}

.library-row__meta-venue {
   margin-left: 0.35rem;
   font-size: 0.75rem;
   opacity: 0.8;
}

.library-row__label {
   font-size: 0.65rem;
   text-transform: uppercase;
   letter-spacing: 0.2em;
   margin-right: 0.3rem;
}

.library-row__value {
   font-size: 0.65rem;
}

.library-row__actions {
   flex-shrink: 0;
}

.library-row__menu {
   border: 1px solid rgba(255, 255, 255, 0.3);
   background: rgba(255, 255, 255, 0.05);
   border-radius: 10px;
   width: 42px;
   height: 42px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   color: var(--text-primary);
   cursor: pointer;
}

.library-row__menu:hover,
.library-row__menu:focus-visible {
   border-color: rgba(46, 196, 182, 0.6);
   border-radius: 10px;
}

.dropdown-menu {
   display: none;
   min-width: 210px;
   border-radius: 16px;
   padding: 0.25rem 0;
   background: var(--bg-panel);
   border: 1px solid rgba(255, 255, 255, 0.12);
   box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

.dropdown-menu.show {
   display: block;
}

.dropdown-item {
   display: flex;
   align-items: center;
   gap: 0.65rem;
   padding: 0.55rem 1.1rem;
   color: var(--text-muted);
   font-size: 0.9rem;
   font-weight: 500;
   text-decoration: none;
   border-radius: 10px;
   transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item i {
   width: 18px;
   display: inline-flex;
   justify-content: center;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
   background: rgba(255, 255, 255, 0.06);
   color: var(--text-primary);
}

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

.dropdown-item-danger:hover,
.dropdown-item-danger:focus-visible {
   background: rgba(214, 40, 40, 0.2);
   color: var(--accent-danger);
}

.share-modal__description {
   margin: 0 0 1rem;
   color: var(--text-muted);
   font-size: 0.9rem;
   text-align: center;
}

.share-modal__actions {
   display: flex;
   justify-content: center;
   gap: 1rem;
   margin-bottom: 1rem;
}

.share-modal__option {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 0.35rem;
   padding: 0.75rem 1.25rem;
   border: 1px solid var(--border-soft);
   border-radius: 12px;
   text-decoration: none;
   color: inherit;
   font-size: 0.9rem;
   font-weight: 600;
   width: 140px;
   text-align: center;
   background: transparent;
}

.share-modal__option--copy {
   cursor: pointer;
}

.share-modal__icon {
   width: 42px;
   height: 42px;
   border-radius: 50%;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   background: rgba(46, 196, 182, 0.1);
   color: var(--accent);
   font-size: 1.2rem;
}

.share-modal__link {
   margin: 0;
   font-size: 0.8rem;
   color: var(--text-muted);
   text-align: center;
   word-break: break-all;
}

@media (max-width: 900px) {

   .library-layout__header,
   .library-layout__toolbar {
      flex-direction: column;
      align-items: flex-start;
   }

   .library-search {
      width: 100%;
      justify-content: space-between;
   }

   .library-tabs-row {
      flex-direction: column;
      align-items: flex-start;
   }

   .library-tabs-row .library-tabs {
      width: 100%;
   }

   .library-search--tabs {
      margin-left: 0;
      width: 100%;
   }

   .library-tabs-row__right {
      width: 100%;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
   }

   .library-row {
      flex-direction: column;
      align-items: stretch;
   }

   .library-row__main {
      width: 100%;
   }

   .library-row__thumbnail {
      width: 100%;
      height: 110px;
   }

   .library-row__actions {
      align-self: flex-end;
   }
}

@media (max-width: 640px) {
   .library-search input {
      width: 100%;
   }

   .library-row__link {
      flex-direction: column;
      align-items: flex-start;
   }
}

.match-table-wrap {
   background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.06)), var(--bg-panel);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-md);
   overflow-x: auto;
   position: relative;
}

.match-table {
   width: 100%;
   border-collapse: collapse;
   color: var(--text-primary);
   min-width: 720px;
}

.match-table th,
.match-table td {
   padding: 12px 18px;
   border-bottom: 1px solid var(--border-soft);
   text-align: left;
}

.match-table th {
   background: #0d152a;
   font-weight: 600;
   font-size: 0.9rem;
   letter-spacing: 0.01em;
}

.match-table tbody tr:hover {
   background: rgba(255, 255, 255, 0.03);
}

.match-table-head {
   border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sort-button {
   background: none;
   border: none;
   padding: 0;
   color: inherit;
   display: inline-flex;
   align-items: center;
   gap: 8px;
   font-weight: 600;
   transition: color 0.12s ease;
}

.sort-button:hover {
   color: var(--accent);
}

.sort-icon {
   font-size: 14px;
   opacity: 0.8;
}

.match-panel {
   border: 1px solid var(--border-soft);
}

.match-list {
   width: 100%;
}

.match-card {
   background: var(--bg-panel);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-md);
   transition: border-color 0.12s ease, transform 0.08s ease
}

.match-card:hover {
   border-color: rgba(63, 184, 255, 0.45);
   transform: translateY(-1px);
}

.match-card-row {
   display: grid;
   grid-template-columns: 1.4fr 1fr auto;
   gap: 16px;
   align-items: center;
}

.match-card-main {
   display: flex;
   flex-direction: column;
   gap: 4px;
}

.match-title {
   font-weight: 700;
   font-size: 1rem;
   color: var(--text-primary);
}

.match-sub {
   min-height: 18px;
}

.match-card-meta {
   text-align: left;
}

.match-card-actions {
   display: flex;
   align-items: center;
   gap: 10px;
   justify-content: flex-end;
}

.status-pill {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   padding: 6px 10px;
   border-radius: 999px;
   font-size: 11px;
   font-weight: 700;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   border: 1px solid transparent;
}

.status-pill-muted {
   background: rgba(148, 163, 184, 0.16);
   color: #cbd5e1;
   border-color: rgba(148, 163, 184, 0.4);
}

.status-pill-live {
   background: rgba(34, 197, 94, 0.18);
   color: #34d399;
   border-color: rgba(34, 197, 94, 0.5);
}

.status-pill-final {
   background: rgba(63, 184, 255, 0.16);
   color: #7dd3fc;
   border-color: rgba(63, 184, 255, 0.5);
}

.status-pill-neutral {
   background: rgba(255, 255, 255, 0.08);
   color: var(--text-primary);
   border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 900px) {
   .match-card-row {
      grid-template-columns: 1fr;
      align-items: flex-start;
      gap: 10px;
   }

   .match-card-actions {
      justify-content: flex-start;
      flex-wrap: wrap;
   }
}

/* Cards / panels */
.panel {
   background: var(--bg-panel);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-md);
}

/* Admin polish */
.admin-card {
   background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.08)), var(--bg-panel);
   border: 1px solid var(--border-soft);
   transition: border-color 0.12s ease, transform 0.08s ease;
}

.admin-card:hover {
   border-color: rgba(63, 184, 255, 0.45);
   transform: translateY(-2px);
}

.admin-card .card-title {
   letter-spacing: 0.01em;
}

.admin-card .btn-primary-soft {
   min-width: 120px;
}

.top-nav {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   height: var(--top-nav-height);
   background: rgba(7, 13, 34, 0.95);
   border-bottom: 1px solid var(--border-soft);
   box-shadow: var(--top-nav-shadow);
   z-index: 1100;
   display: flex;
   align-items: center;
   justify-content: center;
   transition:
      opacity 0.32s ease,
      transform 0.32s ease;
   transform: translateY(0);
   will-change: opacity, transform;
}

.top-nav.is-hidden {
   opacity: 0;
   transform: translateY(-12px);
   pointer-events: none;
}

.top-nav__inner {
   width: min(1280px, 100%);
   height: 100%;
   margin: 0 auto;
   padding: 0 1.5rem;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 1.5rem;
}

.top-nav__brand {
   display: flex;
   align-items: center;
   gap: 0.75rem;
}

.top-nav__logo {
   border-radius: 8px;
   object-fit: cover;
}

.top-nav__brand-text {
   display: flex;
   flex-direction: column;
   line-height: 1.1;
}

.top-nav__brand-name {
   font-size: 0.85rem;
   letter-spacing: 0.25em;
   text-transform: uppercase;
   font-weight: 600;
}

.top-nav__section {
   font-size: 0.65rem;
   letter-spacing: 0.3em;
   text-transform: uppercase;
   color: var(--text-muted);
}

.top-nav__links-wrapper {
   flex: 1;
   display: flex;
   justify-content: center;
   overflow-x: auto;
   -webkit-overflow-scrolling: touch;
}

.top-nav__links {
   display: flex;
   gap: 1.25rem;
   align-items: center;
   white-space: nowrap;
}

.top-nav__link {
   color: var(--text-muted);
   text-decoration: none;
   font-size: 0.8rem;
   letter-spacing: 0.25em;
   text-transform: uppercase;
   font-weight: 600;
   padding-bottom: 0.1rem;
   border-bottom: 2px solid transparent;
   transition: color 0.2s ease, border-color 0.2s ease;
}

.top-nav__link:hover {
   color: var(--text-primary);
}

.top-nav__link.is-active {
   color: var(--accent);
   border-color: var(--accent);
}

.top-nav__user {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   flex-shrink: 0;
}

.top-nav__avatar {
   width: 40px;
   height: 40px;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.05);
   border: 1px solid rgba(255, 255, 255, 0.12);
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-weight: 600;
   font-size: 0.85rem;
   letter-spacing: 0.08em;
   color: var(--text-muted);
}

.top-nav__user-meta {
   display: flex;
   flex-direction: column;
   line-height: 1.1;
   min-width: 0;
}

.top-nav__user-name {
   font-size: 0.85rem;
   font-weight: 600;
}

.top-nav__user-email {
   font-size: 0.7rem;
   color: var(--text-muted);
}

.top-nav__user-actions {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   font-size: 0.7rem;
   letter-spacing: 0.2em;
   text-transform: uppercase;
}

.top-nav__user-link {
   color: var(--text-muted);
   text-decoration: none;
}

.top-nav__user-link:hover {
   color: var(--text-primary);
}

.top-nav__user-separator {
   color: rgba(255, 255, 255, 0.35);
}


@media (max-width: 900px) {
   .top-nav__inner {
      gap: 1rem;
      padding: 0 1rem;
   }

   .top-nav__links {
      gap: 0.8rem;
   }

   .top-nav__user-actions {
      gap: 0.25rem;
   }

   .top-nav__user-email {
      display: none;
   }
}

/* Layout adjustments */
.app-shell {
   flex: 1 1 auto;
   display: flex;
   flex-direction: column;
   width: 100%;
   max-width: none;
   margin: 0;
   margin-top: var(--top-nav-offset);
   padding: 0;
   box-sizing: border-box;
   min-height: calc(100vh - var(--top-nav-offset));
}

.app-main {
   flex: 1;
   display: flex;
   flex-direction: column;
   width: 100%;

}

@media (max-width: 900px) {
   .app-shell {
      padding-inline: 1rem;
   }
}

/* Badges */
.badge {
   border-radius: var(--radius-sm);
}

/* Periods */
.period-list {
   display: flex;
   flex-direction: column;
   gap: 12px;
}

.period-card {
   display: grid;
   grid-template-columns: 1fr auto;
   gap: 12px;
   align-items: center;
   background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.06)), var(--bg-panel);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-md);
   padding: 14px 16px;
   min-height: 82px;
}

.period-title {
   font-weight: 700;
   font-size: 1rem;
   color: var(--text-primary);
}

.period-meta {
   color: var(--text-muted);
   font-size: 0.9rem;
}

.period-badge {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   padding: 6px 10px;
   border-radius: 999px;
   font-size: 12px;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   border: 1px solid var(--border-soft);
   color: var(--text-muted);
}

.period-badge-active {
   color: #cde3ff;
   border-color: rgba(59, 130, 246, 0.6);
   background: rgba(59, 130, 246, 0.12);
}

.period-badge-completed {
   color: #bbf7d0;
   border-color: rgba(34, 197, 94, 0.5);
   background: rgba(34, 197, 94, 0.12);
}

.period-badge-pending {
   color: #cbd5e1;
   border-color: rgba(148, 163, 184, 0.4);
   background: rgba(148, 163, 184, 0.08);
}

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

.period-form-rows {
   display: flex;
   flex-direction: column;
   gap: 10px;
}

.period-form-row {
   display: grid;
   grid-template-columns: 1.2fr 0.8fr 0.8fr;
   gap: 10px;
   background: rgba(255, 255, 255, 0.02);
   padding: 10px;
   border-radius: var(--radius-sm);
   border: 1px solid var(--border-soft);
}

@media (max-width: 768px) {
   .period-card {
      grid-template-columns: 1fr;
   }

   .period-form-row {
      grid-template-columns: 1fr;
   }
}

.clip-review-btn {
   border-radius: var(--radius-sm);
   border: 1px solid var(--border-soft);
   background: transparent;
   color: var(--text-primary);
   padding: 0.35rem 0.9rem;
   cursor: pointer;
   transition: border-color 0.12s ease, color 0.12s ease;
}

.clip-review-btn--approve {
   border-color: rgba(34, 197, 94, 0.6);
   color: #bbf7d0;
}

.clip-review-btn--reject {
   border-color: rgba(248, 113, 113, 0.6);
   color: #fecdd3;
}

.clip-review-btn:disabled {
   opacity: 0.45;
   cursor: not-allowed;
   border-color: var(--border-soft);
}



.lineup-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
   gap: 1rem;
   margin-top: 1rem;
}

.lineup-card {
   background: #050a16;
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 18px;
   padding: 1.25rem;
   box-shadow: 0 16px 30px rgba(3, 7, 17, 0.8);
   display: flex;
   flex-direction: column;
   gap: 1rem;
}

.lineup-card-header {
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   gap: 0.75rem;
   margin-bottom: 2rem;
}

.lineup-card-title {
   font-size: 1.1rem;
   font-weight: 600;
   color: #f8fafc;
}

.lineup-card-caption {
   font-size: 0.75rem;
   letter-spacing: 0.15em;
   text-transform: uppercase;
   color: rgba(255, 255, 255, 0.6);
}

.lineup-card-add {
   background: rgba(59, 130, 246, 0.12);
   border: 1px solid rgba(59, 130, 246, 0.4);
   color: #38bdf8;
   font-size: 1rem;
   border-radius: 999px;
   width: 44px;
   height: 44px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lineup-card-add i,
.lineup-mini-add i {
   font-size: 1.1rem;
}

.lineup-card-add:hover {
   transform: translateY(-1px);
   box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

.lineup-formation {
   position: relative;
   background: #030913;
   padding: 1.25rem 1rem 1rem;
   overflow: visible;
}

.formation-pitch {
   position: relative;
   width: 100%;
   max-width: 320px;
   margin: 0 auto;
}

.formation-pitch svg {
   width: 100%;
   height: auto;
   display: block;
   transform: scale(1.25);
   transform-origin: center;
}

.formation-pitch-content {
   position: absolute;
   inset: 0;
   display: flex;
   align-items: center;
   justify-content: center;
}

.formation {
   width: 100%;
   height: 100%;
   position: relative;
}

.formation-positions {
   position: relative;
   width: 100%;
   height: 100%;
}

.formation-position {
   position: absolute;
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 0.2rem;
   transform: translate(-50%, 0);
   transition:
      left 300ms ease,
      bottom 300ms ease,
      transform 300ms ease;
}

.formation-position.on-pitch {
   transition:
      left 400ms cubic-bezier(0.22, 1, 0.36, 1),
      bottom 400ms cubic-bezier(0.22, 1, 0.36, 1),
      transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.player-dot {
   transition:
      left 300ms ease,
      bottom 300ms ease,
      transform 300ms ease;
}

.formation-position-button.lineup-formation-slot {
   width: 52px;
   height: 52px;
   border-radius: 50%;
   border: 1px solid rgba(255, 255, 255, 0.3);
   background: rgba(255, 255, 255, 0.08);
   display: inline-flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 0.15rem;
   color: #e2e8f0;
   font-size: 0.8rem;
   cursor: pointer;
   position: relative;
   transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
   overflow: visible;
}

.formation-position-button.lineup-formation-slot:hover {
   border-color: rgba(59, 130, 246, 0.8);
   background: rgba(14, 165, 233, 0.2);
}

.formation-position-button.lineup-formation-slot.has-player {
   background: rgba(59, 130, 246, 0.18);
}

.lineup-formation-slot {
   position: relative;
}

.lineup-formation-slot.has-player .lineup-slot-plus {
   opacity: 0;
}

.formation-position-button.lineup-formation-slot .lineup-slot-plus {
   font-size: 1.2rem;
   color: #38bdf8;
}

.formation-position-button.lineup-formation-slot .lineup-slot-pos {
   font-size: 0.7rem;
   letter-spacing: 0.22em;
   color: rgba(255, 255, 255, 0.8);
}

.formation-position .position-label {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 0.1rem;
   min-height: 36px;
}

.formation-position .position-label-name {
   font-size: 0.85rem;
   font-weight: 600;
   letter-spacing: 0.02em;
   color: #f8fafc;
   line-height: 1.2;
}

.formation-position .position-label-role {
   font-size: 0.65rem;
   letter-spacing: 0.3em;
   color: rgba(255, 255, 255, 0.65);
   text-transform: uppercase;
   line-height: 1.1;
}

.lineup-forms {
   margin-top: 1rem;
   display: flex;
   flex-direction: column;
   gap: 0.75rem;
}

.lineup-slot-indicator {
   width: 48px;
   height: 48px;
   border-radius: 50%;
   /* border: 1px solid rgba(255, 255, 255, 0.2);*/
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-size: 1.2rem;
   color: #38bdf8;
   background: rgba(255, 255, 255, 0.04);
   transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   pointer-events: none;
   z-index: 1;
}

.lineup-slot-indicator.has-number {
   border-color: rgba(59, 130, 246, 0.8);
   background: rgba(59, 130, 246, 0.2);
   color: #f8fafc;
   font-weight: 700;
}

.lineup-slot-captain-badge {
   position: absolute;
   top: -6px;
   right: -6px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 22px;
   height: 22px;
   border-radius: 999px;
   font-size: 0.65rem;
   font-weight: 700;
   color: var(--text-primary);
   background: var(--accent-warning);
   border: 1px solid rgba(250, 204, 21, 0.6);
   opacity: 0;
   pointer-events: none;
   transition: opacity 120ms ease;
   z-index: 10;
}

.lineup-slot-captain-badge.visible {
   opacity: 1;
}

.lineup-quick-add-title {
   text-transform: uppercase;
   letter-spacing: 0.08em;
}

.lineup-quick-add-select-row .lineup-quick-add-create {
   width: 44px;
   height: 44px;
   padding: 0;
   border-radius: 12px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
}

.lineup-quick-add-select-row .lineup-quick-add-create i {
   font-size: 1rem;
}

#lineupQuickAddForm input[name="shirt_number"] {
   color: #fff !important;
}

#lineupQuickAddNumber {
   color: #fff;
}

#lineupQuickAddNumber::placeholder {
   color: rgba(255, 255, 255, 0.4);
}

#lineupSubstituteNumber {
   color: #fff;
}

#lineupSubstituteNumber::placeholder {
   color: rgba(255, 255, 255, 0.4);
}

#lineupQuickAddPlayer,
#lineupSubstitutePlayer {
   color: #fff;
   scrollbar-width: thin;
   scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.08);
}

#lineupQuickAddPlayer::-webkit-scrollbar,
#lineupSubstitutePlayer::-webkit-scrollbar {
   width: 6px;
   height: 6px;
}

#lineupQuickAddPlayer::-webkit-scrollbar-track,
#lineupSubstitutePlayer::-webkit-scrollbar-track {
   background: rgba(255, 255, 255, 0.08);
   border-radius: 999px;
}

#lineupQuickAddPlayer::-webkit-scrollbar-thumb,
#lineupSubstitutePlayer::-webkit-scrollbar-thumb {
   background: rgba(255, 255, 255, 0.4);
   border-radius: 999px;
}

#lineupQuickAddPlayer::-webkit-scrollbar-thumb:hover,
#lineupSubstitutePlayer::-webkit-scrollbar-thumb:hover {
   background: rgba(255, 255, 255, 0.6);
}

.quick-add-captain-toggle .form-check-input {
   width: 52px;
   height: 28px;
   transform: scale(1.05);
   margin-left: 0;
}

.quick-add-captain-toggle .form-check-label {
   font-size: 0.85rem;
   font-weight: 600;
   color: #f8fafc;
}

.quick-add-captain-toggle {
   gap: 0.4rem;
}

.lineup-slot-menu {
   position: absolute;
   top: 6px;
   right: 6px;
   display: flex;
   flex-direction: column;
   gap: 4px;
   background: rgba(2, 6, 23, 0.95);
   border: 1px solid rgba(59, 130, 246, 0.3);
   border-radius: 8px;
   padding: 6px;
   z-index: 5;
   opacity: 0;
   visibility: hidden;
   transition: opacity 120ms ease;
}

.lineup-slot-menu button {
   border: none;
   background: transparent;
   color: #fff;
   font-size: 0.65rem;
   padding: 4px 6px;
   cursor: pointer;
   text-align: left;
}

.lineup-slot-menu button:hover {
   color: #38bdf8;
}

.lineup-slot-menu.active {
   opacity: 1;
   visibility: visible;
}

.lineup-slot-plus {
   font-size: 1.2rem;
   color: #38bdf8;
}

.lineup-slot-plus i {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-size: inherit;
}

.lineup-slot-pos {
   font-size: 0.75rem;
   letter-spacing: 0.22em;
   color: rgba(255, 255, 255, 0.7);
}

.lineup-substitutes-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
   gap: 1rem;
   margin-bottom: 0.5rem;
}

.lineup-substitutes-column {
   background: #050b1a;
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 16px;
   padding: 1rem;
   display: flex;
   flex-direction: column;
   gap: 0.75rem;
}

.lineup-substitutes-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.5rem;
}

.lineup-substitutes-header .text-xs {
   letter-spacing: 0.1em;
}

.lineup-substitutes-add {
   width: 40px;
   height: 40px;
   border-radius: 12px;
   border: 1px solid rgba(255, 255, 255, 0.2);
   background: rgba(255, 255, 255, 0.05);
   color: #fff;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.lineup-substitutes-add:hover {
   transform: translateY(-1px);
   border-color: rgba(255, 255, 255, 0.4);
   background: rgba(255, 255, 255, 0.1);
}

.lineup-substitutes-list {
   min-height: 50px;
   display: flex;
   flex-direction: column;
   gap: 0.5rem;
}

.lineup-substitute-row {
   background: rgba(255, 255, 255, 0.02);
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 12px;
   padding: 0.65rem 0.85rem;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.75rem;
}

.lineup-substitute-number {
   font-size: 0.85rem;
   font-weight: 700;
   margin-right: 0.5rem;
   color: #38bdf8;
}

.lineup-substitute-name {
   font-size: 0.9rem;
   font-weight: 600;
   color: #f8fafc;
}

.lineup-sub-icon {
   display: inline-flex;
   width: 18px;
   height: 18px;
   margin-left: 0.35rem;
   vertical-align: middle;
}

.sub-player-list {
   display: flex;
   flex-direction: column;
   gap: 0.4rem;
   max-height: 240px;
   overflow-y: auto;
   padding: 0 0.1rem;
}

.sub-player-list .sub-player-row {
   width: 100%;
   border-radius: 12px;
   border: 1px solid rgba(255, 255, 255, 0.2);
   background: rgba(255, 255, 255, 0.02);
   color: #f8fafc;
   padding: 0.65rem 0.75rem;
   text-align: left;
   font-size: 0.95rem;
   font-weight: 600;
   cursor: pointer;
   transition: background 0.12s ease, border-color 0.12s ease;
   display: block;
   text-decoration: none;
}

.sub-player-list .sub-player-row.is-disabled {
   opacity: 0.45;
   cursor: not-allowed;
   border-color: rgba(255, 255, 255, 0.12);
}

.sub-player-list .sub-player-row.is-disabled:hover {
   border-color: rgba(255, 255, 255, 0.12);
}

.sub-player-list .sub-player-row:hover:not(.is-selected) {
   border-color: rgba(255, 255, 255, 0.4);
}

.sub-player-list .sub-player-row.is-selected {
   background: #111827;
   border-color: #14dc4b;
}

.sub-player-list .sub-player-row:focus-visible {
   outline: 2px solid rgba(20, 220, 75, 0.6);
   outline-offset: 2px;
}

.sub-player-list .sub-player-row .lineup-sub-icon {
   margin-left: 0.5rem;
}

.lineup-substitute-actions {
   display: flex;
   align-items: center;
   gap: 0.4rem;
}

.lineup-substitute-actions button {
   width: 36px;
   height: 36px;
   border-radius: 10px;
   border: 1px solid rgba(255, 255, 255, 0.2);
   background: rgba(255, 255, 255, 0.04);
   color: #f8fafc;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   transition: border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.lineup-substitute-actions button:hover {
   border-color: rgba(59, 130, 246, 0.6);
   color: #38bdf8;
   transform: translateY(-1px);
}

.lineup-substitutes-placeholder {
   font-size: 0.75rem;
   color: rgba(255, 255, 255, 0.6);
}

.lineup-spotlight {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
   gap: 1rem;
   margin-top: 0.5rem;
}

.lineup-mini-card {
   background: #0a101f;
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 14px;
   padding: 1rem;
   display: flex;
   flex-direction: column;
   gap: 0.5rem;
}

.lineup-mini-card h6 {
   margin: 0;
   font-size: 0.9rem;
   color: #f1f5f9;
}

.lineup-mini-card p {
   margin: 0;
   font-size: 0.8rem;
   color: rgba(255, 255, 255, 0.6);
}

.lineup-mini-add {
   width: 38px;
   height: 38px;
   border-radius: 50%;
   border: 1px solid rgba(255, 255, 255, 0.2);
   background: rgba(59, 130, 246, 0.2);
   color: #f1f5f9;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-size: 1.25rem;
   cursor: pointer;
   transition: transform 0.15s ease;
}

.lineup-mini-add:hover {
   transform: translateY(-1px);
}

.lineup-modal-card {
   background: #050a16;
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 18px;
   padding: 1.25rem;
   width: min(100%, 420px);
}

#lineupQuickAddModal {
   display: none;
   position: fixed;
   inset: 0;
   background: rgba(0, 0, 0, 0.7);
   z-index: 2200;
   align-items: center;
   justify-content: center;
   padding: 1rem;
}

#lineupQuickAddModal .panel {
   width: 100%;
   border-radius: 18px;
}

.lineup-card-title+.lineup-card-caption {
   text-transform: uppercase;
}

[data-lineup-root].lineup-read-only .lineup-forms {
   display: none;
}

[data-lineup-root].lineup-read-only .lineup-substitutes-header .lineup-substitutes-add {
   display: none;
}

[data-lineup-root].lineup-read-only .lineup-substitute-actions {
   display: none;
}

[data-lineup-root].lineup-read-only .lineup-formation-slot {
   cursor: default;
   pointer-events: none;
}

[data-lineup-root].lineup-read-only .lineup-formation-slot .lineup-slot-indicator {
   opacity: 0;
}

.lineup-status-row {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-top: 0.5rem;
}

@media (max-width: 768px) {
   .lineup-grid {
      grid-template-columns: 1fr;
   }

   .lineup-card {
      padding: 1rem;
   }

   .lineup-formation-slot {
      min-width: 48px;
      height: 48px;
   }
}

/* Modal Component Styles */
.modal {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   z-index: 1050;
   display: none;
   overflow-x: hidden;
   overflow-y: auto;
   outline: 0;
}

.modal.show {
   display: flex !important;
   align-items: center;
   justify-content: center;
}

.modal-fade-in {
   animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
   from {
      opacity: 0;
      transform: translateY(-20px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

.modal-dialog {
   position: relative;
   width: auto;
   margin: 1.75rem auto;
   max-width: 500px;
   pointer-events: none;
}

.modal-dialog-centered {
   display: flex;
   align-items: center;
   min-height: calc(100% - 3.5rem);
}

.modal-content {
   position: relative;
   display: flex;
   flex-direction: column;
   width: 100%;
   pointer-events: auto;
   background-color: var(--bg-panel);
   background-clip: padding-box;
   border: 1px solid rgba(255, 255, 255, 0.12);
   border-radius: var(--radius-md);
   outline: 0;
   box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.modal-backdrop {
   position: fixed;
   top: 0;
   left: 0;
   z-index: 1040;
   width: 100vw;
   height: 100vh;
   background-color: rgba(0, 0, 0, 0.5);
   opacity: 0;
   transition: opacity 0.3s ease;
}

.modal-backdrop.show {
   opacity: 1;
}

.modal-backdrop.fade {
   transition: opacity 0.15s linear;
}

.modal-header {
   display: flex;
   flex-shrink: 0;
   align-items: center;
   justify-content: space-between;
   padding: 1.25rem 1.5rem;
   border-bottom: 1px solid rgba(255, 255, 255, 0.08);
   border-top-left-radius: calc(var(--radius-md) - 1px);
   border-top-right-radius: calc(var(--radius-md) - 1px);
}

.modal-title {
   margin: 0;
   line-height: 1.5;
   font-size: 1.25rem;
   font-weight: 600;
   color: var(--text-primary);
}

.modal-body {
   position: relative;
   flex: 1 1 auto;
   padding: 1.5rem;
}

.modal-footer {
   display: flex;
   flex-wrap: wrap;
   flex-shrink: 0;
   align-items: center;
   justify-content: flex-end;
   padding: 1rem 1.5rem;
   border-top: 1px solid rgba(255, 255, 255, 0.08);
   border-bottom-right-radius: calc(var(--radius-md) - 1px);
   border-bottom-left-radius: calc(var(--radius-md) - 1px);
}

.modal-footer>* {
   margin: 0.25rem;
}

.btn-close {
   box-sizing: content-box;
   width: 1em;
   height: 1em;
   padding: 0.25em;
   color: var(--text-muted);
   background: transparent;
   border: 0;
   border-radius: var(--radius-sm);
   opacity: 0.8;
   cursor: pointer;
   transition: opacity 0.2s ease;
}

.btn-close:hover {
   opacity: 1;
}

.btn-close::before {
   content: "\d7";
   font-size: 1.5rem;
   line-height: 1;
}

@media (max-width: 576px) {
   .modal-dialog {
      max-width: 100%;
      margin: 0.5rem;
   }
}

/* Tooltip Component Styles */
.tooltip {
   position: fixed;
   z-index: 1070;
   display: block;
   margin: 0;
   font-family: inherit;
   font-style: normal;
   font-weight: 400;
   line-height: 1.5;
   text-align: left;
   text-decoration: none;
   text-shadow: none;
   text-transform: none;
   letter-spacing: normal;
   word-break: normal;
   word-spacing: normal;
   white-space: normal;
   line-break: auto;
   font-size: 0.875rem;
   word-wrap: break-word;
   opacity: 0;
   transition: opacity 0.2s ease;
}

.tooltip.show {
   opacity: 1;
}

.tooltip-arrow {
   position: absolute;
   display: block;
   width: 0.8rem;
   height: 0.4rem;
}

.tooltip-arrow::before {
   position: absolute;
   content: "";
   border-color: transparent;
   border-style: solid;
}

.bs-tooltip-top {
   padding: 0.4rem 0;
}

.bs-tooltip-top .tooltip-arrow {
   bottom: 0;
}

.bs-tooltip-top .tooltip-arrow::before {
   top: -1px;
   border-width: 0.4rem 0.4rem 0;
   border-top-color: rgba(0, 0, 0, 0.9);
}

.bs-tooltip-bottom {
   padding: 0.4rem 0;
}

.bs-tooltip-bottom .tooltip-arrow {
   top: 0;
}

.bs-tooltip-bottom .tooltip-arrow::before {
   bottom: -1px;
   border-width: 0 0.4rem 0.4rem;
   border-bottom-color: rgba(0, 0, 0, 0.9);
}

.bs-tooltip-left {
   padding: 0 0.4rem;
}

.bs-tooltip-left .tooltip-arrow {
   right: 0;
   width: 0.4rem;
   height: 0.8rem;
}

.bs-tooltip-left .tooltip-arrow::before {
   left: -1px;
   border-width: 0.4rem 0 0.4rem 0.4rem;
   border-left-color: rgba(0, 0, 0, 0.9);
}

.bs-tooltip-right {
   padding: 0 0.4rem;
}

.bs-tooltip-right .tooltip-arrow {
   left: 0;
   width: 0.4rem;
   height: 0.8rem;
}

.bs-tooltip-right .tooltip-arrow::before {
   right: -1px;
   border-width: 0.4rem 0.4rem 0.4rem 0;
   border-right-color: rgba(0, 0, 0, 0.9);
}

.tooltip-inner {
   max-width: 200px;
   padding: 0.5rem 0.75rem;
   color: #fff;
   text-align: center;
   background-color: rgba(0, 0, 0, 0.9);
   border-radius: var(--radius-sm);
}

/* Dropdown positioning */
.dropdown {
   position: relative;
}

.dropdown-menu {
   position: absolute;
   right: 0;
   top: 100%;
   margin-top: 0.25rem;
   z-index: 1000;
}

.dropdown-menu-end {
   right: 0;
   left: auto;
}

/* Alert Component Styles */
.alert {
   position: relative;
   padding: 0.75rem 1.25rem;
   margin-bottom: 1rem;
   border: 1px solid transparent;
   border-radius: var(--radius-sm);
}

.alert-success {
   color: #0f5132;
   background-color: #d1e7dd;
   border-color: #badbcc;
}

.alert-danger {
   color: #842029;
   background-color: #f8d7da;
   border-color: #f5c2c7;
}

.alert-warning {
   color: #664d03;
   background-color: #fff3cd;
   border-color: #ffecb5;
}

.alert-info {
   color: #055160;
   background-color: #cff4fc;
   border-color: #b6effb;
}

/* Fade utility */
.fade {
   transition: opacity 0.15s linear;
}

.fade:not(.show) {
   opacity: 0;
}

/* Visually hidden utility */
.visually-hidden {
   position: absolute !important;
   width: 1px !important;
   height: 1px !important;
   padding: 0 !important;
   margin: -1px !important;
   overflow: hidden !important;
   clip: rect(0, 0, 0, 0) !important;
   white-space: nowrap !important;
   border: 0 !important;
}

/* Margin utilities */
.m-0 {
   margin: 0 !important;
}

.mb-3 {
   margin-bottom: 1rem !important;
}

.mb-4 {
   margin-bottom: 1.5rem !important;
}

/* Flexbox utilities */
.flex-fill {
   flex: 1 1 auto !important;
}

.d-flex {
   display: flex !important;
}

.d-grid {
   display: grid !important;
}

.d-none {
   display: none !important;
}

/* Sizing utilities */
.w-100 {
   width: 100% !important;
}

/* Button sizing */
.btn-sm {
   padding: 0.25rem 0.75rem;
   font-size: 0.875rem;
   border-radius: var(--radius-sm);
}

.btn-lg {
   padding: 0.75rem 1.5rem;
   font-size: 1.125rem;
   border-radius: var(--radius-md);
}

/* Form check (checkboxes/radios) */
.form-check {
   display: block;
   min-height: 1.5rem;
   padding-left: 1.5em;
   margin-bottom: 0.125rem;
}

.form-check-input {
   width: 1em;
   height: 1em;
   margin-top: 0.25em;
   vertical-align: top;
   background-color: var(--input-bg);
   border: 1px solid rgba(255, 255, 255, 0.25);
   appearance: none;
   print-color-adjust: exact;
}

.form-check-input[type="checkbox"] {
   border-radius: 0.25em;
}

.form-check-input[type="radio"] {
   border-radius: 50%;
}

.form-check-input:checked {
   background-color: var(--accent);
   border-color: var(--accent);
}

.form-check-label {
   cursor: pointer;
}

/* ====================================
   Match Edit Page Styles
   ==================================== */

/* Navigation Items */
.edit-nav-item,
.create-nav-item {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   width: 100%;
   padding: 0.625rem 1rem;
   text-align: left;
   font-size: 0.875rem;
   font-weight: 500;
   border-radius: 0.5rem;
   border: 1px solid;
   cursor: pointer;
   transition: all 0.2s ease;
   background-color: rgba(30, 41, 59, 0.4);
   border-color: rgba(255, 255, 255, 0.1);
   color: rgb(203, 213, 225);
   position: relative;
}

.edit-nav-item::before,
.create-nav-item::before {
   content: '';
   position: absolute;
   left: 0;
   top: 0;
   bottom: 0;
   width: 3px;
   background-color: transparent;
   border-radius: 0.5rem 0 0 0.5rem;
   transition: background-color 0.2s ease;
}

.edit-nav-item:hover,
.create-nav-item:hover {
   background-color: rgba(51, 65, 85, 0.5);
   border-color: rgba(255, 255, 255, 0.2);
}

.edit-nav-item.active,
.create-nav-item.active {
   background-color: rgb(79, 70, 229);
   border-color: rgb(99, 102, 241);
   color: rgb(255, 255, 255);
   box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.2), 0 4px 6px -4px rgba(79, 70, 229, 0.2);
}

.edit-nav-item.active::before,
.create-nav-item.active::before {
   background-color: rgb(34, 211, 238);
}

.edit-nav-item i.fa-chevron-right,
.edit-nav-item.active i.fa-chevron-right {
   opacity: 0;
   transition: opacity 0.2s ease;
}

.edit-nav-item:hover i.fa-chevron-right,
.edit-nav-item.active i.fa-chevron-right,
.create-nav-item:hover i.fa-chevron-right,
.create-nav-item.active i.fa-chevron-right {
   opacity: 1;
}

/* Event Tabs */
.event-tab {
   display: inline-flex;
   align-items: center;
   padding: 0.875rem 1.25rem;
   font-size: 0.875rem;
   font-weight: 500;
   color: rgb(148, 163, 184);
   background: transparent;
   border: none;
   border-bottom: 2px solid transparent;
   cursor: pointer;
   transition: all 0.2s ease;
}

.event-tab:hover {
   color: rgb(226, 232, 240);
   background: rgba(51, 65, 85, 0.3);
}

.event-tab.active {
   color: rgb(255, 255, 255);
   border-bottom-color: rgb(59, 130, 246);
   background: rgba(59, 130, 246, 0.05);
}

/* Section transitions */
.edit-section {
   animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
   from {
      opacity: 0;
      transform: translateY(10px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

.event-tab-content {
   animation: fadeIn 0.25s ease;
}

/* Lineup Player Cards */
.lineup-player-card {
   padding: 0.75rem;
   background: rgba(30, 41, 59, 0.5);
   border: 1px solid rgba(148, 163, 184, 0.1);
   border-radius: 0.5rem;
   transition: all 0.2s ease;
}

.lineup-player-card:hover {
   background: rgba(30, 41, 59, 0.8);
   border-color: rgba(148, 163, 184, 0.2);
}

.lineup-shirt-number {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 2rem;
   height: 2rem;
   font-size: 0.75rem;
   font-weight: 600;
   color: rgb(255, 255, 255);
   background: rgba(59, 130, 246, 0.2);
   border: 1px solid rgba(59, 130, 246, 0.4);
   border-radius: 0.375rem;
}

.lineup-position {
   font-size: 0.75rem;
   font-weight: 500;
   color: rgb(148, 163, 184);
   text-transform: uppercase;
   letter-spacing: 0.05em;
}

.lineup-delete-btn {
   padding: 0.375rem;
   color: rgb(148, 163, 184);
   background: transparent;
   border: none;
   border-radius: 0.375rem;
   cursor: pointer;
   transition: all 0.2s ease;
   opacity: 0;
}

.lineup-player-card:hover .lineup-delete-btn {
   opacity: 1;
}

.lineup-delete-btn:hover {
   color: rgb(248, 113, 113);
   background: rgba(248, 113, 113, 0.1);
}

/* Modal Styles */
.modal {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   z-index: 9999;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 1rem;
}

.modal-backdrop {
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(0, 0, 0, 0.75);
   backdrop-filter: blur(4px);
   pointer-events: none;
}

.modal-dialog {
   position: relative;
   width: 100%;
   max-width: 500px;
   z-index: 1;
}

.modal-content {
   background: rgb(15, 23, 42);
   border: 1px solid rgba(148, 163, 184, 0.2);
   border-radius: 0.75rem;
   box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
   animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
   from {
      opacity: 0;
      transform: translateY(-20px) scale(0.95);
   }

   to {
      opacity: 1;
      transform: translateY(0) scale(1);
   }
}

.modal-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 1.5rem;
   border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.modal-title {
   font-size: 1.125rem;
   font-weight: 600;
   color: rgb(255, 255, 255);
}

.modal-close {
   padding: 0.5rem;
   color: rgb(148, 163, 184);
   background: transparent;
   border: none;
   border-radius: 0.375rem;
   cursor: pointer;
   transition: all 0.2s ease;
}

.modal-close:hover {
   color: rgb(255, 255, 255);
   background: rgba(148, 163, 184, 0.1);
}

.modal-body {
   padding: 1.5rem;
}

.modal-footer {
   display: flex;
   align-items: center;
   justify-content: flex-end;
   gap: 0.75rem;
   padding: 1.5rem;
   border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.btn-primary {
   padding: 0.625rem 1.25rem;
   font-size: 0.875rem;
   font-weight: 500;
   color: rgb(255, 255, 255);
   background: rgb(59, 130, 246);
   border: none;
   border-radius: 0.5rem;
   cursor: pointer;
   transition: all 0.2s ease;
}

.btn-primary:hover {
   background: rgb(29, 78, 216);
}

.btn-secondary {
   padding: 0.625rem 1.25rem;
   font-size: 0.875rem;
   font-weight: 500;
   color: rgb(226, 232, 240);
   background: rgba(148, 163, 184, 0.1);
   border: 1px solid rgba(148, 163, 184, 0.2);
   border-radius: 0.5rem;
   cursor: pointer;
   transition: all 0.2s ease;
}

.btn-secondary:hover {
   background: rgba(148, 163, 184, 0.2);
   border-color: rgba(148, 163, 184, 0.3);
}

/* ====================================
   Phase 3: Micro-interactions & Animations
   ==================================== */

/* Smooth transitions for all interactive elements */
input,
select,
textarea,
button,
a {
   transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button hover micro-interactions */
button:not(:disabled):hover:not(.btn-primary):not(.btn-secondary) {
   background: rgba(255, 255, 255, 0.08);
}

button:not(:disabled):active,
.btn-primary:active,
.btn-secondary:active {
   transform: translateY(0);
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Link hover effects */
a:not(.edit-nav-item):hover {
   transform: translateX(2px);
}

/* Input focus animations */
input:focus,
select:focus,
textarea:focus {
   transform: scale(1.01);
   box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Card hover effects */
.lineup-player-card {
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lineup-player-card:hover {
   transform: translateY(-2px);
   box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Event card hover */
.event-card {
   transition: all 0.2s ease;
}

.event-card:hover {
   background-color: rgba(51, 65, 85, 0.3);
   transform: translateX(4px);
   border-left: 3px solid rgb(59, 130, 246);
}

/* Stat counter animation */
@keyframes countUp {
   from {
      opacity: 0;
      transform: translateY(-10px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

.stat-value {
   animation: countUp 0.4s ease-out;
}

/* Pulse animation for updated stats */
@keyframes pulse {

   0%,
   100% {
      opacity: 1;
      transform: scale(1);
   }

   50% {
      opacity: 0.8;
      transform: scale(1.05);
   }
}

.stat-updated {
   animation: pulse 0.5s ease-in-out;
}

/* Smooth scroll behavior */
html {
   scroll-behavior: smooth;
}

/* Loading spinner enhancement */
@keyframes spin {
   from {
      transform: rotate(0deg);
   }

   to {
      transform: rotate(360deg);
   }
}

.fa-spinner {
   animation: spin 1s linear infinite;
}

/* Slide in animation for alerts */
@keyframes slideIn {
   from {
      transform: translateX(400px);
      opacity: 0;
   }

   to {
      transform: translateX(0);
      opacity: 1;
   }
}

.animate-slide-in {
   animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade out animation */
@keyframes fadeOut {
   from {
      opacity: 1;
      transform: translateY(0);
   }

   to {
      opacity: 0;
      transform: translateY(-20px);
   }
}

.animate-fade-out {
   animation: fadeOut 0.3s ease-out forwards;
}

/* Scale in animation for modals */
@keyframes scaleIn {
   from {
      opacity: 0;
      transform: scale(0.95);
   }

   to {
      opacity: 1;
      transform: scale(1);
   }
}

.modal-content {
   animation: scaleIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ripple effect for buttons */
button {
   position: relative;
   overflow: hidden;
}

button::after {
   content: '';
   position: absolute;
   top: 50%;
   left: 50%;
   width: 0;
   height: 0;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.3);
   transform: translate(-50%, -50%);
   transition: width 0.6s, height 0.6s;
}

button:active::after {
   width: 300px;
   height: 300px;
}

/* Login page overrides */
[data-page="login"] .login-submit {
   background-image: linear-gradient(90deg, #0ea5e9, #6366f1, #2563eb) !important;
}

[data-page="login"] .login-submit:hover {
   background-image: linear-gradient(90deg, #38bdf8, #818cf8, #3b82f6) !important;
   filter: brightness(1.05);
}

/* Skeleton loading animation */
@keyframes shimmer {
   0% {
      background-position: -1000px 0;
   }

   100% {
      background-position: 1000px 0;
   }
}

.skeleton {
   background: linear-gradient(90deg,
         rgba(255, 255, 255, 0.05) 25%,
         rgba(255, 255, 255, 0.1) 50%,
         rgba(255, 255, 255, 0.05) 75%);
   background-size: 1000px 100%;
   animation: shimmer 2s infinite;
}

/* Modal Mode Toggle Buttons */
.modal-mode-btn {
   background-color: rgb(71 84 103);
   color: rgb(203 213 225);
   transition: all 0.2s ease;
}

.modal-mode-btn:hover {
   background-color: rgb(51 65 85);
}

.modal-mode-btn.active {
   background-color: rgb(37 99 235);
   color: white;
}