/* =================================
   Page Layout / Footer / Workflow
================================= */
.page-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px 40px;
    width: 100%;
}

.page-title {
    margin: 0 0 16px;
    font-size: 32px;
    line-height: 1.15;
    word-break: break-word;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.muted {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.workflow {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.workflow-step {
    padding: 8px 12px;
    border-radius: 999px;
    background: #e5e7eb;
    font-weight: bold;
    font-size: 13px;
}

.workflow-step.active {
    background: var(--primary);
    color: #fff;
}

.workflow-arrow {
    font-size: 14px;
    color: #6b7280;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

.games-layout,
.layout-grid,
.lock-grid,
.players-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.grass-divider {
    position: relative;
    width: 100%;
    height: 120px;
    margin-top: 70px;
    overflow: hidden;
}

.grass-divider::before {
    content: "";
    position: absolute;
    inset: 0;

    background: url("/assets/images/grass_footer.png") repeat-x center bottom;
    background-size: auto 100%;

    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.15) 18%,
        rgba(0, 0, 0, 0.45) 38%,
        rgba(0, 0, 0, 0.75) 62%,
        rgba(0, 0, 0, 1) 100%
    );

    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.15) 18%,
        rgba(0, 0, 0, 0.45) 38%,
        rgba(0, 0, 0, 0.75) 62%,
        rgba(0, 0, 0, 1) 100%
    );
}
.site-footer {
    padding: 56px 24px 26px;
    background:
        radial-gradient(
            circle at top left,
            rgba(255, 255, 255, 0.08),
            transparent 32%
        ),
        linear-gradient(135deg, #0f172a 0%, #111827 48%, #020617 100%);
    color: #fff;
}

.footer-large {
    max-width: 1240px;
    margin: 0 auto;
}

.footer-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    padding-bottom: 38px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand-panel {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.footer-logo-mark {
    width: 64px;
    height: 64px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    flex-shrink: 0;
}

.footer-logo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-kicker {
    color: rgba(255, 255, 255, 0.64);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.footer-brand-panel h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.footer-brand-panel p {
    max-width: 690px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
    font-size: 16px;
}

.footer-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-main-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 30px;
    padding: 38px 0;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
}

.footer-column a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-learn-strip {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(255, 255, 255, 0.72);
}

.footer-learn-strip strong {
    display: block;
    color: #fff;
    margin-bottom: 4px;
}

.footer-learn-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-learn-links a {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.footer-learn-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 13px;
}

@media (max-width: 1100px) {
    .footer-main-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-hero {
        grid-template-columns: 1fr;
    }

    .footer-hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .site-footer {
        padding: 42px 20px 24px;
    }

    .footer-brand-panel {
        grid-template-columns: 1fr;
    }

    .footer-main-grid {
        grid-template-columns: 1fr 1fr;
        gap: 26px 20px;
    }

    .footer-learn-strip {
        display: block;
    }

    .footer-learn-links {
        margin-top: 14px;
    }
}

@media (max-width: 480px) {
    .footer-main-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom span {
        display: block;
        width: 100%;
    }
}
.pitch-rule-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.pitch-rule-card {
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.pitch-rule-card-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.pitch-rule-card h3 {
    margin: 0 0 4px;
}

.pitch-rule-card p {
    margin: 0;
}

.pitch-rule-max {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.pitch-rule-max span {
    color: #6b7280;
    font-weight: 700;
}

.pitch-rule-max strong {
    color: #111827;
}

.pitch-rest-rules {
    margin-top: 14px;
}

.pitch-rest-rules h4 {
    margin: 0 0 8px;
}

.rest-rule-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rest-rule-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 13px;
    font-weight: 700;
}
.suggested-lineup-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suggested-lineup-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.suggested-lineup-slot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.suggested-lineup-player {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.suggested-lineup-player span {
    font-size: 12px;
    opacity: 0.7;
}

.suggested-lineup-player small {
    font-size: 11px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.suggested-lineup-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    font-size: 13px;
    opacity: 0.9;
}

@media (max-width: 700px) {
    .suggested-lineup-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .suggested-lineup-metrics {
        justify-content: flex-start;
    }
}

.suggested-lineup-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.suggested-lineup-compact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
    line-height: 1.2;
}

.sl-slot {
    width: 22px;
    font-weight: 700;
    opacity: 0.7;
    flex-shrink: 0;
}

.sl-player {
    flex: 1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sl-player span {
    opacity: 0.6;
    font-size: 11px;
    margin-left: 4px;
}

.sl-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 11px;
    opacity: 0.8;
}

@media (max-width: 640px) {
    .suggested-lineup-compact-row {
        gap: 8px;
        padding: 6px 8px;
    }

    .sl-stats {
        gap: 6px;
        font-size: 10px;
    }
}
.suggested-lineup-toggle summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 18px;
    padding: 2px 0;
}

.suggested-lineup-toggle summary::-webkit-details-marker {
    display: none;
}

.suggested-lineup-toggle summary small {
    font-size: 12px;
    opacity: 0.65;
    font-weight: 500;
}

.suggested-lineup-content {
    margin-top: 14px;
}
.stat-tip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted #94a3b8;
}

.stat-tip:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: #0f172a;
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.45;
    z-index: 999;
    white-space: normal;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.stat-tip:hover::before {
    content: "";
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}
.badge {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-secondary {
    background: #e5e7eb;
    color: #4b5563;
}
/* =========================================================
   Coach Dashboard
========================================================= */

.coach-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.coach-dashboard-card {
    min-width: 0;
}

.coach-next-game-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 900;
    line-height: 1.1;
    margin-top: 8px;
}

.coach-next-game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: var(--muted-color, #6b7280);
}

.coach-next-game-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--surface-muted, #f7f7f8);
    font-size: 0.86rem;
    font-weight: 700;
}

.coach-alert {
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.coach-alert p {
    margin: 6px 0 0;
}

.coach-alert-warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.coach-alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.coach-alert-ok {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.coach-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.coach-status-pill.available {
    background: #e8f7ef;
    color: #166534;
}

.coach-status-pill.resting {
    background: #fdecec;
    color: #991b1b;
}

.coach-recent-list {
    display: grid;
    gap: 10px;
}

.coach-recent-game {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 12px;
    background: var(--surface-muted, #f7f7f8);
}

.coach-recent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

/* Mobile coach dashboard tables */
@media (max-width: 760px) {
    .coach-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .coach-recent-game {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-recent-actions {
        justify-content: stretch;
    }

    .coach-recent-actions .btn {
        width: 100%;
    }

    .coach-table table,
    .coach-table thead,
    .coach-table tbody,
    .coach-table th,
    .coach-table td,
    .coach-table tr {
        display: block;
    }

    .coach-table thead {
        display: none;
    }

    .coach-table tbody {
        display: grid;
        gap: 12px;
    }

    .coach-table tr {
        background: var(--card-bg, #ffffff);
        border: 1px solid var(--border-color, #e5e7eb);
        border-radius: 14px;
        padding: 10px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    }

    .coach-table td {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        padding: 8px 4px;
        border: 0;
        border-bottom: 1px solid var(--border-color, #e5e7eb);
        text-align: right;
    }

    .coach-table td:last-child {
        border-bottom: 0;
    }

    .coach-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: var(--muted-color, #6b7280);
        text-align: left;
    }

    .coach-table td[data-label="Player"] {
        font-size: 1rem;
        font-weight: 800;
    }
}
