:root {
    color-scheme: dark;
    --background: #090d15;
    --panel: #111827;
    --panel-soft: #172235;
    --border: #2c3a50;
    --text: #eef4ff;
    --muted: #8291a8;
    --accent: #8a00d4;
    --accent-hover: #a600ff;
    --green: #20b967;
    --red: #e6545f;
    --input: #0d1523;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

body {
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    min-height: 58px;
    padding: 0 22px;
    border-bottom: 1px solid var(--border);
    background: #0d1421;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.inline-form {
    display: inline;
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.container {
    width: min(1500px, calc(100% - 32px));
    margin: 24px auto 60px;
}

.page-heading {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-heading h1 {
    margin: 0 0 5px;
    font-size: 24px;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
}

.summary-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 220px));
    gap: 12px;
    margin-bottom: 18px;
}

.summary-card {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.summary-card strong {
    font-size: 22px;
}

.panel {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--panel);
    overflow: hidden;
}

.panel > h2,
.panel-title-row {
    margin: 0;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
}

.panel h2 {
    margin: 0;
    font-size: 15px;
}

.panel-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters {
    padding: 16px 18px;
    display: grid;
    grid-template-columns: minmax(280px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr);
    gap: 12px;
    align-items: end;
}

.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #dce7f8;
    font-size: 13px;
    font-weight: 600;
}

label small {
    color: var(--muted);
    font-weight: 400;
}

input,
select {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid #41506a;
    border-radius: 5px;
    outline: none;
    background: var(--input);
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus {
    border-color: #a7e600;
    box-shadow: 0 0 0 1px #a7e600;
}

.button {
    min-height: 40px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.button.primary {
    background: var(--accent);
    color: #fff;
}

.button.primary:hover {
    background: var(--accent-hover);
}

.button.secondary {
    border-color: #4c5e79;
    background: transparent;
    color: var(--text);
}

.button.compact {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.button.full {
    width: 100%;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1050px;
}

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid #223047;
    text-align: left;
    vertical-align: middle;
}

th {
    color: #7890b2;
    background: #121d2d;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.018);
}

.badge {
    margin-left: 6px;
    padding: 4px 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}

.badge.active {
    background: rgba(32, 185, 103, 0.18);
    color: #42d984;
}

.badge.inactive {
    background: rgba(230, 84, 95, 0.18);
    color: #ff7c87;
}

.badge.admin {
    background: rgba(68, 137, 255, 0.18);
    color: #77aaff;
}

.muted {
    color: var(--muted);
}

.empty {
    padding: 30px;
    color: var(--muted);
    text-align: center;
}

.pagination {
    padding: 14px 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.form-panel {
    max-width: 850px;
}

.form-panel form {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px;
}

.wide {
    grid-column: 1 / -1;
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
}

.checkbox-row input {
    width: 18px;
    min-height: 18px;
}

.form-actions {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.flash-area {
    margin-bottom: 14px;
}

.flash {
    margin-bottom: 8px;
    padding: 11px 13px;
    border-radius: 5px;
    border: 1px solid;
}

.flash.success {
    border-color: rgba(32, 185, 103, 0.55);
    background: rgba(32, 185, 103, 0.12);
    color: #78e7aa;
}

.flash.error {
    border-color: rgba(230, 84, 95, 0.55);
    background: rgba(230, 84, 95, 0.12);
    color: #ff9da5;
}

.login-page {
    min-height: 100vh;
    padding: 25px;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(390px, 100%);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel);
}

.login-logo {
    margin-bottom: 24px;
    color: #a7e600;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-align: center;
}

.login-card h1 {
    margin: 0 0 24px;
    font-size: 18px;
    text-align: center;
}

.login-card form {
    display: grid;
    gap: 17px;
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 20px, 1500px);
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-row,
    .filters,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .wide {
        grid-column: auto;
    }
}


/* LOGIN UNICO MVP */

.user-role {
    color: var(--muted);
    font-size: 12px;
}

.home-header {
    padding: 25px 0 15px;
    text-align: center;
}

.home-brand {
    color: #a7e600;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 2px;
}

.home-menu {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.home-menu button:disabled {
    opacity: .62;
    cursor: default;
}

.welcome {
    margin-top: 18px;
    color: var(--muted);
}

.live-section {
    width: min(920px, 100%);
    margin: 20px auto 35px;
}

.live-section > h1 {
    margin: 0 0 17px;
    font-size: 28px;
    font-weight: 400;
    text-align: center;
}

.competition-block {
    border: 1px solid #606060;
    background: #151918;
}

.competition-title {
    padding: 8px 12px;
    border-bottom: 1px solid #606060;
    color: #3d91ff;
    font-size: 12px;
    font-weight: 700;
}

.match-row {
    min-height: 48px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.loading-row {
    color: #dce5f4;
}

.master-shortcuts {
    width: min(920px, 100%);
    margin: 0 auto 40px;
}

.master-shortcuts h2 {
    font-size: 16px;
}

.master-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 12px;
}

.master-card {
    min-height: 105px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.master-card strong {
    font-size: 15px;
}

.master-card span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.master-card:not(.disabled-card):hover {
    border-color: #a7e600;
}

.disabled-card {
    opacity: .7;
}

@media (max-width: 760px) {
    .topbar {
        padding: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar nav {
        width: 100%;
        gap: 12px;
        flex-wrap: wrap;
    }

    .user-role {
        margin-left: auto;
    }

    .master-grid {
        grid-template-columns: 1fr;
    }
}


/* PARTIDAS RUSHFLOWS */

.live-title-row {
    margin-bottom: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.live-title-row h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 400;
}

.competition-block {
    margin-bottom: 9px;
}

.match-row + .match-row {
    border-top: 1px solid #555;
}

.match-info {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-star {
    color: #fff;
    font-size: 22px;
}

.match-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.match-button {
    min-width: 55px;
    min-height: 31px;
    padding: 5px 9px;
    border: 1px solid #536175;
    border-radius: 4px;
    background: #2a313a;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.match-button.radar {
    background: #343d48;
}

.match-button.video {
    background: #1f5c79;
}

.match-button.master {
    background: #7000aa;
}

.match-button:disabled {
    cursor: default;
    opacity: .67;
}

.match-alert {
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(230, 84, 95, .17);
    color: #ff8c95;
    font-size: 10px;
    font-weight: 700;
}

.sync-error {
    margin-bottom: 13px;
    padding: 11px 13px;
    border: 1px solid rgba(230, 84, 95, .55);
    border-radius: 5px;
    background: rgba(230, 84, 95, .12);
    color: #ff9da5;
}

@media (max-width: 650px) {
    .match-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-actions {
        width: 100%;
        justify-content: flex-end;
    }
}


/* AGENDA E FAVORITOS */

.schedule-section {
    margin-bottom: 25px;
}

.schedule-heading {
    margin: 0 0 9px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.schedule-heading h2 {
    margin: 0;
    color: #e9f1ff;
    font-size: 18px;
    font-weight: 600;
}

.schedule-heading span {
    min-width: 25px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #243044;
    color: #9db0ca;
    font-size: 11px;
    text-align: center;
}

.favorite-form {
    margin: 0;
}

.favorite-toggle {
    width: 25px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font-size: 23px;
    line-height: 1;
}

.favorite-toggle:hover,
.favorite-toggle.selected {
    color: #f7c948;
}

.match-time {
    min-width: 42px;
    color: #dce7f8;
    font-size: 12px;
    font-weight: 700;
}

.live-badge,
.finished-badge {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
}

.live-badge {
    background: rgba(32, 185, 103, .18);
    color: #47df8a;
}

.finished-badge {
    background: rgba(126, 143, 168, .17);
    color: #aebbd0;
}

@media (max-width: 650px) {
    .match-info {
        width: 100%;
        flex-wrap: wrap;
    }

    .match-name {
        max-width: calc(100% - 100px);
    }
}


/* BANDEIRAS E SENHAS */

.competition-title {
    display: flex;
    align-items: center;
    gap: 7px;
}

.country-flag {
    width: 20px;
    height: 15px;
    flex: 0 0 auto;
    border-radius: 1px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

.country-globe {
    width: 20px;
    display: inline-flex;
    justify-content: center;
    font-size: 13px;
}

.password-input-row {
    width: 100%;
    display: flex;
    align-items: stretch;
}

.password-input-row input {
    border-radius: 5px 0 0 5px;
}

.password-icon-button {
    width: 48px;
    min-width: 48px;
    border: 1px solid #41506a;
    border-left: 0;
    border-radius: 0 5px 5px 0;
    background: #172235;
    color: #ffffff;
    cursor: pointer;
    font-size: 17px;
}

.password-icon-button:hover {
    background: #22314a;
}

.password-tools {
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.password-message {
    color: #64d99a;
    font-size: 11px;
    font-weight: 500;
}

.password-tools button:disabled {
    opacity: .45;
    cursor: default;
}


/* PERFIL DO USUARIO */

.profile-summary {
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel-soft);
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(140px, 1fr)
    );
    gap: 14px;
}

.profile-summary span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
}

.profile-summary strong {
    font-size: 14px;
}

@media (max-width: 650px) {
    .profile-summary {
        grid-template-columns: 1fr;
    }
}


/* PLAYER LINKS */

a.match-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

a.match-button.video:hover {
    background: #28779a;
    border-color: #4598bc;
}

.favorite-toggle:disabled {
    opacity: .55;
    cursor: wait;
}
