body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #f4f5f7;
    color: #1d2327;
    margin: 0;
    padding: 40px 20px;
}

.mpl-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.mpl-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 20px;
}

.mpl-error {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.mpl-field {
    margin-bottom: 14px;
}

.mpl-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.mpl-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
}

.mpl-button {
    display: inline-block;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 9px 16px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.mpl-button:hover {
    background: #135e96;
}

.mpl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mpl-header h1 {
    font-size: 20px;
    margin: 0;
}

.mpl-logout {
    color: #646970;
    font-size: 13px;
}

.mpl-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #dcdcde;
    flex-wrap: wrap;
}

.mpl-match:last-child {
    border-bottom: none;
}

.mpl-match-teams {
    font-weight: 600;
}

.mpl-match-meta {
    color: #646970;
    font-size: 13px;
}

.mpl-generate-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mpl-generate-buttons button {
    background: #f0f0f1;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
}

.mpl-generate-buttons button:hover {
    background: #dcdcde;
}

.mpl-empty {
    color: #646970;
}

.mpl-gallery-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #dcdcde;
}

.mpl-gallery-entry:last-child {
    border-bottom: none;
}

.mpl-gallery-entry-actions {
    display: flex;
    gap: 6px;
}

.mpl-delete-button {
    background: #fcf0f1;
    color: #d63638;
    border: 1px solid #d63638;
    border-radius: 4px;
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
}

.mpl-delete-button:hover {
    background: #d63638;
    color: #fff;
}

#mpl-debug-log {
    max-height: 320px;
    overflow-y: auto;
    background: #1d2327;
    color: #c3c4c7;
    padding: 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.mpl-debug-entry {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #3c434a;
}

.mpl-debug-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* audit.php's team quick-pick list — a wrapped row of small pill links,
   one per team_id that currently has at least one generated entry. */
.mpl-team-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mpl-team-picker a {
    display: inline-block;
    background: #f0f0f1;
    border: 1px solid #8c8f94;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    text-decoration: none;
    color: #1d2327;
}

.mpl-team-picker a:hover,
.mpl-team-picker a.-is-active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.mpl-team-form {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 12px;
}

.mpl-team-form input[type="number"] {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
}

/* index.php's own banner when the current session is an admin-override
   view opened from audit.php (open-team.php), not a real per-team login. */
.mpl-admin-banner {
    background: #fcf9e8;
    border: 1px solid #dba617;
    border-radius: 4px;
    padding: 10px 14px;
    margin: 0 0 20px;
    font-size: 13px;
}
