/* Teams & Logos Management Styles */
.teams-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Nav Bar */
.teams-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 12px;
}

.teams-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
}

.teams-nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card-alt);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-btn.active {
  background: rgba(255, 229, 0, 0.15);
  border-color: var(--fb-yellow);
  color: var(--fb-yellow);
}

/* Header */
.teams-header {
  margin-bottom: 28px;
}

.teams-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, var(--fb-yellow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.teams-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 750px;
  line-height: 1.5;
}

/* Layout */
.teams-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .teams-layout {
    grid-template-columns: 1fr;
  }
}

/* Form Card */
.team-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.team-form-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.form-group {
  margin-bottom: 14px;
}

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

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input, #0b1120);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--fb-yellow);
}

/* Colors Row */
.colors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  width: 100%;
}

.color-picker-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.color-picker-box label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.color-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.color-native-picker {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}

.color-native-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-native-picker::-webkit-color-swatch {
  border: none;
  border-radius: 5px;
}

.color-hex-text {
  width: 100%;
  max-width: 86px;
  min-width: 0;
  padding: 5px 6px;
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  background: #0b1120;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: #ffffff;
}

.color-hex-text:focus {
  outline: none;
  border-color: var(--fb-yellow);
}

/* Eyedropper Button */
.btn-eyedropper {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.btn-eyedropper:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
}

/* Dropzone */
.team-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

.team-dropzone:hover, .team-dropzone.dragover {
  border-color: var(--fb-yellow);
  background: rgba(255, 229, 0, 0.05);
}

.team-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

/* Logo Preview in Form */
.team-logo-preview-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 10px;
}

.team-logo-preview-box img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 2px;
}

.btn-clear-logo {
  background: rgba(214, 28, 53, 0.15);
  border: 1px solid rgba(214, 28, 53, 0.4);
  color: #f87171;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-clear-logo:hover {
  background: rgba(214, 28, 53, 0.3);
}

/* Live Preview Card */
.live-preview-section {
  margin-top: 18px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.live-preview-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.live-team-badge {
  background: #0f172a;
  border: 2px solid #ffed00;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.live-badge-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-badge-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #ffffff;
}

.live-badge-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.live-badge-name {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.live-badge-short {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  margin-top: 2px;
}

.live-badge-score {
  font-family: var(--font-score, monospace);
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Submit Button */
.btn-save-team {
  width: 100%;
  padding: 12px;
  margin-top: 18px;
  background: var(--fb-yellow);
  color: #002d72;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-save-team:hover {
  background: #facc15;
  transform: translateY(-1px);
}

/* Right Column: Library */
.teams-library-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.teams-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.9rem;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--fb-yellow);
}

/* Teams Grid */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.team-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.team-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.team-card-banner {
  height: 8px;
  width: 100%;
}

.team-card-body {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.team-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 900;
  font-size: 1.2rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.team-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.team-card-info {
  flex: 1;
  min-width: 0;
}

.team-card-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.team-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-short-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--fb-yellow);
}

.team-color-swatches {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.team-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.team-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-card-action {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  transition: all 0.15s;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-card-action.danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.btn-card-action.danger:hover {
  background: rgba(248, 113, 113, 0.15);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.btn-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.btn-modal-close:hover {
  color: #ffffff;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.btn-modal-cancel {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card-alt);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-modal-save {
  padding: 10px 22px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--fb-yellow) 0%, #e6d200 100%);
  color: #0b1120;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(255, 237, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-modal-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 237, 0, 0.35);
  filter: brightness(1.05);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
