/* ========================================
   COMPLETA TIME — Camada responsiva Desktop
   Mantém os componentes/cores da marca; reorganiza
   o layout em telas largas com navbar superior fixa.
   ======================================== */

@media (min-width: 992px) {

  body { max-width: none; }

  /* ---- Bottom nav (mobile) escondida no desktop ---- */
  .bottom-nav { display: none; }
  .md-bottom-nav { display: none; }
  .md-hero-header { border-radius: 0; padding-top: 24px; }
  .md-hero-header .md-hero-topline { display: none; }

  /* ---- Navbar superior fixa ---- */
  .desktop-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 68px;
    padding: 0 32px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 200;
  }

  .desktop-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: var(--color-secondary);
    flex-shrink: 0;
  }
  .desktop-nav-brand .brand-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--md-primary), var(--md-navy-900));
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
  }

  .desktop-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
  }
  .desktop-nav-links a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-muted);
    text-decoration: none;
    transition: all 0.15s;
  }
  .desktop-nav-links a:hover { background: var(--md-surface); color: var(--md-text); }
  .desktop-nav-links a.active { background: rgba(62,123,250,0.10); color: var(--md-primary); }
  .desktop-nav-links a svg { flex-shrink: 0; }

  .wallet-topbar { display: none; }
  .app-header-mobile { display: none; }
  .mobile-offcanvas { display: none; }

  .desktop-nav-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
  .desktop-nav-bell {
    position: relative;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--md-surface);
    display: flex; align-items: center; justify-content: center;
    color: var(--md-text);
    text-decoration: none;
  }
  .desktop-nav-bell.active { background: rgba(62,123,250,0.10); color: var(--md-primary); }
  .desktop-nav-wallet {
    display: flex; align-items: center; gap: 7px;
    background: var(--md-surface);
    border-radius: var(--md-radius-pill);
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--md-text);
    text-decoration: none;
  }
  .desktop-nav-actions .btn-create {
    display: flex; align-items: center; gap: 7px;
    background: var(--md-primary);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--md-radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--md-elevation-1);
  }
  .desktop-nav-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--md-primary-light); }
  .desktop-nav-actions .dropdown-toggle { display: flex; align-items: center; justify-content: center; }
  .desktop-nav-actions .dropdown-toggle::after { display: none; }

  /* ---- Área de conteúdo (telas com navbar) ---- */
  .page {
    margin: 0 auto;
    max-width: 1100px;
    padding: 88px 24px 40px;
  }
  .md-page {
    margin: 0 auto;
    max-width: 1040px;
    padding: 104px 32px 40px;
  }

  /* ---- Telas sem navbar (auth, wizards) ficam centralizadas ---- */
  .page-no-nav {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 8px 0;
  }

  .login-page { margin-left: 0; }

  /* ---- Dashboard: grids em vez de scroll horizontal ---- */
  .partidas-scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    overflow: visible;
    padding: 4px 0 16px;
  }
  .partida-card { min-width: 0; }
  .partida-card-img { height: 160px; }

  .chips-row { overflow: visible; flex-wrap: wrap; padding: 8px 0; }
  .search-row { padding: 12px 0; }
  .section-header { padding: 20px 0 12px; }
  .dash-header { padding: 8px 0 12px; }

  .quadra-list-item, .atleta-list-item, .avaliacao-item, .notif-item,
  .convite-card, .candidate-item, .fifa-card, .summary-card {
    margin-left: 0; margin-right: 0;
  }

  .container { padding: 0; }

  /* ---- Busca de atletas: grid de cards em vez de lista ---- */
  .athlete-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
  }
  .athlete-grid .atleta-list-item { margin: 0; }
  .filter-panel { margin-left: 0; margin-right: 0; }

  /* ---- Chat: layout dividido lista + conversa ---- */
  .chat-split {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
    height: calc(100vh - 88px - 40px);
  }
  .chat-split .conv-list-panel {
    background: var(--color-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow-y: auto;
    height: 100%;
  }
  .chat-split .chat-thread-panel {
    background: var(--color-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .chat-split .chat-thread { flex: 1; overflow-y: auto; padding-bottom: 16px; }
  .chat-split .chat-composer {
    position: static;
    transform: none;
    max-width: none;
    width: auto;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
  }

  /* ---- Wizards / formulários: 2 colunas quando fizer sentido ---- */
  .page-no-nav .form-row-desktop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .page-no-nav.wide { max-width: 640px; }

  /* ---- Botões fixos viram botões normais no fluxo ---- */
  .btn-fixed, .btn-fixed-nonnav {
    position: static;
    transform: none;
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 24px auto;
    box-shadow: var(--shadow-card);
  }

  .top-bar { padding-left: 0; padding-right: 0; }
}

@media (min-width: 1280px) {
  .page { max-width: 1240px; }
  .md-page { max-width: 1160px; }
  .partidas-scroll { grid-template-columns: repeat(3, 1fr); }
  .chat-split { grid-template-columns: 380px 1fr; }
}
