/* ===========================================
   BFL Match Reports v3 - Light Theme
   =========================================== */

.bfl-mr-form-wrap,
.bfl-mr-list-wrap {
    max-width: 750px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Title bar */
.bfl-mr-title {
    background: #2c3e50;
    color: #ffffff;
    padding: 14px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-top: 3px solid #3498db;
}

/* Form container */
.bfl-mr-form {
    background: #ffffff;
    border: 1px solid #ddd;
    border-top: none;
    padding: 28px 24px;
}

/* User info bar */
.bfl-mr-user-info {
    display: flex;
    justify-content: space-between;
    background: #f0f4f8;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Login message */
.bfl-mr-login-msg {
    text-align: center;
    padding: 40px 20px;
    color: #555;
    font-size: 15px;
}
.bfl-mr-login-msg a {
    color: #2271b1;
}

/* No matches */
.bfl-mr-no-matches {
    text-align: center;
    padding: 30px 20px;
    color: #888;
    font-size: 14px;
}

/* Field */
.bfl-mr-field {
    margin-bottom: 20px;
}
.bfl-mr-field.bfl-mr-full {
    width: 100%;
}

/* Labels */
.bfl-mr-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
    margin-bottom: 8px;
}
.bfl-mr-req { color: #e74c3c; }
.bfl-mr-optional { color: #999; font-weight: 400; font-size: 11px; text-transform: none; }

/* Inputs */
.bfl-mr-form input[type="text"],
.bfl-mr-form input[type="number"],
.bfl-mr-form input[type="file"],
.bfl-mr-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.bfl-mr-form input:focus,
.bfl-mr-form select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

/* Match info display */
.bfl-mr-match-info {
    background: #2c3e50;
    color: #fff;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}
.bfl-mr-match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 18px;
    font-weight: 700;
}
.bfl-mr-team-home,
.bfl-mr-team-away {
    flex: 1;
    text-align: center;
}
.bfl-mr-vs {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.6;
}
.bfl-mr-match-league {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.bfl-mr-match-day {
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.8;
    font-weight: 600;
}

/* Score row */
.bfl-mr-score-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.bfl-mr-score-input {
    width: 65px !important;
    text-align: center;
    font-size: 22px !important;
    font-weight: 700;
    padding: 10px !important;
    flex: none;
}
.bfl-mr-score-sep {
    font-size: 26px;
    font-weight: 700;
    color: #333;
}
.bfl-mr-score-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

/* Sections */
#bfl-mr-details-section {
    margin-top: 10px;
    border-top: 2px solid #ecf0f1;
    padding-top: 20px;
}

.bfl-mr-section-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.bfl-mr-section-header {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Section dots instead of emoji */
.bfl-mr-section-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.bfl-mr-dot-goal {
    background: #27ae60;
    border: 1px solid #1e8449;
}
.bfl-mr-dot-card {
    background: #f1c40f;
    border: 1px solid #d4ac0d;
}
.bfl-mr-dot-mvp {
    background: #f6ad55;
    border: 1px solid #c05621;
}

.bfl-mr-mvp-block { background: #fffaf0; border: 1px solid #feebc8; }
.bfl-mr-mvp-block select {
    width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #e2e8f0;
    font-size: 14px; background: #fff;
}
.bfl-mr-kup-hint {
    background: #e6f0fa; border: 1px solid #bee3f8; color: #2c5282;
    padding: 10px 14px; border-radius: 8px; font-size: 13px; margin: 14px 0 0;
}

/* Dynamic row */
.bfl-mr-dynamic-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.bfl-mr-dynamic-row select {
    flex: 1;
    min-width: 140px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    color: #333;
}
.bfl-mr-dynamic-row .bfl-mr-card-type {
    min-width: 120px;
    flex: 0 0 auto;
}

/* Remove button */
.bfl-mr-btn-remove {
    background: none;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bfl-mr-btn-remove:hover {
    background: #e74c3c;
    color: #fff;
}

/* Add button */
.bfl-mr-btn-add {
    background: none;
    border: 1px dashed #3498db;
    color: #3498db;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
    transition: all 0.2s;
}
.bfl-mr-btn-add:hover {
    background: #3498db;
    color: #fff;
    border-style: solid;
}

/* Submit button */
.bfl-mr-btn-submit {
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.2s;
}
.bfl-mr-btn-submit:hover { background: #34495e; }
.bfl-mr-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Message */
.bfl-mr-message {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    min-height: 20px;
}
.bfl-mr-msg-success { color: #27ae60; }
.bfl-mr-msg-error { color: #e74c3c; }

/* ---- Reports List Table ---- */
.bfl-mr-list-wrap { max-width: 100%; }

.bfl-mr-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.bfl-mr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}
.bfl-mr-table thead {
    background: #2c3e50;
    color: #fff;
}
.bfl-mr-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.bfl-mr-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.bfl-mr-table tbody tr:hover { background: #f0f4f8; }
.bfl-mr-table tbody tr:nth-child(even) { background: #fafafa; }
.bfl-mr-table tbody tr:nth-child(even):hover { background: #f0f4f8; }

.bfl-mr-col-date { white-space: nowrap; font-size: 12px; color: #666; }
.bfl-mr-col-psn { font-weight: 600; }
.bfl-mr-col-team { font-weight: 500; white-space: nowrap; }
.bfl-mr-score-cell { text-align: center; font-size: 14px; font-weight: 700; white-space: nowrap; letter-spacing: 1px; }
.bfl-mr-details-cell { font-size: 12px; line-height: 1.8; min-width: 100px; }
.bfl-mr-col-link, .bfl-mr-col-img { text-align: center; }

.bfl-mr-assist { color: #888; font-size: 11px; }

.bfl-mr-card-yellow, .bfl-mr-card-red {
    display: inline-block;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 4px;
}
.bfl-mr-card-yellow { background: #f1c40f; border: 1px solid #d4ac0d; }
.bfl-mr-card-red { background: #e74c3c; border: 1px solid #c0392b; }

.bfl-mr-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}
.bfl-mr-yt-link {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
}
.bfl-mr-yt-link:hover { background: #e74c3c; color: #fff; }

.bfl-mr-empty {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .bfl-mr-form { padding: 20px 16px; }
    .bfl-mr-user-info { flex-direction: column; }
    .bfl-mr-match-teams { font-size: 15px; gap: 10px; }
    .bfl-mr-dynamic-row { flex-direction: column; align-items: stretch; }
    .bfl-mr-dynamic-row select { min-width: unset; }
    .bfl-mr-btn-remove { align-self: flex-end; }
    .bfl-mr-score-label { display: none; }
}

/* ===== v4 dodaci: legenda boja, pregled slika, napomena ===== */
.bfl-mr-legend {
    display: flex; gap: 18px; flex-wrap: wrap;
    padding: 10px 14px; margin-bottom: 14px;
    background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 12px; color: #555;
}
.bfl-mr-leg { display: inline-flex; align-items: center; gap: 6px; }
.bfl-mr-leg-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.bfl-mr-leg-dot.green { background: #2f855a; }
.bfl-mr-leg-dot.yellow { background: #d69e2e; }
.bfl-mr-leg-dot.neutral { background: #a0aec0; }

/* Pregled izabranih slika */
.bfl-mr-img-preview {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.bfl-mr-img-thumb {
    position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden;
    border: 2px solid #e2e8f0;
}
.bfl-mr-img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bfl-mr-img-thumb span {
    position: absolute; top: 2px; left: 2px;
    background: rgba(0,0,0,.7); color: #fff; font-size: 11px;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.bfl-mr-img-hint { font-size: 11px; color: #999; margin-top: 6px; }
.bfl-mr-img-processing {
    font-size: 13px; color: #718096; padding: 8px 0; font-style: italic;
}

.bfl-mr-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; font-family: inherit; resize: vertical;
}

/* ===== Pregled poslatih izveštaja (sadržaj za admin tim) ===== */
.bfl-mr-list-wrap { max-width: 760px; margin: 0 auto; }
.bfl-mr-list-count {
    font-size: 13px; background: #fef3cd; color: #996c00;
    padding: 3px 12px; border-radius: 20px; font-weight: 700; vertical-align: middle; margin-left: 8px;
}
.bfl-mr-view-tabs { display: flex; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.bfl-mr-view-tab {
    text-decoration: none; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 700;
    background: #f1f5f9; color: #555;
}
.bfl-mr-view-tab.active { background: #1a2332; color: #fff; }
.bfl-mr-pagination {
    display: flex; align-items: center; justify-content: center; gap: 18px;
    margin: 20px 0; font-size: 13px; color: #666;
}
.bfl-mr-pagination a {
    text-decoration: none; background: #e6f0fa; color: #2c5282; padding: 7px 14px; border-radius: 8px; font-weight: 700;
}
.bfl-mr-bar-status {
    font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.bfl-mr-bar-status-done { background: #d1f0d6; color: #0a6b1f; }
.bfl-mr-bar-status-official { background: #dbeafe; color: #1e40af; }
.bfl-mr-bar-mismatch { color: #c53030; font-weight: 800; }
.bfl-mr-applied-official { background: #dbeafe; color: #1e40af; }
.bfl-mr-card-confirmed {
    padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
    background: #d1f0d6; color: #0a6b1f;
}
.bfl-mr-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 0; margin-bottom: 20px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.bfl-mr-card-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 18px; background: #f7fafc; border-bottom: 1px solid #edf2f7; flex-wrap: wrap; gap: 6px;
}
.bfl-mr-card-comp { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: #2c5282; }
.bfl-mr-card-meta { font-size: 12px; color: #888; }
.bfl-mr-card-score {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    padding: 18px; font-size: 17px;
}
.bfl-mr-card-team { flex: 1; font-weight: 700; }
.bfl-mr-card-team:first-child { text-align: right; }
.bfl-mr-card-team:last-child { text-align: left; }
.bfl-mr-card-result {
    background: #1a2332; color: #fff; padding: 8px 18px; border-radius: 8px;
    font-weight: 800; font-size: 20px; white-space: nowrap;
}
.bfl-mr-card-cols { display: flex; border-top: 1px solid #edf2f7; }
.bfl-mr-card-col { flex: 1; padding: 12px 18px; font-size: 13px; }
.bfl-mr-card-col:first-child { border-right: 1px solid #edf2f7; text-align: right; }
.bfl-mr-ev { padding: 3px 0; }
.bfl-mr-ev.g { color: #2f7a4a; }
.bfl-mr-ev.c { color: #b7791f; }
.bfl-mr-ev span { color: #999; font-size: 12px; }
.bfl-mr-ev.empty { color: #cbd5e0; }
.bfl-mr-card-note {
    padding: 10px 18px; background: #fffbeb; border-top: 1px solid #fef3cd;
    font-size: 13px; color: #92702a;
}
.bfl-mr-card-imgs {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid #edf2f7;
}
.bfl-mr-card-imgs img {
    width: 130px; height: 100px; object-fit: cover; border-radius: 8px;
    border: 1px solid #e2e8f0; transition: transform .15s;
}
.bfl-mr-card-imgs img:hover { transform: scale(1.04); }
.bfl-mr-card-actions {
    display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid #edf2f7; flex-wrap: wrap;
}
.bfl-mr-card-yt, .bfl-mr-card-edit, .bfl-mr-card-done {
    text-decoration: none; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
}
.bfl-mr-card-yt { background: #fee; color: #c00; }
.bfl-mr-card-edit { background: #e6f0fa; color: #2c5282; }
.bfl-mr-card-done { background: #2f855a; color: #fff; margin-left: auto; }
.bfl-mr-card-done:hover { background: #276749; color: #fff; }

@media (max-width: 600px) {
    .bfl-mr-card-imgs img { width: calc(50% - 4px); height: 90px; }
    .bfl-mr-card-actions { flex-direction: column; }
    .bfl-mr-card-done { margin-left: 0; text-align: center; }
}

/* Bonus labela (YouTube) */
.bfl-mr-bonus {
    font-size: 11px; background: #e6fffa; color: #047481;
    padding: 2px 10px; border-radius: 20px; font-weight: 600; margin-left: 6px;
}

/* ===== KOMPAKTNE KARTICE (collapse) ===== */
.bfl-mr-card-bar {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    cursor: pointer; user-select: none; transition: background .12s;
}
.bfl-mr-card-bar:hover { background: #f7fafc; }
.bfl-mr-bar-comp {
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
    color: #2c5282; background: #e6f0fa; padding: 3px 9px; border-radius: 6px; white-space: nowrap;
}
.bfl-mr-bar-match { flex: 1; font-size: 14px; color: #2d3748; }
.bfl-mr-bar-match b { font-size: 15px; color: #1a2332; margin: 0 4px; }
.bfl-mr-bar-icons { font-size: 12px; color: #888; display: flex; gap: 6px; white-space: nowrap; }
.bfl-mr-bar-psn { font-size: 12px; color: #999; white-space: nowrap; }
.bfl-mr-bar-toggle { color: #cbd5e0; font-size: 14px; transition: transform .2s; }
.bfl-mr-open .bfl-mr-bar-toggle { transform: rotate(180deg); }

/* Telo skriveno dok nije .bfl-mr-open */
.bfl-mr-card-body { display: none; border-top: 1px solid #edf2f7; }
.bfl-mr-open .bfl-mr-card-body { display: block; }
.bfl-mr-open { box-shadow: 0 4px 16px rgba(44,82,130,.12); }

@media (max-width: 600px) {
    .bfl-mr-bar-psn { display: none; }
    .bfl-mr-bar-match { font-size: 13px; }
}

/* ===== v4.1: zakljucavanje + automatski upis ===== */
.bfl-mr-lock-warning {
    background: #fffbeb; border: 1px solid #fde68a; color: #92702a;
    padding: 10px 14px; border-radius: 8px; font-size: 13px; margin: 16px 0 0;
}

.bfl-mr-bar-applied { color: #2f855a; }
.bfl-mr-bar-partial { color: #b7791f; }
.bfl-mr-bar-noapply { color: #999; }
.bfl-mr-card-warn { background: #fdecea !important; border-top-color: #f5c6cb !important; color: #a02622 !important; }

/* "Moji izveštaji" — kartice za menadžera */
.bfl-mr-reports-tabs { max-width: 750px; margin: 28px auto 0; display: flex; gap: 8px; }
.bfl-mr-rtab {
    flex: 1; text-align: center; padding: 12px; border: none; border-radius: 10px 10px 0 0;
    background: #e2e8f0; color: #555; font-weight: 800; font-size: 13px; letter-spacing: .3px;
    cursor: pointer;
}
.bfl-mr-rtab.active { background: #1a2332; color: #fff; }
.bfl-mr-myreports-wrap { max-width: 750px; margin: 0 auto; }
.bfl-mr-myrep-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 16px 18px; margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.bfl-mr-myrep-top {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap;
    margin-bottom: 10px;
}
.bfl-mr-myrep-comp {
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
    color: #2c5282; background: #e6f0fa; padding: 3px 9px; border-radius: 6px;
}
.bfl-mr-myrep-teams { font-size: 14px; color: #2d3748; }
.bfl-mr-applied-badge {
    font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
.bfl-mr-applied-yes { background: #e6f4ea; color: #1e7b41; }
.bfl-mr-applied-partial { background: #fef3cd; color: #996c00; }
.bfl-mr-applied-no { background: #f1f1f1; color: #777; }
.bfl-mr-myrep-cols { font-size: 13px; }
.bfl-mr-myrep-ev { padding: 2px 0; }
.bfl-mr-myrep-ev.g { color: #2f7a4a; }
.bfl-mr-myrep-ev.c { color: #b7791f; }
.bfl-mr-myrep-ev span { color: #999; font-size: 12px; }
.bfl-mr-myrep-note {
    margin-top: 8px; padding: 8px 10px; background: #fffbeb; border-radius: 6px;
    font-size: 12px; color: #92702a;
}
.bfl-mr-myrep-warn { background: #fdecea; color: #a02622; }
.bfl-mr-myrep-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bfl-mr-myrep-imgs img {
    width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f0;
}
.bfl-mr-myrep-yt {
    display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700;
    color: #c00; text-decoration: none;
}
.bfl-mr-myrep-lock {
    margin-top: 10px; font-size: 11px; color: #999;
}
.bfl-mr-myrep-mvp, .bfl-mr-card-mvp {
    background: #fffaf0; color: #9c4221; border: 1px solid #feebc8;
    padding: 6px 10px; border-radius: 6px; font-size: 13px; margin: 8px 0;
}

/* Kup / dvomec / finale */
.bfl-mr-kup-info {
    background: #ebf8ff; border: 1px solid #bee3f8; border-radius: 8px;
    padding: 10px 14px; margin: 10px 0; font-size: 13px; color: #2c5282;
}
.bfl-mr-kup-title { font-weight: 800; margin-bottom: 6px; }
.bfl-mr-kup-leg { padding: 2px 0; }
.bfl-mr-kup-agg { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #90cdf4; font-weight: 600; }
.bfl-mr-kup-winner { color: #1e7b41; font-weight: 700; margin-top: 4px; }
.bfl-mr-kup-tied { color: #9c4221; font-weight: 700; margin-top: 4px; }
.bfl-mr-kup-waiting { color: #718096; font-style: italic; margin-top: 4px; }
.bfl-mr-kup-final-box { font-weight: 700; }

/* Vidljiv okvir sa pravom greskom servera - da se lako screenshotuje, bez F12 */
#bfl-mr-debug-box {
    display: none;
    margin-top: 14px;
    padding: 14px;
    background: #fff5f5;
    border: 2px solid #e53e3e;
    border-radius: 8px;
    color: #822727;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
}
