/* ============================================
   P4NOW — Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@1,900&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Primary palette — electric blue */
  --color-primary: #009CFF;
  --color-primary-dark: #0070CC;
  --color-primary-light: #66C8FF;
  --color-primary-glow: rgba(0, 156, 255, 0.25);

  /* Accent */
  --color-accent: #FF6D00;
  --color-accent-light: #FF9E40;

  /* Neutrals (dark mode — pure black) */
  --color-bg: #000000;
  --color-bg-elevated: #0A0A0A;
  --color-bg-card: #111111;
  --color-bg-card-hover: #1A1A1A;
  --color-bg-glass: rgba(10, 10, 10, 0.75);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(0, 156, 255, 0.35);

  /* Text */
  --color-text: #F1F5F9;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;

  /* Semantic */
  --color-success: #22C55E;
  --color-error: #EF4444;
  --color-warning: #F59E0B;
  --color-info: #3B82F6;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #009CFF 0%, #0070CC 100%);
  --gradient-hero: linear-gradient(135deg, #000000 0%, #050A12 50%, #000510 100%);
  --gradient-card: linear-gradient(145deg, rgba(17, 17, 17, 0.95), rgba(5, 10, 18, 0.8));
  --gradient-accent: linear-gradient(135deg, #FF6D00 0%, #FF9100 100%);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px var(--color-primary-glow);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Aliases used across pages */
  --color-surface: #111111;
  /* same as --color-bg-card */
  --accent-color: #009CFF;
  /* same as --color-primary */

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---- Dynamic Sport Background ---- */
body.sport-background {
  background-color: var(--color-bg);
  transition: background-image var(--transition-base);
}

body.cat-futebol {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-futebol.webp');
}

body.cat-volei {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-volei.webp');
}

body.cat-basquete {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-basquete.webp');
}

body.cat-tenis {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-tenis.webp');
}

body.cat-beach-tennis {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-beach-tennis.webp');
}

body.cat-padel {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-padel.webp');
}

body.cat-futevolei {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-futevolei.webp');
}

body.cat-pickleball {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-pickleball.webp');
}

/* New sports with generated backgrounds */
body.cat-hockey {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-hockey.png');
}

body.cat-rugby {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-rugby.png');
}

body.cat-futebol-americano {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-futebol-americano.png');
}

/* Other new sports generic fallbacks */
body.cat-polo-aquatico,
body.cat-tenis-mesa,
body.cat-squash,
body.cat-baseball {
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.6) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-generic.webp');
}



html {
  scroll-behavior: smooth;
  font-size: 16px;
  min-height: 100%;
  background-color: var(--color-bg);
}

body {
  font-family: var(--font-family);
  background-image: linear-gradient(to top, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.95) 100%), url('../img/sports/bg-generic.webp');
  background-repeat: no-repeat, no-repeat;
  background-position: center bottom, center bottom;
  background-size: cover, cover;
  background-attachment: fixed, fixed;
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---- Utility ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---- Glassmorphism Card ---- */
.glass-card {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  padding: var(--space-xl) !important;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 156, 255, 0.08);
  border-color: var(--color-border-hover);
}

/* ---- Datepicker Indicator (White) ---- */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

/* ---- Datepicker Indicator (White) ---- */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  display: none;
  /* Hide default icon since flatpickr handles it */
}

/* ---- Custom Flatpickr Theme ---- */
.flatpickr-calendar {
  background: var(--color-bg-card) !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  border-radius: var(--border-radius-lg) !important;
  padding: 10px;
}

.flatpickr-months {
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: var(--border-radius-md) !important;
  margin-bottom: 10px;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  color: var(--color-text) !important;
  font-weight: 600 !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:after {
  border-bottom-color: var(--color-text) !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown:after {
  border-top-color: var(--color-text) !important;
}

span.flatpickr-weekday {
  color: var(--color-text-secondary) !important;
  font-weight: 500 !important;
}

.flatpickr-day {
  color: var(--color-text) !important;
  border-radius: 50% !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: transparent !important;
}

.flatpickr-day.selected {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-bg) !important;
  font-weight: bold !important;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: var(--color-text-muted) !important;
}

.flatpickr-time {
  border-top-color: var(--color-border) !important;
}

.flatpickr-time input,
.flatpickr-time .flatpickr-am-pm {
  color: var(--color-text) !important;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1.5;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 12px var(--color-primary-glow);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 24px var(--color-primary-glow), var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(0, 156, 255, 0.05);
}

.btn-google {
  background: #fff;
  color: #1F1F1F;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
}

.btn-google:hover:not(:disabled) {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-accent {
  background: var(--gradient-accent);
  color: #fff;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

/* ---- Form Elements ---- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.form-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--color-text);
  background: #0A0A0A;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form-input:hover:not(:focus) {
  border-color: var(--color-border-hover);
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  padding-right: calc(var(--space-md) + 20px);
}

select.form-input option {
  background: #111111;
  color: var(--color-text);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* ---- Password Input Wrapper ---- */
.input-password-wrapper {
  position: relative;
}

.input-password-wrapper .form-input {
  padding-right: 3rem;
}

.btn-toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.btn-toggle-password:hover {
  color: var(--color-primary);
}

/* ---- Password Strength ---- */
.password-strength {
  margin-top: var(--space-xs);
}

.strength-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-base), background var(--transition-base);
  width: 0%;
}

.strength-fill.weak {
  width: 25%;
  background: #EF4444;
}

.strength-fill.fair {
  width: 50%;
  background: #F59E0B;
}

.strength-fill.good {
  width: 75%;
  background: #3B82F6;
}

.strength-fill.strong {
  width: 100%;
  background: #22C55E;
}

.strength-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.strength-label.weak {
  color: #EF4444;
}

.strength-label.fair {
  color: #F59E0B;
}

.strength-label.good {
  color: #3B82F6;
}

.strength-label.strong {
  color: #22C55E;
}

/* ---- Form Row (side by side) ---- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* ---- Auth Divider ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ---- Spinner ---- */
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Auth Page ---- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: transparent;
  position: relative;
  overflow: hidden;
}

.auth-container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.auth-logo img {
  height: 60px;
  width: auto;
}

.auth-logo h1 {
  font-size: var(--font-size-4xl);
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.auth-logo p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
}

.auth-card {
  padding: var(--space-2xl);
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-xl);
  background: #0A0A0A;
  border-radius: var(--radius-sm);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--color-primary-glow);
}

.auth-tab:hover:not(.active) {
  color: var(--color-text);
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-message {
  display: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-lg);
  animation: fadeIn 0.3s ease;
}

.auth-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

.auth-message.success {
  background: rgba(0, 156, 255, 0.1);
  border: 1px solid rgba(0, 156, 255, 0.3);
  color: #66C8FF;
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.navbar-brand {
  font-size: var(--font-size-xl);
  font-weight: 800;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 50px !important;
  width: auto;
  vertical-align: middle;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.navbar-user-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin-left: var(--space-lg);
}

.navbar-nav a {
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: var(--space-xs) 0;
  position: relative;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: #fff;
}

.navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* Mobile Menus & Toggler */
.navbar-toggler {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  /* Above collapse menu */
}

.navbar-toggler span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin-bottom: 5px;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggler span:last-child {
  margin-bottom: 0;
}

/* Toggler animation to 'X' */
.navbar-toggler.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggler.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggler.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.navbar-collapse {
  display: flex;
  align-items: center;
  width: auto;
  justify-content: end;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 30px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.navbar-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.navbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
  color: #fff;
}

/* ---- Dashboard Layout ---- */
.dashboard-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  width: 100%;
}

.dashboard-content {
  flex: 1;
  padding: var(--space-2xl) 0;
  width: 100%;
  background: transparent;
}

.page-header {
  margin-bottom: var(--space-xl);
}

.page-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.page-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
}

/* ---- Match Cards ---- */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.match-card {
  padding: var(--space-lg);
  cursor: pointer;
  position: relative;
  border-color: transparent !important;
  /* Hide default glass-card border */
  background: linear-gradient(145deg, rgba(12, 12, 12, 0.8), rgba(8, 12, 20, 0.4)) !important;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.match-card:hover {
  background: linear-gradient(145deg, rgba(15, 15, 15, 1), rgba(10, 15, 25, 0.8)) !important;
}

.match-card.urgency-today {
  --urgency-color: var(--color-error);
}

.match-card.urgency-tomorrow {
  --urgency-color: var(--color-warning);
}

.match-card.urgency-future {
  --urgency-color: var(--color-info);
}

/* Animated Gradient Border Overlay */
.match-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  /* Border thickness */
  background: linear-gradient(135deg, var(--urgency-color) 0%, var(--color-border) 80%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.match-card:hover::after {
  opacity: 0.4;
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.match-sport-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(0, 156, 255, 0.1);
  border: 1px solid rgba(0, 156, 255, 0.2);
  border-radius: 20px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-primary-light);
}

.match-status {
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 20px;
}

.match-status.open {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.match-status.closed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.match-card-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.match-card-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.match-card-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.match-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.match-slots {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary-light);
}

.match-price {
  font-size: var(--font-size-sm);
  color: var(--color-accent-light);
  font-weight: 600;
}

/* ---- Filters ---- */
.filters-section {
  margin-bottom: var(--space-2xl);
}

.mobile-filter-toggle {
  display: none;
}

.filters-main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.filter-group label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

/* Sport filter 2-level */
.sport-filter-wrapper {
  display: flex;
  gap: var(--space-sm);
  flex: 2;
  min-width: 280px;
}

.sport-filter-wrapper .filter-group {
  flex: 1;
  min-width: 120px;
}

/* Price range */
.price-range-inputs {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.price-range-inputs .form-input {
  flex: 1;
}

.price-range-sep {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

/* ---- Custom Multi-select Dropdown ---- */
.custom-multiselect {
  position: relative;
  width: 100%;
  user-select: none;
}

.multiselect-header {
  width: 100%;
  min-height: 38px;
  max-height: 38px;
  padding: 8px var(--space-md);
  background: #0A0A0A;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--font-size-base);
  line-height: normal;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.multiselect-header:hover {
  border-color: var(--color-border-hover);
}

.multiselect-header::after {
  content: "";
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  transition: transform var(--transition-fast);
}

.custom-multiselect.active .multiselect-header::after {
  transform: rotate(180deg);
}

.multiselect-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #111111;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-top: 4px;
  max-height: 250px;
  overflow-y: auto;
  display: none;
  box-shadow: var(--shadow-lg);
  padding: var(--space-xs);
  animation: fadeIn 0.2s ease;
}

.custom-multiselect.active .multiselect-options {
  display: block;
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-fast);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.multiselect-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

.multiselect-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.multiselect-option.selected {
  background: rgba(0, 156, 255, 0.1);
  color: var(--color-primary-light);
}

/* ---- Sport Grid ---- */

/* ---- Sport Grid ---- */
.sport-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.sport-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  aspect-ratio: 1;
  padding: var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--color-text-secondary);
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.sport-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card-hover);
  color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sport-card.active {
  border-color: var(--color-primary);
  background: rgba(0, 156, 255, 0.08);
  color: var(--color-primary);
  box-shadow: 0 0 16px var(--color-primary-glow), inset 0 0 12px rgba(0, 156, 255, 0.05);
}

.sport-card-icon {
  width: 48px;
  /* Slightly larger for premium 3D look */
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
}

.sport-icon-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sport-icon-png {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Premium touch: subtle shadow for PNGs */
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.sport-icon-svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sport-icon-svg svg {
  width: 100%;
  height: 100%;
}


.sport-card-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* ---- Sport Detail Panel (subtypes + positions side-by-side) ---- */
.sport-detail-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  animation: fadeIn 0.3s ease;
}

.sport-detail-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sport-detail-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-xs);
}

.sport-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.sport-subtype-btn,
.sport-position-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  color: var(--color-text-secondary);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.sport-subtype-btn:hover,
.sport-position-btn:hover {
  border-color: var(--color-border-hover);
  color: var(--color-text);
  background: var(--color-bg-card-hover);
}

.sport-subtype-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--color-primary-glow);
}

.sport-position-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 109, 0, 0.25);
}

.filter-city-loading {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ---- Star Rating ---- */
.star-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--color-border);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  padding: 0 2px;
  line-height: 1;
}

.star-btn:hover,
.star-btn.hover {
  color: #fbbf24;
  transform: scale(1.15);
}

.star-btn.active {
  color: #f59e0b;
}

.star-label {
  margin-left: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ---- Vacancy Slots ---- */
.vacancy-row {
  display: grid;
  grid-template-columns: 2fr 80px 140px 110px 36px;
  gap: var(--space-sm);
  align-items: end;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  animation: fadeIn 0.2s ease;
}

.vacancy-field label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-icon-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-remove:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* ---- Google Places Dropdown ---- */
.places-dropdown {
  position: absolute;
  z-index: 100;
  width: 100%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.places-dropdown .place-item {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--color-border);
}

.places-dropdown .place-item:hover {
  background: var(--color-bg-card-hover);
}

.places-dropdown .place-item:last-child {
  border-bottom: none;
}

/* ---- Compact Sport Grid (create page) ---- */
.sport-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--space-sm);
}

.sport-grid-compact .sport-card {
  padding: var(--space-sm);
  min-height: 72px;
}

.sport-grid-compact .sport-card-icon {
  width: 32px;
  height: 32px;
}


.sport-grid-compact .sport-card-name {
  font-size: 11px;
}

/* ---- Form Hint ---- */
.form-hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

/* ---- Outline Button ---- */
.btn-outline {
  background: transparent;
  border: 1px dashed var(--color-border);
  color: var(--color-primary);
  font-weight: 600;
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background: rgba(37, 99, 235, 0.05);
}

.btn-sm {
  padding: 6px var(--space-md);
  font-size: var(--font-size-sm);
}

/* ---- Location form-group relative ---- */
.form-group {
  position: relative;
}

/* ---- Match Badge Icon ---- */
.match-badge-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
}

.match-badge-icon .sport-icon-wrapper {
  width: 100%;
  height: 100%;
}

.match-badge-icon svg {
  width: 100%;
  height: 100%;
}


/* ---- Auth Logo Image ---- */
.auth-logo img {
  height: 56px;
  width: auto;
  display: block;
  margin: 0 auto var(--space-xs);
}

/* ---- Navbar Logo Image ---- */
.navbar-brand img {
  height: 28px;
  width: auto;
  vertical-align: middle;
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }

  .auth-container {
    max-width: 100%;
  }

  .auth-card {
    padding: var(--space-lg);
  }

  .auth-logo h1 {
    font-size: var(--font-size-3xl);
  }

  .navbar-inner {
    padding: 14px;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .navbar-nav {
    gap: var(--space-xs);
  }

  .navbar-nav a {
    padding: var(--space-sm);
    font-size: var(--font-size-xs);
  }

  .mobile-filter-toggle {
    display: block;
    width: 100%;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-align: center;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    font-weight: 600;
    cursor: pointer;
  }

  .filters-main {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .filters-main.open {
    display: flex;
  }

  .filters-advanced-inner {
    flex-direction: column;
  }

  .sport-filter-wrapper {
    flex-direction: column;
    min-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .vacancy-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .vacancy-field-name {
    grid-column: 1 / -1;
    /* Name spans full width */
  }

  .profile-header {
    padding: var(--space-xl) var(--space-md);
  }

  .profile-avatar-wrapper {
    width: 100px;
    height: 100px;
  }

  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-title {
    font-size: var(--font-size-2xl);
  }

  .sport-grid {
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: var(--space-sm);
  }

  .sport-card-icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .auth-wrapper {
    padding: var(--space-md);
  }

  .sport-detail-panel {
    grid-template-columns: 1fr;
  }

  .filters-main {
    flex-direction: column;
  }

  .vacancy-row {
    grid-template-columns: 1fr 1fr;
  }

  .vacancy-field-pos {
    grid-column: 1 / -1;
  }

  .vacancy-field-remove {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .stat-col.stat-divider {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
  }

  .stat-col {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Navbar Dropdown ---- */
.nav-item-dropdown {
  position: relative;
  cursor: pointer;
}

.dropdown-arrow {
  font-size: 0.8rem;
  margin-left: 4px;
  color: var(--color-text-muted);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: var(--space-xs);
  display: none;
  flex-direction: column;
  z-index: 1000;
  margin-top: var(--space-xs);
}

/* Bridge to prevent closing */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
}

@media (hover: hover) {
  .nav-item-dropdown:hover .dropdown-menu {
    display: flex;
    animation: fadeIn 0.2s ease;
  }
}

.nav-item-dropdown .dropdown-menu.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.dropdown-item {
  padding: var(--space-md);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.dropdown-item.active {
  background: var(--color-primary);
  color: white;
}

.dropdown-item.text-danger {
  color: var(--color-danger);
}

.dropdown-item.text-danger:hover {
  background: rgba(255, 77, 77, 0.1);
}

.dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-xs) 0;
}

/* ---- Profile Page ---- */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--gradient-primary);
  opacity: 0.2;
  z-index: 0;
}

.profile-avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--color-bg-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 1;
  background: var(--color-bg);
  cursor: pointer;
  overflow: hidden;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  color: white;
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.profile-avatar-wrapper:hover .avatar-overlay {
  opacity: 1;
}

.profile-info {
  margin-top: var(--space-md);
  z-index: 1;
}

.profile-info h1 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.location-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-top: var(--space-sm);
}

/* Stats Cards */
.stat-card {
  padding: var(--space-lg);
}

.stat-card h3 {
  font-size: var(--font-size-md);
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.stat-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-details {
  flex: 1;
}

.stat-label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-value .star {
  color: #FFD700;
  font-size: 1.2rem;
}

.stat-value .count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: 400;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.achievement {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0.3;
  filter: grayscale(1);
}

.achievement:not(.locked) {
  opacity: 1;
  filter: none;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.tab-content {
  display: none;
  padding: var(--space-lg) 0;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ---- Overrides ---- */
.form-group {
  margin-bottom: var(--space-xl);
}

.glass-card {
  padding: var(--space-xl);
}

/* ---- GRID SYSTEM FIX (Bootstrap-lite) ---- */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -10px;
  margin-left: -10px;
}

.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12,
.col-6 {
  position: relative;
  width: 100%;
  padding-right: 10px;
  padding-left: 10px;
}

.col-md-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.align-items-center {
  align-items: center;
}

@media (min-width: 768px) {
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
}

/* ============================================
   FAB - Floating Action Button
   ============================================ */
.fab-create {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: #FF8E01;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 38px;
  box-shadow: 0 4px 16px rgba(255, 142, 1, 0.4);
  z-index: 1000;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  line-height: 1;
}

.fab-create:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 6px 20px rgba(255, 142, 1, 0.6);
  color: white;
}

/* ---- Global Lightbox ---- */
#global-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

#global-lightbox.open {
  opacity: 1;
}

.lightbox-content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  width: min(420px, 95vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
}

#global-lightbox.open .lightbox-content {
  transform: translateY(0) scale(1);
}

.lightbox-content.success {
  border-top: 4px solid var(--color-success);
}

.lightbox-content.error {
  border-top: 4px solid var(--color-error);
}

.lightbox-content.warning {
  border-top: 4px solid var(--color-warning);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.lightbox-close:hover {
  color: var(--color-text);
}

.lightbox-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.lightbox-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.lightbox-message {
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.lightbox-btn-ok {
  min-width: 120px;
}

.lightbox-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
}

.lightbox-buttons .btn {
  min-width: 100px;
}

/* ============================================
   MOBILE RESPONSIVENESS (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

  /* 1. Global CSS & Structure */
  .container {
    padding: 0 var(--space-md);
    /* Reduced from var(--space-lg) */
  }

  /* Typography Scaling */
  .page-title,
  .auth-logo h1 {
    font-size: var(--font-size-3xl);
    /* Scaled down from 4xl */
  }

  .stat-value-large,
  .crop-modal-title {
    font-size: 1.5rem;
    /* Scaled down from 2rem / 1.2rem adjusted */
  }

  p,
  li,
  .form-label,
  .form-input,
  .btn {
    font-size: 16px;
    /* Prevents iOS auto-zoom on inputs */
  }

  /* Touch Targets */
  .btn,
  .form-input,
  select,
  .auth-tab {
    min-height: 48px;
    /* Comfortable touch target size */
  }

  /* 2. Navigation */
  .navbar-inner {
    padding: 0;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .navbar-brand img {
    height: 40px !important;
    /* Slightly smaller logo */
  }

  .navbar-toggler {
    display: block;
    /* Show hamburger icon */
  }

  .navbar-collapse {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    margin-top: 10px;
    padding: 1rem 0;
  }

  .navbar-collapse.show {
    display: flex;
    animation: fadeIn 0.2s ease-out forwards;
  }

  .navbar-nav {
    display: none !important;
  }

  .navbar-user-nav {
    flex-direction: row;
    width: auto;
    align-items: center;
    margin: 0;
  }

  .navbar-nav a {
    display: block;
    width: 100%;
    padding: 12px 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .navbar-nav a.active::after {
    display: none;
    /* Hide bottom line indicator on mobile */
  }

  .navbar-nav a.active {
    background: rgba(0, 156, 255, 0.1);
    color: var(--color-primary-light);
  }

  .navbar-user-nav {
    padding: 0;
  }

  /* Removed broken static positioning for dropdown-menu */

  .filters-main {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .filters-main.open {
    display: flex !important;
  }

  .nav-item-dropdown .dropdown-menu.show {
    display: flex;
  }

  .user-badge {
    padding: 4px 8px;
  }
}

/* ---- Mobile Bottom Navigation ---- */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .dashboard-wrapper {
    padding-bottom: 80px;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 999;
    align-items: center;
    gap: 15px;
  }

  .bottom-nav-pill {
    display: flex;
    flex: 1;
    height: 65px;
    background: #292929;
    border-radius: 35px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .bottom-nav-pill .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    font-style: italic;
    font-family: var(--font-family);
    background: transparent;
    transition: background 0.3s ease;
  }

  .bottom-nav-pill .nav-item:first-child {
    border-top-left-radius: 35px;
    border-bottom-left-radius: 35px;
  }

  .bottom-nav-pill .nav-item:last-child {
    border-top-right-radius: 35px;
    border-bottom-right-radius: 35px;
  }

  .bottom-nav-pill .nav-item.active {
    background: #009CFF;
  }
  
  .bottom-nav-pill .nav-item.active-create {
    background: #FF8E01;
  }

  .bottom-nav-pill .nav-item svg {
    width: 22px;
    height: 22px;
    margin-bottom: 2px;
  }

  .fab-create {
    display: none !important;
  }
}

/* ============================================
   Ads System Styles
   ============================================ */

.ad-link {
  display: block;
  width: 100%;
  margin-bottom: var(--space-lg);
  text-align: center;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ad-link img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* HTML5 Ads Styles */
.ad-iframe-mobile {
  display: none !important;
}

@media (max-width: 768px) {
  .ad-iframe-mobile {
    display: block !important;
  }

  .ad-iframe-desktop {
    display: none !important;
  }
}

/* Ad Rotator Styles */
.ad-rotator {
  position: relative;
  width: 100%;
}

.ad-rotator-item {
  display: none;
}

.ad-rotator-item.active {
  display: block;
}

#ad-banner-top,
#ad-banner-footer {
  display: none;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

#ad-banner-top {
  padding-top: var(--space-lg);
}

#ad-banner-footer {
  padding-bottom: var(--space-lg);
}

/* Vertical Ads */
#ad-vertical-container {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Allow clicking through the container itself */
  z-index: 900;
}

.ad-vertical {
  position: absolute;
  width: 250px;
  height: 850px;
  pointer-events: auto;
  /* Re-enable clicks on the ad itself */
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.ad-vertical-left {
  left: 20px;
}

.ad-vertical-right {
  right: 20px;
}

.ad-vertical img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hide vertical ads on smaller screens to prevent overlap */
@media (max-width: 1300px) {
  #ad-vertical-container {
    display: none !important;
  }
}

/* Popup Ad */
.ad-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.ad-popup-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s ease;
  background: transparent;
}

.ad-popup-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.ad-popup-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  color: var(--color-text);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.ad-popup-close:hover {
  background: var(--color-error);
  border-color: var(--color-error);
  transform: scale(1.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   Notifications Dropdown Styles
   ============================================ */
#notifications-dropdown {
  /* fixed + coordenadas do sino (js/app.js positionDropdown): com absolute no <body> abria no
     lugar errado quando a página estava rolada. */
  position: fixed;
  top: 70px;
  right: 10px;
  width: 340px;
  max-width: 90vw;
  max-height: 450px;
  background: var(--color-bg-card, #111111);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
  /* acima do banner "partida para avaliar" (1500), abaixo dos modais */
  z-index: 1600;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

#notifications-dropdown.show {
  display: flex;
}

#notifications-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--color-bg-card, #111111);
  transform: rotate(45deg);
  border-left: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  border-top: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  z-index: -1;
}

/* Header inside dropdown */
.notifications-dropdown-header {
  padding: var(--space-sm, 12px) var(--space-md, 16px);
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.notifications-dropdown-title {
  font-weight: 700;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-text, #F1F5F9);
  margin: 0;
}

.notifications-clear-all-btn {
  background: transparent;
  border: none;
  color: var(--color-primary, #009CFF);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm, 4px);
  transition: background var(--transition-fast);
}

.notifications-clear-all-btn:hover {
  background: rgba(0, 156, 255, 0.1);
  color: var(--color-primary-light, #66C8FF);
}

/* Dropdown list container */
.notifications-dropdown-list {
  overflow-y: auto;
  flex: 1;
  max-height: 380px;
}

/* Notification Item */
.notification-dropdown-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.04));
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  background: transparent;
}

.notification-dropdown-item:hover {
  background: var(--color-bg-card-hover, #1A1A1A);
}

.notification-dropdown-item.unread {
  background: rgba(0, 156, 255, 0.03);
}

.notification-dropdown-item.unread:hover {
  background: rgba(0, 156, 255, 0.06);
}

/* Icon / Avatar wrapper */
.notification-item-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notification-dropdown-item.unread .notification-item-icon-wrapper {
  background: rgba(0, 156, 255, 0.1);
  color: var(--color-primary, #009CFF);
}

/* Text elements */
.notification-item-content {
  flex: 1;
  min-width: 0;
}

.notification-item-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text, #F1F5F9);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-item-desc {
  font-size: 11.5px;
  color: var(--color-text-secondary, #94A3B8);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-item-time {
  font-size: 10px;
  color: var(--color-text-muted, #64748B);
}

/* Unread dot indicator */
.notification-item-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary, #009CFF);
  margin-top: 15px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  #notifications-dropdown {
    position: fixed;
    top: 60px;
    left: 5%;
    right: 5%;
    width: 90%;
    max-width: none;
    max-height: calc(100vh - 80px);
  }
  #notifications-dropdown::before {
    display: none;
  }
  .notifications-dropdown-list {
    max-height: calc(100vh - 140px);
  }
}

.error-highlight {
  border-color: var(--color-danger, #ff4d4d) !important;
  background-color: rgba(255, 77, 77, 0.05) !important;
}

/* ============================================
   Correções do jogador (docs/correcoes-jogador.md)
   ============================================ */

/* Foco visível pra quem navega por teclado (cartões, sino, menus, chips viraram botões/links). */
:focus-visible {
  outline: 2px solid var(--color-primary, #009CFF);
  outline-offset: 2px;
}

/* Sino e menu da conta agora são <button> - sem a aparência padrão de botão. */
.nav-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: inherit;
  padding: 4px;
  cursor: pointer;
  border-radius: 8px;
}
button.navbar-user {
  font: inherit;
  color: inherit;
}

/* Cartão de partida virou link (<a>): mantém o visual de antes. */
a.match-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Itens do dropdown de notificações viraram <button>. */
button.notification-dropdown-item {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.04));
  color: inherit;
  font: inherit;
  text-align: left;
}
.notification-dropdown-item .notification-item-title,
.notification-dropdown-item .notification-item-desc,
.notification-dropdown-item .notification-item-time {
  display: block;
}
.notification-item-status-dot {
  display: block;
}

.auth-message.info {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  color: var(--color-text-secondary, #94A3B8);
}

/* Cadastro no celular: o gap do grid somava com a margem do .form-group e os campos da mesma
   linha ficavam mais separados que os de linhas diferentes. */
@media (max-width: 768px) {
  .form-row {
    gap: 0;
  }
}

/* Status (partida e candidatura) */
.match-status.finished {
  background: rgba(148, 163, 184, 0.12);
  color: var(--color-text-secondary, #94A3B8);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.match-status.pending,
.participant-status.pending {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.participant-status {
  display: inline-block;
  font-size: var(--font-size-xs, 12px);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
}
.participant-status.confirmed,
.participant-status.open {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success, #22C55E);
  border-color: rgba(34, 197, 94, 0.3);
}
.participant-status.declined,
.participant-status.canceled,
.participant-status.closed,
.participant-status.cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error, #EF4444);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Advertência / bloqueio da conta (perfil e dashboard) */
.account-status-banner {
  border-radius: var(--radius-md, 12px);
  padding: var(--space-md, 16px) var(--space-lg, 20px);
  margin-bottom: var(--space-xl, 24px);
  font-size: var(--font-size-sm, 14px);
  line-height: 1.5;
}
.account-status-banner.is-banned {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}
.account-status-banner.is-warning {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #FCD34D;
}

/* Botões de ação desabilitados durante a requisição (aprovar/recusar etc.) */
button[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Native app (Capacitor iOS): js/native-app.js sets viewport-fit=cover + .is-ios ---- */
html.is-ios body {
  padding-top: env(safe-area-inset-top);
}

html.is-ios body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top);
  background: #000;
  z-index: 1001;
}

html.is-ios .navbar {
  top: env(safe-area-inset-top);
}

@media (max-width: 768px) {
  html.is-ios .mobile-bottom-nav {
    bottom: max(20px, env(safe-area-inset-bottom));
  }

  html.is-ios .dashboard-wrapper {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }
}
