/* ============================================================
   BFX3 — css/team.css  v1.0
   Estilos específicos de team.html
   Depende de perfil.css (variables, navbar, stats-grid, etc.)
   ============================================================ */

/* ── Team Header ──────────────────────────────────────────── */
.team-header-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Table Section ────────────────────────────────────────── */
.team-table-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.team-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.team-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(108,63,197,0.22);
    border: 1px solid rgba(108,63,197,0.40);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: #a78bfa;
}

/* ── Table wrapper (scroll horizontal en mobile) ─────────── */
.team-table-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.team-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 14px;
}

.team-table thead {
    background: rgba(81,39,123,0.22);
    border-bottom: 1px solid var(--color-border);
}

.team-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.team-table td {
    padding: 13px 16px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(81,39,123,0.18);
    color: var(--color-text-primary);
}

.team-table tbody tr:last-child td {
    border-bottom: none;
}

.team-table tbody tr {
    background: rgba(255,255,255,0.02);
    transition: background var(--transition);
}

.team-table tbody tr:hover {
    background: rgba(108,63,197,0.10);
}

/* ── ID cell ─────────────────────────────────────────────── */
.team-id {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    color: var(--color-action);
}

/* ── Wallet cell ─────────────────────────────────────────── */
.team-wallet {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 13px;
    color: var(--color-text-primary);
}

/* ── Level badges ────────────────────────────────────────── */
.level-badge-active {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-display);
    background: rgba(74,222,128,0.12);
    border: 1px solid rgba(74,222,128,0.28);
    color: var(--color-success);
}

.level-badge-inactive {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-display);
    background: rgba(154,154,154,0.08);
    border: 1px solid rgba(154,154,154,0.20);
    color: var(--color-text-secondary);
}

/* ── View link ───────────────────────────────────────────── */
.team-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(245,191,93,0.08);
    border: 1px solid rgba(245,191,93,0.22);
    color: var(--color-action);
    font-size: 14px;
    transition: background var(--transition);
    text-decoration: none;
}

.team-view-link:hover {
    background: rgba(245,191,93,0.20);
}

/* ── Skeleton rows ────────────────────────────────────────── */
.skeleton-row td {
    padding: 14px 16px;
}

.skeleton-cell {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-cell.w-40 { width: 40px; }
.skeleton-cell.w-80 { width: 80px; }
.skeleton-cell.w-100 { width: 100px; }
.skeleton-cell.w-120 { width: 120px; }

/* ── Empty state ─────────────────────────────────────────── */
.team-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px;
    text-align: center;
}

.team-empty-icon {
    font-size: 40px;
    line-height: 1;
}

.team-empty-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    color: var(--color-text-primary);
}

.team-empty-text {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.65;
    max-width: 320px;
}

/* ── Network Level 2 Section ─────────────────────────────── */
.network-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.network-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color var(--transition), transform var(--transition);
}

.network-card:hover {
    border-color: rgba(108,63,197,0.45);
    transform: translateY(-2px);
}

.network-card-wallet {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.network-card-count {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    color: var(--color-action);
    line-height: 1;
}

.network-card-label {
    font-size: 11px;
    color: var(--color-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Loading progress hint ───────────────────────────────── */
.team-load-hint {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
    padding: 8px 0;
    opacity: 0.7;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile: table → cards
   ══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    /* Hide the real table on mobile */
    .team-table-wrap { display: none; }

    /* Card list instead */
    .team-card-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .team-member-card {
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        transition: border-color var(--transition);
    }

    .team-member-card:hover {
        border-color: rgba(108,63,197,0.40);
    }

    .team-mc-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .team-mc-id {
        font-family: var(--font-display);
        font-weight: 800;
        font-size: 15px;
        color: var(--color-action);
    }

    .team-mc-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px 12px;
    }

    .team-mc-row {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .team-mc-label {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--color-text-secondary);
        font-weight: 600;
    }

    .team-mc-value {
        font-size: 13px;
        color: var(--color-text-primary);
        font-weight: 500;
    }

    .team-mc-wallet {
        font-family: 'DM Mono', 'Courier New', monospace;
        font-size: 12px;
        color: var(--color-text-secondary);
    }
}

@media (min-width: 768px) {
    /* Hide mobile card list on desktop */
    .team-card-list { display: none; }
}
