/* ═══ FC Manager — Frontend Styles ═══ */
:root {
    --fcm-primary: #1e3a5f;
    --fcm-primary-light: #2d5a8e;
    --fcm-accent: #3B82F6;
    --fcm-success: #10B981;
    --fcm-danger: #EF4444;
    --fcm-warning: #F59E0B;
    --fcm-bg: #F9FAFB;
    --fcm-border: #E5E7EB;
    --fcm-text: #374151;
    --fcm-text-light: #6B7280;
    --fcm-radius: 8px;
}

/* ─── Tournament ─── */
.fcm-tournament { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--fcm-text); }
.fcm-tournament-header { margin-bottom: 24px; }
.fcm-tournament-name { font-size: 24px; font-weight: 700; color: var(--fcm-primary); margin: 0 0 8px; }
.fcm-tournament-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--fcm-text-light); }
.fcm-meta-item { display: inline-flex; align-items: center; gap: 4px; }

/* Tabs */
.fcm-tournament-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--fcm-border); padding-bottom: 0; overflow-x: auto; }
.fcm-tab {
    padding: 10px 20px; border: none; background: none; cursor: pointer;
    font-size: 14px; font-weight: 500; color: var(--fcm-text-light);
    border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .2s;
    white-space: nowrap;
}
.fcm-tab:hover { color: var(--fcm-primary); }
.fcm-tab-active { color: var(--fcm-primary); border-bottom-color: var(--fcm-primary); font-weight: 600; }
.fcm-tab-content { display: none; }
.fcm-tab-visible { display: block; }

/* ─── Standings Table ─── */
.fcm-standings-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 20px; background: #fff; border-radius: var(--fcm-radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.fcm-standings-table th { padding: 10px 12px; background: var(--fcm-primary); color: #fff; font-weight: 600; font-size: 12px; text-transform: uppercase; text-align: center; }
.fcm-standings-table th.fcm-col-team { text-align: left; }
.fcm-standings-table td { padding: 10px 12px; border-bottom: 1px solid var(--fcm-border); text-align: center; }
.fcm-standings-table td.fcm-col-team { text-align: left; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.fcm-standings-table td.fcm-col-pos { font-weight: 700; color: var(--fcm-primary); width: 30px; }
.fcm-standings-table td.fcm-col-pts { font-weight: 700; font-size: 16px; color: var(--fcm-primary); }
.fcm-standings-table tbody tr:hover { background: #EFF6FF; }
.fcm-standings-table tbody tr:nth-child(even) { background: var(--fcm-bg); }
.fcm-standings-table tbody tr:nth-child(even):hover { background: #EFF6FF; }
.fcm-standings-logo { width: 24px; height: 24px; object-fit: contain; border-radius: 2px; }

/* ─── Match List ─── */
.fcm-match-list { display: flex; flex-direction: column; gap: 4px; }
.fcm-match-row {
    display: grid; grid-template-columns: 80px 1fr 80px; align-items: center;
    padding: 12px 16px; background: #fff; border-radius: var(--fcm-radius);
    border: 1px solid var(--fcm-border); transition: all .15s;
}
.fcm-match-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); border-color: var(--fcm-accent); }
.fcm-match-live { border-left: 4px solid var(--fcm-danger); background: #FEF2F2; }
.fcm-match-time { text-align: center; }
.fcm-match-date { display: block; font-size: 12px; color: var(--fcm-text-light); }
.fcm-match-kickoff { display: block; font-size: 14px; font-weight: 600; }
.fcm-match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; }
.fcm-match-home { text-align: right; font-weight: 500; }
.fcm-match-away { text-align: left; font-weight: 500; }
.fcm-match-result { font-size: 18px; font-weight: 700; min-width: 60px; }
.fcm-vs { font-size: 13px; color: var(--fcm-text-light); font-weight: 400; }
.fcm-match-status { text-align: center; }
.fcm-live-badge { background: var(--fcm-danger); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; animation: fcm-pulse 2s infinite; }
.fcm-ht-badge { background: var(--fcm-warning); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.fcm-pitch { font-size: 12px; color: var(--fcm-text-light); }
@keyframes fcm-pulse { 0%,100% { opacity:1; } 50% { opacity:.6; } }

/* ─── Bracket ─── */
.fcm-bracket { display: flex; gap: 24px; overflow-x: auto; padding: 16px 0; }
.fcm-bracket-round { min-width: 200px; display: flex; flex-direction: column; justify-content: space-around; }
.fcm-bracket-round-title { font-size: 13px; font-weight: 700; color: var(--fcm-primary); text-transform: uppercase; text-align: center; margin-bottom: 12px; }
.fcm-bracket-match { background: #fff; border: 1px solid var(--fcm-border); border-radius: 6px; margin-bottom: 12px; overflow: hidden; }
.fcm-bracket-team { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--fcm-border); }
.fcm-bracket-team:last-child { border-bottom: none; }
.fcm-bracket-score { font-weight: 700; min-width: 20px; text-align: center; }
.fcm-winner { background: #ECFDF5; font-weight: 600; }

/* ─── Team Card ─── */
.fcm-team-card { background: #fff; border-radius: var(--fcm-radius); border: 1px solid var(--fcm-border); overflow: hidden; }
.fcm-team-header { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--fcm-primary); color: #fff; }
.fcm-team-logo { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.fcm-team-name { font-size: 20px; font-weight: 700; margin: 0; }
.fcm-team-club { font-size: 14px; opacity: .8; }
.fcm-roster-table { width: 100%; border-collapse: collapse; }
.fcm-roster-table th { padding: 10px 16px; background: var(--fcm-bg); font-size: 12px; text-transform: uppercase; color: var(--fcm-text-light); text-align: left; }
.fcm-roster-table td { padding: 10px 16px; border-bottom: 1px solid var(--fcm-border); }
.fcm-jersey { font-weight: 700; color: var(--fcm-primary); width: 40px; }

/* ─── Registration Form ─── */
.fcm-register-form { background: #fff; border-radius: var(--fcm-radius); padding: 24px; border: 1px solid var(--fcm-border); max-width: 600px; }
.fcm-register-form h3 { margin: 0 0 16px; color: var(--fcm-primary); }
.fcm-register-info { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; font-size: 14px; color: var(--fcm-text-light); }
.fcm-deadline { color: var(--fcm-warning); font-weight: 500; font-size: 14px; }
.fcm-register-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.fcm-field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.fcm-register-form .fcm-input { padding: 10px 14px; border: 1px solid var(--fcm-border); border-radius: 6px; font-size: 14px; width: 100%; box-sizing: border-box; }
.fcm-register-form .fcm-input:focus { outline: none; border-color: var(--fcm-accent); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.fcm-btn-register { width: 100%; padding: 12px; background: var(--fcm-primary); color: #fff; border: none; border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background .2s; }
.fcm-btn-register:hover { background: var(--fcm-primary-light); }
.fcm-btn-register:disabled { opacity: .5; cursor: not-allowed; }
.fcm-register-message { margin-top: 12px; padding: 12px; border-radius: 6px; font-size: 14px; }
.fcm-register-message.fcm-msg-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.fcm-register-message.fcm-msg-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* ─── Tournament List ─── */
.fcm-tournament-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.fcm-tournament-card { background: #fff; border-radius: var(--fcm-radius); border: 1px solid var(--fcm-border); padding: 20px; transition: box-shadow .2s; }
.fcm-tournament-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.fcm-tournament-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.fcm-tournament-card-header h3 { margin: 0; font-size: 16px; color: var(--fcm-primary); }
.fcm-tournament-card-body { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--fcm-text-light); }
.fcm-tournament-card-desc { font-size: 13px; color: var(--fcm-text-light); margin-top: 8px; }

/* ─── Live Widget ─── */
.fcm-live-widget { background: #fff; border-radius: var(--fcm-radius); border: 1px solid var(--fcm-border); overflow: hidden; }
.fcm-live-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--fcm-primary); color: #fff; font-weight: 600; font-size: 14px; }
.fcm-live-dot { width: 10px; height: 10px; background: var(--fcm-danger); border-radius: 50%; animation: fcm-pulse 2s infinite; }
.fcm-live-content { padding: 16px; }
.fcm-loading { text-align: center; color: var(--fcm-text-light); }

/* ─── Utilities ─── */
.fcm-error { color: var(--fcm-danger); font-style: italic; }
.fcm-notice { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 6px; padding: 12px 16px; color: #92400E; }
.fcm-empty { text-align: center; color: var(--fcm-text-light); padding: 20px; font-style: italic; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .fcm-match-row { grid-template-columns: 60px 1fr 50px; padding: 8px 10px; }
    .fcm-match-teams { grid-template-columns: 1fr auto 1fr; gap: 6px; font-size: 13px; }
    .fcm-match-result { font-size: 15px; min-width: 50px; }
    .fcm-bracket { flex-direction: column; }
    .fcm-bracket-round { min-width: auto; }
    .fcm-tournament-list { grid-template-columns: 1fr; }
    .fcm-standings-table { font-size: 12px; }
    .fcm-standings-table th, .fcm-standings-table td { padding: 6px 4px; }
}
