:root {
    --team-ink: #15231d;
    --team-muted: #6c7c73;
    --team-line: #e4ebe7;
    --team-soft: #f5f8f6;
    --team-green: #15915d;
    --team-green-dark: #0c6843;
    --team-lime: #b9f44a;
    --team-white: #fff;
    --team-danger: #c43d4b;
    --team-shadow: 0 22px 60px rgba(19, 65, 45, .1);
    --team-content-gutter: clamp(10px, 2vw, 18px);
}

/* Shared controls */
.team-primary-button,
.team-secondary-button {
    min-height: 48px;
    border: 0;
    border-radius: 15px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.team-primary-button {
    color: #fff !important;
    background: linear-gradient(135deg, var(--team-green), var(--team-green-dark)) !important;
    box-shadow: 0 12px 28px rgba(21, 145, 93, .24);
}

.team-primary-button:hover,
.team-secondary-button:hover { transform: translateY(-1px); }
.team-primary-button:disabled { opacity: .68; cursor: wait; transform: none; }

.team-secondary-button {
    color: var(--team-ink) !important;
    background: var(--team-white) !important;
    border: 1px solid var(--team-line);
}

/* Shared team creation CTA */
.premium-add-team.addTeam {
    position: relative;
    min-height: 52px;
    padding: 8px 18px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(185, 244, 74, .34) !important;
    border-radius: 16px !important;
    color: #fff !important;
    background:
        radial-gradient(circle at 12% 0, rgba(185, 244, 74, .26), transparent 34%),
        linear-gradient(135deg, #15915d 0%, #0c6843 72%) !important;
    box-shadow: 0 14px 30px rgba(12, 104, 67, .26), inset 0 1px 0 rgba(255, 255, 255, .2) !important;
    font-weight: 850;
    letter-spacing: .01em;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.premium-add-team.addTeam::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -70%;
    left: -18%;
    width: 36%;
    height: 240%;
    background: rgba(255, 255, 255, .15);
    transform: rotate(20deg);
    transition: left .45s ease;
}

.premium-add-team.addTeam:hover {
    color: #fff !important;
    filter: saturate(1.08);
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(12, 104, 67, .32), inset 0 1px 0 rgba(255, 255, 255, .22) !important;
}

.premium-add-team.addTeam:hover::after { left: 105%; }
.premium-add-team.addTeam > span { position: relative; color: #fff !important; }
.premium-add-team.addTeam > span:not(.premium-add-team-icon) { display: grid; gap: 2px; text-align: left; }
.premium-add-team.addTeam strong,
.premium-add-team.addTeam small { display: block; color: #fff !important; }
.premium-add-team.addTeam small { opacity: .72; font-weight: 650; }
.premium-add-team-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 11px;
    background: rgba(255, 255, 255, .12);
}

.team-page-eyebrow,
.team-create-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--team-green);
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* Create sheet */
.custom-modal.team-create-modal {
    background: rgba(8, 22, 16, .46);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.team-create-modal .custom-modal-content {
    width: min(720px, 100%) !important;
    min-width: 0 !important;
    max-width: 720px !important;
    height: min(92vh, 920px);
    border-radius: 26px 26px 0 0;
    background: #f7faf8;
    box-shadow: 0 -24px 80px rgba(4, 28, 18, .3);
}

.team-create-modal .custom-modal-header {
    min-height: 58px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--team-line);
    background: rgba(255, 255, 255, .94);
}

.team-create-modal .custom-modal-header > span {
    color: var(--team-ink) !important;
}

.team-create-modal .custom-modal-body { background: #f7faf8; }

.team-create-form { padding: 26px 26px calc(28px + env(safe-area-inset-bottom)); }
.team-create-intro { padding: 6px 2px 20px; }
.team-create-intro h2,
.team-create-success h2,
.team-create-load-error h3 {
    margin: 8px 0 7px;
    color: var(--team-ink);
    font-weight: 900;
    letter-spacing: -.035em;
}

.team-create-intro p,
.team-create-success > p,
.team-create-load-error p {
    margin: 0;
    color: var(--team-muted);
    line-height: 1.65;
}

.team-create-location {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 13px 14px;
    color: var(--team-ink);
    background: linear-gradient(135deg, #effaf4, #f7fcf9);
    border: 1px solid #cfe8da;
    border-radius: 17px;
}

.team-create-location-icon,
.team-privacy-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: var(--team-green);
    background: rgba(21, 145, 93, .1);
}

.team-create-location small,
.team-create-location strong { display: block; }
.team-create-location small { color: var(--team-muted); }
.team-create-location strong { margin-top: 2px; }
.team-create-location-check { color: var(--team-green); }

.team-create-section {
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--team-line);
    border-radius: 20px;
    background: var(--team-white);
    box-shadow: 0 8px 24px rgba(31, 68, 51, .045);
}

fieldset.team-create-section { min-width: 0; }
.team-create-section legend { float: none; width: 100%; margin: 0 0 14px; }
.team-create-section legend > span { display: block; color: var(--team-ink); font-weight: 850; }
.team-create-section legend > small { display: block; margin-top: 3px; color: var(--team-muted); }
.team-create-section b,
.team-create-field > span b { color: #dd4655; }

.team-create-logo-row {
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: center;
    gap: 14px;
    padding-bottom: 17px;
    margin-bottom: 17px;
    border-bottom: 1px solid var(--team-line);
}

.team-create-logo-button,
.team-edit-logo {
    position: relative;
    width: 68px;
    height: 68px;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 20px;
    background: #eaf1ed;
    box-shadow: 0 0 0 1px var(--team-line), 0 10px 25px rgba(20, 72, 48, .12);
}

.team-create-logo-button img,
.team-edit-logo img { width: 100%; height: 100%; border-radius: 17px; object-fit: cover; }
.team-create-logo-button > span,
.team-edit-logo > span {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--team-green);
}

.team-create-logo-row strong,
.team-create-logo-row p { display: block; margin: 0; }
.team-create-logo-row strong { color: var(--team-ink); }
.team-create-logo-row p { margin: 3px 0 5px; color: var(--team-muted); line-height: 1.45; }
.team-create-logo-link { padding: 0; border: 0; color: var(--team-green); background: none; font-weight: 800; }

.team-create-field { position: relative; display: block; margin: 0; }
.team-create-field > span:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    color: var(--team-ink);
    font-weight: 800;
}
.team-create-field > span em { color: var(--team-muted); font-style: normal; font-weight: 600; }

.team-create-input-wrap,
.team-premium-input {
    min-height: 49px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 14px;
    border: 1px solid var(--team-line);
    border-radius: 14px;
    background: #fbfdfc;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.team-create-input-wrap:focus-within,
.team-premium-input:focus-within {
    border-color: rgba(21, 145, 93, .7);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(21, 145, 93, .09);
}

.team-create-input-wrap > i,
.team-premium-input > i { color: var(--team-green); }
.team-create-input-wrap input,
.team-premium-input input,
.team-premium-input select {
    width: 100%;
    height: 47px;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--team-ink);
    background: transparent;
    font-weight: 700;
}
.team-create-input-wrap input::placeholder { color: #a8b4ad; font-weight: 500; }
.team-create-input-wrap input.is-invalid { color: var(--team-danger); }
.team-create-field-error { min-height: 0; display: block; margin: 5px 2px 0; color: var(--team-danger); }

.team-format-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.team-level-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.team-choice-card { position: relative; min-width: 0; margin: 0; cursor: pointer; }
.team-choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.team-choice-card > strong,
.team-choice-card > small,
.team-choice-card > .team-level-icon { position: relative; z-index: 1; }
.team-choice-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid var(--team-line);
    border-radius: 14px;
    background: #fbfdfc;
    transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
}
.team-choice-card:has(input:checked)::before {
    border-color: var(--team-green);
    background: #effaf4;
    box-shadow: 0 0 0 3px rgba(21, 145, 93, .08);
}
.team-choice-card:hover::before { transform: translateY(-1px); }
.team-choice-check {
    position: absolute;
    z-index: 2;
    top: 7px;
    right: 7px;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--team-green);
    opacity: 0;
    transform: scale(.7);
    transition: .18s;
}
.team-choice-card:has(input:checked) .team-choice-check { opacity: 1; transform: scale(1); }
.team-format-card { min-height: 74px; padding: 18px 6px 9px; text-align: center; }
.team-format-card strong { display: block; color: var(--team-ink); font-weight: 900; }
.team-format-card strong span { padding: 0 1px; color: var(--team-green); }
.team-format-card small { display: block; margin-top: 2px; overflow: hidden; color: var(--team-muted); white-space: nowrap; text-overflow: ellipsis; }
.team-level-card { min-height: 83px; padding: 13px 6px 9px; text-align: center; }
.team-level-icon { width: 27px; height: 27px; margin: 0 auto 5px; display: grid; place-items: center; border-radius: 9px; color: var(--team-green); background: rgba(21,145,93,.1); }
.team-level-card strong { display: block; overflow: hidden; color: var(--team-ink); font-weight: 850; white-space: nowrap; text-overflow: ellipsis; }

.team-create-field textarea,
.team-premium-field textarea {
    width: 100%;
    padding: 13px 14px 25px;
    resize: vertical;
    border: 1px solid var(--team-line);
    border-radius: 14px;
    outline: 0;
    color: var(--team-ink);
    background: #fbfdfc;
    line-height: 1.55;
}
.team-create-field textarea:focus,
.team-premium-field textarea:focus { border-color: var(--team-green); box-shadow: 0 0 0 4px rgba(21,145,93,.08); }
.team-create-counter { position: absolute; right: 12px; bottom: 8px; color: var(--team-muted); }

.team-privacy-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--team-line); }
.team-privacy-copy strong,
.team-privacy-copy small { display: block; }
.team-privacy-copy strong { color: var(--team-ink); }
.team-privacy-copy small { margin-top: 3px; color: var(--team-muted); line-height: 1.4; }
.team-privacy-row.is-private .team-privacy-icon { color: #7a5c21; background: #fff6df; }
.team-switch { position: relative; width: 46px; height: 27px; margin: 0; }
.team-switch input { position: absolute; opacity: 0; }
.team-switch > span { position: absolute; inset: 0; border-radius: 99px; background: #ced8d2; transition: .2s; }
.team-switch > span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.17); transition: .2s; }
.team-switch input:checked + span { background: var(--team-green); }
.team-switch input:checked + span::after { transform: translateX(19px); }

.team-create-error { display: none; margin: 0 0 14px; padding: 11px 13px; border: 1px solid #f3c9ce; border-radius: 13px; color: #a82f3c; background: #fff3f4; font-weight: 700; }
.team-create-error.is-visible { display: block; }
.team-create-actions .team-primary-button { width: 100%; }
.team-create-actions > small { display: block; margin-top: 10px; color: var(--team-muted); text-align: center; }
.team-create-actions > small i { color: var(--team-green); margin-right: 4px; }

.team-create-success,
.team-create-load-error { min-height: 460px; padding: 50px 30px calc(34px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.team-create-success-mark,
.team-create-load-error > span {
    width: 86px;
    height: 86px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
    border-radius: 27px;
    color: #fff;
    background: linear-gradient(135deg, var(--team-green), #0c6c46);
    box-shadow: 0 18px 45px rgba(21,145,93,.28);
    transform: rotate(-4deg);
}
.team-create-load-error > span { color: var(--team-danger); background: #fff0f2; box-shadow: none; }
.team-create-success-summary { width: 100%; max-width: 390px; margin: 24px 0; display: grid; gap: 9px; text-align: left; }
.team-create-success-summary span { padding: 11px 13px; border-radius: 12px; color: var(--team-ink); background: #eef8f2; font-weight: 750; }
.team-create-success-summary i { margin-right: 7px; color: var(--team-green); }
.team-create-success-actions { width: 100%; display: grid; grid-template-columns: .8fr 1.4fr; gap: 10px; }

/* Team management page */
.team-premium-page {
    width: min(1180px, calc(100% - 28px));
    margin: 18px auto 80px;
    color: var(--team-ink);
}

.team-premium-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 22px 26px 0;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 75% 10%, rgba(185,244,74,.18), transparent 32%),
        linear-gradient(135deg, #102c21 0%, #0d5639 58%, #127d50 100%);
    box-shadow: 0 32px 78px rgba(8,55,36,.26), 0 8px 24px rgba(7,45,30,.12), inset 0 1px 0 rgba(255,255,255,.16);
}
.team-premium-hero::before,
.my-teams-hero::before { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.1), transparent 27%, transparent 72%, rgba(203,255,111,.07)); }
.team-premium-hero::after,
.my-teams-hero::after { content: ""; position: absolute; z-index: 0; top: 0; right: 0; left: 0; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,255,255,.44), transparent); opacity: .65; }
.team-hero-glow { position: absolute; z-index: 0; border-radius: 50%; filter: blur(1px); pointer-events: none; }
.team-hero-glow-one { top: -112px; right: -58px; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 0 70px rgba(203,255,111,.05); }
.team-hero-glow-two { bottom: -150px; left: 27%; width: 330px; height: 330px; background: rgba(185,244,74,.065); filter: blur(5px); }
.team-hero-topbar { position: relative; z-index: 1; display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; }
.team-icon-button { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; color: #fff; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 9px 22px rgba(3,30,19,.14); backdrop-filter: blur(12px); transition: transform .18s, background .18s, border-color .18s; }
.team-icon-button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.16); }
.team-owner-badge { justify-self: center; padding: 7px 11px; border-radius: 99px; color: #e8ffc0; background: rgba(185,244,74,.12); border: 1px solid rgba(185,244,74,.2); font-weight: 800; }
.team-owner-badge i { margin-right: 5px; color: var(--team-lime); }
.team-hero-main { position: relative; z-index: 1; padding: 30px 2px 25px; display: flex; align-items: center; gap: 20px; }
.team-hero-logo-wrap { position: relative; flex: 0 0 auto; }
.team-hero-logo { width: 94px; height: 94px; padding: 4px; border: 1px solid rgba(255,255,255,.32); border-radius: 26px; background: rgba(255,255,255,.16); object-fit: cover; box-shadow: 0 20px 42px rgba(0,0,0,.24), 0 0 0 5px rgba(255,255,255,.045); }
.team-hero-logo-wrap > span { position: absolute; right: -4px; bottom: -3px; width: 25px; height: 25px; display: grid; place-items: center; border: 3px solid #106441; border-radius: 50%; color: var(--team-lime); background: #fff; }
.team-hero-copy .team-page-eyebrow { color: #cfff89; }
.team-hero-copy h1 { margin: 6px 0 10px; color: #fff; font-weight: 900; letter-spacing: -.04em; }
.team-hero-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.team-hero-meta span { padding: 6px 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; color: rgba(255,255,255,.82); background: rgba(255,255,255,.07); font-weight: 650; }
.team-hero-meta i { margin-right: 5px; color: var(--team-lime); }
.team-hero-stats { position: relative; z-index: 1; margin-inline: -26px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.13); background: linear-gradient(180deg, rgba(2,24,15,.08), rgba(2,24,15,.2)); backdrop-filter: blur(14px); }
.team-hero-stats div { padding: 15px 10px 17px; text-align: center; border-right: 1px solid rgba(255,255,255,.1); }
.team-hero-stats div:last-child { border: 0; }
.team-hero-stats strong,
.team-hero-stats span { display: block; }
.team-hero-stats strong { color: #fff; font-weight: 900; }
.team-hero-stats span { margin-top: 2px; color: rgba(255,255,255,.6); font-weight: 650; }

.team-command-center { margin: 0; }
.team-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.team-section-heading h2 { margin: 2px 0 3px; color: var(--team-ink); font-weight: 900; letter-spacing: -.025em; }
.team-section-heading p { max-width: 650px; margin: 0; color: var(--team-muted); line-height: 1.55; }
.team-content-heading-card { margin-inline: var(--team-content-gutter); margin-bottom: 12px; padding: 13px 15px; border: 1px solid var(--team-line); border-radius: 15px; background: #fff; box-shadow: 0 6px 18px rgba(25, 75, 51, .045); }

.team-premium-tabs { margin-top: 16px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; padding: 6px; border: 1px solid var(--team-line); border-radius: 17px; background: #fff; box-shadow: 0 8px 24px rgba(25, 75, 51, .055); }
.team-premium-tabs button { min-width: 0; min-height: 58px; padding: 7px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid transparent; border-radius: 12px; color: var(--team-muted); background: transparent; text-align: center; transition: .2s; }
.team-premium-tabs button > i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #839189; background: #e8eeea; }
.team-premium-tabs button span { overflow: hidden; font-weight: 850; white-space: nowrap; text-overflow: ellipsis; }
.team-premium-tabs button.active { color: var(--team-ink); border-color: #d8e7de; background: #fff; box-shadow: 0 6px 18px rgba(28,76,53,.08); }
.team-premium-tabs button.active > i { color: #fff; background: var(--team-green); }
.team-tab-content { margin-top: 14px; }
.team-partial-shell { min-height: 180px; }
.team-staff-tab,
.team-staff-editor-host { margin: 0 !important; padding: 0 !important; }
.team-staff-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; }
.team-staff-toolbar-copy { min-width: 0; }
.team-staff-toolbar-copy h2 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.team-staff-toolbar .team-secondary-button { min-height: 38px; padding: 0 12px; border-radius: 11px; }

.team-inline-setting { margin: 0; padding: 5px 6px; display: flex; align-items: center; gap: 7px; border: 0; border-radius: 11px; background: var(--team-soft); }
.team-inline-setting-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--team-green); background: #fff; }
.team-inline-setting strong,
.team-inline-setting small { display: block; }
.team-inline-setting small { color: var(--team-muted); }
.team-inline-setting select { min-width: 86px; height: 32px; padding: 0 8px; border: 1px solid var(--team-line); border-radius: 9px; color: var(--team-ink); background: #fff; font-weight: 800; }

.team-staff-role-section { padding: 0 !important; }
.team-staff-role-grid { margin: 10px var(--team-content-gutter) 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.team-staff-role-card { min-width: 0; padding: 10px; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 9px; overflow: hidden; border: 1px solid var(--team-line); border-radius: 14px; color: var(--team-ink); background: linear-gradient(145deg, #fff, #f7fbf9); box-shadow: 0 8px 20px rgba(25, 75, 51, .055); cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.team-staff-role-card:hover { transform: translateY(-1px); border-color: #c9ddd2; box-shadow: 0 11px 24px rgba(25, 75, 51, .085); }
.team-staff-role-avatar { width: 42px; height: 42px; padding: 2px; overflow: hidden; border: 1px solid #dce9e1; border-radius: 13px; background: #fff; }
.team-staff-role-avatar img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.team-staff-role-copy,
.team-staff-role-copy strong,
.team-staff-role-copy small { min-width: 0; display: block; }
.team-staff-role-copy strong,
.team-staff-role-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.team-staff-role-label { margin-bottom: 2px; color: var(--team-green); font-weight: 850; }
.team-staff-role-label i { margin-right: 3px; }
.team-staff-role-meta { margin-top: 2px; color: var(--team-muted); }
.team-staff-role-owner { border-top-color: #9fd8bc; }
.team-staff-role-coach { border-top-color: #b9d8c8; }
.team-staff-role-captain { border-top-color: #a9cd79; }

/* Settings partial */
.team-settings-form { display: grid; gap: 0; }
.team-settings-form > .team-section-heading { margin-bottom: 12px; }
.team-autosave-note { flex: 0 0 auto; padding: 7px 10px; border-radius: 99px; color: var(--team-green); background: #edf8f2; font-weight: 800; }
.team-autosave-note i { margin-right: 4px; }
.team-settings-card { margin-inline: var(--team-content-gutter); padding: 18px 0; border-bottom: 1px solid var(--team-line); }
.team-settings-card:last-of-type { border-bottom: 0; }
.team-settings-card-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; }
.team-settings-card-heading > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--team-green); background: #eaf7f0; }
.team-settings-card-heading h3,
.team-settings-card-heading p { margin: 0; }
.team-settings-card-heading h3 { color: var(--team-ink); font-weight: 900; }
.team-settings-card-heading p { margin-top: 2px; color: var(--team-muted); }
.team-edit-logo-row { display: flex; align-items: center; gap: 13px; margin-bottom: 17px; padding-bottom: 17px; border-bottom: 1px solid var(--team-line); }
.team-edit-logo-row strong,
.team-edit-logo-row small { display: block; }
.team-edit-logo-row small { margin-top: 2px; color: var(--team-muted); }
.team-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.team-field-wide { grid-column: 1 / -1; }
.team-premium-field { min-width: 0; margin: 0; }
.team-premium-field > span:first-child { min-height: 18px; margin: 0 2px 5px; display: flex; justify-content: space-between; color: var(--team-ink); font-weight: 800; }
.team-premium-field > span em { color: var(--team-muted); font-style: normal; font-weight: 500; }
.team-premium-input { min-height: 44px; background: #fff; }
.team-premium-input input,
.team-premium-input select { height: 42px; }
.team-description-editor .ck.ck-editor { width: 100%; border-radius: 15px; box-shadow: 0 8px 24px rgba(25,75,51,.055); }
.team-description-editor .ck.ck-toolbar { border: 1px solid var(--team-line); border-bottom: 0; border-radius: 15px 15px 0 0; background: #f7fbf9; }
.team-description-editor .ck.ck-editor__main > .ck-editor__editable { min-height: 145px; padding: 12px 15px; border: 1px solid var(--team-line); border-radius: 0 0 15px 15px; color: var(--team-ink); background: #fff; box-shadow: none; }
.team-description-editor .ck.ck-editor__main > .ck-editor__editable:focus { border-color: var(--team-green); box-shadow: 0 0 0 4px rgba(21,145,93,.08); }
.team-toggle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.team-setting-toggle { position: relative; min-width: 0; margin: 0; padding: 12px; display: grid; grid-template-columns: 35px 1fr 40px; align-items: center; gap: 10px; border: 1px solid var(--team-line); border-radius: 14px; background: #fff; cursor: pointer; }
.team-setting-toggle > span:first-child { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--team-green); background: #edf8f2; }
.team-setting-toggle strong,
.team-setting-toggle small { display: block; }
.team-setting-toggle strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.team-setting-toggle small { margin-top: 2px; overflow: hidden; color: var(--team-muted); white-space: nowrap; text-overflow: ellipsis; }
.team-setting-toggle input { position: absolute; opacity: 0; }
.team-setting-toggle > i { position: relative; width: 40px; height: 23px; border-radius: 99px; background: #d1dbd5; transition: .2s; }
.team-setting-toggle > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.14); transition: .2s; }
.team-setting-toggle input:checked + i { background: var(--team-green); }
.team-setting-toggle input:checked + i::after { transform: translateX(17px); }
.team-settings-actions { position: sticky; z-index: 5; bottom: 8px; margin: 8px var(--team-content-gutter) 0; padding: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.team-settings-actions > span { margin-right: auto; }
.team-settings-actions > span { color: var(--team-muted); }
.team-settings-actions > span i { margin-right: 4px; color: var(--team-green); }
.team-settings-actions .team-primary-button { min-height: 43px; }

/* Availability */
.team-availability-tip,
.team-location-tip { margin-bottom: 16px; padding: 13px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid #d8ebdf; border-radius: 15px; color: var(--team-ink); background: #f1faf5; line-height: 1.45; }
.team-availability-tip > i { color: var(--team-green); }
.team-availability-tip strong { margin-right: 3px; }
.team-day-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.team-day-card { margin: 0 !important; overflow: hidden; border: 1px solid var(--team-line) !important; border-radius: 17px !important; background: #fff !important; box-shadow: none !important; }
.team-day-card .card-body { padding: 12px !important; background: #fff !important; }
.team-day-card .card-body.bg-half-primary { background: #f1faf5 !important; }
.team-day-toggle { width: 100%; padding: 0; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; border: 0; color: var(--team-ink); background: transparent; text-align: left; }
.team-day-monogram { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--team-muted); background: var(--team-soft); font-weight: 900; }
.team-day-toggle strong,
.team-day-toggle small { display: block; }
.team-day-toggle small { margin-top: 2px; color: var(--team-muted); }
.team-day-toggle > i { color: #b5c0ba; }
.team-day-card .bg-half-primary .team-day-monogram { color: #fff; background: var(--team-green); }
.team-day-card .bg-half-primary .team-day-toggle > i { color: var(--team-green); }
.team-day-hours { margin-top: 11px; padding-top: 11px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; border-top: 1px solid #dfe9e3; }
.team-day-hours > i { padding-bottom: 9px; color: #9caaa2; }
.team-day-hours label { margin: 0; }
.team-day-hours label span { display: block; margin-bottom: 4px; color: var(--team-muted); font-weight: 700; }
.team-day-hours input { width: 100%; height: 34px; padding: 0 6px; border: 1px solid var(--team-line); border-radius: 9px; color: var(--team-ink); background: #fff; font-weight: 750; }

.team-legacy-day-grid .card { border-color: var(--team-line) !important; background: var(--team-white) !important; }
.team-legacy-day-grid .card-body { color: var(--team-ink); background: var(--team-white) !important; }
.team-legacy-day-grid .card-body.bg-half-primary { background: #edf8f2 !important; }
.team-legacy-day-grid .text-primary { color: var(--team-green) !important; }
.team-legacy-day-grid input.bg-half-primary { border-color: #d8e8df !important; color: var(--team-ink) !important; background: #f7fbf9 !important; }

/* Location, squad and rivals */
.team-location-tip > span { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--team-green); background: #fff; }
.team-location-tip strong,
.team-location-tip small { display: block; }
.team-location-tip small { margin-top: 2px; color: var(--team-muted); }
.team-location-relation { min-height: 140px; padding: 2px 0; }
.team-rivals-grid { margin-inline: var(--team-content-gutter); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.team-rivals-grid > section { min-width: 0; padding: 10px 2px; }
.team-rivals-grid > section + section { border-left: 1px solid var(--team-line); padding-left: 16px; }
.team-rivals-grid h3 { margin: 0 0 12px; color: var(--team-ink); font-weight: 900; }
.team-rivals-grid h3 i { margin-right: 5px; color: var(--team-green); }
.team-request-list,
.team-rival-list { display: grid; gap: 8px; }
.team-request-item { min-width: 0; }
.team-compact-empty { min-height: 145px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.team-compact-empty > span { width: 43px; height: 43px; margin-bottom: 9px; display: grid; place-items: center; border-radius: 13px; color: var(--team-green); background: #edf8f2; }
.team-compact-empty strong { color: var(--team-ink); }
.team-compact-empty small { max-width: 240px; margin-top: 3px; color: var(--team-muted); line-height: 1.45; }
.team-rival-card { width: 100%; padding: 9px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--team-line); border-radius: 13px; color: var(--team-ink); background: #fff; text-align: left; }
.team-rival-card img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
.team-rival-card strong,
.team-rival-card small { display: block; }
.team-rival-card strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.team-rival-card small { margin-top: 3px; color: var(--team-muted); }
.team-rival-card small i { margin-right: 4px; color: var(--team-green); }
.team-rival-card > i { color: #a4b0a9; }
.team-potential-rivals { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--team-line); }
.team-potential-rivals h4 { margin: 0 0 8px; color: var(--team-muted); font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.team-potential-rivals .team-rival-card + .team-rival-card { margin-top: 8px; }

.team-operations-grid { margin-inline: var(--team-content-gutter); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.team-operation-card { position: relative; min-width: 0; min-height: 100px; padding: 13px 38px 13px 13px; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; overflow: hidden; border: 1px solid var(--team-line); border-radius: 15px; color: var(--team-ink); background: linear-gradient(145deg, #fff, #f6faf8); text-align: left; transition: transform .18s, border-color .18s, box-shadow .18s; }
.team-operation-card:first-child { border-color: #cce6d7; background: linear-gradient(145deg, #f1faf5, #fff); }
.team-operation-card:hover { transform: translateY(-1px); border-color: #cbded3; box-shadow: 0 9px 22px rgba(25,75,51,.08); }
.team-operation-card > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--team-green); background: #eaf7f0; }
.team-operation-card > div { min-width: 0; }
.team-operation-card strong,
.team-operation-card small { display: block; }
.team-operation-card strong { overflow: hidden; color: var(--team-ink); font-weight: 900; white-space: nowrap; text-overflow: ellipsis; }
.team-operation-card small { margin-top: 3px; display: -webkit-box; overflow: hidden; color: var(--team-muted); line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.team-operation-card > i { position: absolute; top: 50%; right: 13px; color: #9eaba4; transform: translateY(-50%); }

.team-danger-zone { margin-top: 16px; padding: 14px 16px; display: grid; grid-template-columns: 39px 1fr auto; align-items: center; gap: 11px; border: 1px solid #f0d7da; border-radius: 17px; background: #fff9fa; }
.team-danger-zone > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: var(--team-danger); background: #ffedef; }
.team-danger-zone strong,
.team-danger-zone small { display: block; }
.team-danger-zone strong { color: #912d37; }
.team-danger-zone small { margin-top: 2px; color: #9a7378; }
.team-danger-zone button { padding: 8px 11px; border: 1px solid #efc6cb; border-radius: 10px; color: var(--team-danger); background: #fff; font-weight: 800; }

.team-empty-page { min-height: 70vh; display: grid; place-items: center; }
.team-empty-state { width: min(590px,100%); padding: 48px 30px; display: flex; flex-direction: column; align-items: center; border: 1px solid var(--team-line); border-radius: 28px; background: radial-gradient(circle at 50% 0, #e7faef, #fff 45%); box-shadow: var(--team-shadow); text-align: center; }
.team-empty-visual { width: 92px; height: 92px; margin-bottom: 20px; display: grid; place-items: center; border-radius: 28px; color: #fff; background: linear-gradient(135deg,var(--team-green),var(--team-green-dark)); box-shadow: 0 20px 45px rgba(21,145,93,.25); transform: rotate(-4deg); }
.team-empty-state h1 { margin: 7px 0 8px; color: var(--team-ink); font-weight: 900; letter-spacing: -.04em; }
.team-empty-state p { max-width: 430px; margin: 0 0 20px; color: var(--team-muted); line-height: 1.6; }
.team-empty-state > small { margin-top: 11px; color: var(--team-muted); }
.team-empty-state > small i { color: var(--team-green); }

/* My teams */
.my-teams-premium-page {
    width: min(1180px, calc(100% - 28px));
    margin: 18px auto 80px;
    color: var(--team-ink);
}

.my-teams-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 20px 24px 0;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 78% 12%, rgba(185, 244, 74, .2), transparent 30%),
        linear-gradient(135deg, #102c21 0%, #0d5639 58%, #127d50 100%);
    box-shadow: 0 32px 78px rgba(8, 55, 36, .26), 0 8px 24px rgba(7, 45, 30, .12), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.my-teams-hero-glow { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; }
.my-teams-hero-glow-one { top: -170px; right: -82px; width: 360px; height: 360px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 0 90px rgba(203,255,111,.045); }
.my-teams-hero-glow-two { right: 22%; bottom: -195px; width: 390px; height: 390px; background: rgba(185, 244, 74, .065); filter: blur(6px); }
.my-teams-topbar { position: relative; z-index: 1; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; }
.my-teams-back { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .2); border-radius: 13px; color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 9px 22px rgba(3,30,19,.14); backdrop-filter: blur(12px); transition: transform .18s, background .18s, border-color .18s; }
.my-teams-back:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.16); }
.my-teams-eyebrow { justify-self: start; display: inline-flex; align-items: center; gap: 7px; color: #d9ffa4 !important; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.my-teams-status { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px; color: rgba(255, 255, 255, .76) !important; background: rgba(255, 255, 255, .07); font-weight: 750; }
.my-teams-status i { color: var(--team-lime); }
.my-teams-hero-content { position: relative; z-index: 1; padding: 31px 2px 28px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.my-teams-hero-copy { max-width: 650px; }
.my-teams-hero-copy h1 { margin: 0 0 9px; color: #fff; font-weight: 900; letter-spacing: -.035em; }
.my-teams-hero-copy p { max-width: 590px; margin: 0; color: rgba(255, 255, 255, .7); line-height: 1.65; }
.my-teams-hero-content .premium-add-team { flex: 0 0 auto; min-width: 235px; }
.my-teams-stats { position: relative; z-index: 1; margin-inline: -24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, .13); background: linear-gradient(180deg, rgba(2,24,15,.08), rgba(2,24,15,.2)); backdrop-filter: blur(14px); }
.my-teams-stats > div { padding: 5px 10px 5px; border-right: 1px solid rgba(255, 255, 255, .1); text-align: center; }
.my-teams-stats > div:last-child { border-right: 0; }
.my-teams-stats strong,
.my-teams-stats span { display: block; }
.my-teams-stats strong { color: #fff !important; font-weight: 900; }
.my-teams-stats span { margin-top: 3px; color: rgba(255, 255, 255, .6) !important; font-weight: 700; }

.my-teams-content {
    margin-top: 18px;
    padding: 24px;
    border: 1px solid var(--team-line);
    border-radius: 25px;
    background: #fff;
    box-shadow: var(--team-shadow);
}

.my-teams-section-heading { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.my-teams-section-heading h2 { margin: 4px 0; color: var(--team-ink); font-weight: 900; letter-spacing: -.02em; }
.my-teams-section-heading p { margin: 0; color: var(--team-muted); }
.my-teams-section-kicker { color: var(--team-green) !important; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.my-teams-count { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #d7e7de; border-radius: 99px; color: var(--team-green) !important; background: #eff8f3; font-weight: 800; }
.my-teams-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.my-team-premium-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--team-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(20, 70, 47, .07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.my-team-premium-card:hover { border-color: #cee1d6; transform: translateY(-2px); box-shadow: 0 18px 42px rgba(20, 70, 47, .12); }
.my-team-premium-card.is-owner { border-color: rgba(21, 145, 93, .26); }
.my-team-card-cover {
    position: relative;
    min-height: 132px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 15%, rgba(185, 244, 74, .18), transparent 28%),
        linear-gradient(135deg, #16372a, #0d6b46);
}

.my-team-premium-card:not(.is-owner) .my-team-card-cover { background: radial-gradient(circle at 78% 15%, rgba(255, 255, 255, .1), transparent 28%), linear-gradient(135deg, #263c33, #49645a); }
.my-team-card-orbit { position: absolute; width: 210px; height: 210px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 50%; }
.my-team-card-cover img { position: relative; z-index: 1; width: 76px; height: 76px; padding: 3px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 22px; background: rgba(255, 255, 255, .14); object-fit: cover; box-shadow: 0 16px 32px rgba(0, 0, 0, .2); }
.my-team-role,
.my-team-privacy { position: absolute; z-index: 2; top: 13px; padding: 6px 8px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 9px; color: rgba(255, 255, 255, .84) !important; background: rgba(5, 23, 16, .24); backdrop-filter: blur(8px); font-weight: 750; }
.my-team-role { left: 13px; }
.my-team-privacy { right: 13px; }
.my-team-role i { margin-right: 4px; color: var(--team-lime); }
.my-team-privacy i { margin-right: 4px; }
.my-team-card-body { padding: 17px; }
.my-team-card-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.my-team-card-title h3 { margin: 3px 0 0; overflow: hidden; color: var(--team-ink); font-weight: 900; white-space: nowrap; text-overflow: ellipsis; }
.my-team-format { flex: 0 0 auto; min-width: 48px; height: 42px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--team-green) !important; background: #edf8f2; font-weight: 900; }
.my-team-format span { margin: 0 1px; color: var(--team-green) !important; }
.my-team-description { min-height: 42px; margin: 12px 0; display: -webkit-box; overflow: hidden; color: var(--team-muted); line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.my-team-description p { margin: 0; }
.my-team-description > :last-child { margin-bottom: 0; }
.my-team-meta { min-height: 27px; padding-bottom: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; border-bottom: 1px solid var(--team-line); }
.my-team-meta > span { padding: 5px 7px; border-radius: 8px; color: var(--team-muted) !important; background: var(--team-soft); font-weight: 700; }
.my-team-meta > span i { margin-right: 4px; }
.my-team-meta > .is-searching { color: var(--team-green) !important; background: #eaf8f0; }
.my-team-card-actions { padding-top: 13px; display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.my-team-primary-action,
.my-team-icon-action,
.my-team-leave-action { min-height: 42px; border: 0; border-radius: 12px; font-weight: 800; }
.my-team-primary-action { padding: 0 14px; color: #fff !important; background: linear-gradient(135deg, var(--team-green), var(--team-green-dark)); box-shadow: 0 9px 20px rgba(21, 145, 93, .2); }
.my-team-primary-action i { margin-right: 6px; }
.my-team-icon-action,
.my-team-leave-action { width: 42px; padding: 0; color: var(--team-ink); background: var(--team-soft); }
.my-team-leave-action { color: var(--team-danger); background: #fff0f2; }

.my-teams-profile-callout {
    margin-top: 18px;
    padding: 22px;
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 16px;
    border: 1px solid #d4e8dc;
    border-radius: 22px;
    background: linear-gradient(135deg, #f1faf5, #fff);
    box-shadow: var(--team-shadow);
    cursor: pointer;
}

.my-teams-callout-icon,
.my-teams-empty-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: #fff !important; background: linear-gradient(135deg, var(--team-green), var(--team-green-dark)); box-shadow: 0 12px 26px rgba(21, 145, 93, .22); }
.my-teams-profile-callout h2 { margin: 4px 0; color: var(--team-ink); font-weight: 900; }
.my-teams-profile-callout p { margin: 0; color: var(--team-muted); }
.my-teams-callout-action { color: var(--team-green) !important; font-weight: 850; }
.my-teams-callout-action i { margin-left: 6px; }
.my-teams-empty { min-height: 330px; padding: 35px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #cfe0d6; border-radius: 20px; background: linear-gradient(180deg, #f7fbf9, #fff); text-align: center; }
.my-teams-empty-icon { margin-bottom: 15px; }
.my-teams-empty h2 { margin: 6px 0; color: var(--team-ink); font-weight: 900; }
.my-teams-empty p { max-width: 430px; margin: 0 0 18px; color: var(--team-muted); line-height: 1.6; }
.my-teams-empty .premium-add-team { min-width: 250px; }

body.dark-mode .team-premium-page,
body.dark-mode .team-create-form,
body.dark-mode .my-teams-premium-page { --team-ink: #eaf4ee; --team-muted: #91a49a; --team-line: #2a3d34; --team-soft: #1b2b23; --team-white: #17251e; }
body.dark-mode .team-create-modal .custom-modal-content,
body.dark-mode .team-create-modal .custom-modal-body { background: #101b16; }
body.dark-mode .team-create-modal .custom-modal-header,
body.dark-mode .team-day-card .card-body,
body.dark-mode .team-empty-state,
body.dark-mode .my-teams-content,
body.dark-mode .my-team-premium-card,
body.dark-mode .my-teams-profile-callout,
body.dark-mode .team-content-heading-card,
body.dark-mode .team-premium-tabs { background: #17251e !important; }
body.dark-mode .team-create-input-wrap,
body.dark-mode .team-premium-input,
body.dark-mode .team-create-field textarea,
body.dark-mode .team-premium-field textarea,
body.dark-mode .team-choice-card::before,
body.dark-mode .team-setting-toggle,
body.dark-mode .team-rival-card,
body.dark-mode .my-team-format,
body.dark-mode .my-team-icon-action,
body.dark-mode .my-teams-empty { background: #111d17; }
body.dark-mode .premium-add-team.addTeam { color: #fff !important; background: radial-gradient(circle at 12% 0, rgba(185, 244, 74, .26), transparent 34%), linear-gradient(135deg, #15915d 0%, #0c6843 72%) !important; }
body.dark-mode .my-team-primary-action { color: #fff !important; background: linear-gradient(135deg, var(--team-green), var(--team-green-dark)) !important; }
body.dark-mode .team-premium-tabs button { color: var(--team-muted); }
body.dark-mode .team-premium-tabs button > i { color: #a7b7ae; background: #223229; }
body.dark-mode .team-premium-tabs button.active { color: var(--team-ink); border-color: #345242; background: #203328; }
body.dark-mode .team-premium-tabs button.active span { color: var(--team-ink) !important; }
body.dark-mode .team-description-editor .ck.ck-toolbar,
body.dark-mode .team-description-editor .ck.ck-editor__main > .ck-editor__editable { color: var(--team-ink); background: #111d17 !important; border-color: var(--team-line) !important; }
body.dark-mode .team-inline-setting,
body.dark-mode .team-staff-role-card,
body.dark-mode .team-operation-card { color: var(--team-ink); background: linear-gradient(145deg, #17251e, #111d17); }
body.dark-mode .team-inline-setting-icon,
body.dark-mode .team-inline-setting select,
body.dark-mode .team-staff-role-avatar { color: var(--team-ink); border-color: var(--team-line); background: #101b16; }
body.dark-mode .team-legacy-day-grid .card,
body.dark-mode .team-legacy-day-grid .card-body { color: var(--team-ink); border-color: var(--team-line) !important; background: #17251e !important; }
body.dark-mode .team-legacy-day-grid .card-body.bg-half-primary { background: #20352a !important; }
body.dark-mode .team-legacy-day-grid input.bg-half-primary { border-color: var(--team-line) !important; color: var(--team-ink) !important; background: #101b16 !important; }

@media (max-width: 767px) {
    .team-create-modal .custom-modal-content { height: 94%; border-radius: 22px 22px 0 0; }
    .team-create-form { padding: 20px 14px calc(25px + env(safe-area-inset-bottom)); }
    .team-create-section { padding: 15px; border-radius: 17px; }
    .team-create-success { padding-inline: 18px; }
    .team-create-success-actions { grid-template-columns: 1fr; }

    .team-premium-page { width: 100%; margin: 0 auto 70px; }
    .team-premium-hero { padding: 12px 13px 0; border-radius: 0 0 23px 23px; box-shadow: 0 18px 42px rgba(12, 70, 45, .18); }
    .team-hero-topbar { grid-template-columns: 38px 1fr 38px; }
    .team-icon-button { width: 38px; height: 38px; border-radius: 12px; }
    .team-hero-main { padding: 18px 0 16px; gap: 12px; }
    .team-hero-logo { width: 68px; height: 68px; border-radius: 19px; }
    .team-hero-copy h1 { margin-block: 4px 7px; }
    .team-hero-meta span:nth-child(3) { display: none; }
    .team-hero-stats { margin-inline: -13px; }
    .team-hero-stats div { padding: 11px 3px 13px; }

    .team-command-center { margin: 0; }
    .team-premium-tabs { position: sticky; z-index: 18; top: calc(var(--mobileHeaderPx) + var(--maui-safe-area-top)); margin: 10px 9px 0; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; padding: 5px; border-radius: 15px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); }
    .team-premium-tabs button { min-height: 53px; padding: 6px 2px; gap: 4px; border-radius: 10px; }
    .team-premium-tabs button > i { width: 25px; height: 25px; border-radius: 8px; }
    .team-tab-content { margin-top: 11px; }
    .team-section-heading { align-items: flex-start; }
    .team-section-heading .team-secondary-button { min-height: 39px; padding: 0 11px; }
    .team-content-heading-card { margin-bottom: 11px; padding: 13px 14px; border-radius: 15px; }
    .team-staff-toolbar { grid-template-columns: minmax(0, 1fr) auto 38px; align-items: center; gap: 6px; padding: 9px 10px; }
    .team-staff-toolbar-copy .team-page-eyebrow,
    .team-staff-toolbar .team-inline-setting > span,
    .team-staff-toolbar .team-secondary-button span { display: none; }
    .team-staff-toolbar .team-inline-setting { padding: 3px; }
    .team-staff-toolbar .team-inline-setting select { min-width: 76px; }
    .team-staff-toolbar .team-secondary-button { width: 38px; padding: 0; }
    .team-staff-role-grid { gap: 6px; }
    .team-staff-role-card { padding: 8px 5px; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 6px; text-align: center; }
    .team-staff-role-avatar { width: 40px; height: 40px; }
    .team-staff-role-copy { width: 100%; }
    .team-staff-role-meta { display: none !important; }

    .team-settings-card { padding: 14px 2px; }
    .team-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 8px; }
    .team-toggle-grid,
    .team-day-grid,
    .team-rivals-grid { grid-template-columns: 1fr; }
    .team-operations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .team-operation-card { min-height: 126px; padding: 11px; grid-template-columns: minmax(0, 1fr); grid-template-rows: 38px 1fr; align-items: start; gap: 8px; }
    .team-operation-card > span { width: 38px; height: 38px; }
    .team-operation-card strong { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .team-operation-card > i { top: 22px; right: 12px; transform: none; }
    .team-field-wide { grid-column: 1 / -1; }
    .team-premium-field > span:first-child { min-height: 24px; align-items: end; }
    .team-premium-input { padding-inline: 9px; gap: 7px; }
    .team-settings-actions { bottom: calc(60px + var(--maui-safe-area-bottom)); flex-direction: column; align-items: stretch; }
    .team-settings-actions > span { display: none; }
    .team-inline-setting { grid-template-columns: 38px 1fr auto; }
    .team-rivals-grid > section { padding: 10px 2px; }
    .team-rivals-grid > section + section { padding-top: 15px; padding-left: 2px; border-top: 1px solid var(--team-line); border-left: 0; }
    .team-danger-zone { margin-inline: 10px; }
    .team-danger-zone small { display: none; }

    .my-teams-premium-page { width: 100%; margin: 0 auto 70px; }
    .my-teams-hero { padding: 16px 15px 0; border-radius: 0 0 25px 25px; }
    .my-teams-hero-content { padding: 24px 0 20px; display: grid; gap: 17px; }
    .my-teams-hero-content .premium-add-team { width: 100%; min-width: 0; }
    .my-teams-stats { margin-inline: -15px; }
    .my-teams-stats > div { padding-inline: 4px; }
    .my-teams-content { margin: 12px 10px 0; padding: 16px 12px; border-radius: 21px; }
    .my-teams-grid { grid-template-columns: 1fr; }
    .my-teams-profile-callout { margin: 12px 10px 0; padding: 17px; grid-template-columns: 48px 1fr; }
    .my-teams-callout-icon { width: 48px; height: 48px; }
    .my-teams-callout-action { grid-column: 2; }
}

@media (min-width: 768px) and (max-width: 1120px) {
    .team-premium-page,
    .my-teams-premium-page { width: 100%; margin-top: 0; }
    .team-premium-hero,
    .my-teams-hero { border-radius: 0 0 26px 26px; }
}

@media (max-width: 390px) {
    .team-create-location { grid-template-columns: 38px 1fr auto; }
    .team-create-location-icon { width: 38px; height: 38px; }
    .my-teams-topbar { grid-template-columns: 42px 1fr; }
    .my-teams-status { display: none; }
    .my-team-role,
    .my-team-privacy { top: 10px; }
    .my-team-role { left: 10px; }
    .my-team-privacy { right: 10px; }
}
