/*
 * TennisFinalsPro — Tournament Manager PRO 3.0
 * Nowy panel organizatora + harmonogram z indywidualnym startem każdego kortu.
 * Plik jest ładowany jako ostatni na stronie turnieju i celowo nadpisuje stare,
 * rozproszone reguły managera bez ingerowania w pozostałe moduły serwisu.
 */

body[data-page="tournament-view"] {
    --tfp-mgr-navy: #0b2f66;
    --tfp-mgr-navy-2: #123f86;
    --tfp-mgr-blue: #1677ef;
    --tfp-mgr-cyan: #19afe6;
    --tfp-mgr-ink: #102342;
    --tfp-mgr-muted: #6f8099;
    --tfp-mgr-line: #dce7f4;
    --tfp-mgr-soft: #f5f9fe;
    --tfp-mgr-white: #ffffff;
    --tfp-mgr-green: #19a56a;
    --tfp-mgr-orange: #ef8c20;
    --tfp-mgr-red: #e94b5f;
}

body[data-page="tournament-view"] .league-panel--manage > .league-manage-tab-intro {
    display: none !important;
}

body[data-page="tournament-view"] .tournament-manager-tab-host {
    width: 100%;
    margin: 0 !important;
}

body[data-page="tournament-view"] .tournament-admin-accordion--as-tab,
body[data-page="tournament-view"] .tournament-admin-accordion--as-tab .league-admin-accordion__content,
body[data-page="tournament-view"] .tournament-admin-accordion--as-tab .tfp-manager__panel--pro {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body[data-page="tournament-view"] .tournament-admin-accordion--as-tab > .league-admin-accordion__trigger {
    display: none !important;
}

body[data-page="tournament-view"] .tfp-manager__panel--pro {
    display: grid;
    gap: 14px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: inherit;
}

/* =========================================================
   Command center / hero
   ========================================================= */
body[data-page="tournament-view"] .tfp-manager-command {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) auto;
    gap: 18px 28px;
    padding: 26px 28px 22px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 94% 18%, rgba(42,198,243,.34), transparent 29%),
        radial-gradient(circle at 78% 110%, rgba(43,128,250,.28), transparent 34%),
        linear-gradient(120deg, #0a2d63 0%, #10458e 56%, #0d9fd1 100%);
    box-shadow: 0 20px 45px rgba(18, 64, 119, .17);
}

body[data-page="tournament-view"] .tfp-manager-command::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -160px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    box-shadow: inset 0 0 0 32px rgba(255,255,255,.025), inset 0 0 0 68px rgba(255,255,255,.02);
    pointer-events: none;
}

body[data-page="tournament-view"] .tfp-manager-command__copy,
body[data-page="tournament-view"] .tfp-manager-command__actions,
body[data-page="tournament-view"] .tfp-manager-command__stats {
    position: relative;
    z-index: 1;
}

body[data-page="tournament-view"] .tfp-manager-command__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.11);
    color: #cfe8ff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body[data-page="tournament-view"] .tfp-manager-command h2 {
    margin: 10px 0 4px;
    color: #fff;
    font-size: clamp(24px, 2.25vw, 36px);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.02;
}

body[data-page="tournament-view"] .tfp-manager-command__copy > p {
    max-width: 650px;
    margin: 0;
    color: rgba(237,247,255,.82);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

body[data-page="tournament-view"] .tfp-manager-command__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

body[data-page="tournament-view"] .tfp-manager-command__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(5,34,76,.22);
    color: #e5f3ff;
    font-size: 10px;
    font-weight: 800;
}

body[data-page="tournament-view"] .tfp-manager-command__actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

body[data-page="tournament-view"] .tfp-manager-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid #d7e5f5;
    border-radius: 12px;
    background: #fff;
    color: #16355e;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

body[data-page="tournament-view"] .tfp-manager-command .tfp-manager-action {
    border-color: rgba(255,255,255,.22);
    background: rgba(255,255,255,.10);
    color: #fff;
    backdrop-filter: blur(8px);
}

body[data-page="tournament-view"] .tfp-manager-action:hover {
    transform: translateY(-1px);
    border-color: #a9cef8;
    box-shadow: 0 9px 20px rgba(30,92,155,.12);
}

body[data-page="tournament-view"] .tfp-manager-action--primary,
body[data-page="tournament-view"] .tfp-manager-command .tfp-manager-action--primary {
    border-color: transparent;
    background: linear-gradient(135deg, #237df6 0%, #16b3e5 100%);
    color: #fff;
    box-shadow: 0 10px 26px rgba(19,148,225,.24);
}

body[data-page="tournament-view"] .tfp-manager-command__stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 2px;
}

body[data-page="tournament-view"] .tfp-manager-command__stats > div {
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 14px;
    background: rgba(6,39,82,.26);
    backdrop-filter: blur(7px);
}

body[data-page="tournament-view"] .tfp-manager-command__stats span,
body[data-page="tournament-view"] .tfp-manager-command__stats small {
    display: block;
}

body[data-page="tournament-view"] .tfp-manager-command__stats span {
    color: #bad8f6;
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .055em;
}

body[data-page="tournament-view"] .tfp-manager-command__stats strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 23px;
    font-weight: 900;
    line-height: 1;
}

body[data-page="tournament-view"] .tfp-manager-command__stats small {
    margin-top: 4px;
    color: rgba(233,246,255,.72);
    font-size: 9px;
    font-weight: 700;
}

/* =========================================================
   Manager navigation
   ========================================================= */
body[data-page="tournament-view"] .tfp-manager-tabs--pro {
    display: flex !important;
    align-items: center;
    gap: 4px !important;
    width: 100%;
    padding: 7px !important;
    overflow-x: auto;
    border: 1px solid var(--tfp-mgr-line) !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.97) !important;
    box-shadow: 0 9px 26px rgba(40,81,127,.075) !important;
    scrollbar-width: none;
}
body[data-page="tournament-view"] .tfp-manager-tabs--pro::-webkit-scrollbar { display: none; }

body[data-page="tournament-view"] .tfp-manager-tabs--pro .tfp-manager-tab {
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px !important;
    padding: 0 13px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: transparent !important;
    color: #53657f !important;
    font-size: 10.5px !important;
    font-weight: 850 !important;
    white-space: nowrap;
    box-shadow: none !important;
    transition: .16s ease;
}

body[data-page="tournament-view"] .tfp-manager-tabs--pro .tfp-manager-tab > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #eff5fc;
    color: #3d6799;
    font-size: 12px;
}

body[data-page="tournament-view"] .tfp-manager-tabs--pro .tfp-manager-tab:hover {
    background: #f2f7fd !important;
    color: #163f70 !important;
}

body[data-page="tournament-view"] .tfp-manager-tabs--pro .tfp-manager-tab.active {
    background: linear-gradient(135deg, #1a73ef 0%, #17aee4 100%) !important;
    color: #fff !important;
    box-shadow: 0 7px 17px rgba(23,129,226,.22) !important;
}
body[data-page="tournament-view"] .tfp-manager-tabs--pro .tfp-manager-tab.active > span {
    background: rgba(255,255,255,.18);
    color: #fff;
}

body[data-page="tournament-view"] .tfp-manager-tabs--pro .tfp-manager-tab--danger:not(.active) { color: #cf5364 !important; }
body[data-page="tournament-view"] .tfp-manager-tabs--pro .tfp-manager-tab--danger:not(.active) > span { color: #cf5364; background: #fff0f2; }

body[data-page="tournament-view"] .tfp-manager-panel {
    min-width: 0;
}

body[data-page="tournament-view"] .tfp-manager__panel--pro > .tfp-manager-panel:not(.tfp-manager-overview) {
    padding: 16px !important;
    border: 1px solid var(--tfp-mgr-line) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 12px 30px rgba(42,80,123,.06) !important;
}

/* =========================================================
   Overview
   ========================================================= */
body[data-page="tournament-view"] .tfp-manager-overview {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body[data-page="tournament-view"] .tfp-manager-overview__grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr .9fr;
    gap: 12px;
}

body[data-page="tournament-view"] .tfp-manager-overview-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--tfp-mgr-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 27px rgba(40,79,123,.055);
}

body[data-page="tournament-view"] .tfp-manager-overview-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

body[data-page="tournament-view"] .tfp-manager-overview-card__head span {
    display: block;
    color: #71839b;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}
body[data-page="tournament-view"] .tfp-manager-overview-card__head h3 {
    margin: 4px 0 0;
    color: var(--tfp-mgr-ink);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -.02em;
}
body[data-page="tournament-view"] .tfp-manager-overview-card__head > b {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}
body[data-page="tournament-view"] .tfp-manager-overview-card__head > b.is-ok { color: #087c4b; background: #eafaf3; }
body[data-page="tournament-view"] .tfp-manager-overview-card__head > b.is-warning { color: #a96008; background: #fff4df; }

body[data-page="tournament-view"] .tfp-manager-progress {
    height: 7px;
    margin: 19px 0 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #ecf2f9;
}
body[data-page="tournament-view"] .tfp-manager-progress span {
    display: block;
    height: 100%;
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1a78ef, #16b2dd);
}

body[data-page="tournament-view"] .tfp-manager-overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}
body[data-page="tournament-view"] .tfp-manager-overview-metrics > div {
    padding: 10px;
    border-radius: 12px;
    background: #f5f9fd;
}
body[data-page="tournament-view"] .tfp-manager-overview-metrics strong,
body[data-page="tournament-view"] .tfp-manager-overview-metrics span { display: block; }
body[data-page="tournament-view"] .tfp-manager-overview-metrics strong { color: #143860; font-size: 17px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-manager-overview-metrics span { margin-top: 2px; color: #74869c; font-size: 8px; font-weight: 800; }

body[data-page="tournament-view"] .tfp-manager-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 15px;
}
body[data-page="tournament-view"] .tfp-manager-quick-actions button {
    display: grid;
    grid-template-columns: 34px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    min-height: 64px;
    padding: 11px;
    border: 1px solid #e0e9f4;
    border-radius: 13px;
    background: #f9fbfe;
    color: #15375e;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: .15s ease;
}
body[data-page="tournament-view"] .tfp-manager-quick-actions button:hover { transform: translateY(-1px); border-color: #b9d5f7; background: #f3f8ff; }
body[data-page="tournament-view"] .tfp-manager-quick-actions button > span {
    grid-row: 1 / 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e8f3ff;
    color: #1774df;
    font-size: 16px;
    font-weight: 900;
}
body[data-page="tournament-view"] .tfp-manager-quick-actions strong { align-self: end; font-size: 10.5px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-manager-quick-actions small { align-self: start; margin-top: 2px; color: #7b8ca2; font-size: 8.5px; font-weight: 700; }

body[data-page="tournament-view"] .tfp-manager-alert-list {
    display: grid;
    gap: 8px;
    margin-top: 15px;
}
body[data-page="tournament-view"] .tfp-manager-alert-list > div,
body[data-page="tournament-view"] .tfp-manager-alert-list > button {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 9px;
    align-items: center;
    width: 100%;
    padding: 10px;
    border: 1px solid #e1eaf4;
    border-radius: 12px;
    background: #fbfcfe;
    color: inherit;
    font: inherit;
    text-align: left;
}
body[data-page="tournament-view"] .tfp-manager-alert-list > button { cursor: pointer; }
body[data-page="tournament-view"] .tfp-manager-alert-list > *.is-warning { border-color: #f6d9ad; background: #fffaf1; }
body[data-page="tournament-view"] .tfp-manager-alert-list > *.is-ok { border-color: #caeadb; background: #f3fcf8; }
body[data-page="tournament-view"] .tfp-manager-alert-list > * > b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #edf4fb;
    color: #1b6fc8;
    font-size: 11px;
    font-weight: 900;
}
body[data-page="tournament-view"] .tfp-manager-alert-list .is-warning > b { color: #ae650a; background: #fff0d5; }
body[data-page="tournament-view"] .tfp-manager-alert-list .is-ok > b { color: #0c8752; background: #e4f8ef; }
body[data-page="tournament-view"] .tfp-manager-alert-list strong,
body[data-page="tournament-view"] .tfp-manager-alert-list small { display: block; }
body[data-page="tournament-view"] .tfp-manager-alert-list strong { color: #19395e; font-size: 9.5px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-manager-alert-list small { margin-top: 2px; color: #7a8aa0; font-size: 8px; font-weight: 700; line-height: 1.35; }

/* General legacy manager cards — cleaner, less cramped */
body[data-page="tournament-view"] .tfp-manager__panel--pro .league-admin-grid--manager,
body[data-page="tournament-view"] .tfp-manager__panel--pro .league-admin-grid {
    gap: 12px !important;
}
body[data-page="tournament-view"] .tfp-manager__panel--pro .tfp-admin-card,
body[data-page="tournament-view"] .tfp-manager__panel--pro .league-admin-card {
    border-color: #dfe8f3 !important;
    border-radius: 15px !important;
    box-shadow: none !important;
    background: #fff !important;
}
body[data-page="tournament-view"] .tfp-manager__panel--pro .tfp-admin-card__head h3 { color: #15375e !important; }
body[data-page="tournament-view"] .tfp-manager__panel--pro input,
body[data-page="tournament-view"] .tfp-manager__panel--pro select,
body[data-page="tournament-view"] .tfp-manager__panel--pro textarea {
    font-family: inherit;
}

/* =========================================================
   Schedule PRO 3.0
   ========================================================= */
body[data-page="tournament-view"] .tfp-manager-panel[data-manager-panel="schedule-admin"] {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body[data-page="tournament-view"] .tfp-schedule-command {
    display: grid;
    gap: 12px;
}

body[data-page="tournament-view"] .tfp-schedule-command__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid #dbe7f4;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 10px 28px rgba(40,80,126,.055);
}
body[data-page="tournament-view"] .tfp-schedule-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eaf4ff;
    color: #1770d9;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}
body[data-page="tournament-view"] .tfp-schedule-command__head h3 {
    margin: 7px 0 3px;
    color: #112f55;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -.025em;
}
body[data-page="tournament-view"] .tfp-schedule-command__head p {
    max-width: 760px;
    margin: 0;
    color: #6c7e95;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.55;
}
body[data-page="tournament-view"] .tfp-schedule-command__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

body[data-page="tournament-view"] .tfp-schedule-pro-form {
    display: grid;
    gap: 12px;
}

body[data-page="tournament-view"] .tfp-schedule-pro-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr) 286px;
    gap: 12px;
    align-items: start;
}

body[data-page="tournament-view"] .tfp-schedule-settings-card,
body[data-page="tournament-view"] .tfp-schedule-courts-card,
body[data-page="tournament-view"] .tfp-schedule-queue-card,
body[data-page="tournament-view"] .tfp-schedule-preview {
    min-width: 0;
    border: 1px solid #dce7f3;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 9px 25px rgba(40,80,126,.052);
}
body[data-page="tournament-view"] .tfp-schedule-settings-card,
body[data-page="tournament-view"] .tfp-schedule-queue-card { padding: 15px; }
body[data-page="tournament-view"] .tfp-schedule-courts-card { padding: 15px; }

body[data-page="tournament-view"] .tfp-schedule-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
body[data-page="tournament-view"] .tfp-schedule-card-title--between { justify-content: space-between; }
body[data-page="tournament-view"] .tfp-schedule-card-title--between > div { display: flex; align-items: center; gap: 10px; }
body[data-page="tournament-view"] .tfp-schedule-card-title > span,
body[data-page="tournament-view"] .tfp-schedule-card-title--between > div > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #edf5ff;
    color: #1974dd;
    font-size: 15px;
    font-weight: 900;
}
body[data-page="tournament-view"] .tfp-schedule-card-title strong,
body[data-page="tournament-view"] .tfp-schedule-card-title small { display: block; }
body[data-page="tournament-view"] .tfp-schedule-card-title strong { color: #17375c; font-size: 11px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-schedule-card-title small { margin-top: 2px; color: #8190a4; font-size: 8px; font-weight: 700; line-height: 1.35; }

body[data-page="tournament-view"] .tfp-field-pro {
    display: grid;
    gap: 5px;
    margin-top: 10px;
}
body[data-page="tournament-view"] .tfp-field-pro > span,
body[data-page="tournament-view"] .tfp-court-config-card label > span {
    color: #5f728d;
    font-size: 8.5px;
    font-weight: 850;
}
body[data-page="tournament-view"] .tfp-field-pro > small {
    color: #94a1b2;
    font-size: 7.5px;
    font-weight: 650;
    line-height: 1.35;
}
body[data-page="tournament-view"] .tfp-field-pro input,
body[data-page="tournament-view"] .tfp-field-pro select,
body[data-page="tournament-view"] .tfp-court-config-card input {
    width: 100%;
    min-width: 0;
    height: 39px;
    padding: 0 10px;
    border: 1px solid #d8e4f1;
    border-radius: 10px;
    outline: none;
    background: #fbfdff;
    color: #16375e;
    font-size: 10px;
    font-weight: 800;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
body[data-page="tournament-view"] .tfp-field-pro input:focus,
body[data-page="tournament-view"] .tfp-field-pro select:focus,
body[data-page="tournament-view"] .tfp-court-config-card input:focus {
    border-color: #7bb8f8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(36,132,235,.10);
}
body[data-page="tournament-view"] .tfp-field-pro-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
body[data-page="tournament-view"] .tfp-input-unit { position: relative; }
body[data-page="tournament-view"] .tfp-input-unit input { padding-right: 38px; }
body[data-page="tournament-view"] .tfp-input-unit b {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: #8594a8;
    font-size: 8px;
    font-weight: 850;
    pointer-events: none;
}

body[data-page="tournament-view"] .tfp-court-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}
body[data-page="tournament-view"] .tfp-court-config-card {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, .95fr) minmax(118px, .75fr) 28px;
    gap: 8px;
    align-items: end;
    padding: 11px;
    border: 1px solid #dfe9f4;
    border-radius: 13px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
}
body[data-page="tournament-view"] .tfp-court-config-card__icon {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #237cf0, #1aa7df);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 5px 12px rgba(31,130,226,.18);
}
body[data-page="tournament-view"] .tfp-court-config-card:nth-child(4n+2) .tfp-court-config-card__icon { background: linear-gradient(135deg, #1fa66d, #36c88b); }
body[data-page="tournament-view"] .tfp-court-config-card:nth-child(4n+3) .tfp-court-config-card__icon { background: linear-gradient(135deg, #7654e9, #a56cf4); }
body[data-page="tournament-view"] .tfp-court-config-card:nth-child(4n+4) .tfp-court-config-card__icon { background: linear-gradient(135deg, #ea8b21, #f5ad44); }
body[data-page="tournament-view"] .tfp-court-config-card label { display: grid; gap: 5px; min-width: 0; }
body[data-page="tournament-view"] .tfp-court-remove {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #e1e8f1;
    border-radius: 8px;
    background: #fff;
    color: #a4afbd;
    font: inherit;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}
body[data-page="tournament-view"] .tfp-court-remove:hover { color: #d94d5e; border-color: #f0bdc5; background: #fff7f8; }
body[data-page="tournament-view"] .tfp-court-remove:disabled { opacity: .35; cursor: not-allowed; }

body[data-page="tournament-view"] .tfp-add-court-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 37px;
    margin-top: 10px;
    padding: 0 12px;
    border: 1px dashed #9fc8f4;
    border-radius: 10px;
    background: #f5faff;
    color: #176bc8;
    font: inherit;
    font-size: 9.5px;
    font-weight: 850;
    cursor: pointer;
}
body[data-page="tournament-view"] .tfp-add-court-btn span { font-size: 15px; }
body[data-page="tournament-view"] .tfp-schedule-count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #edf6ff;
    color: #176dce;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

body[data-page="tournament-view"] .tfp-group-schedule-settings--pro {
    margin-top: 13px !important;
    border: 1px solid #e0e9f4 !important;
    border-radius: 12px !important;
    background: #fbfdff !important;
    overflow: hidden;
}
body[data-page="tournament-view"] .tfp-group-schedule-settings--pro summary {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px !important;
    cursor: pointer;
}
body[data-page="tournament-view"] .tfp-group-schedule-settings--pro summary > span strong,
body[data-page="tournament-view"] .tfp-group-schedule-settings--pro summary > span small { display: block; }
body[data-page="tournament-view"] .tfp-group-schedule-settings--pro summary > span strong { color: #1b3d65; font-size: 9.5px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-group-schedule-settings--pro summary > span small { margin-top: 2px; color: #8190a2; font-size: 8px; font-weight: 700; }
body[data-page="tournament-view"] .tfp-group-schedule-settings--pro summary > b { color: #2574ce; font-size: 8.5px; }
body[data-page="tournament-view"] .tfp-group-schedule-settings--pro .tfp-group-schedule-grid { padding: 0 11px 11px !important; }

body[data-page="tournament-view"] .tfp-queue-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #edf4fb;
    color: #35648f;
    font-size: 10px;
    font-weight: 900;
}
body[data-page="tournament-view"] .tfp-schedule-queue-list {
    display: grid;
    gap: 7px;
}
body[data-page="tournament-view"] .tfp-schedule-queue-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 8px;
    align-items: center;
    min-height: 52px;
    padding: 8px;
    border: 1px solid #e1eaf4;
    border-radius: 11px;
    background: #fbfdff;
}
body[data-page="tournament-view"] .tfp-schedule-queue-item__phase {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 27px;
    padding: 0 5px;
    border-radius: 8px;
    background: #eaf4ff;
    color: #1771d7;
    font-size: 7.5px;
    font-weight: 900;
    text-align: center;
}
body[data-page="tournament-view"] .tfp-schedule-queue-item > div strong,
body[data-page="tournament-view"] .tfp-schedule-queue-item > div small { display: block; }
body[data-page="tournament-view"] .tfp-schedule-queue-item > div strong { overflow: hidden; color: #18395e; font-size: 8.5px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
body[data-page="tournament-view"] .tfp-schedule-queue-item > div small { margin: 1px 0; color: #9aa6b5; font-size: 7px; font-weight: 800; }
body[data-page="tournament-view"] .tfp-schedule-queue-more { padding: 6px 4px; color: #71839b; font-size: 8.5px; font-weight: 800; text-align: center; }
body[data-page="tournament-view"] .tfp-schedule-queue-empty { display: grid; place-items: center; gap: 4px; padding: 20px 10px; border: 1px dashed #bee4d4; border-radius: 12px; background: #f4fcf8; text-align: center; }
body[data-page="tournament-view"] .tfp-schedule-queue-empty > span { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #dbf5e9; color: #118254; font-size: 16px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-schedule-queue-empty strong { color: #146343; font-size: 9.5px; }
body[data-page="tournament-view"] .tfp-schedule-queue-empty small { max-width: 190px; color: #739181; font-size: 8px; line-height: 1.4; }

body[data-page="tournament-view"] .tfp-schedule-health {
    display: grid;
    gap: 7px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid #e6edf5;
}
body[data-page="tournament-view"] .tfp-schedule-health > div {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 10px;
    background: #f7f9fc;
}
body[data-page="tournament-view"] .tfp-schedule-health > div.is-warning { background: #fff8ed; }
body[data-page="tournament-view"] .tfp-schedule-health > div.is-ok { background: #f1fbf6; }
body[data-page="tournament-view"] .tfp-schedule-health b { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: #e8f2fb; color: #246cb2; font-size: 9px; }
body[data-page="tournament-view"] .tfp-schedule-health .is-warning b { background: #ffedcf; color: #aa6208; }
body[data-page="tournament-view"] .tfp-schedule-health .is-ok b { background: #dcf4e8; color: #0d7c4d; }
body[data-page="tournament-view"] .tfp-schedule-health strong,
body[data-page="tournament-view"] .tfp-schedule-health small { display: block; }
body[data-page="tournament-view"] .tfp-schedule-health strong { color: #193a5f; font-size: 8.7px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-schedule-health small { margin-top: 2px; color: #8291a4; font-size: 7.5px; font-weight: 700; }

body[data-page="tournament-view"] .tfp-schedule-pro-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #d8e6f4;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef7ff 100%);
}
body[data-page="tournament-view"] .tfp-schedule-pro-actions > div strong,
body[data-page="tournament-view"] .tfp-schedule-pro-actions > div span { display: block; }
body[data-page="tournament-view"] .tfp-schedule-pro-actions > div strong { color: #153a65; font-size: 10px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-schedule-pro-actions > div span { margin-top: 3px; color: #70839c; font-size: 8.5px; font-weight: 700; }
body[data-page="tournament-view"] .tfp-auto-schedule-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 190px;
    min-height: 43px;
    padding: 0 17px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #2279f1 0%, #13afe0 100%);
    color: #fff;
    font: inherit;
    font-size: 10.5px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(27,133,226,.22);
    cursor: pointer;
}
body[data-page="tournament-view"] .tfp-auto-schedule-btn:hover { filter: brightness(1.03); transform: translateY(-1px); }
body[data-page="tournament-view"] .tfp-auto-schedule-btn span { font-size: 14px; }

/* Schedule preview table */
body[data-page="tournament-view"] .tfp-schedule-preview { overflow: hidden; }
body[data-page="tournament-view"] .tfp-schedule-preview__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 17px;
    border-bottom: 1px solid #e3ebf4;
    background: #fbfdff;
}
body[data-page="tournament-view"] .tfp-schedule-preview__head > div > span { color: #2475cf; font-size: 8px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
body[data-page="tournament-view"] .tfp-schedule-preview__head h4 { margin: 3px 0 2px; color: #16385e; font-size: 15px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-schedule-preview__head p { margin: 0; color: #7a8ba1; font-size: 8.5px; font-weight: 650; }
body[data-page="tournament-view"] .tfp-schedule-preview-scroll { overflow-x: auto; }
body[data-page="tournament-view"] .tfp-schedule-preview-grid {
    display: grid;
    grid-template-columns: 78px repeat(var(--court-columns), minmax(190px, 1fr));
    min-width: max-content;
}
body[data-page="tournament-view"] .tfp-preview-cell {
    min-width: 190px;
    min-height: 66px;
    padding: 8px;
    border-right: 1px solid #e5edf5;
    border-bottom: 1px solid #e5edf5;
    background: #fff;
    box-sizing: border-box;
}
body[data-page="tournament-view"] .tfp-preview-cell--time { min-width: 78px; width: 78px; display: flex; align-items: center; justify-content: center; background: #f8fbfe; color: #3b5575; }
body[data-page="tournament-view"] .tfp-preview-cell--head { min-height: 51px; background: #0f3a74; color: #fff; text-align: center; }
body[data-page="tournament-view"] .tfp-preview-cell--head strong,
body[data-page="tournament-view"] .tfp-preview-cell--head small { display: block; }
body[data-page="tournament-view"] .tfp-preview-cell--head strong { font-size: 9.5px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-preview-cell--head small { margin-top: 2px; color: #b9d6f5; font-size: 7.5px; font-weight: 750; }
body[data-page="tournament-view"] .tfp-preview-cell--head.tfp-preview-cell--time { min-width: 78px; color: #dcecff; background: #0a2e61; font-size: 8px; font-weight: 900; text-transform: uppercase; }
body[data-page="tournament-view"] .tfp-preview-cell--slot { display: grid; align-content: center; gap: 1px; background: #fbfdff; }
body[data-page="tournament-view"] .tfp-preview-cell--slot.has-match { background: linear-gradient(180deg,#fbfdff,#f3f8ff); border-left: 3px solid #2a82ec; }
body[data-page="tournament-view"] .tfp-preview-phase { width: max-content; margin-bottom: 2px; padding: 2px 5px; border-radius: 999px; background: #eaf4ff; color: #1a6dcc; font-size: 6.5px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-preview-cell--slot strong { overflow: hidden; color: #17375b; font-size: 8px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
body[data-page="tournament-view"] .tfp-preview-cell--slot small { color: #9aa7b6; font-size: 6.5px; font-weight: 800; }
body[data-page="tournament-view"] .tfp-preview-cell--slot em { color: #697f9a; font-size: 7px; font-style: normal; font-weight: 800; }
body[data-page="tournament-view"] .tfp-preview-empty { color: #b2bdca; font-size: 8px; font-weight: 750; text-align: center; }

body[data-page="tournament-view"] .tfp-schedule-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
body[data-page="tournament-view"] .tfp-schedule-footer-actions form { margin: 0; }
body[data-page="tournament-view"] .tfp-schedule-clear-btn {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #f0c4cb;
    border-radius: 12px;
    background: #fff7f8;
    color: #cf5364;
    font: inherit;
    font-size: 9.5px;
    font-weight: 850;
    cursor: pointer;
}

/* Manual schedule studio: separate start per court */
body[data-page="tournament-view"] .tfp-manual-court-starts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 9px 0 13px;
    padding: 10px;
    border: 1px solid #dfe9f4;
    border-radius: 12px;
    background: #f8fbff;
}
body[data-page="tournament-view"] .tfp-manual-court-starts label {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 4px 7px 4px 10px;
    border: 1px solid #dbe7f4;
    border-radius: 10px;
    background: #fff;
}
body[data-page="tournament-view"] .tfp-manual-court-starts label > span { color: #24466e; font-size: 8.5px; font-weight: 900; }
body[data-page="tournament-view"] .tfp-manual-court-starts input[type="time"] { height: 29px; min-width: 92px; padding: 0 7px; border: 1px solid #dbe6f2; border-radius: 8px; color: #1767bd; background: #f8fbff; font: inherit; font-size: 8.5px; font-weight: 850; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
    body[data-page="tournament-view"] .tfp-manager-overview__grid { grid-template-columns: 1fr 1fr; }
    body[data-page="tournament-view"] .tfp-manager-overview-card--alerts { grid-column: 1 / -1; }
    body[data-page="tournament-view"] .tfp-schedule-pro-layout { grid-template-columns: 260px minmax(0, 1fr); }
    body[data-page="tournament-view"] .tfp-schedule-queue-card { grid-column: 1 / -1; }
    body[data-page="tournament-view"] .tfp-schedule-queue-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body[data-page="tournament-view"] .tfp-schedule-queue-empty { grid-column: 1 / -1; }
    body[data-page="tournament-view"] .tfp-schedule-health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    body[data-page="tournament-view"] .tfp-manager-command { grid-template-columns: 1fr; padding: 22px; }
    body[data-page="tournament-view"] .tfp-manager-command__actions { justify-content: flex-start; }
    body[data-page="tournament-view"] .tfp-manager-command__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body[data-page="tournament-view"] .tfp-manager-overview__grid { grid-template-columns: 1fr; }
    body[data-page="tournament-view"] .tfp-manager-overview-card--alerts { grid-column: auto; }
    body[data-page="tournament-view"] .tfp-schedule-pro-layout { grid-template-columns: 1fr; }
    body[data-page="tournament-view"] .tfp-schedule-queue-card { grid-column: auto; }
    body[data-page="tournament-view"] .tfp-court-config-grid { grid-template-columns: 1fr; }
    body[data-page="tournament-view"] .tfp-schedule-command__head { flex-direction: column; }
    body[data-page="tournament-view"] .tfp-schedule-command__actions { justify-content: flex-start; }
    body[data-page="tournament-view"] .tfp-schedule-pro-actions { align-items: stretch; flex-direction: column; }
    body[data-page="tournament-view"] .tfp-auto-schedule-btn { width: 100%; min-width: 0; }
    body[data-page="tournament-view"] .tfp-schedule-queue-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    body[data-page="tournament-view"] .league-panel--manage { padding-left: 0 !important; padding-right: 0 !important; }
    body[data-page="tournament-view"] .tfp-manager-command { border-radius: 16px; padding: 18px 15px; }
    body[data-page="tournament-view"] .tfp-manager-command h2 { font-size: 24px; }
    body[data-page="tournament-view"] .tfp-manager-command__copy > p { font-size: 11px; }
    body[data-page="tournament-view"] .tfp-manager-command__actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    body[data-page="tournament-view"] .tfp-manager-command__actions .tfp-manager-action { width: 100%; padding: 0 9px; }
    body[data-page="tournament-view"] .tfp-manager-command__stats { gap: 7px; }
    body[data-page="tournament-view"] .tfp-manager-command__stats > div { padding: 11px; }
    body[data-page="tournament-view"] .tfp-manager-command__stats strong { font-size: 20px; }

    body[data-page="tournament-view"] .tfp-manager-tabs--pro { border-radius: 13px !important; padding: 5px !important; }
    body[data-page="tournament-view"] .tfp-manager-tabs--pro .tfp-manager-tab { min-height: 38px !important; padding: 0 10px !important; font-size: 9.5px !important; }

    body[data-page="tournament-view"] .tfp-manager__panel--pro > .tfp-manager-panel:not(.tfp-manager-overview) { padding: 10px !important; border-radius: 14px !important; }
    body[data-page="tournament-view"] .tfp-manager-overview-card { padding: 14px; border-radius: 14px; }
    body[data-page="tournament-view"] .tfp-manager-overview-metrics { grid-template-columns: repeat(2, 1fr); }
    body[data-page="tournament-view"] .tfp-manager-quick-actions { grid-template-columns: 1fr; }

    body[data-page="tournament-view"] .tfp-schedule-command__head { padding: 16px 14px; border-radius: 14px; }
    body[data-page="tournament-view"] .tfp-schedule-command__head h3 { font-size: 18px; }
    body[data-page="tournament-view"] .tfp-schedule-settings-card,
    body[data-page="tournament-view"] .tfp-schedule-courts-card,
    body[data-page="tournament-view"] .tfp-schedule-queue-card { padding: 12px; border-radius: 14px; }
    body[data-page="tournament-view"] .tfp-field-pro-row { grid-template-columns: 1fr; }
    body[data-page="tournament-view"] .tfp-court-config-card { grid-template-columns: 32px minmax(0, 1fr) 28px; align-items: end; }
    body[data-page="tournament-view"] .tfp-court-config-card label:nth-of-type(2) { grid-column: 2 / 3; }
    body[data-page="tournament-view"] .tfp-court-config-card__icon { grid-row: 1 / 3; align-self: center; width: 32px; height: 32px; }
    body[data-page="tournament-view"] .tfp-court-remove { grid-column: 3; grid-row: 1 / 3; align-self: center; }
    body[data-page="tournament-view"] .tfp-schedule-queue-list { grid-template-columns: 1fr; }
    body[data-page="tournament-view"] .tfp-schedule-health { grid-template-columns: 1fr; }
    body[data-page="tournament-view"] .tfp-schedule-preview__head { align-items: flex-start; flex-direction: column; }
    body[data-page="tournament-view"] .tfp-schedule-preview__head .tfp-manager-action { width: 100%; }
    body[data-page="tournament-view"] .tfp-schedule-footer-actions { display: grid; grid-template-columns: 1fr; }
    body[data-page="tournament-view"] .tfp-schedule-footer-actions .tfp-manager-action,
    body[data-page="tournament-view"] .tfp-schedule-footer-actions form,
    body[data-page="tournament-view"] .tfp-schedule-footer-actions button { width: 100%; }
    body[data-page="tournament-view"] .tfp-manual-court-starts { display: grid; grid-template-columns: 1fr; }
    body[data-page="tournament-view"] .tfp-manual-court-starts label { justify-content: space-between; }
}

/* ========================================================================== */
/* TennisFinalsPro — Centrum kontroli turnieju PRO 4.0                        */
/* ========================================================================== */
.tfp-manager-tab--control{
  color:#fff!important;
  background:linear-gradient(135deg,#5b5cf0 0%,#7c3aed 48%,#0ea5e9 100%)!important;
  border-color:rgba(99,102,241,.36)!important;
  box-shadow:0 8px 20px rgba(79,70,229,.18)!important;
}
.tfp-manager-tab--control:not(.active){opacity:.9}
.tfp-manager-quick-actions .is-control{
  background:linear-gradient(145deg,rgba(99,102,241,.11),rgba(14,165,233,.08))!important;
  border-color:rgba(99,102,241,.20)!important;
}
.tfp-control-center{padding:0!important}
.tfp-control-hero{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
  padding:18px;
  margin-bottom:14px;
  border:1px solid rgba(99,102,241,.17);
  border-radius:20px;
  background:
    radial-gradient(circle at 100% 0%,rgba(14,165,233,.15),transparent 35%),
    radial-gradient(circle at 0% 100%,rgba(124,58,237,.12),transparent 38%),
    linear-gradient(135deg,#fbfdff 0%,#f7f8ff 100%);
  box-shadow:0 14px 36px rgba(31,52,90,.08);
}
.tfp-control-hero__icon{
  width:52px;height:52px;border-radius:16px;display:grid;place-items:center;
  color:#fff;font-size:23px;font-weight:900;
  background:linear-gradient(135deg,#4f46e5,#7c3aed 55%,#0ea5e9);
  box-shadow:0 12px 26px rgba(79,70,229,.24);
}
.tfp-control-hero__copy span,
.tfp-control-card__head>div:nth-child(2)>span,
.tfp-control-history__head span{
  display:block;margin-bottom:3px;color:#4f46e5;font-size:10px;font-weight:900;
  letter-spacing:.09em;text-transform:uppercase;
}
.tfp-control-hero__copy h3{margin:0;color:#10213d;font-size:20px;line-height:1.08;letter-spacing:-.025em}
.tfp-control-hero__copy p{margin:7px 0 0;color:#687a96;font-size:12px;line-height:1.45;max-width:720px}
.tfp-control-hero__badges{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end;max-width:250px}
.tfp-control-hero__badges b{
  display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border-radius:999px;
  border:1px solid #e5eaf4;background:#fff;color:#43536c;font-size:10px;white-space:nowrap;
}
.tfp-control-hero__badges i{width:6px;height:6px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.10)}
.tfp-control-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:14px}
.tfp-control-card{
  min-width:0;padding:16px;border:1px solid #e4eaf4;border-radius:18px;background:#fff;
  box-shadow:0 10px 28px rgba(31,52,90,.055);
}
.tfp-control-card--match{grid-row:span 2}
.tfp-control-card--pair{background:linear-gradient(180deg,#fff 0%,#fbfaff 100%)}
.tfp-control-card--danger-soft{background:linear-gradient(180deg,#fff 0%,#fffafb 100%)}
.tfp-control-card--nav{background:linear-gradient(180deg,#fff 0%,#f9fcff 100%)}
.tfp-control-card__head{display:flex;gap:11px;align-items:flex-start;margin-bottom:14px}
.tfp-control-card__glyph{
  flex:0 0 auto;min-width:38px;height:38px;padding:0 8px;border-radius:12px;display:grid;place-items:center;
  color:#fff;background:linear-gradient(135deg,#2563eb,#0ea5e9);font-size:11px;font-weight:950;letter-spacing:-.03em;
  box-shadow:0 7px 16px rgba(37,99,235,.16)
}
.tfp-control-card--pair .tfp-control-card__glyph{background:linear-gradient(135deg,#7c3aed,#ec4899)}
.tfp-control-card--danger-soft .tfp-control-card__glyph{background:linear-gradient(135deg,#fb7185,#f97316)}
.tfp-control-card--nav .tfp-control-card__glyph{background:linear-gradient(135deg,#0f766e,#10b981)}
.tfp-control-card__head h3{margin:0;color:#13233f;font-size:15px;line-height:1.12;letter-spacing:-.02em}
.tfp-control-card__head p{margin:4px 0 0;color:#7a8aa2;font-size:10.5px;line-height:1.4}
.tfp-control-form{display:grid;gap:10px}
.tfp-control-field{display:grid;gap:5px;min-width:0}
.tfp-control-field>span{color:#5b6b82;font-size:9.5px;font-weight:850;text-transform:uppercase;letter-spacing:.04em}
.tfp-control-field input,
.tfp-control-field select{
  width:100%;min-width:0;height:39px;padding:0 11px;border:1px solid #dce5f1;border-radius:11px;background:#fbfdff;
  color:#162743;font:700 11px/1.2 inherit;outline:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.tfp-control-field input:focus,
.tfp-control-field select:focus{border-color:#7c83ff;background:#fff;box-shadow:0 0 0 3px rgba(99,102,241,.10)}
.tfp-control-versus{display:grid;grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);gap:7px;align-items:end}
.tfp-control-vs{height:39px;border-radius:10px;display:grid;place-items:center;color:#64748b;background:#eef3f9;font-size:9px;font-weight:950}
.tfp-control-schedule-row{display:grid;grid-template-columns:1fr .85fr 1fr;gap:8px}
.tfp-control-check{display:flex;align-items:flex-start;gap:9px;padding:10px;border:1px solid #e5eaf4;border-radius:12px;background:#fbfcff;cursor:pointer}
.tfp-control-check input{width:17px;height:17px;margin:1px 0 0;accent-color:#4f46e5;flex:0 0 auto}
.tfp-control-check span{display:grid;gap:2px}.tfp-control-check b{font-size:10.5px;color:#263750}.tfp-control-check small{font-size:9px;line-height:1.35;color:#7c8ba0}
.tfp-control-warning{padding:9px 10px;border:1px solid #fed7aa;border-radius:11px;background:#fff7ed;color:#9a5416;font-size:9.5px;line-height:1.4;font-weight:700}
.tfp-control-info{display:grid;gap:3px;padding:10px;border:1px solid #ddd6fe;border-radius:12px;background:#faf8ff}
.tfp-control-info b{color:#6d28d9;font-size:10px}.tfp-control-info span{color:#756d86;font-size:9.5px;line-height:1.4}
.tfp-control-primary,
.tfp-control-secondary-danger{
  min-height:40px;border:0;border-radius:11px;padding:0 14px;cursor:pointer;font:850 11px/1 inherit;transition:transform .15s ease,box-shadow .15s ease;
}
.tfp-control-primary{color:#fff;background:linear-gradient(135deg,#2563eb,#0ea5e9);box-shadow:0 9px 18px rgba(37,99,235,.17)}
.tfp-control-primary--violet{background:linear-gradient(135deg,#7c3aed,#ec4899);box-shadow:0 9px 18px rgba(124,58,237,.15)}
.tfp-control-secondary-danger{color:#be123c;background:#fff1f2;border:1px solid #fecdd3}
.tfp-control-primary:hover,.tfp-control-secondary-danger:hover{transform:translateY(-1px)}
.tfp-control-empty{padding:13px;border:1px dashed #dce5f1;border-radius:12px;background:#fbfdff;color:#8290a4;font-size:10.5px;text-align:center}
.tfp-control-nav-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tfp-control-nav-grid button{
  min-width:0;display:flex;align-items:center;gap:8px;padding:9px;border:1px solid #e1e8f2;border-radius:12px;background:#fff;text-align:left;cursor:pointer;
}
.tfp-control-nav-grid button>b{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:#eef6ff;color:#2563eb;font-size:13px}
.tfp-control-nav-grid button>span{min-width:0;color:#1f314d;font-size:10px;font-weight:850}.tfp-control-nav-grid small{display:block;margin-top:1px;color:#8a97aa;font-size:8.5px;font-weight:650;white-space:normal}
.tfp-control-history{margin-top:14px;padding:15px;border:1px solid #e4eaf4;border-radius:18px;background:#fff;box-shadow:0 10px 28px rgba(31,52,90,.045)}
.tfp-control-history__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.tfp-control-history__head h3{margin:0;color:#152640;font-size:14px}.tfp-control-history__head>b{padding:6px 8px;border-radius:999px;background:#f2f6fb;color:#65758c;font-size:9px}
.tfp-control-history__list{display:grid;gap:0}
.tfp-control-history__item{display:grid;grid-template-columns:9px minmax(0,1fr);gap:9px;align-items:flex-start;padding:9px 2px;border-top:1px solid #edf1f6}
.tfp-control-history__item:first-child{border-top:0}
.tfp-control-history__item>i{width:7px;height:7px;margin-top:3px;border-radius:50%;background:linear-gradient(135deg,#4f46e5,#06b6d4);box-shadow:0 0 0 3px rgba(99,102,241,.08)}
.tfp-control-history__item div{display:grid;gap:2px}.tfp-control-history__item strong{color:#35445c;font-size:10px;line-height:1.35}.tfp-control-history__item small{color:#94a0b1;font-size:8.5px}

@media (max-width: 980px){
  .tfp-control-hero{grid-template-columns:auto minmax(0,1fr)}
  .tfp-control-hero__badges{grid-column:1/-1;justify-content:flex-start;max-width:none}
  .tfp-control-grid{grid-template-columns:1fr}
  .tfp-control-card--match{grid-row:auto}
}
@media (max-width: 720px){
  .tfp-manager-tab--control{box-shadow:none!important}
  .tfp-control-center{padding:0!important}
  .tfp-control-hero{grid-template-columns:40px minmax(0,1fr);gap:10px;padding:12px;border-radius:15px;margin-bottom:10px}
  .tfp-control-hero__icon{width:40px;height:40px;border-radius:12px;font-size:18px}
  .tfp-control-hero__copy h3{font-size:15px}.tfp-control-hero__copy p{font-size:9.5px;margin-top:4px}
  .tfp-control-hero__badges{gap:5px}.tfp-control-hero__badges b{padding:5px 7px;font-size:8.5px}
  .tfp-control-grid{gap:9px}
  .tfp-control-card{padding:11px;border-radius:14px}
  .tfp-control-card__head{gap:8px;margin-bottom:10px}.tfp-control-card__glyph{min-width:32px;height:32px;border-radius:9px;font-size:9px}
  .tfp-control-card__head h3{font-size:13px}.tfp-control-card__head p{font-size:9px}
  .tfp-control-form{gap:8px}.tfp-control-field>span{font-size:8.5px}
  .tfp-control-field input,.tfp-control-field select{height:37px;font-size:10px;border-radius:10px;padding:0 9px}
  .tfp-control-versus{grid-template-columns:1fr;gap:7px}.tfp-control-vs{height:22px;border-radius:8px}
  .tfp-control-schedule-row{grid-template-columns:1fr 1fr}.tfp-control-schedule-row .tfp-control-field:last-child{grid-column:1/-1}
  .tfp-control-check{padding:8px}.tfp-control-check b{font-size:9.5px}.tfp-control-check small{font-size:8.5px}
  .tfp-control-primary,.tfp-control-secondary-danger{min-height:38px;font-size:10px}
  .tfp-control-nav-grid{grid-template-columns:1fr 1fr;gap:6px}.tfp-control-nav-grid button{padding:7px}.tfp-control-nav-grid button>b{width:25px;height:25px}.tfp-control-nav-grid button>span{font-size:9px}.tfp-control-nav-grid small{font-size:7.8px}
  .tfp-control-history{margin-top:9px;padding:11px;border-radius:14px}.tfp-control-history__head h3{font-size:12px}.tfp-control-history__item strong{font-size:9px}
}
@media (max-width: 420px){
  .tfp-control-hero__badges b{flex:1;justify-content:center}
  .tfp-control-nav-grid{grid-template-columns:1fr}
}
