.multireto-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 28px;
    border: 1px solid rgba(56, 189, 248, .35);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(9, 25, 48, .98), rgba(5, 13, 27, .98));
    box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
    color: #f8fafc;
    box-sizing: border-box;
}

.multireto-heading,
.multireto-matches-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(148, 163, 184, .2);
}
.multireto-heading h2,
.multireto-matches-heading h2,
.multireto-import-modal h2 { margin: 4px 0; font: 800 34px/1.1 'Open Sans', sans-serif; }
.multireto-heading p { margin: 7px 0 0; color: #94a3b8; }
.multireto-kicker { color: #22d3ee; font-size: 11px; font-weight: 900; letter-spacing: 2px; }
.multireto-finish { min-height: 42px; padding: 9px 15px; border: 1px solid #ef4444; border-radius: 8px; background: rgba(239,68,68,.14); color: #fca5a5; font-weight: 900; cursor: pointer; }
.multireto-finish:disabled { opacity: .4; cursor: not-allowed; }

.multireto-tables-label { display: grid; gap: 7px; color: #cbd5e1; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.multireto-tables-label select,
.multireto-match-table,
.multireto-search-form input {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #07152e;
    color: white;
}

.multireto-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.multireto-actions button,
.multireto-search-form button,
.multireto-modal-actions button,
.multireto-match-launch,
#multiRetoVolver,
#multiRetoFinalizadosVolver {
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #0878dc, #0ea5e9);
    color: white;
    font-weight: 800;
    cursor: pointer;
}
.multireto-actions button:nth-child(2) { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.multireto-actions button:nth-child(3) { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.multireto-actions button:nth-child(4) { background: linear-gradient(135deg, #047857, #10b981); }
.multireto-actions button:disabled,
.multireto-match-launch:disabled { opacity: .45; cursor: not-allowed; }

.multireto-sidebar-actions { width: 100%; padding: 12px; flex-direction: column; gap: 9px; box-sizing: border-box; }
.multireto-sidebar-title { padding: 5px 7px 10px; color: #22d3ee; font-size: 11px; font-weight: 900; letter-spacing: 1.8px; }
.multireto-sidebar-actions button { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid rgba(56,189,248,.25); border-radius: 8px; background: rgba(8,120,220,.18); color: #e2e8f0; font-size: 12px; font-weight: 800; text-align: left; cursor: pointer; }
.multireto-sidebar-actions button:hover { border-color: #22d3ee; background: rgba(8,120,220,.36); color: white; }
.multireto-sidebar-actions button:nth-of-type(2) { background: rgba(14,116,144,.22); }
.multireto-sidebar-actions button:nth-of-type(3) { background: rgba(109,40,217,.22); }
.multireto-sidebar-actions button:nth-of-type(4) { background: rgba(4,120,87,.24); }
.multireto-sidebar-actions button:nth-of-type(5) { background: rgba(71,85,105,.32); }

.multireto-message { min-height: 20px; margin: 8px 0; color: #94a3b8; font-weight: 700; }
.multireto-message.is-error { color: #f87171; }
.multireto-message.is-success { color: #34d399; }
.multireto-imported,
.multireto-matches,
.multireto-finished-list { display: grid; gap: 12px; margin-top: 18px; }
.multireto-empty { padding: 34px 20px; border: 1px dashed #334155; border-radius: 12px; color: #64748b; text-align: center; }

.multireto-card,
.multireto-match-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 17px 18px;
    border: 1px solid #263b59;
    border-radius: 12px;
    background: rgba(15, 35, 64, .82);
}
.multireto-card-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; }
.multireto-remove { padding: 8px 14px; border: 1px solid #ef4444; border-radius: 7px; background: rgba(239, 68, 68, .12); color: #f87171; font-weight: 800; cursor: pointer; }
.multireto-remove:disabled { opacity: .4; cursor: not-allowed; }
.multireto-card h3,
.multireto-match-card h3 { margin: 0 0 7px; color: white; font-size: 18px; }
.multireto-card p,
.multireto-match-card p { margin: 3px 0; color: #94a3b8; font-size: 13px; }
.multireto-status { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: rgba(34, 211, 238, .12); color: #67e8f9; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.multireto-status.is-active { background: rgba(52, 211, 153, .14); color: #34d399; }
.multireto-status.is-final { background: rgba(148, 163, 184, .14); color: #94a3b8; }
.multireto-match-card { position: relative; display: block; padding: 0; overflow: visible; }
.multireto-match-header { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; min-height: 44px; padding: 0 10px 0 16px; border-radius: 11px 11px 0 0; background: #17263d; color: #94a3b8; font-size: 11px; font-weight: 900; letter-spacing: .8px; }
.multireto-match-header > span { justify-self: start; }
.multireto-match-players { padding: 10px 16px; }
.multireto-player-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 52px; border-bottom: 1px solid #263b59; }
.multireto-player-row:last-child { border-bottom: 0; }
.multireto-player-identity { display: flex; align-items: center; min-width: 0; gap: 11px; }
.multireto-player-avatar { width: 38px; height: 38px; flex: 0 0 38px; border: 2px solid #3b82f6; border-radius: 50%; object-fit: cover; background: #07152e; }
.multireto-player-identity > strong { overflow: hidden; color: white; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.multireto-score-control { display: flex; align-items: center; gap: 5px; }
.multireto-score-control button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 5px; background: #374151; color: white; font-size: 18px; font-weight: 900; cursor: pointer; }
.multireto-score-control button:last-child { background: #3b82f6; }
.multireto-score-control button:disabled { opacity: .35; cursor: not-allowed; }
.multireto-score-control strong { min-width: 34px; color: white; font-size: 19px; text-align: center; }
.multireto-match-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 11px 16px; border-top: 1px solid #263b59; background: rgba(3, 10, 23, .45); }
.multireto-race-control { display: inline-flex; align-items: center; gap: 7px; color: #cbd5e1; font-size: 12px; font-weight: 800; }
.multireto-race-input { width: 58px; min-height: 42px; box-sizing: border-box; padding: 8px; border: 1px solid #334155; border-radius: 8px; background: #07152e; color: white; font-weight: 800; text-align: center; }
.multireto-race-control button { min-height: 42px; padding: 8px 12px; border: 0; border-radius: 8px; background: #2563eb; color: white; font-weight: 800; cursor: pointer; }
.multireto-race-control button:disabled { opacity: .45; cursor: not-allowed; }
.multireto-match-header .multireto-race-control { justify-self: center; color: #f8fafc; font-size: 14px; letter-spacing: 1.2px; }
.multireto-match-header .multireto-race-input { width: 52px; min-height: 32px; padding: 5px 7px; }
.multireto-match-header .multireto-race-control button { min-height: 32px; padding: 5px 10px; }
.multireto-match-header .multireto-options { justify-self: end; }
.multireto-match-launch { background: #10b981; white-space: nowrap; }
.multireto-match-launch.is-stop { background: #ef4444; }
.multireto-match-score { color: #f8fafc; font-size: 18px; font-weight: 900; }
.multireto-finished-card { padding: 18px; border: 1px solid #334155; border-radius: 12px; background: rgba(15,35,64,.82); }
.multireto-finished-card h3 { margin: 0; color: white; font-size: 19px; }
.multireto-finished-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 14px; color: #94a3b8; font-size: 12px; }
.multireto-finished-retos { display: grid; gap: 7px; }
.multireto-finished-reto { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; padding: 9px 11px; border-radius: 7px; background: rgba(2,8,20,.55); color: #dbeafe; font-size: 13px; }
.multireto-finished-reto b { color: white; }
.multireto-options { position: relative; z-index: 20; }
.multireto-options-toggle { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #cbd5e1; font-size: 25px; font-weight: 900; cursor: pointer; }
.multireto-options-toggle:hover { background: rgba(255, 255, 255, .08); }
.multireto-options-menu { position: absolute; top: 35px; right: 0; display: none; width: 210px; padding: 7px; border: 1px solid #334155; border-radius: 9px; background: #0f172a; box-shadow: 0 16px 35px rgba(0, 0, 0, .6); }
.multireto-options-menu.is-open { display: grid; }
.multireto-options-menu button { padding: 10px 11px; border: 0; border-radius: 6px; background: transparent; color: #e2e8f0; font-weight: 700; text-align: left; cursor: pointer; }
.multireto-options-menu button:hover { background: #1e293b; }

.multireto-import-modal { width: min(620px, calc(100% - 30px)); }
.multireto-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 20px; }
.multireto-search-result { margin-top: 18px; }
.multireto-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
#multiRetoImportCancel { background: #475569; }
#multiRetoVolver,
#multiRetoFinalizadosVolver { border: 1px solid #475569; background: linear-gradient(135deg, #334155, #1e293b); box-shadow: 0 5px 14px rgba(0,0,0,.28); }
#multiRetoVolver:hover,
#multiRetoFinalizadosVolver:hover { border-color: #38bdf8; background: linear-gradient(135deg, #3b4d65, #26364d); transform: translateY(-1px); }
#multiRetoVolver:focus-visible,
#multiRetoFinalizadosVolver:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }

@media (max-width: 820px) {
    .multireto-shell { padding: 20px 15px; }
    .multireto-heading { align-items: flex-start; flex-direction: column; }
    .multireto-actions { grid-template-columns: 1fr 1fr; }
    .multireto-card,
    .multireto-match-card { grid-template-columns: 1fr; }
    .multireto-match-controls { align-items: stretch; flex-direction: column; }
}

@media (max-width: 480px) {
    .multireto-actions,
    .multireto-search-form { grid-template-columns: 1fr; }
}
