:root {
    color-scheme: light;
    --bg: #f5f7f2;
    --surface: #ffffff;
    --ink: #17211b;
    --muted: #617066;
    --line: #dbe4d8;
    --primary: #107c41;
    --primary-dark: #0a5d30;
    --accent: #e4b33d;
    --danger: #b42318;
    --info: #1769aa;
    --theme-radius: 8px;
    --theme-icon-size: 56px;
    --theme-shadow: 0 14px 32px rgba(23, 33, 27, 0.12);
    --theme-gap: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 10%, rgba(228, 179, 61, 0.2), transparent 26%),
        linear-gradient(135deg, rgba(16, 124, 65, 0.1), transparent 42%),
        var(--bg);
    color: var(--ink);
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 10px clamp(14px, 4vw, 42px);
    border-bottom: 1px solid rgba(16, 124, 65, 0.12);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
        linear-gradient(90deg, rgba(16, 124, 65, 0.08), rgba(228, 179, 61, 0.08));
    box-shadow: 0 12px 30px rgba(23, 33, 27, 0.08);
    backdrop-filter: blur(16px);
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
}

.compact-actions {
    position: relative;
    flex: 0 0 auto;
}

.brand-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.brand-link {
    color: var(--ink);
    text-decoration: none;
}

.brand {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
    font-size: clamp(17px, 2vw, 22px);
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(16, 124, 65, 0.24);
}

.brand-mark svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.brand-logo {
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid rgba(228, 179, 61, 0.72);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(23, 33, 27, 0.1);
    object-fit: cover;
}

.brand-logo.fallback {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 19px;
    font-weight: 900;
}

.dropdown {
    position: relative;
}

.dropdown summary {
    list-style: none;
}

.dropdown summary::-webkit-details-marker {
    display: none;
}

.menu-trigger,
.avatar-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    cursor: pointer;
    overflow: hidden;
    user-select: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.menu-trigger {
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(16, 124, 65, 0.14);
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(16, 124, 65, 0.2);
}

.menu-trigger strong {
    font-size: 14px;
    line-height: 1;
}

.menu-icon,
.trigger-chevron,
.dropdown-panel a span {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

.menu-icon {
    width: 24px;
    height: 24px;
}

.menu-trigger svg,
.avatar-trigger svg,
.dropdown-panel svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.menu-trigger:hover,
.avatar-trigger:hover {
    box-shadow: 0 12px 26px rgba(23, 33, 27, 0.13);
    transform: translateY(-1px);
}

.avatar-trigger {
    gap: 5px;
    min-width: 58px;
    padding: 4px 7px 4px 5px;
    border: 1px solid rgba(16, 124, 65, 0.16);
    border-radius: 999px;
    background: #fff;
}

.trigger-chevron {
    width: 18px;
    height: 18px;
    color: var(--muted);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(228, 179, 61, 0.9);
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar.fallback {
    display: inline-grid;
    place-items: center;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 70;
    display: grid;
    width: min(320px, calc(100vw - 24px));
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(16, 124, 65, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 60px rgba(23, 33, 27, 0.18);
    backdrop-filter: blur(18px);
}

.dropdown-panel a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 11px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.dropdown-panel a span {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(16, 124, 65, 0.08);
    color: var(--primary-dark);
}

.dropdown-panel a:hover,
.dropdown-panel a.active {
    background: rgba(16, 124, 65, 0.09);
    color: var(--primary-dark);
    transform: translateX(-2px);
}

.dropdown-panel .logout-link {
    color: var(--danger);
}

.dropdown-panel .logout-link span {
    background: rgba(180, 35, 24, 0.08);
    color: var(--danger);
}

.menu-divider {
    display: block;
    height: 1px;
    margin: 4px 2px;
    background: var(--line);
}

.account-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(16, 124, 65, 0.06);
}

.user-meta {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.user-meta strong,
.user-meta small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta strong {
    font-size: 14px;
}

.user-meta small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.layout {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.hero {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.public-home {
    display: grid;
    min-height: calc(100vh - 190px);
    place-items: center;
    padding: clamp(26px, 7vw, 72px) 0;
}

.public-card {
    position: relative;
    width: min(620px, 100%);
    overflow: hidden;
    padding: clamp(28px, 7vw, 54px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
        repeating-linear-gradient(90deg, rgba(16, 124, 65, 0.12) 0 48px, rgba(16, 124, 65, 0.18) 48px 96px);
    box-shadow: 0 24px 60px rgba(23, 33, 27, 0.14);
    text-align: center;
}

.public-card::before {
    content: "";
    position: absolute;
    inset: 16px;
    border: 2px solid rgba(16, 124, 65, 0.18);
    border-radius: 8px;
    pointer-events: none;
}

.public-card::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 50%;
    width: 118px;
    height: 118px;
    transform: translate(50%, -50%);
    border: 2px solid rgba(16, 124, 65, 0.12);
    border-radius: 50%;
    pointer-events: none;
}

.public-card h1 {
    position: relative;
    margin: 12px 0 0;
    font-size: clamp(28px, 7vw, 44px);
}

.sport-badge {
    position: relative;
    z-index: 1;
    display: inline-grid;
    width: 70px;
    height: 70px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 14px 28px rgba(16, 124, 65, 0.28);
}

.sport-badge::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 2px solid rgba(228, 179, 61, 0.74);
    border-radius: 50%;
    animation: pulse-ring 1.8s ease-out infinite;
}

.sport-badge svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-actions {
    position: relative;
    z-index: 1;
    justify-content: center;
    margin-top: 24px;
}

.platform-dashboard {
    display: grid;
    gap: 18px;
}

.tournament-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 20px;
}

@media (max-width: 1060px) {
    .tournament-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .tournament-grid { grid-template-columns: 1fr; gap: 14px; }
}

.tournament-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(16, 124, 65, 0.14);
    border-radius: var(--theme-radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88)),
        repeating-linear-gradient(90deg, rgba(16, 124, 65, 0.08) 0 34px, rgba(228, 179, 61, 0.08) 34px 68px);
    box-shadow: var(--theme-shadow);
}

.tournament-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tournament-card h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.tournament-card-head a {
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mini-stats span {
    min-height: 58px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--theme-radius);
    background: rgba(255, 255, 255, 0.86);
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.mini-stats strong {
    display: block;
    color: var(--ink);
    font-size: 23px;
    line-height: 1.1;
}

.tournament-theme {
    position: relative;
    isolation: isolate;
    margin: -8px 0 0;
    padding: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: var(--theme-radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.52)),
        repeating-linear-gradient(135deg, rgba(16, 124, 65, 0.08) 0 1px, transparent 1px 18px),
        var(--tournament-bg);
}

.tournament-theme::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(16, 124, 65, 0.12), transparent 32%, rgba(228, 179, 61, 0.14)),
        linear-gradient(180deg, transparent 0 72%, rgba(255, 255, 255, 0.72));
    pointer-events: none;
}

.visitor-hero {
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
    gap: var(--theme-gap);
    margin-bottom: var(--theme-gap);
}

.tournament-hero .hero-main-card,
.hero-live-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(16, 124, 65, 0.18);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.84)),
        linear-gradient(90deg, rgba(16, 124, 65, 0.14), transparent 48%, rgba(228, 179, 61, 0.12));
    box-shadow: 0 22px 52px rgba(23, 33, 27, 0.14);
}

.tournament-hero .hero-main-card::after {
    content: "";
    position: absolute;
    inset: auto -44px -52px auto;
    width: 230px;
    height: 150px;
    border: 18px solid rgba(16, 124, 65, 0.08);
    border-left-width: 0;
    border-radius: 80px 0 0 80px;
    pointer-events: none;
}

.hero-kicker,
.hero-highlights span,
.live-card-head,
.match-meta span,
.live-card-link,
.toolbar-title,
.btn.with-icon,
.visitor-tabbar a {
    display: inline-flex;
    align-items: center;
}

.hero-kicker {
    gap: 8px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid rgba(16, 124, 65, 0.14);
    border-radius: 999px;
    background: rgba(16, 124, 65, 0.08);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 900;
}

.hero-kicker-icon,
.live-card-icon,
.panel-icon,
.toolbar-icon,
.stat-icon,
.row-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

.hero-kicker-icon {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: var(--tournament-primary);
    color: #fff;
}

.hero-kicker svg,
.hero-highlights svg,
.match-meta svg,
.live-card-link svg,
.toolbar-icon svg,
.btn.with-icon svg,
.visitor-tabbar svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.hero-main-card h1 {
    margin-top: 14px;
    font-size: 36px;
    line-height: 1.25;
}

.hero-main-card p {
    max-width: 680px;
    font-size: 16px;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.hero-highlights span {
    gap: 7px;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid rgba(16, 124, 65, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(23, 33, 27, 0.07);
}

.hero-highlights svg {
    color: var(--tournament-primary);
}

.hero-actions {
    margin-top: 18px;
}

.hero-live-card {
    display: grid;
    align-content: space-between;
    gap: 16px;
    min-height: 100%;
    padding: 20px;
    border: 1px solid rgba(16, 124, 65, 0.18);
    border-radius: var(--theme-radius);
}

.live-card-head {
    justify-content: space-between;
    gap: 10px;
}

.live-card-head strong {
    flex: 1 1 auto;
    font-size: 16px;
}

.live-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--tournament-accent), #f0c85b);
    color: #3c2b00;
    box-shadow: 0 12px 22px rgba(228, 179, 61, 0.22);
}

.live-card-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.matchup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 88px;
}

.matchup span {
    min-width: 0;
    padding: 11px 9px;
    border: 1px solid var(--line);
    border-radius: var(--theme-radius);
    background: rgba(255, 255, 255, 0.78);
    font-weight: 900;
    text-align: center;
    overflow-wrap: anywhere;
}

.matchup b {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--tournament-primary);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0;
    box-shadow: 0 10px 24px rgba(16, 124, 65, 0.24);
}

.match-meta {
    display: grid;
    gap: 8px;
}

.match-meta span {
    gap: 8px;
    min-height: 34px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.match-meta svg {
    color: var(--tournament-primary);
}

.live-card-link {
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: var(--theme-radius);
    background: rgba(16, 124, 65, 0.09);
    color: var(--primary-dark);
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease;
}

.live-card-link:hover {
    background: rgba(16, 124, 65, 0.15);
    transform: translateY(-1px);
}

.live-empty {
    padding: 14px 0;
}

.tournament-stats {
    gap: var(--theme-gap);
    margin: 0 0 18px;
}

.app-stat {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon value"
        "icon label";
    align-items: center;
    column-gap: 12px;
    min-height: 94px;
    padding: 16px;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82)),
        linear-gradient(90deg, rgba(16, 124, 65, 0.1), transparent);
}

.app-stat::after {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 3px solid rgba(16, 124, 65, 0.22);
    pointer-events: none;
}

.app-stat .stat-icon {
    grid-area: icon;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--tournament-primary);
    color: #fff;
    box-shadow: 0 12px 22px rgba(16, 124, 65, 0.2);
}

.app-stat .stat-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.app-stat strong {
    grid-area: value;
    font-size: 32px;
    line-height: 1;
}

.app-stat > span:last-child {
    grid-area: label;
    color: var(--muted);
    font-size: 13px;
}

.mobile-app-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--theme-gap);
    margin: 18px 0 22px;
}

.app-icon-card {
    position: relative;
    isolation: isolate;
    display: grid;
    gap: 8px;
    place-items: center;
    min-height: 140px;
    padding: 14px 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: var(--theme-radius);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.84)),
        linear-gradient(180deg, rgba(16, 124, 65, 0.1), transparent);
    color: var(--ink);
    text-align: center;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(23, 33, 27, 0.1);
    animation: app-card-enter 0.48s ease both;
    animation-delay: calc(var(--item-order, 0) * 55ms);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-icon-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    transform: translateX(120%);
    transition: transform 0.6s ease;
}

.app-icon-card:hover {
    border-color: var(--tournament-primary);
    box-shadow: 0 22px 42px rgba(16, 124, 65, 0.2);
    transform: translateY(-4px) scale(1.015);
}

.app-icon-card:hover .app-icon {
    transform: translateY(-2px) scale(1.06);
}

.app-icon-card:hover::before {
    transform: translateX(-120%);
}

.app-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: var(--theme-icon-size);
    height: var(--theme-icon-size);
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--tournament-primary), #083f25);
    color: #fff;
    box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.16), 0 12px 24px rgba(16, 124, 65, 0.24);
    transition: transform 0.2s ease;
}

.app-icon-card:nth-child(2) .app-icon {
    background: linear-gradient(135deg, #1769aa, #0f426e);
}

.app-icon-card:nth-child(3) .app-icon {
    background: linear-gradient(135deg, #d28712, #7f4f05);
}

.app-icon-card:nth-child(4) .app-icon {
    background: linear-gradient(135deg, #c03b2b, #7d1f17);
}

.app-icon-card:nth-child(5) .app-icon {
    background: linear-gradient(135deg, #4764b6, #273d85);
}

.app-icon-card:nth-child(6) .app-icon {
    background: linear-gradient(135deg, #0f8a7a, #075c52);
}

.app-icon svg {
    width: 55%;
    height: 55%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.solid-icons .app-icon svg {
    fill: rgba(255, 255, 255, 0.25);
    stroke-width: 1.5;
}

.app-icon-card strong,
.app-icon-card small {
    position: relative;
    z-index: 1;
}

.app-icon-card strong {
    font-size: 14px;
}

.app-icon-card small {
    color: var(--muted);
    font-weight: 800;
}

.app-card-arrow {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 1;
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
}

.app-card-arrow svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--theme-gap);
    margin-bottom: 18px;
}

.app-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.86)),
        linear-gradient(180deg, rgba(16, 124, 65, 0.08), transparent);
}

.panel-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.panel-title-row h2 {
    margin: 0;
    font-size: 19px;
}

.panel-icon,
.toolbar-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(16, 124, 65, 0.1);
    color: var(--tournament-primary);
}

.panel-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.mini-row {
    display: grid;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.mini-row.icon-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 58px;
}

.mini-row:last-child {
    border-bottom: 0;
}

.mini-row span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.mini-row .row-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(16, 124, 65, 0.08);
    color: var(--tournament-primary);
}

.mini-row .row-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.mini-row .row-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mini-row .row-copy strong {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.mini-row .row-copy span {
    color: var(--muted);
}

.empty.compact {
    padding: 10px 0;
    text-align: right;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.checkbox-line input {
    width: auto;
    min-height: auto;
}

@keyframes pulse-ring {
    0% {
        opacity: 0.8;
        transform: scale(0.9);
    }

    100% {
        opacity: 0;
        transform: scale(1.22);
    }
}

@keyframes app-card-enter {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ripple-pop {
    to {
        opacity: 0;
        transform: scale(3);
    }
}

.panel,
.stat,
.card {
    border: 1px solid var(--line);
    border-radius: var(--theme-radius);
    background: var(--surface);
    box-shadow: var(--theme-shadow);
}

.panel {
    padding: 22px;
}

.panel h1,
.panel h2,
.section-title {
    margin: 0 0 12px;
    font-size: 24px;
}

.panel p {
    margin: 0;
    color: var(--muted);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat {
    padding: 18px;
}

.stat strong {
    display: block;
    font-size: 30px;
}

.stat span {
    color: var(--muted);
    font-weight: 700;
}

.stats .app-stat {
    padding: 16px;
}

.stats .app-stat strong {
    grid-area: value;
    font-size: 32px;
    line-height: 1;
}

.stats .app-stat .stat-icon {
    color: #fff;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 22px 0 12px;
}

.section-toolbar {
    margin-top: 24px;
}

.toolbar-title {
    gap: 10px;
}

.toolbar-title .section-title {
    margin: 0;
}

.toolbar-icon svg {
    width: 20px;
    height: 20px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn,
button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover,
button:hover {
    box-shadow: 0 10px 22px rgba(16, 124, 65, 0.16);
    transform: translateY(-1px);
}

.btn.with-icon,
button.with-icon {
    gap: 8px;
}

.btn.with-icon > span,
button.with-icon > span {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
}

.btn.secondary.with-icon > span {
    background: rgba(16, 124, 65, 0.08);
    color: var(--primary-dark);
}

.touch-ripple {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-pop 0.56s ease-out forwards;
}

.btn.secondary {
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
}

.btn.danger,
button.danger {
    background: var(--danger);
}

.google-btn {
    gap: 9px;
}

.google-icon {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: #2f66d0;
    font-weight: 900;
    line-height: 1;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 16px 32px rgba(23, 33, 27, 0.08);
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    vertical-align: middle;
}

th {
    background: #eef5ed;
    color: #304238;
    font-size: 14px;
}

tbody tr {
    transition: background 0.16s ease, transform 0.16s ease;
}

tbody tr:hover {
    background: rgba(16, 124, 65, 0.045);
}

tr:last-child td {
    border-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid .wide {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.tag-info {
    background: #e7f0fa;
    color: var(--info);
}

.tag-live {
    background: #fff1cc;
    color: #8a5a00;
}

.tag-success {
    background: #e6f5eb;
    color: var(--primary-dark);
}

.tag-muted {
    background: #edf0ee;
    color: var(--muted);
}

.score {
    font-size: 18px;
    font-weight: 900;
}

.empty {
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.hint {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.visitor-tabbar {
    display: none;
}

.visitor-tabbar a {
    justify-content: center;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    text-decoration: none;
}

.visitor-tabbar span {
    display: inline-grid;
    place-items: center;
}

.visitor-tabbar strong {
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.reveal-ready {
    opacity: 0;
    transform: translateY(14px);
}

.reveal-ready.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 800;
}

.alert.success {
    background: #e6f5eb;
    color: var(--primary-dark);
}

.alert.error {
    background: #fdebea;
    color: var(--danger);
}

.site-footer {
    padding: 22px 16px 32px;
    color: var(--muted);
    text-align: center;
}

.site-footer a {
    color: var(--primary-dark);
    font-weight: 800;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 780px) {
    .layout {
        width: calc(100% - 18px);
        margin: 14px auto 42px;
    }

    .hero,
    .stats,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: center;
        flex-direction: row;
        gap: 10px;
        min-height: 62px;
        padding: 9px 10px;
    }

    .brand-link {
        flex: 1 1 auto;
        min-width: 0;
    }

    .brand-logo,
    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand {
        font-size: 16px;
    }

    .topbar-actions,
    .compact-actions {
        width: auto;
        align-items: center;
        justify-content: flex-end;
        gap: 7px;
    }

    .menu-trigger {
        min-height: 40px;
        padding: 8px 10px;
    }

    .menu-trigger strong {
        display: none;
    }

    .avatar-trigger {
        min-width: 46px;
        min-height: 40px;
        padding: 3px 5px;
    }

    .avatar-trigger .trigger-chevron {
        display: none;
    }

    .dropdown-panel {
        top: calc(100% + 8px);
        width: min(300px, calc(100vw - 18px));
    }

    .nav-menu .dropdown-panel,
    .account-menu .dropdown-panel {
        left: 0;
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .actions .btn,
    .actions button {
        flex: 1 1 auto;
    }

    .auth-actions .btn {
        flex: 1 1 100%;
    }

    .public-home {
        min-height: calc(100vh - 230px);
        padding: 24px 0;
    }

    .public-card {
        padding: 30px 18px;
    }

    .public-card::before {
        inset: 10px;
    }

    .tournament-theme {
        padding: 10px 10px 96px;
    }

    .visitor-hero {
        gap: 10px;
    }

    .hero-main-card h1 {
        font-size: 28px;
    }

    .hero-highlights {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-highlights span {
        justify-content: center;
        min-width: 0;
        padding: 7px 6px;
        text-align: center;
    }

    .matchup {
        min-height: 72px;
    }

    .matchup b {
        width: 36px;
        height: 36px;
    }

    .tournament-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .tournament-stats .app-stat {
        grid-template-columns: 1fr;
        grid-template-areas:
            "icon"
            "value"
            "label";
        justify-items: center;
        min-height: 112px;
        padding: 12px 6px;
        text-align: center;
    }

    .tournament-stats .app-stat .stat-icon {
        width: 42px;
        height: 42px;
    }

    .tournament-stats .app-stat strong {
        font-size: 26px;
    }

    .mobile-app-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .app-icon-card {
        min-height: 118px;
        padding: 12px 8px;
    }

    .dashboard-panels {
        grid-template-columns: 1fr;
    }

    .panel-title-row h2 {
        font-size: 18px;
    }

    .toolbar-title {
        align-items: flex-start;
    }

    .visitor-tabbar {
        position: fixed;
        right: 12px;
        bottom: 10px;
        left: 12px;
        z-index: 40;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        padding: 6px;
        border: 1px solid rgba(16, 124, 65, 0.14);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 18px 42px rgba(23, 33, 27, 0.22);
        backdrop-filter: blur(16px);
    }

    .visitor-tabbar a {
        display: grid;
        min-height: 54px;
        place-items: center;
        padding: 7px 3px;
        border-radius: 17px;
        transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
    }

    .visitor-tabbar a.active {
        background: var(--tournament-primary);
        color: #fff;
        box-shadow: 0 10px 22px rgba(16, 124, 65, 0.24);
    }

    .visitor-tabbar a:active {
        transform: scale(0.96);
    }

    .visitor-tabbar span {
        width: 24px;
        height: 24px;
    }

    .tournament-card-head,
    .mini-stats {
        grid-template-columns: 1fr;
    }

    .tournament-card-head {
        flex-direction: column;
    }
}

@media (max-width: 430px) {
    .hero-highlights,
    .tournament-stats,
    .mobile-app-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-highlights span:last-child,
    .tournament-stats .app-stat:last-child {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-ready {
        opacity: 1;
        transform: none;
    }
}

/* Professional tournament cards on user home */
.pro-tournament-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    gap: 18px;
    min-height: 330px;
    padding: 20px;
    border-color: color-mix(in srgb, var(--card-primary, #107c41) 24%, var(--card-line, #dbe4d8));
    border-radius: calc(var(--theme-radius) + 8px);
    color: var(--card-ink, var(--ink));
    background:
        radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--card-accent, #e4b33d) 32%, transparent) 0 22%, transparent 43%),
        radial-gradient(circle at 95% 12%, color-mix(in srgb, var(--card-primary, #107c41) 24%, transparent) 0 18%, transparent 38%),
        linear-gradient(145deg, color-mix(in srgb, var(--card-surface, #fff) 92%, var(--card-bg, #f5f7f2)), color-mix(in srgb, var(--card-bg, #f5f7f2) 88%, #fff));
    box-shadow:
        0 24px 60px color-mix(in srgb, var(--card-primary, #107c41) 16%, transparent),
        0 2px 0 rgba(255,255,255,0.82) inset;
    transform: translateZ(0);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.pro-tournament-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(120deg, transparent 0 22%, rgba(255,255,255,.48) 34%, transparent 46%),
        repeating-linear-gradient(135deg, color-mix(in srgb, var(--card-primary, #107c41) 8%, transparent) 0 1px, transparent 1px 18px);
    opacity: .7;
    transform: translateX(28%);
    transition: transform .7s ease, opacity .28s ease;
}

.pro-tournament-card::after {
    content: '';
    position: absolute;
    inset: auto -38px -54px auto;
    width: 170px;
    height: 170px;
    border: 26px solid color-mix(in srgb, var(--card-primary, #107c41) 12%, transparent);
    border-radius: 999px;
    z-index: -1;
}

.pro-tournament-card:hover {
    transform: translateY(-7px) scale(1.01);
    border-color: color-mix(in srgb, var(--card-primary, #107c41) 48%, var(--card-accent, #e4b33d));
    box-shadow:
        0 30px 74px color-mix(in srgb, var(--card-primary, #107c41) 22%, transparent),
        0 2px 0 rgba(255,255,255,0.9) inset;
}

.pro-tournament-card:hover::before {
    transform: translateX(-24%);
    opacity: .95;
}

.tournament-card-glow {
    position: absolute;
    inset: -80px auto auto -70px;
    width: 190px;
    height: 190px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--card-accent, #e4b33d) 28%, transparent);
    filter: blur(26px);
    pointer-events: none;
    animation: card-glow-float 5.5s ease-in-out infinite;
}

.tournament-card-title {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
}

.tournament-logo-mark,
.next-match-icon,
.pro-mini-stats i {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--card-primary, var(--primary));
    background:
        linear-gradient(145deg, rgba(255,255,255,.9), color-mix(in srgb, var(--card-primary, #107c41) 9%, #fff)),
        color-mix(in srgb, var(--card-accent, #e4b33d) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--card-primary, #107c41) 18%, transparent);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--card-primary, #107c41) 14%, transparent);
}

.tournament-logo-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
}


.tournament-logo-mark.has-image {
    overflow: hidden;
    padding: 0;
    background: #fff;
}

.tournament-logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .28s ease, filter .28s ease;
}

.pro-tournament-card:hover .tournament-logo-mark img {
    transform: scale(1.08) rotate(-1deg);
    filter: saturate(1.08) contrast(1.04);
}

.tournament-logo-mark svg,
.next-match-icon svg,
.pro-mini-stats i svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.85;
}

.tournament-kicker {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--card-muted, var(--muted));
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
}

.pro-tournament-card .tournament-card-head {
    position: relative;
    z-index: 1;
}

.pro-tournament-card h2 {
    color: var(--card-ink, var(--ink));
    font-size: 22px;
    line-height: 1.35;
}

.pro-tournament-card .tournament-card-head a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: color-mix(in srgb, var(--card-primary, #107c41) 88%, #0b2d1a);
}

.pro-tournament-card .tournament-card-head a span,
.tournament-card-actions .with-icon span {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.pro-tournament-card .tournament-card-head a svg,
.tournament-card-actions svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.tournament-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 9px 12px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--card-primary, #107c41), color-mix(in srgb, var(--card-primary, #107c41) 60%, var(--card-accent, #e4b33d)));
    box-shadow: 0 12px 28px color-mix(in srgb, var(--card-primary, #107c41) 22%, transparent);
    font-size: 13px;
    font-weight: 900;
}

.pro-mini-stats {
    position: relative;
    z-index: 1;
}

.pro-mini-stats span {
    display: grid;
    gap: 5px;
    min-height: 92px;
    padding: 12px 8px;
    border-color: color-mix(in srgb, var(--card-primary, #107c41) 14%, var(--card-line, #dbe4d8));
    border-radius: 18px;
    color: var(--card-muted, var(--muted));
    background: rgba(255,255,255,.68);
    backdrop-filter: blur(10px);
    transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.pro-mini-stats span:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--card-primary, #107c41) 36%, var(--card-accent, #e4b33d));
    background: rgba(255,255,255,.88);
}

.pro-mini-stats i {
    width: 34px;
    height: 34px;
    margin: 0 auto 1px;
    border-radius: 13px;
    font-style: normal;
}

.pro-mini-stats i svg {
    width: 19px;
    height: 19px;
}

.pro-mini-stats strong {
    color: var(--card-ink, var(--ink));
    font-size: 25px;
}

.pro-mini-stats small {
    font-size: 12px;
    font-weight: 900;
}

.next-match-strip {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid color-mix(in srgb, var(--card-accent, #e4b33d) 28%, var(--card-line, #dbe4d8));
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,.78), color-mix(in srgb, var(--card-accent, #e4b33d) 10%, #fff));
    box-shadow: 0 12px 34px rgba(23,33,27,.08);
}

.next-match-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: color-mix(in srgb, var(--card-primary, #107c41) 82%, var(--card-accent, #e4b33d));
}

.next-match-strip small {
    display: block;
    color: var(--card-muted, var(--muted));
    font-size: 12px;
    font-weight: 900;
}

.next-match-strip strong {
    color: var(--card-ink, var(--ink));
    font-size: 14px;
}

.tournament-card-actions {
    position: relative;
    z-index: 1;
}

.tournament-card-actions .btn {
    border-radius: 16px;
}

.tournament-card-actions .tournament-open-btn {
    border-color: transparent;
    background: linear-gradient(135deg, var(--card-primary, #107c41), color-mix(in srgb, var(--card-primary, #107c41) 58%, var(--card-accent, #e4b33d)));
    box-shadow: 0 14px 28px color-mix(in srgb, var(--card-primary, #107c41) 24%, transparent);
}


.tournament-card-actions .secondary:first-of-type {
    font-weight: 900;
    border-color: color-mix(in srgb, var(--card-accent, #e4b33d) 38%, var(--card-line, #dbe4d8));
    background: linear-gradient(135deg, rgba(255,255,255,.78), color-mix(in srgb, var(--card-accent, #e4b33d) 13%, #fff));
}

.tournament-card-actions .secondary {
    color: color-mix(in srgb, var(--card-primary, #107c41) 88%, #0b2d1a);
    border-color: color-mix(in srgb, var(--card-primary, #107c41) 18%, var(--card-line, #dbe4d8));
    background: rgba(255,255,255,.64);
    backdrop-filter: blur(10px);
}

@keyframes card-glow-float {
    0%, 100% { transform: translate3d(0,0,0) scale(1); opacity: .72; }
    50% { transform: translate3d(18px,18px,0) scale(1.08); opacity: .95; }
}

@media (max-width: 720px) {
    .pro-tournament-card {
        min-height: auto;
        padding: 16px;
    }

    .tournament-logo-mark {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .pro-tournament-card h2 {
        font-size: 19px;
    }

    .pro-mini-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tournament-card-actions .btn {
        width: 100%;
    }
}

/* Comprehensive tournament settings */
.settings-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
    border-radius: 28px;
    background:
        radial-gradient(circle at 12% 20%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 34%),
        radial-gradient(circle at 90% 80%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 36%),
        linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, var(--primary) 6%), var(--surface));
    box-shadow: 0 24px 60px rgba(23, 33, 27, .10);
}

.settings-hero::after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    inset-inline-end: -100px;
    top: -120px;
    border: 35px solid color-mix(in srgb, var(--accent) 14%, transparent);
    border-radius: 50%;
    pointer-events: none;
}

.settings-hero-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.settings-hero-logo {
    width: 78px;
    height: 78px;
    flex: 0 0 78px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent)));
    box-shadow: 0 18px 36px color-mix(in srgb, var(--primary) 25%, transparent);
}

.settings-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.settings-hero-logo svg { width: 38px; }
.settings-kicker { display: block; margin-bottom: 6px; color: var(--primary); font-size: 13px; font-weight: 900; }
.settings-hero h1 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 38px); }
.settings-hero p { margin: 0; color: var(--muted); font-weight: 700; }

.settings-hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    gap: 10px;
}

.settings-hero-stats span {
    display: grid;
    min-width: 88px;
    padding: 14px 16px;
    text-align: center;
    border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    backdrop-filter: blur(12px);
}
.settings-hero-stats strong { font-size: 23px; color: var(--primary); }
.settings-hero-stats small { color: var(--muted); font-weight: 800; }

.settings-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.settings-app-icon {
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    border: 1px solid var(--line);
    border-radius: 25px;
    color: var(--ink);
    text-align: center;
    text-decoration: none;
    background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 92%, var(--primary) 8%));
    box-shadow: 0 12px 28px rgba(23, 33, 27, .07);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.settings-app-icon::before {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    top: -42px;
    inset-inline-end: -32px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.settings-app-icon > span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 19px;
    color: #fff;
    background: linear-gradient(145deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent)));
    box-shadow: 0 13px 24px color-mix(in srgb, var(--primary) 22%, transparent);
}
.settings-app-icon > span svg { width: 28px; height: 28px; }
.settings-app-icon strong { font-size: 15px; }
.settings-app-icon small { color: var(--muted); font-size: 11px; font-weight: 700; }
.settings-app-icon:hover, .settings-app-icon:focus-visible { transform: translateY(-5px); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); box-shadow: 0 20px 42px rgba(23,33,27,.13); }
.settings-app-icon.is-active { border-color: color-mix(in srgb, var(--primary) 38%, var(--line)); }
.settings-app-icon.is-warning > span { background: linear-gradient(145deg, #d97706, #f59e0b); }
.settings-app-icon.is-danger > span { background: linear-gradient(145deg, #b42318, #ef4444); }
.settings-app-icon.is-danger::before { background: rgba(239,68,68,.10); }

.settings-section {
    scroll-margin-top: 18px;
    margin-bottom: 24px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 18px 46px rgba(23,33,27,.075);
}

.settings-section:target {
    animation: settings-section-focus .8s ease;
}

.settings-section-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 23px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.settings-section-heading > span {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 11%, var(--surface));
}
.settings-section-heading svg { width: 27px; }
.settings-section-heading h2 { margin: 0 0 5px; font-size: 22px; }
.settings-section-heading p { margin: 0; color: var(--muted); line-height: 1.7; }

.settings-form { display: grid; gap: 22px; }
.settings-form label small { display: block; margin-top: 6px; color: var(--muted); }
.settings-form input[type="text"], .settings-form input[type="url"], .settings-form input[type="number"], .settings-form input[type="date"], .settings-form select, .settings-form textarea {
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.settings-form input:focus, .settings-form select:focus, .settings-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}

.settings-logo-editor {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px dashed color-mix(in srgb, var(--primary) 38%, var(--line));
    border-radius: 22px;
    background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}
.settings-logo-preview {
    width: 100px;
    height: 100px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 24px;
    color: var(--primary);
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(23,33,27,.12);
}
.settings-logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.settings-logo-preview svg { width: 40px; }
.settings-upload-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    cursor: pointer;
}
.settings-upload-button > svg { width: 28px; color: var(--primary); }
.settings-upload-button span { display: grid; gap: 4px; }
.settings-upload-button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }

.settings-savebar {
    position: sticky;
    bottom: 12px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 91%, transparent);
    box-shadow: 0 14px 40px rgba(23,33,27,.13);
    backdrop-filter: blur(16px);
}
.settings-savebar > span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.settings-savebar > span svg { width: 20px; color: var(--primary); }

.settings-switch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.settings-switch {
    display: grid;
    grid-template-columns: 48px minmax(0,1fr);
    align-items: center;
    gap: 14px;
    min-height: 92px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 94%, var(--primary) 6%);
    cursor: pointer;
}
.settings-switch input { position: absolute; opacity: 0; pointer-events: none; }
.settings-switch > span {
    position: relative;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 26%, var(--surface));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted) 22%, transparent);
    transition: background .22s ease;
}
.settings-switch > span::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    top: 3px;
    inset-inline-start: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,.22);
    transition: transform .22s ease;
}
.settings-switch input:checked + span { background: var(--primary); }
.settings-switch input:checked + span::after { transform: translateX(-20px); }
.settings-switch div { display: grid; gap: 4px; }
.settings-switch small { color: var(--muted); line-height: 1.55; }
.settings-switch-prominent { grid-template-columns: 54px minmax(0,1fr); min-height: 110px; border-color: color-mix(in srgb, #d97706 35%, var(--line)); background: color-mix(in srgb, #f59e0b 7%, var(--surface)); }

.format-live-summary, .settings-locked-card, .danger-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border-radius: 21px;
}
.format-live-summary { border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line)); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.format-live-summary > span, .settings-locked-card > svg, .danger-summary > span {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--primary);
    background: var(--surface);
}
.format-live-summary > span svg, .danger-summary > span svg { width: 26px; }
.format-live-summary p, .settings-locked-card p, .danger-summary p { margin: 4px 0 0; color: var(--muted); line-height: 1.7; }
.maintenance-active { border-color: rgba(217,119,6,.4); box-shadow: 0 18px 46px rgba(217,119,6,.10); }
.owner-only-note { color: #9a6700 !important; }
.settings-locked-card { border: 1px dashed var(--line); background: color-mix(in srgb, var(--muted) 5%, var(--surface)); }

.danger-zone { border-color: rgba(239,68,68,.3); background: linear-gradient(145deg, var(--surface), rgba(239,68,68,.035)); }
.danger-zone .settings-section-heading > span { color: #b42318; background: rgba(239,68,68,.1); }
.danger-summary { justify-content: space-between; border: 1px solid rgba(239,68,68,.23); background: rgba(239,68,68,.055); }
.danger-summary > span { color: #b42318; }
.danger-summary > div { flex: 1; }
.danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 18px; color: #fff; background: linear-gradient(135deg,#b42318,#ef4444); box-shadow: 0 12px 24px rgba(180,35,24,.2); cursor: pointer; font-weight: 900; }
.danger-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.delete-dialog {
    width: min(520px, calc(100% - 28px));
    padding: 0;
    border: 0;
    border-radius: 28px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: 0 40px 100px rgba(0,0,0,.28);
}
.delete-dialog::backdrop { background: rgba(8,18,12,.62); backdrop-filter: blur(5px); }
.delete-dialog form { position: relative; display: grid; gap: 17px; padding: 30px; text-align: center; }
.dialog-close { position: absolute; top: 15px; inset-inline-end: 15px; width: 36px; height: 36px; padding: 0; border-radius: 50%; color: var(--muted); background: color-mix(in srgb, var(--muted) 9%, var(--surface)); }
.dialog-danger-icon { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto; border-radius: 22px; color: #b42318; background: rgba(239,68,68,.1); }
.dialog-danger-icon svg { width: 32px; }
.delete-dialog h2 { margin: 0; }
.delete-dialog p { margin: 0; color: var(--muted); line-height: 1.7; }
.delete-dialog label { text-align: start; }
.delete-confirm-check { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border-radius: 15px; background: rgba(239,68,68,.06); }
.delete-confirm-check input { margin-top: 4px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@keyframes settings-section-focus {
    0% { transform: scale(.99); box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 0%, transparent); }
    45% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 12%, transparent); }
    100% { transform: scale(1); box-shadow: 0 18px 46px rgba(23,33,27,.075); }
}

@media (max-width: 800px) {
    .settings-hero { align-items: stretch; flex-direction: column; padding: 20px; }
    .settings-hero-stats { grid-template-columns: repeat(3, 1fr); }
    .settings-app-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .settings-section { padding: 18px; border-radius: 22px; }
    .settings-switch-grid { grid-template-columns: 1fr; }
    .settings-savebar { position: static; flex-direction: column; align-items: stretch; }
    .settings-savebar button { width: 100%; }
    .danger-summary { align-items: stretch; flex-direction: column; }
    .danger-button { width: 100%; }
}

@media (max-width: 520px) {
    .settings-hero-brand { align-items: flex-start; }
    .settings-hero-logo { width: 62px; height: 62px; flex-basis: 62px; border-radius: 20px; }
    .settings-hero-stats span { min-width: 0; padding: 11px 8px; }
    .settings-app-icon { min-height: 132px; border-radius: 21px; }
    .settings-app-icon > span { width: 52px; height: 52px; }
    .settings-logo-editor { grid-template-columns: 1fr; text-align: center; }
    .settings-logo-preview { margin: 0 auto; }
    .settings-upload-button { justify-content: center; }
    .dialog-actions { grid-template-columns: 1fr; }
}

.settings-section [hidden], .settings-switch-grid [hidden] { display: none !important; }

/* Tournament subscription & Thawani payment */
.registration-payment-panel,
.payment-summary,
.subscription-status-card,
.subscription-renew-card,
.subscription-action-panel,
.payment-pricing-panel,
.payments-list-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, var(--primary) 4%), var(--surface));
    box-shadow: 0 18px 48px rgba(16, 42, 27, .07);
}
.registration-payment-panel { display: grid; gap: 18px; padding: 20px; margin-bottom: 22px; overflow: hidden; position: relative; }
.registration-payment-panel::after { content:""; position:absolute; width:190px; height:190px; inset-inline-end:-75px; top:-105px; border-radius:50%; background:radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 68%); pointer-events:none; }
.registration-payment-head { display:flex; align-items:center; gap:14px; position:relative; z-index:1; }
.registration-payment-icon,
.payment-result-icon,
.subscription-icon,
.subscription-card-icon {
    display:grid; place-items:center; flex:0 0 auto; color:var(--primary);
    background:color-mix(in srgb, var(--primary) 10%, var(--surface));
    border:1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.registration-payment-icon { width:54px; height:54px; border-radius:18px; }
.registration-payment-icon svg, .payment-result-icon svg, .subscription-icon svg, .subscription-card-icon svg { width:27px; height:27px; }
.registration-payment-head h3 { margin:0 0 4px; }
.registration-payment-head p { margin:0; color:var(--muted); line-height:1.6; }
.registration-price-card { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:16px 18px; border-radius:19px; color:#fff; background:linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 68%, #071c10)); box-shadow:0 15px 32px color-mix(in srgb, var(--primary) 22%, transparent); }
.registration-price-card strong { font-size:1.5rem; }
.registration-price-card span { color:rgba(255,255,255,.8); font-size:.9rem; }
.payment-steps { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.payment-steps span { position:relative; display:grid; gap:5px; padding:13px; border-radius:16px; text-align:center; color:var(--muted); background:color-mix(in srgb, var(--muted) 6%, var(--surface)); border:1px solid var(--line); font-size:.84rem; }
.payment-steps b { color:var(--ink); }
.payment-summary { display:grid; gap:13px; padding:19px; }
.payment-summary > div { display:flex; align-items:center; justify-content:space-between; gap:15px; padding-bottom:12px; border-bottom:1px dashed var(--line); }
.payment-summary > div:last-child { padding-bottom:0; border-bottom:0; }
.payment-summary span { color:var(--muted); }
.payment-security-note { display:flex; align-items:flex-start; gap:10px; padding:13px 15px; margin:0; border-radius:16px; color:color-mix(in srgb, var(--primary) 78%, var(--ink)); background:color-mix(in srgb, var(--primary) 7%, var(--surface)); line-height:1.65; }
.payment-security-note svg { width:21px; flex:0 0 21px; margin-top:2px; }

.payment-result-shell { min-height:70vh; display:grid; place-items:center; padding:30px 16px; }
.payment-result-card { width:min(610px,100%); display:grid; justify-items:center; gap:16px; padding:34px; border:1px solid var(--line); border-radius:30px; text-align:center; background:var(--surface); box-shadow:0 28px 80px rgba(10,35,20,.12); }
.payment-result-card h1 { margin:0; }
.payment-result-card p { margin:0; color:var(--muted); line-height:1.75; }
.payment-result-icon { width:78px; height:78px; border-radius:26px; }
.payment-result-card.is-success .payment-result-icon { color:#067647; background:#ecfdf3; border-color:#a6f4c5; }
.payment-result-card.is-error .payment-result-icon { color:#b42318; background:#fef3f2; border-color:#fecdca; }
.payment-result-card.is-loading .payment-result-icon svg { animation:payment-spin 1s linear infinite; }
.payment-result-meta { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.payment-result-meta > div { padding:13px; border-radius:16px; background:color-mix(in srgb, var(--muted) 6%, var(--surface)); }
.payment-result-meta span { display:block; color:var(--muted); font-size:.82rem; margin-bottom:4px; }
.payment-progress-track { width:100%; height:8px; overflow:hidden; border-radius:999px; background:color-mix(in srgb, var(--muted) 13%, var(--surface)); }
.payment-progress-track::after { content:""; display:block; width:38%; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--primary),var(--accent)); animation:payment-progress 1.3s ease-in-out infinite alternate; }
.payment-result-actions { width:100%; display:flex; justify-content:center; gap:10px; flex-wrap:wrap; }
.payment-result-actions .btn { min-width:150px; }

.subscription-hero { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:25px; margin-bottom:22px; border-radius:28px; color:#fff; background:linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 58%, #071b10)); box-shadow:0 23px 60px color-mix(in srgb, var(--primary) 22%, transparent); }
.subscription-hero-main { display:flex; align-items:center; gap:16px; }
.subscription-icon { width:66px; height:66px; border-radius:22px; color:#fff; background:rgba(255,255,255,.13); border-color:rgba(255,255,255,.22); }
.subscription-hero h1 { margin:0 0 5px; }
.subscription-hero p { margin:0; color:rgba(255,255,255,.76); }
.subscription-hero.is-expired { background:linear-gradient(135deg,#8f1d16,#d92d20); }
.subscription-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; }
.subscription-status-card, .subscription-renew-card, .subscription-action-panel { padding:22px; }
.subscription-status-card, .subscription-renew-card { display:grid; gap:16px; }
.subscription-card-icon { width:52px; height:52px; border-radius:18px; }
.subscription-status-card.is-active .subscription-card-icon { color:#067647; background:#ecfdf3; border-color:#a6f4c5; }
.subscription-status-card.is-expired .subscription-card-icon { color:#b42318; background:#fef3f2; border-color:#fecdca; }
.subscription-action-panel { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:18px; }
.subscription-action-panel p { margin:4px 0 0; color:var(--muted); }
.subscription-public-expired { min-height:70vh; display:grid; place-items:center; padding:24px; }
.subscription-public-expired .panel { width:min(620px,100%); padding:34px; text-align:center; }
.subscription-card-strip { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 13px; border-radius:14px; margin:12px 0; font-size:.87rem; }
.subscription-card-strip.is-active { color:#05603a; background:#ecfdf3; border:1px solid #a6f4c5; }
.subscription-card-strip.is-expired { color:#912018; background:#fef3f2; border:1px solid #fecdca; }

.payments-admin-hero { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:24px; margin-bottom:20px; border-radius:27px; color:#fff; background:linear-gradient(135deg,#102f1e,var(--primary)); box-shadow:0 22px 58px rgba(15,67,38,.2); }
.payments-admin-hero h1 { margin:0 0 5px; }
.payments-admin-hero p { margin:0; color:rgba(255,255,255,.74); }
.gateway-status { display:inline-flex; align-items:center; gap:8px; padding:9px 13px; border-radius:999px; font-weight:800; white-space:nowrap; }
.gateway-status.is-ready { color:#d1fadf; background:rgba(3,152,85,.22); border:1px solid rgba(166,244,197,.35); }
.gateway-status.is-error { color:#fee4e2; background:rgba(217,45,32,.24); border:1px solid rgba(254,205,202,.35); }
.payment-admin-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-bottom:18px; }
.payment-admin-stats .app-stat { min-height:112px; }
.payment-pricing-panel { padding:21px; margin-bottom:18px; }
.payment-pricing-panel form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) auto; align-items:end; gap:14px; }
.payments-list-panel { overflow:hidden; }
.payments-list-head { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:20px; border-bottom:1px solid var(--line); }
.payments-list-head h2 { margin:0; }
.payments-filter-form { display:flex; align-items:end; gap:9px; flex-wrap:wrap; }
.table-scroll { width:100%; overflow:auto; }
.payments-table { width:100%; min-width:1050px; border-collapse:collapse; }
.payments-table th, .payments-table td { padding:14px 13px; border-bottom:1px solid var(--line); text-align:start; vertical-align:middle; }
.payments-table th { position:sticky; top:0; z-index:1; color:var(--muted); background:color-mix(in srgb, var(--surface) 94%, var(--primary) 6%); font-size:.82rem; }
.payments-table tbody tr { transition:background .18s ease; }
.payments-table tbody tr:hover { background:color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.payment-error-row td { color:#b42318; background:#fef3f2; font-size:.83rem; }
.small-btn { min-height:36px; padding:7px 11px; border-radius:11px; font-size:.82rem; }
.muted { color:var(--muted); }

@keyframes payment-spin { to { transform:rotate(360deg); } }
@keyframes payment-progress { from { transform:translateX(-155%); } to { transform:translateX(255%); } }

@media (max-width:900px) {
    .payment-admin-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .payment-pricing-panel form { grid-template-columns:1fr 1fr; }
    .payment-pricing-panel form button { grid-column:1/-1; }
}
@media (max-width:700px) {
    .subscription-hero, .payments-admin-hero, .subscription-action-panel { align-items:stretch; flex-direction:column; }
    .subscription-grid { grid-template-columns:1fr; }
    .subscription-action-panel { grid-column:auto; }
    .payment-steps { grid-template-columns:1fr; }
    .payments-list-head { align-items:stretch; flex-direction:column; }
    .payments-filter-form > * { flex:1 1 140px; }
}
@media (max-width:520px) {
    .registration-price-card { align-items:flex-start; flex-direction:column; }
    .payment-result-card { padding:24px 18px; border-radius:24px; }
    .payment-result-meta, .payment-admin-stats, .payment-pricing-panel form { grid-template-columns:1fr; }
    .payment-pricing-panel form button { grid-column:auto; }
    .subscription-hero-main { align-items:flex-start; }
    .subscription-icon { width:56px; height:56px; border-radius:19px; }
}

/* Fine tuning for asynchronous payment state */
.payment-result-icon.is-loading svg { animation:payment-spin 1s linear infinite; }
.payment-progress-track::after { display:none; }
.payment-progress-track > span { display:block; width:12%; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--primary),var(--accent)); transition:width .35s ease; }
.payment-result-meta > span { display:block; padding:13px; border-radius:16px; background:color-mix(in srgb, var(--muted) 6%, var(--surface)); }
.payment-result-meta > span small { display:block; color:var(--muted); font-size:.82rem; margin-bottom:4px; }
.payment-result-meta > span strong { display:block; overflow-wrap:anywhere; }
.payment-summary.wide { grid-column:1/-1; }
.payment-summary.wide > span { display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:1px dashed var(--line); }
.payment-summary.wide > span:last-child { border-bottom:0; }
.payment-summary.wide svg { width:21px; color:var(--primary); flex:0 0 21px; }
.registration-payment-head > div:first-of-type { flex:1; }
@media (max-width:760px) {
    .registration-payment-head { align-items:stretch; flex-wrap:wrap; }
    .registration-price-card { flex:1 1 100%; }
}

/* Tournament timezone settings */
.timezone-control-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(260px,.75fr);gap:18px;align-items:stretch}.timezone-select-label{display:flex;flex-direction:column;gap:8px}.timezone-select-label select{min-height:52px}.timezone-select-label small{color:var(--muted);font-weight:700}.timezone-live-card{display:flex;align-items:center;gap:14px;padding:18px;border:1px solid color-mix(in srgb,var(--primary) 24%,var(--line));border-radius:22px;background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 8%,var(--surface)),var(--surface));box-shadow:0 14px 34px color-mix(in srgb,var(--primary) 10%,transparent)}.timezone-live-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:18px;color:#fff;background:linear-gradient(145deg,var(--primary),color-mix(in srgb,var(--primary) 64%,#071b10));box-shadow:0 12px 25px color-mix(in srgb,var(--primary) 24%,transparent)}.timezone-live-icon svg{width:27px;height:27px}.timezone-live-card div{display:grid;gap:3px}.timezone-live-card small,.timezone-live-card span{color:var(--muted);font-weight:700}.timezone-live-card strong{font-size:1.5rem;letter-spacing:.04em;font-variant-numeric:tabular-nums}

/* Compact payments administration */
.compact-payment-hero{padding:20px 22px;margin-bottom:16px}.compact-payment-hero h1{font-size:clamp(1.35rem,2.4vw,1.9rem)}.payment-admin-layout{display:grid;grid-template-columns:minmax(330px,370px) minmax(0,1fr);gap:16px;align-items:start}.payment-admin-sidebar{display:grid;gap:14px;position:sticky;top:14px}.payment-compact-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.payment-compact-stats>div{display:grid;grid-template-columns:34px 1fr;grid-template-areas:'icon label' 'icon value';column-gap:9px;align-items:center;min-height:72px;padding:12px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 10px 24px rgba(23,33,27,.07)}.payment-compact-stats>div>span{grid-area:icon;display:grid;place-items:center;width:34px;height:34px;border-radius:12px;color:var(--primary);background:color-mix(in srgb,var(--primary) 10%,var(--surface))}.payment-compact-stats svg{width:18px;height:18px}.payment-compact-stats small{grid-area:label;color:var(--muted);font-weight:700;font-size:.72rem}.payment-compact-stats strong{grid-area:value;font-size:.93rem;line-height:1.25;overflow-wrap:anywhere}.compact-pricing-panel{padding:16px}.compact-panel-title{display:flex;align-items:center;gap:10px;margin-bottom:13px}.compact-panel-title>span{display:grid;place-items:center;width:40px;height:40px;border-radius:14px;color:#fff;background:var(--primary)}.compact-panel-title svg{width:21px;height:21px}.compact-panel-title h2{margin:0;font-size:1rem}.compact-panel-title p{margin:2px 0 0;color:var(--muted);font-size:.78rem}.compact-price-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.compact-price-form label{display:grid;gap:6px;font-size:.8rem;font-weight:800}.compact-price-form input{min-height:43px}.compact-price-form button{grid-column:1/-1;width:100%;margin-top:2px}.compact-payments-panel{padding:17px;min-width:0}.compact-list-head{display:grid;gap:13px;margin-bottom:15px}.compact-list-head h2{margin:0}.compact-list-head p{margin:3px 0 0;color:var(--muted)}.compact-filter-form{display:grid;grid-template-columns:minmax(180px,1.6fr) minmax(130px,.7fr) minmax(120px,.65fr) auto auto;gap:8px;align-items:center}.compact-filter-form input,.compact-filter-form select{min-height:42px}.payment-records-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.payment-record-card{display:grid;gap:11px;padding:14px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(155deg,var(--surface),color-mix(in srgb,var(--primary) 2.5%,var(--surface)));box-shadow:0 10px 25px rgba(23,33,27,.06);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.payment-record-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--primary) 28%,var(--line));box-shadow:0 15px 32px rgba(23,33,27,.09)}.payment-record-top{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:9px;align-items:center}.payment-purpose-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;color:var(--primary);background:color-mix(in srgb,var(--primary) 10%,var(--surface))}.payment-purpose-icon svg{width:20px;height:20px}.payment-record-title{display:grid;gap:2px;min-width:0}.payment-record-title strong,.payment-record-title small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.payment-record-title small,.payment-record-user small{color:var(--muted)}.payment-record-user{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:13px;background:color-mix(in srgb,var(--primary) 4%,var(--surface))}.payment-record-user>span{color:var(--primary)}.payment-record-user>span svg{width:18px;height:18px}.payment-record-user div{display:grid;min-width:0}.payment-record-user strong,.payment-record-user small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.payment-record-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px}.payment-record-meta>span{display:grid;gap:2px;padding:9px 10px;border:1px solid var(--line);border-radius:13px}.payment-record-meta small,.payment-record-reference small{color:var(--muted);font-size:.72rem;font-weight:700}.payment-record-meta strong{font-size:.85rem}.payment-record-reference{display:grid;gap:4px}.payment-record-reference code{display:block;max-width:100%;padding:7px 9px;border-radius:10px;background:#f3f6f3;overflow:auto;font-size:.72rem}.payment-record-details{border-top:1px dashed var(--line);padding-top:8px}.payment-record-details summary{cursor:pointer;color:var(--primary);font-weight:800;font-size:.8rem}.payment-record-details p{margin:7px 0 0;font-size:.78rem}.payment-record-error{color:#b42318}.payment-record-action{display:flex;justify-content:flex-end}.payments-pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.payments-pagination span{color:var(--muted);font-weight:800;font-size:.82rem}.is-disabled{pointer-events:none;opacity:.45}

@media (max-width:980px){.payment-admin-layout{grid-template-columns:1fr}.payment-admin-sidebar{position:static}.payment-compact-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.compact-pricing-panel .compact-price-form{grid-template-columns:1fr 1fr}.compact-pricing-panel .compact-price-form button{grid-column:1/-1}.compact-filter-form{grid-template-columns:1fr 1fr}.compact-filter-form input{grid-column:1/-1}.payment-records-grid{grid-template-columns:1fr 1fr}}
@media (max-width:700px){.timezone-control-grid{grid-template-columns:1fr}.payment-compact-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-pricing-panel .compact-price-form,.compact-filter-form,.payment-records-grid{grid-template-columns:1fr}.compact-pricing-panel .compact-price-form button{grid-column:auto}.compact-filter-form input{grid-column:auto}.compact-payment-hero{padding:18px}.payment-record-top{grid-template-columns:38px minmax(0,1fr)}.payment-record-top .tag{grid-column:2;justify-self:start}.payments-pagination{justify-content:space-between}.payments-pagination span{font-size:.74rem}}


/* Central subscriptions page on btola.net */
.subscriptions-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
    padding: 26px;
    border: 1px solid rgba(16, 124, 65, .16);
    border-radius: 28px;
    background:
        radial-gradient(circle at 12% 15%, rgba(228, 179, 61, .22), transparent 35%),
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,249,244,.92));
    box-shadow: 0 22px 54px rgba(23,33,27,.1);
}

.subscriptions-hero::after {
    content: '';
    position: absolute;
    inset: auto -54px -76px auto;
    width: 220px;
    height: 220px;
    border: 30px solid rgba(16,124,65,.07);
    border-radius: 999px;
    pointer-events: none;
}

.subscriptions-hero h1 { margin: 4px 0 3px; font-size: clamp(27px, 4vw, 40px); }
.subscriptions-hero p { margin: 0; color: var(--muted); font-weight: 700; }
.subscriptions-hero .btn { position: relative; z-index: 1; flex: 0 0 auto; }

.subscriptions-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.subscriptions-summary article {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 92px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.84);
    box-shadow: 0 12px 30px rgba(23,33,27,.07);
}

.subscriptions-summary article > span {
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 15px;
    color: var(--primary);
    background: rgba(16,124,65,.09);
}

.subscriptions-summary article.is-active > span { color: #0a6b37; background: rgba(16,124,65,.11); }
.subscriptions-summary article.is-expired > span { color: var(--danger); background: rgba(180,35,24,.09); }
.subscriptions-summary svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.subscriptions-summary small { display: block; color: var(--muted); font-weight: 800; }
.subscriptions-summary strong { display: block; font-size: 22px; line-height: 1.25; }

.subscriptions-list { display: grid; gap: 15px; }

.subscription-list-card {
    --subscription-primary: #107c41;
    --subscription-accent: #e4b33d;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(320px, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--subscription-primary) 20%, var(--line));
    border-radius: 24px;
    background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--subscription-accent) 18%, transparent), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,.96), color-mix(in srgb, var(--subscription-primary) 4%, #fff));
    box-shadow: 0 17px 42px color-mix(in srgb, var(--subscription-primary) 10%, transparent);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.subscription-list-card:hover,
.subscription-list-card.is-selected {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--subscription-primary) 46%, var(--subscription-accent));
    box-shadow: 0 24px 54px color-mix(in srgb, var(--subscription-primary) 16%, transparent);
}

.subscription-list-card.is-expired { border-inline-start: 5px solid var(--danger); }
.subscription-list-card.is-active { border-inline-start: 5px solid var(--subscription-primary); }

.subscription-list-main,
.subscription-list-heading,
.subscription-list-actions,
.subscription-list-title a { display: flex; align-items: center; }
.subscription-list-main { min-width: 0; gap: 14px; }
.subscription-list-title { min-width: 0; }
.subscription-list-heading { flex-wrap: wrap; gap: 9px; }
.subscription-list-heading h2 { margin: 0; font-size: 21px; line-height: 1.35; }
.subscription-list-title a { gap: 6px; max-width: 100%; color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.subscription-list-title a svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; }

.subscription-list-logo {
    display: inline-grid;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--subscription-primary) 20%, var(--line));
    border-radius: 18px;
    color: var(--subscription-primary);
    background: #fff;
    box-shadow: 0 12px 26px color-mix(in srgb, var(--subscription-primary) 12%, transparent);
}
.subscription-list-logo img { width: 100%; height: 100%; object-fit: cover; }
.subscription-list-logo svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.subscription-list-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.subscription-list-details span { min-width: 0; padding: 10px; border: 1px solid rgba(16,124,65,.1); border-radius: 15px; background: rgba(255,255,255,.72); }
.subscription-list-details small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; }
.subscription-list-details strong { display: block; margin-top: 2px; font-size: 13px; overflow-wrap: anywhere; }

.subscription-list-actions { justify-content: flex-end; flex-wrap: wrap; gap: 8px; max-width: 330px; }
.subscription-list-actions .btn { min-height: 42px; padding: 9px 13px; border-radius: 14px; white-space: nowrap; }
.subscription-list-actions .btn:first-child { width: 100%; justify-content: center; }
.subscription-renew-form { width: 100%; margin: 0; }
.subscription-renew-form .btn { width: 100%; justify-content: center; border: 0; cursor: pointer; }
.subscription-renew-form .btn[disabled] { opacity: .72; cursor: wait; transform: none; }

.subscriptions-empty { display: grid; justify-items: center; gap: 10px; padding: 38px; text-align: center; }
.subscriptions-empty > span { display: inline-grid; width: 64px; height: 64px; place-items: center; border-radius: 21px; color: var(--primary); background: rgba(16,124,65,.09); }
.subscriptions-empty > span svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.subscriptions-empty h2, .subscriptions-empty p { margin: 0; }
.subscriptions-security-note { margin-top: 20px; }

@media (max-width: 1060px) {
    .subscriptions-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .subscription-list-card { grid-template-columns: minmax(0, 1fr); }
    .subscription-list-actions { max-width: none; justify-content: flex-start; }
    .subscription-list-actions .btn:first-child { width: auto; }
}

@media (max-width: 700px) {
    .subscriptions-hero { align-items: stretch; flex-direction: column; padding: 20px; border-radius: 22px; }
    .subscriptions-hero .btn { width: 100%; justify-content: center; }
    .subscriptions-summary { grid-template-columns: 1fr 1fr; gap: 9px; }
    .subscriptions-summary article { min-height: 84px; padding: 11px; gap: 9px; }
    .subscriptions-summary article > span { width: 38px; height: 38px; }
    .subscriptions-summary strong { font-size: 18px; }
    .subscription-list-card { padding: 15px; border-radius: 20px; }
    .subscription-list-details { grid-template-columns: 1fr; }
    .subscription-list-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .subscription-list-actions .btn,
    .subscription-list-actions .btn:first-child { width: 100%; justify-content: center; }
}


/* Refined pricing and subscription renewal flow */
.compact-price-form label{min-width:0}
.compact-price-form input{width:100%;font-size:1rem;font-weight:800;text-align:center;direction:ltr}
.compact-price-form button{min-height:46px;border-radius:14px;justify-content:center}
.subscription-renew-button{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) 24px;
    align-items:center;
    gap:11px;
    min-height:62px!important;
    padding:9px 13px!important;
    text-align:start;
    color:#fff;
    border:0!important;
    background:linear-gradient(135deg,var(--subscription-primary),color-mix(in srgb,var(--subscription-primary) 72%,#071b10))!important;
    box-shadow:0 13px 28px color-mix(in srgb,var(--subscription-primary) 26%,transparent);
    overflow:hidden;
}
.subscription-renew-button:hover{transform:translateY(-2px);box-shadow:0 17px 34px color-mix(in srgb,var(--subscription-primary) 34%,transparent)}
.subscription-renew-button-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.18)}
.subscription-renew-button-icon svg,.subscription-renew-button-arrow svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9}
.subscription-renew-button-copy{display:grid;gap:2px;min-width:0}
.subscription-renew-button-copy b{font-size:1rem;line-height:1.2}
.subscription-renew-button-copy small{color:rgba(255,255,255,.78);font-size:.72rem;font-weight:700;white-space:normal}
.subscription-renew-button-arrow{display:grid;place-items:center;transition:transform .2s ease}
.subscription-renew-button:hover .subscription-renew-button-arrow{transform:translateX(-3px)}
.subscription-renew-button[disabled] .subscription-renew-button-icon svg{animation:payment-spin .9s linear infinite}
@media(max-width:700px){.payment-admin-layout{grid-template-columns:1fr}.compact-price-form{grid-template-columns:1fr}.compact-price-form button{grid-column:auto}.subscription-renew-button{grid-template-columns:42px minmax(0,1fr) 22px}}


/* ===== Professional public tournament launcher + AJAX modal ===== */
.tournament-theme {
    position: relative;
    isolation: isolate;
}

.tournament-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 85% 8%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 34%),
        radial-gradient(circle at 8% 38%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 30%);
}

.tournament-app-launcher {
    position: relative;
    margin-top: 18px;
    padding: clamp(18px, 3vw, 28px);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--line));
    border-radius: clamp(22px, 3vw, 32px);
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, var(--primary) 4%), var(--surface));
    box-shadow: 0 24px 70px color-mix(in srgb, var(--primary) 13%, transparent);
}

.tournament-app-launcher::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    inset: -100px auto auto -70px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    filter: blur(2px);
    pointer-events: none;
}

.launcher-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.launcher-heading h2 {
    margin: 3px 0 5px;
    font-size: clamp(20px, 3vw, 29px);
}

.launcher-heading p {
    margin: 0;
    color: var(--muted);
}

.launcher-eyebrow,
.launcher-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
}

.launcher-status {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.launcher-status svg { width: 17px; height: 17px; }

.modal-app-grid {
    position: relative;
    z-index: 1;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: clamp(11px, 2vw, 16px);
}

.modal-app-grid .app-icon-card {
    min-height: 148px;
    padding: 18px 14px;
    border-color: color-mix(in srgb, var(--primary) 12%, var(--line));
    background: color-mix(in srgb, var(--surface) 96%, var(--primary) 4%);
    box-shadow: 0 12px 28px rgba(18, 32, 24, 0.07);
    transform-origin: 50% 100%;
}

.modal-app-grid .app-icon-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
    box-shadow: 0 20px 40px color-mix(in srgb, var(--primary) 16%, transparent);
}

.modal-app-grid .app-icon {
    width: 58px;
    height: 58px;
    border-radius: 19px;
    background: linear-gradient(145deg, var(--primary), color-mix(in srgb, var(--primary) 68%, #0a2730));
    color: #fff;
    box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 28%, transparent), inset 0 1px rgba(255,255,255,.28);
}

.modal-app-grid .app-icon svg { width: 29px; height: 29px; }
.modal-app-grid .app-icon-card strong { font-size: 15px; }
.modal-app-grid .app-card-arrow { opacity: .65; }
.modal-app-grid .app-icon-card.is-loading { pointer-events: none; opacity: .72; }

.tournament-quick-glance {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 24px;
}

.quick-glance-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(18, 32, 24, .045);
}

.quick-glance-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--primary-dark);
}
.quick-glance-icon svg { width: 22px; height: 22px; }
.quick-glance-card div { display: grid; gap: 1px; }
.quick-glance-card small { color: var(--muted); font-size: 12px; }
.quick-glance-card strong { font-size: 23px; }

.tournament-content-modal[hidden] { display: none !important; }
.tournament-content-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: clamp(10px, 3vw, 28px);
}

.tournament-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 13, 9, .63);
    opacity: 0;
    backdrop-filter: blur(0);
    transition: opacity .32s ease, backdrop-filter .32s ease;
}

.tournament-modal-dialog {
    position: relative;
    width: min(920px, 100%);
    max-height: min(88vh, 820px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.44);
    border-radius: clamp(22px, 3vw, 32px);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 38px 100px rgba(0,0,0,.35);
    opacity: 0;
    transform: translateY(36px) scale(.94);
    transition: transform .38s cubic-bezier(.2,.9,.2,1.08), opacity .28s ease;
}

.tournament-content-modal.is-open .tournament-modal-backdrop {
    opacity: 1;
    backdrop-filter: blur(10px);
}
.tournament-content-modal.is-open .tournament-modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.tournament-modal-header,
.tournament-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px clamp(16px, 3vw, 24px);
    background: color-mix(in srgb, var(--surface) 93%, var(--primary) 7%);
}
.tournament-modal-header { border-bottom: 1px solid var(--line); }
.tournament-modal-footer { border-top: 1px solid var(--line); justify-content: flex-end; }

.tournament-modal-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tournament-modal-heading div { min-width: 0; }
.tournament-modal-heading small { color: var(--muted); }
.tournament-modal-heading h2 { margin: 2px 0 0; font-size: clamp(19px, 3vw, 25px); }
.tournament-modal-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #071d24));
    color: #fff;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 25%, transparent);
}
.tournament-modal-icon svg { width: 25px; height: 25px; }
.tournament-modal-close {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}
.tournament-modal-close:hover { transform: rotate(7deg) scale(1.06); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }

.tournament-modal-body {
    min-height: 240px;
    max-height: calc(min(88vh, 820px) - 150px);
    padding: clamp(16px, 3vw, 26px);
    overflow: auto;
    overscroll-behavior: contain;
}

.modal-loading {
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    gap: 9px;
}
.modal-loading span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--primary);
    animation: modalLoader .8s ease-in-out infinite alternate;
}
.modal-loading span:nth-child(2) { animation-delay: .13s; }
.modal-loading span:nth-child(3) { animation-delay: .26s; }
@keyframes modalLoader { to { transform: translateY(-12px); opacity: .42; } }

.modal-empty-state {
    display: grid;
    min-height: 230px;
    place-items: center;
    align-content: center;
    gap: 12px;
    text-align: center;
    color: var(--muted);
}
.modal-empty-state span {
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border-radius: 22px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--primary-dark);
}
.modal-empty-state svg { width: 31px; height: 31px; }

.modal-match-list,
.modal-ranking-list { display: grid; gap: 11px; }
.modal-match-card,
.modal-result-card,
.modal-ranking-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 97%, var(--primary) 3%);
    box-shadow: 0 8px 20px rgba(18,32,24,.045);
}
.modal-match-card { padding: 15px; }
.modal-match-date,
.modal-match-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.modal-match-date span,
.modal-match-meta span { display: inline-flex; align-items: center; gap: 6px; }
.modal-match-date svg,
.modal-match-meta svg { width: 16px; height: 16px; }
.modal-match-teams,
.modal-result-card div { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 13px; margin: 14px 0; text-align: center; }
.modal-match-teams span:first-child,
.modal-result-card div span:first-child { text-align: left; }
.modal-match-teams span:last-child,
.modal-result-card div span:last-child { text-align: right; }
.modal-match-teams b,
.modal-result-card b { padding: 8px 12px; border-radius: 12px; background: var(--primary); color: #fff; white-space: nowrap; }

.modal-result-card { padding: 14px 16px; }
.modal-result-card small { color: var(--muted); }
.modal-result-card em { display: block; color: var(--muted); font-size: 12px; font-style: normal; text-align: center; }

.modal-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; }
.modal-data-table { min-width: 680px; margin: 0; }
.modal-data-table th { position: sticky; top: 0; z-index: 1; background: color-mix(in srgb, var(--surface) 90%, var(--primary) 10%); }
.rank-number { display: inline-grid; width: 29px; height: 29px; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--primary) 11%, var(--surface)); color: var(--primary-dark); font-weight: 900; }

.modal-ranking-card {
    display: grid;
    grid-template-columns: auto auto minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
}
.ranking-position { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 11px; background: var(--primary); color: #fff; font-weight: 900; }
.ranking-icon { color: var(--accent); }
.ranking-icon svg { width: 27px; height: 27px; }
.modal-ranking-card div { display: grid; gap: 2px; }
.modal-ranking-card small { color: var(--muted); }
.modal-ranking-card > b { font-size: 22px; color: var(--primary-dark); }
.modal-ranking-card > b small { font-size: 11px; }
.cards-ranking { grid-template-columns: auto minmax(0,1fr) auto auto; }
.discipline-count { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 11px; font-weight: 900; }
.discipline-count i { display: block; width: 13px; height: 18px; border-radius: 3px; }
.discipline-count.yellow { background: #fff8d8; color: #7f6100; }
.discipline-count.yellow i { background: #f2cf23; }
.discipline-count.red { background: #ffe9e7; color: #9d241a; }
.discipline-count.red i { background: #dc382b; }

.modal-team-grid,
.modal-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; }
.modal-team-card,
.modal-stat-grid article { display: grid; place-items: center; gap: 7px; padding: 18px 12px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 97%, var(--primary) 3%); text-align: center; }
.modal-team-card img,
.modal-team-fallback { width: 62px; height: 62px; object-fit: contain; border-radius: 18px; }
.modal-team-fallback { display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--primary-dark); }
.modal-team-fallback svg { width: 30px; height: 30px; }
.modal-team-card small,
.modal-team-card span { color: var(--muted); font-size: 12px; }
.modal-stat-grid article > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--primary-dark); }
.modal-stat-grid article svg { width: 25px; height: 25px; }
.modal-stat-grid article strong { font-size: 27px; }
.modal-stat-grid article small { color: var(--muted); }

body.tournament-modal-open { overflow: hidden; }

@media (max-width: 720px) {
    .launcher-heading { align-items: flex-start; }
    .launcher-status { display: none; }
    .modal-app-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .modal-app-grid .app-icon-card { min-height: 126px; padding: 14px 8px; }
    .modal-app-grid .app-icon { width: 50px; height: 50px; border-radius: 16px; }
    .modal-app-grid .app-icon-card strong { font-size: 13px; }
    .modal-app-grid .app-icon-card small { font-size: 10px; }
    .tournament-quick-glance { grid-template-columns: 1fr; }
    .tournament-content-modal { padding: 0; align-items: end; }
    .tournament-modal-dialog { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; transform: translateY(100%); }
    .tournament-content-modal.is-open .tournament-modal-dialog { transform: translateY(0); }
    .tournament-modal-body { max-height: calc(92vh - 145px); }
    .tournament-modal-footer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
    .modal-match-teams,
    .modal-result-card div { gap: 8px; font-size: 12px; }
    .modal-ranking-card { grid-template-columns: auto auto minmax(0,1fr) auto; padding: 11px; }
    .cards-ranking { grid-template-columns: auto minmax(0,1fr) auto auto; }
}

@media (max-width: 430px) {
    .modal-app-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .tournament-modal-footer .secondary { display: none; }
    .tournament-modal-footer .btn { width: 100%; justify-content: center; }
    .cards-ranking { grid-template-columns: auto minmax(0,1fr) auto; }
    .cards-ranking .discipline-count.red { grid-column: 3; }
}

@media (prefers-reduced-motion: reduce) {
    .tournament-modal-backdrop,
    .tournament-modal-dialog,
    .modal-app-grid .app-icon-card { transition: none !important; }
    .modal-loading span { animation: none; }
}


.tournament-hero-branding {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.5vw, 22px);
    margin-top: 12px;
}

.tournament-hero-branding > div {
    min-width: 0;
}

.tournament-hero-branding h1 {
    margin: 0 0 8px;
}

.tournament-hero-branding p {
    margin: 0;
}

.tournament-hero-logo {
    display: grid;
    width: clamp(74px, 10vw, 104px);
    height: clamp(74px, 10vw, 104px);
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: clamp(22px, 3vw, 30px);
    background: rgba(255,255,255,.14);
    color: #fff;
    box-shadow: 0 18px 42px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.24);
    backdrop-filter: blur(12px);
}

.tournament-hero-logo img {
    width: 100%;
    height: 100%;
    padding: 9px;
    object-fit: contain;
}

.tournament-hero-logo svg {
    width: 45%;
    height: 45%;
}

@media (max-width: 560px) {
    .tournament-hero-branding {
        align-items: flex-start;
    }
    .tournament-hero-logo {
        width: 68px;
        height: 68px;
        border-radius: 20px;
    }
}

/* ===== تطبيقات البطولة المبسطة ===== */
.today-match-hero {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 14px;
}

.today-match-hero .hero-live-card {
    width: min(720px, 100%);
    min-height: auto;
    margin-inline: auto;
}

.apps-only-launcher {
    margin: 12px 0 24px;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.apps-only-launcher::after {
    display: none;
}

.apps-only-launcher .modal-app-grid {
    width: min(900px, 100%);
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: clamp(16px, 2.6vw, 28px) clamp(10px, 2vw, 22px);
}

.apps-only-launcher .app-icon-card {
    display: grid;
    min-height: 0;
    padding: 4px 2px;
    gap: 9px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform-origin: center;
}

.apps-only-launcher .app-icon-card::before {
    display: none;
}

.apps-only-launcher .app-icon-card:hover {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    transform: translateY(-5px);
}

.apps-only-launcher .app-icon-card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 38%, transparent);
    outline-offset: 7px;
    border-radius: 18px;
}

.apps-only-launcher .app-icon {
    width: clamp(58px, 7vw, 72px);
    height: clamp(58px, 7vw, 72px);
    border-radius: clamp(17px, 2vw, 22px);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .28),
        inset 0 -10px 18px rgba(0, 0, 0, .13),
        0 10px 20px rgba(18, 32, 24, .17);
}

.apps-only-launcher .app-icon-card:hover .app-icon {
    transform: scale(1.075) rotate(-1.5deg);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .3),
        inset 0 -10px 18px rgba(0, 0, 0, .12),
        0 15px 28px rgba(18, 32, 24, .22);
}

.apps-only-launcher .app-icon-card strong {
    max-width: 110px;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

@media (max-width: 700px) {
    .apps-only-launcher .modal-app-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 19px 8px;
    }

    .apps-only-launcher .app-icon-card {
        padding-inline: 0;
    }

    .apps-only-launcher .app-icon-card strong {
        font-size: 12px;
    }
}

@media (max-width: 430px) {
    .apps-only-launcher .modal-app-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Support notes */
.dropdown-panel a .menu-unread-badge {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    flex: 0 0 auto;
    margin-inline-start: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d93025;
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.support-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 11%, var(--surface)), var(--surface));
    box-shadow: 0 14px 36px rgba(19, 41, 28, .08);
}
.support-page-heading h1 { margin: 5px 0 6px; }
.support-page-heading p { margin: 0; color: var(--muted); }

.support-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    min-height: 650px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(22, 42, 30, .09);
}
.support-ticket-sidebar {
    min-width: 0;
    background: color-mix(in srgb, var(--bg) 72%, var(--surface));
    border-inline-end: 1px solid var(--line);
}
.support-ticket-sidebar-head {
    height: 68px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}
.support-ticket-sidebar-head span {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--primary);
    font-weight: 800;
}
.support-ticket-list { max-height: 690px; overflow: auto; padding: 10px; }
.support-ticket-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 13px;
    margin-bottom: 6px;
    border-radius: 17px;
    color: var(--ink);
    text-decoration: none;
    transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}
.support-ticket-item:hover { transform: translateY(-1px); background: var(--surface); }
.support-ticket-item.is-active { background: var(--surface); box-shadow: 0 8px 24px rgba(22, 42, 30, .09); }
.support-ticket-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    color: var(--primary);
}
.support-ticket-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.support-ticket-copy { min-width: 0; display: grid; gap: 3px; }
.support-ticket-copy strong, .support-ticket-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-ticket-copy small { color: var(--muted); font-size: 12px; }
.support-ticket-owner { color: var(--primary) !important; font-weight: 700; }
.support-unread {
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: 11px;
}

.support-thread-panel { min-width: 0; display: flex; flex-direction: column; background: var(--surface); }
.support-thread-head {
    min-height: 86px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}
.support-thread-head h2 { margin: 5px 0 2px; font-size: clamp(18px, 2vw, 24px); }
.support-thread-head small { color: var(--muted); }
.support-thread-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.support-thread-status.is-open { color: #08783e; background: #e8f8ef; }
.support-thread-status.is-closed { color: #6b7280; background: #eef0f2; }
.support-message-stream {
    flex: 1;
    min-height: 420px;
    max-height: 620px;
    overflow: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--primary) 5%, transparent), transparent 28%),
        color-mix(in srgb, var(--bg) 50%, var(--surface));
}
.support-message { max-width: min(76%, 680px); display: grid; gap: 5px; }
.support-message.is-mine { align-self: flex-start; }
.support-message.is-other { align-self: flex-end; }
.support-message-meta { display: flex; align-items: center; gap: 9px; padding: 0 4px; font-size: 11px; color: var(--muted); }
.support-message.is-other .support-message-meta { justify-content: flex-end; }
.support-message-body {
    padding: 12px 15px;
    border-radius: 18px 18px 5px 18px;
    background: var(--primary);
    color: white;
    line-height: 1.8;
    overflow-wrap: anywhere;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 20%, transparent);
}
.support-message.is-other .support-message-body {
    border-radius: 18px 18px 18px 5px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: 0 7px 18px rgba(23, 33, 27, .06);
}
.support-reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.support-reply-form textarea { min-height: 54px; max-height: 150px; resize: vertical; margin: 0; }
.support-reply-form .btn { min-height: 54px; }
.support-reply-form .btn svg, .support-status-form svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.support-form-feedback { margin: 0 16px 14px; padding: 10px 13px; border-radius: 12px; }
.support-form-feedback.is-error { background: #fdecec; color: #a61b1b; }
.support-form-feedback.is-success { background: #e8f8ef; color: #08783e; }
.support-thread-empty, .support-empty-small {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 30px;
    color: var(--muted);
}
.support-thread-empty > span, .support-empty-small > svg {
    width: 72px;
    height: 72px;
    padding: 18px;
    border-radius: 24px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
.support-thread-empty svg, .support-empty-small svg { fill: none; stroke: currentColor; stroke-width: 1.7; }
.support-thread-empty h2 { margin: 10px 0 0; color: var(--ink); }
.support-thread-empty p { margin: 0 0 12px; }
.support-empty-small { min-height: 260px; padding: 20px; }
.support-empty-small > svg { width: 58px; height: 58px; }

.support-compose-modal[hidden] { display: none !important; }
.support-compose-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 18px;
}
.support-compose-backdrop { position: absolute; inset: 0; border: 0; background: rgba(8, 18, 12, .58); backdrop-filter: blur(7px); }
.support-compose-card {
    position: relative;
    width: min(620px, 100%);
    max-height: min(720px, calc(100vh - 36px));
    overflow: auto;
    border-radius: 25px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(7, 21, 13, .27);
    opacity: 0;
    transform: translateY(24px) scale(.96);
    transition: opacity .28s ease, transform .34s cubic-bezier(.22, .9, .28, 1);
}
.support-compose-modal.is-open .support-compose-card { opacity: 1; transform: none; }
.support-compose-card > header { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.support-compose-card > header > div { display: flex; align-items: center; gap: 10px; }
.support-compose-card > header h2 { margin: 0; }
.support-compose-card > header span { width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--primary); background: color-mix(in srgb, var(--primary) 11%, var(--surface)); }
.support-compose-card > header button { width: 38px; height: 38px; border: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink); cursor: pointer; }
.support-compose-card svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.support-compose-card form { padding: 20px; display: grid; gap: 16px; }
.support-compose-card label { display: grid; gap: 7px; font-weight: 700; }
.support-compose-card input, .support-compose-card textarea { width: 100%; }
body.support-compose-open { overflow: hidden; }

@media (max-width: 820px) {
    .support-page-heading { align-items: stretch; flex-direction: column; padding: 18px; }
    .support-layout { grid-template-columns: 1fr; min-height: auto; }
    .support-ticket-sidebar { border-inline-end: 0; border-bottom: 1px solid var(--line); }
    .support-ticket-list { max-height: 310px; }
    .support-layout.has-thread .support-ticket-sidebar { display: none; }
    .support-message-stream { min-height: 470px; max-height: 58vh; padding: 16px 12px; }
    .support-message { max-width: 88%; }
    .support-thread-head { align-items: flex-start; flex-direction: column; }
    .support-status-form, .support-status-form .btn { width: 100%; }
}

@media (max-width: 520px) {
    .support-layout { border-radius: 20px; }
    .support-reply-form { grid-template-columns: 1fr; }
    .support-reply-form .btn { width: 100%; }
    .support-message { max-width: 94%; }
}


/* Mobile support composer: fixed, keyboard-aware messenger layout. */
.support-reply-form textarea {
    width: 100%;
    min-height: 48px;
    max-height: 120px;
    padding: 12px 17px;
    resize: none;
    overflow-y: auto;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 24px;
    background: color-mix(in srgb, var(--bg) 76%, var(--surface));
    line-height: 1.45;
    box-shadow: none;
}
.support-reply-form textarea:focus {
    border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
    background: var(--surface);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}
.support-send-button {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
}
.support-send-button span { display: inline-grid; place-items: center; }

@media (max-width: 820px) {
    body.support-chat-active {
        --support-composer-height: 72px;
        padding-bottom: calc(var(--support-composer-height) + env(safe-area-inset-bottom));
    }
    body.support-chat-active .site-footer { display: none; }
    body.support-chat-active .layout {
        width: 100%;
        margin: 10px 0 0;
    }
    body.support-chat-active .support-page-heading { display: none; }
    body.support-chat-active .support-layout.has-thread {
        min-height: calc(100dvh - 78px);
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    body.support-chat-active .support-thread-panel {
        min-height: calc(100dvh - 78px);
        padding-bottom: calc(var(--support-composer-height) + env(safe-area-inset-bottom));
    }
    body.support-chat-active .support-thread-head {
        position: sticky;
        top: 68px;
        z-index: 12;
        min-height: 72px;
        padding: 10px 13px;
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        backdrop-filter: blur(14px);
    }
    body.support-chat-active .support-message-stream {
        min-height: calc(100dvh - 218px);
        max-height: none;
        padding: 16px 10px 24px;
        scroll-padding-bottom: 96px;
    }
    body.support-chat-active .support-reply-form {
        position: fixed;
        z-index: 1000;
        inset-inline: 0;
        bottom: var(--support-keyboard-offset, 0px);
        grid-template-columns: minmax(0, 1fr) 52px;
        align-items: end;
        gap: 8px;
        width: 100%;
        min-height: var(--support-composer-height);
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        box-shadow: 0 -8px 24px rgba(17, 35, 24, .08);
        backdrop-filter: blur(18px);
        transition: bottom .16s ease;
    }
    body.support-chat-active .support-reply-form textarea {
        min-height: 48px;
        padding: 12px 16px;
        border-radius: 24px;
        background: color-mix(in srgb, var(--bg) 78%, var(--surface));
    }
    body.support-chat-active .support-send-button {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        align-self: end;
    }
    body.support-chat-active .support-send-button b { display: none; }
    body.support-chat-active .support-send-button svg { width: 22px; height: 22px; }
    body.support-chat-active .support-form-feedback {
        position: fixed;
        z-index: 1002;
        inset-inline: 12px;
        bottom: calc(var(--support-keyboard-offset, 0px) + var(--support-composer-height) + 10px);
        margin: 0;
    }
}


.support-message.is-pending { opacity: .78; }
.support-message.is-pending .support-message-body { position: relative; }
.support-message-delivery { padding-inline: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.support-send-button[aria-busy="true"] { opacity: .75; }

/* Support ticket state and direct voice calls */
.support-reply-form[hidden],
.support-call-card[hidden],
.support-call-action[hidden],
.support-call-start-button[hidden] {
    display: none !important;
}
.support-scroll-anchor {
    display: block;
    flex: 0 0 1px;
    width: 100%;
    height: 1px;
    pointer-events: none;
}
.support-thread-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}
.support-thread-actions .support-status-form { margin: 0; }
.support-call-start-button svg,
.support-call-action svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.support-call-root > audio { display: none; }
.support-call-card {
    position: fixed;
    z-index: 1500;
    inset: 50% auto auto 50%;
    width: min(390px, calc(100vw - 28px));
    padding: 26px 22px 22px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-radius: 28px;
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
    color: var(--ink);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 28px 80px rgba(8, 24, 15, .28);
    backdrop-filter: blur(22px);
    transform: translate(-50%, -50%);
    animation: supportCallEnter .34s cubic-bezier(.2, .9, .25, 1) both;
}
.support-call-card::before {
    content: '';
    position: fixed;
    z-index: -1;
    inset: -100vh -100vw;
    background: rgba(5, 15, 9, .43);
    backdrop-filter: blur(5px);
}
.support-call-card strong { font-size: 20px; }
.support-call-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.support-call-pulse {
    position: relative;
    width: 78px;
    height: 78px;
    border-radius: 25px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 84%, #ffffff), var(--primary));
    box-shadow: 0 16px 34px color-mix(in srgb, var(--primary) 32%, transparent);
}
.support-call-pulse::before,
.support-call-pulse::after {
    content: '';
    position: absolute;
    inset: -7px;
    border: 2px solid color-mix(in srgb, var(--primary) 35%, transparent);
    border-radius: 31px;
    animation: supportCallPulse 1.8s ease-out infinite;
}
.support-call-pulse::after { animation-delay: .65s; }
.support-call-pulse svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.support-call-actions {
    width: 100%;
    margin-top: 8px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}
.support-call-action {
    min-width: 68px;
    padding: 0;
    border: 0;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
}
.support-call-action > span {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--primary) 11%, var(--surface));
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.support-call-action:hover > span { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(10, 28, 17, .13); }
.support-call-action b { font-size: 12px; }
.support-call-action.is-accept > span { color: #fff; background: #16a05d; }
.support-call-action.is-decline > span,
.support-call-action.is-end > span { color: #fff; background: #d83a45; }
.support-call-action.is-muted > span { color: #fff; background: #da8b18; }
.support-call-action:disabled { opacity: .55; cursor: wait; }

@keyframes supportCallEnter {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 24px)) scale(.94); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes supportCallPulse {
    0% { opacity: .75; transform: scale(.92); }
    100% { opacity: 0; transform: scale(1.28); }
}

@media (max-width: 820px) {
    .support-thread-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
    .support-thread-actions .btn,
    .support-thread-actions .support-status-form,
    .support-thread-actions .support-status-form .btn { width: 100%; }
    .support-call-card { padding: 24px 18px 20px; border-radius: 24px; }
}

/* Professional local image upload fields */
.media-upload-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px;
    border: 1px dashed color-mix(in srgb, var(--primary) 38%, var(--line));
    border-radius: 22px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 5%, var(--surface)), var(--surface));
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease, opacity .22s ease;
}
.media-upload-card:hover {
    border-color: color-mix(in srgb, var(--primary) 62%, var(--line));
    box-shadow: 0 14px 34px color-mix(in srgb, var(--primary) 10%, transparent);
}
.media-upload-card.is-removing { opacity: .58; }
.media-upload-preview {
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 13%, var(--line));
    border-radius: 26px;
    color: var(--primary);
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(23,33,27,.12);
}
.media-upload-preview img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.media-upload-preview svg { width: 43px; height: 43px; }
.media-upload-copy { display: grid; gap: 8px; justify-items: start; }
.media-upload-copy > strong { font-size: 17px; }
.media-upload-copy > small { color: var(--muted); line-height: 1.7; }
.media-upload-picker {
    position: relative;
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    padding: 10px 15px;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
    border-radius: 14px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    font-weight: 900;
    cursor: pointer;
    overflow: hidden;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.media-upload-picker:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--primary) 13%, var(--surface)); box-shadow: 0 9px 22px color-mix(in srgb, var(--primary) 12%, transparent); }
.media-upload-picker svg { width: 21px; height: 21px; }
.media-upload-picker input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.media-remove-option {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: auto !important;
    color: var(--danger, #b42318);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.media-remove-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--danger, #b42318); }
.media-upload-actions { display: grid; gap: 12px; }
.team-name-cell { display: flex; align-items: center; gap: 11px; min-width: 150px; }
.team-table-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
}
.team-table-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.team-table-logo svg { width: 23px; height: 23px; }
.settings-logo-editor.is-removing, .media-upload-card.is-removing .media-upload-preview { opacity: .55; }

@media (max-width: 640px) {
    .media-upload-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .media-upload-copy { justify-items: center; }
    .media-upload-preview { width: 112px; height: 112px; }
    .media-upload-actions { justify-items: center; }
}

/* Professional teams and matches pages */
.teams-page-toolbar,
.schedule-toolbar { align-items: center; }
.teams-total-chip,
.schedule-summary span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 94%, var(--primary) 6%);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}
.teams-total-chip svg,
.schedule-summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.schedule-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.schedule-summary b { font-size: 16px; }

.public-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 16px;
}
.public-team-card {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 13%, var(--line));
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(23, 33, 27, .07);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.public-team-card:hover,
.public-team-card.is-open {
    border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
    box-shadow: 0 20px 42px rgba(23, 33, 27, .11);
    transform: translateY(-2px);
}
.public-team-summary {
    display: grid;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 17px;
    border: 0;
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--primary) 10%, transparent), transparent 38%),
        var(--surface);
    color: var(--ink);
    text-align: right;
    cursor: pointer;
}
.public-team-logo,
.manager-team-logo {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--line));
    border-radius: 21px;
    background: color-mix(in srgb, var(--surface) 91%, var(--primary) 9%);
    color: var(--primary-dark);
}
.public-team-logo img,
.manager-team-logo img { width: 100%; height: 100%; padding: 8px; object-fit: contain; }
.public-team-logo svg,
.manager-team-logo svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.public-team-main { display: grid; min-width: 0; gap: 4px; }
.public-team-main strong { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-team-main small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.public-team-numbers { display: flex; align-items: center; gap: 8px; }
.public-team-numbers > span {
    display: grid;
    min-width: 68px;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 9px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
    color: var(--primary-dark);
}
.public-team-numbers svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.public-team-numbers b { font-size: 16px; }
.public-team-numbers small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.public-team-chevron { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); color: var(--primary-dark); transition: transform .22s ease; }
.public-team-chevron svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.public-team-card.is-open .public-team-chevron { transform: rotate(180deg); }
.public-team-details { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 97%, var(--primary) 3%); }
.public-team-details:not([hidden]) { animation: teamDetailsIn .24s ease both; }
@keyframes teamDetailsIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.team-section-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    padding: 13px;
    overflow-x: auto;
}
.team-section-tabs button {
    display: grid;
    min-width: 82px;
    min-height: 72px;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 8px 5px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.team-section-tabs button:hover { transform: translateY(-2px); }
.team-section-tabs button.is-active { border-color: color-mix(in srgb, var(--primary) 17%, var(--line)); background: var(--surface); color: var(--primary-dark); box-shadow: 0 8px 20px rgba(23, 33, 27, .06); }
.team-section-tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.team-section-tabs span { font-size: 11px; font-weight: 800; }
.team-section-tabs b { display: grid; min-width: 21px; height: 21px; place-items: center; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); font-size: 10px; }
.team-tab-panel { padding: 2px 14px 16px; }
.team-tab-panel.is-active:not([hidden]) { animation: teamPanelIn .2s ease both; }
@keyframes teamPanelIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.team-data-empty { display: grid; min-height: 130px; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.team-data-empty svg { width: 29px; height: 29px; fill: none; stroke: var(--primary); stroke-width: 1.7; }
.team-mini-matches,
.team-ranking-list { display: grid; gap: 8px; }
.team-mini-match {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease;
}
.team-mini-match:hover { transform: translateX(-3px); border-color: color-mix(in srgb, var(--primary) 28%, var(--line)); }
.team-mini-date { display: grid; place-items: center; gap: 0; padding: 6px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.team-mini-date b { color: var(--primary-dark); }
.team-mini-date small { color: var(--muted); font-size: 9px; }
.team-mini-clubs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; }
.team-mini-clubs > span { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; font-weight: 800; }
.team-mini-clubs > span:last-child { flex-direction: row-reverse; text-align: left; }
.team-mini-clubs i { display: grid; width: 30px; height: 30px; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 9px; background: color-mix(in srgb, var(--primary) 7%, var(--surface)); color: var(--primary-dark); }
.team-mini-clubs i img { width: 100%; height: 100%; padding: 3px; object-fit: contain; }
.team-mini-clubs i svg { width: 17px; height: 17px; fill: none; stroke: currentColor; }
.team-mini-clubs em { color: var(--muted); font-size: 10px; font-style: normal; }
.team-mini-clubs .team-result-score { padding: 5px 8px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 900; }
.team-player-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.team-player-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.player-number { display: grid; width: 38px; height: 38px; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 900; }
.team-player-item div { display: grid; min-width: 0; }
.team-player-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-player-item small { color: var(--muted); font-size: 10px; }
.team-ranking-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.team-ranking-row > b { color: var(--primary-dark); font-size: 18px; }
.team-ranking-row > b small { font-size: 10px; }
.team-ranking-row.cards-row { grid-template-columns: minmax(0, 1fr) auto auto; }

.match-filter-bar { display: flex; gap: 8px; margin-bottom: 16px; padding: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.match-filter-bar button { display: inline-flex; min-width: max-content; align-items: center; gap: 7px; padding: 9px 13px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.match-filter-bar button.is-active { background: var(--primary); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 25%, transparent); }
.match-filter-bar b { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 10px; }
.public-match-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 15px; }
.public-match-card { overflow: hidden; border: 1px solid color-mix(in srgb, var(--primary) 13%, var(--line)); border-radius: 24px; background: var(--surface); box-shadow: 0 14px 34px rgba(23, 33, 27, .07); transition: transform .2s ease, box-shadow .2s ease; }
.public-match-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(23, 33, 27, .11); }
.public-match-card[hidden] { display: none !important; }
.public-match-link { display: grid; padding: 15px; color: inherit; text-decoration: none; }
.public-match-topline,
.public-match-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.match-stage-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.match-stage-label svg,
.public-match-footer svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.public-match-body { display: grid; grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr); align-items: center; gap: 10px; padding: 18px 0; }
.public-match-team { display: grid; min-width: 0; place-items: center; gap: 8px; text-align: center; }
.public-match-team strong { max-width: 100%; overflow-wrap: anywhere; }
.public-match-logo,
.match-detail-logo,
.manager-club > span {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
    border-radius: 21px;
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
    color: var(--primary-dark);
}
.public-match-logo img,
.match-detail-logo img,
.manager-club > span img { width: 100%; height: 100%; padding: 7px; object-fit: contain; }
.public-match-logo svg,
.match-detail-logo svg,
.manager-club > span svg { width: 33px; height: 33px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.public-match-center { display: grid; place-items: center; gap: 2px; }
.public-match-center time { color: var(--primary-dark); font-size: 25px; font-weight: 900; }
.public-match-center small { color: var(--muted); font-size: 10px; }
.public-score { display: flex; align-items: center; gap: 8px; }
.public-score b { display: grid; width: 38px; height: 44px; place-items: center; border-radius: 13px; background: var(--primary); color: #fff; font-size: 22px; }
.public-score i { color: var(--muted); font-style: normal; font-weight: 900; }
.public-match-footer { padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.public-match-footer span { display: inline-flex; align-items: center; gap: 5px; }
.match-details-arrow { color: var(--primary-dark); font-weight: 900; }
.schedule-filter-empty { margin-top: 15px; }

.manager-match-grid,
.manager-team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 370px), 1fr)); gap: 16px; }
.manager-match-empty,
.manager-team-empty { grid-column: 1 / -1; }
.manager-match-card,
.manager-team-card { display: grid; gap: 13px; padding: 16px; border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line)); border-radius: 23px; background: var(--surface); box-shadow: 0 13px 32px rgba(23,33,27,.065); }
.manager-match-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.manager-match-date { display: grid; min-width: 53px; place-items: center; padding: 6px; border-radius: 14px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.manager-match-date b { color: var(--primary-dark); font-size: 21px; line-height: 1; }
.manager-match-date small { color: var(--muted); font-size: 9px; }
.manager-match-stage { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 12px; }
.manager-match-stage svg { width: 17px; height: 17px; fill: none; stroke: currentColor; }
.manager-match-clubs { display: grid; grid-template-columns: minmax(0,1fr) 82px minmax(0,1fr); align-items: center; gap: 9px; }
.manager-club { display: grid; min-width: 0; place-items: center; gap: 7px; text-align: center; }
.manager-club strong { max-width: 100%; overflow-wrap: anywhere; }
.manager-match-score { display: grid; place-items: center; gap: 2px; }
.manager-match-score b { font-size: 24px; }
.manager-match-score i { margin: 0 4px; color: var(--muted); font-style: normal; }
.manager-match-score time { color: var(--primary-dark); font-size: 22px; font-weight: 900; }
.manager-match-score small { color: var(--muted); font-size: 9px; }
.manager-match-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.manager-match-meta span { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 9px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 5%, var(--surface)); color: var(--muted); font-size: 11px; }
.manager-match-meta svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: var(--primary); }
.manager-match-actions,
.manager-team-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 7px; }
.manager-match-actions > *,
.manager-team-actions > * { flex: 1 1 95px; }
.manager-match-actions form,
.manager-team-actions form { display: flex; }
.manager-match-actions .btn,
.manager-match-actions button,
.manager-team-actions .btn,
.manager-team-actions button { display: inline-flex; width: 100%; align-items: center; justify-content: center; gap: 6px; }
.manager-match-actions svg,
.manager-team-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; }
.manager-team-identity { display: flex; align-items: center; gap: 13px; }
.manager-team-identity h2 { margin: 0; font-size: 19px; }
.manager-team-identity p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.manager-team-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.manager-team-stats > span { display: grid; place-items: center; gap: 1px; min-width: 0; padding: 9px 5px; border-radius: 14px; background: color-mix(in srgb, var(--primary) 6%, var(--surface)); color: var(--primary-dark); text-align: center; }
.manager-team-stats svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.manager-team-stats b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.manager-team-stats small { color: var(--muted); font-size: 9px; }

.match-detail-hero { display: grid; gap: 17px; padding: clamp(18px,4vw,30px); border: 1px solid color-mix(in srgb, var(--primary) 17%, var(--line)); border-radius: 28px; background: radial-gradient(circle at 50% -20%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 48%), var(--surface); box-shadow: 0 18px 44px rgba(23,33,27,.09); }
.match-detail-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); }
.match-detail-topline > span:first-child { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; }
.match-detail-topline svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.match-detail-scoreboard { display: grid; grid-template-columns: minmax(0,1fr) 120px minmax(0,1fr); align-items: center; gap: 14px; }
.match-detail-team { display: grid; place-items: center; gap: 10px; text-align: center; }
.match-detail-team h1 { margin: 0; font-size: clamp(17px,3vw,25px); }
.match-detail-logo { width: 96px; height: 96px; border-radius: 28px; }
.match-detail-result { display: grid; place-items: center; gap: 3px; }
.match-detail-result div { display: flex; align-items: center; gap: 9px; }
.match-detail-result b { display: grid; width: 49px; height: 56px; place-items: center; border-radius: 16px; background: var(--primary); color: #fff; font-size: 29px; }
.match-detail-result i { color: var(--muted); font-style: normal; font-weight: 900; }
.match-detail-result time { color: var(--primary-dark); font-size: 34px; font-weight: 900; }
.match-detail-result small { color: var(--muted); }
.match-detail-meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.match-detail-meta span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 13px; background: color-mix(in srgb, var(--primary) 7%, var(--surface)); color: var(--muted); font-size: 11px; }
.match-detail-meta svg { width: 16px; height: 16px; fill: none; stroke: var(--primary); }
.match-events-toolbar { margin-top: 20px; }
.match-timeline { position: relative; display: grid; gap: 10px; }
.match-timeline::before { content: ''; position: absolute; top: 12px; bottom: 12px; right: 31px; width: 2px; background: color-mix(in srgb, var(--primary) 20%, var(--line)); }
.match-timeline-item { position: relative; display: grid; grid-template-columns: 48px 46px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.match-timeline-minute { color: var(--primary-dark); font-weight: 900; text-align: center; }
.match-timeline-icon { z-index: 1; display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 4px var(--surface); color: var(--primary); }
.match-timeline-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; }
.match-timeline-item h3,
.match-timeline-item p { margin: 0; }
.match-timeline-item p { color: var(--muted); font-size: 12px; }
.match-timeline-item small { color: var(--muted); font-size: 10px; }
.match-timeline-team { color: var(--muted); font-size: 11px; }

@media (max-width: 720px) {
    .public-teams-grid,
    .public-match-list,
    .manager-match-grid,
    .manager-team-grid { grid-template-columns: 1fr; }
    .public-team-summary { grid-template-columns: auto minmax(0,1fr) auto; }
    .public-team-numbers { grid-column: 1 / -1; justify-content: stretch; }
    .public-team-numbers > span { flex: 1; }
    .public-team-chevron { grid-column: 3; grid-row: 1; }
    .team-section-tabs { grid-template-columns: repeat(5, 82px); }
    .public-match-footer { display: grid; grid-template-columns: 1fr 1fr; }
    .match-details-arrow { grid-column: 1 / -1; justify-content: center; }
    .match-detail-scoreboard { grid-template-columns: minmax(0,1fr) 84px minmax(0,1fr); gap: 7px; }
    .match-detail-logo { width: 74px; height: 74px; border-radius: 22px; }
    .match-detail-result b { width: 36px; height: 44px; font-size: 22px; }
    .manager-match-meta { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .public-team-summary { padding: 13px; gap: 10px; }
    .public-team-logo,
    .manager-team-logo { width: 58px; height: 58px; border-radius: 17px; }
    .public-team-main strong { font-size: 16px; }
    .team-mini-match { grid-template-columns: 51px minmax(0,1fr); }
    .team-mini-match > .tag { grid-column: 1 / -1; justify-self: center; }
    .team-mini-clubs > span { font-size: 10px; }
    .team-mini-clubs i { width: 25px; height: 25px; }
    .public-match-body { grid-template-columns: minmax(0,1fr) 66px minmax(0,1fr); gap: 5px; }
    .public-match-logo { width: 58px; height: 58px; border-radius: 17px; }
    .public-match-team strong { font-size: 12px; }
    .public-score b { width: 30px; height: 38px; font-size: 18px; }
    .public-match-center time { font-size: 20px; }
    .manager-match-clubs { grid-template-columns: minmax(0,1fr) 64px minmax(0,1fr); }
    .manager-club > span { width: 58px; height: 58px; border-radius: 17px; }
    .manager-team-stats { grid-template-columns: 1fr 1fr; }
    .manager-team-stats > span:last-child { grid-column: 1 / -1; }
    .match-detail-hero { padding: 15px 10px; border-radius: 22px; }
    .match-detail-scoreboard { grid-template-columns: minmax(0,1fr) 62px minmax(0,1fr); }
    .match-detail-logo { width: 62px; height: 62px; border-radius: 19px; }
    .match-detail-team h1 { font-size: 13px; }
    .match-detail-result b { width: 28px; height: 38px; font-size: 18px; border-radius: 11px; }
    .match-timeline-item { grid-template-columns: 42px 40px minmax(0,1fr); }
    .match-timeline-team { grid-column: 3; }
}

.modal-match-teams-with-logos > span { display: grid; place-items: center; gap: 6px; text-align: center !important; }
.modal-club-logo { display: grid; width: 48px; height: 48px; place-items: center; overflow: hidden; border-radius: 14px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); color: var(--primary-dark); }
.modal-club-logo img { width: 100%; height: 100%; padding: 5px; object-fit: contain; }
.modal-club-logo svg { width: 24px; height: 24px; fill: none; stroke: currentColor; }
.modal-team-link { color: inherit; text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.modal-team-link:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); box-shadow: 0 12px 26px rgba(23,33,27,.08); }
.modal-team-player-count { display: inline-flex; align-items: center; gap: 5px; color: var(--primary-dark) !important; font-weight: 800; }
.modal-team-player-count svg { width: 15px; height: 15px; fill: none; stroke: currentColor; }

/* ===== Professional live match events ===== */
.match-control-toolbar { align-items: center; }
.match-events-back {
    display: inline-flex;
    width: auto;
    max-width: max-content;
    min-height: 42px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-radius: 14px;
    background: var(--surface);
    color: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(23,33,27,.06);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}
.match-events-back svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.match-control-scoreboard {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(170px,230px) minmax(0,1fr);
    align-items: center;
    gap: clamp(10px,3vw,28px);
    padding: clamp(18px,4vw,34px);
    border: 1px solid color-mix(in srgb,var(--primary) 18%,var(--line));
    border-radius: 30px;
    background:
        radial-gradient(circle at 50% -30%, color-mix(in srgb,var(--primary) 18%,transparent), transparent 55%),
        linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--primary) 3%,var(--surface)));
    box-shadow: 0 20px 48px rgba(23,33,27,.09);
}
.match-control-team { display: grid; min-width: 0; place-items: center; gap: 10px; text-align: center; }
.match-control-team > strong { max-width: 100%; font-size: clamp(14px,2.4vw,22px); overflow-wrap: anywhere; }
.match-control-logo {
    display: grid;
    width: clamp(72px,10vw,104px);
    height: clamp(72px,10vw,104px);
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb,var(--primary) 16%,var(--line));
    border-radius: 28px;
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 14px 30px rgba(23,33,27,.09);
}
.match-control-logo img { width: 100%; height: 100%; padding: 8px; object-fit: contain; }
.match-control-logo svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.match-control-center { display: grid; place-items: center; gap: 9px; }
.match-control-result { display: flex; align-items: center; justify-content: center; gap: 9px; }
.match-control-result b {
    display: grid;
    width: clamp(48px,7vw,64px);
    height: clamp(58px,8vw,72px);
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(145deg,var(--primary),color-mix(in srgb,var(--primary) 72%,#071b10));
    color: #fff;
    box-shadow: 0 14px 28px color-mix(in srgb,var(--primary) 25%,transparent);
    font-size: clamp(25px,4vw,36px);
    font-variant-numeric: tabular-nums;
}
.match-control-result i { color: var(--muted); font-size: 25px; font-style: normal; font-weight: 900; }
.match-live-clock {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: 'dot time' 'label label';
    align-items: center;
    justify-content: center;
    column-gap: 7px;
    min-width: 136px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb,var(--primary) 5%,var(--surface));
}
.match-live-dot { grid-area: dot; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.match-live-clock strong { grid-area: time; color: var(--primary-dark); font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.match-live-clock small { grid-area: label; color: var(--muted); font-size: 10px; font-weight: 900; text-align: center; }
.match-live-clock.is-running .match-live-dot { background: #e11d48; box-shadow: 0 0 0 5px rgba(225,29,72,.12); animation: match-live-pulse 1.25s ease-in-out infinite; }
@keyframes match-live-pulse { 50% { transform: scale(.7); opacity: .55; } }
.match-shootout-score { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: #191919; color: #fff; font-size: 12px; font-weight: 900; }
.match-shootout-score span { color: rgba(255,255,255,.7); }
.match-shootout-score.is-hidden { display: none; }

.match-clock-panel,
.match-events-section {
    display: grid;
    gap: 15px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(23,33,27,.065);
}
.match-clock-heading,
.match-event-heading { display: flex; align-items: center; gap: 12px; }
.match-clock-heading > span,
.match-event-heading > span {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 15px;
    background: color-mix(in srgb,var(--primary) 10%,var(--surface));
    color: var(--primary-dark);
}
.match-clock-heading svg,
.match-event-heading svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.match-clock-heading h2,
.match-event-heading h2 { margin: 0; font-size: 18px; }
.match-clock-heading p,
.match-event-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.match-clock-controls { display: grid; grid-template-columns: minmax(220px,1.5fr) repeat(4,minmax(120px,.7fr)); gap: 9px; align-items: end; }
.match-period-select { display: grid; gap: 7px; font-size: 12px; font-weight: 900; }
.match-period-select > span { display: inline-flex; align-items: center; gap: 7px; }
.match-period-select svg { width: 17px; height: 17px; fill: none; stroke: var(--primary); stroke-width: 1.8; }
.match-period-select select { min-height: 48px; }
.match-clock-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 15px;
    font-size: 12px;
}
.match-clock-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.match-clock-button.phase { border-color: color-mix(in srgb,var(--primary) 18%,var(--line)); background: color-mix(in srgb,var(--primary) 7%,var(--surface)); color: var(--primary-dark); }
.match-clock-button.start { background: #087443; }
.match-clock-button.pause { background: #b76b08; }
.match-clock-button.reset { background: #fff; color: var(--danger); border-color: color-mix(in srgb,var(--danger) 22%,var(--line)); }

.match-event-compose { margin-top: 18px; border-radius: 24px; }
.match-event-compose .form-grid { margin-top: 16px; }
.match-add-event-button { gap: 8px; border-radius: 14px; }
.match-add-event-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.match-add-event-button.is-loading { opacity: .7; pointer-events: none; }
.match-action-feedback { margin-top: 12px; padding: 10px 12px; border-radius: 13px; font-size: 12px; font-weight: 900; }
.match-action-feedback.is-success { background: rgba(8,116,67,.1); color: #07643b; }
.match-action-feedback.is-error { background: rgba(180,35,24,.1); color: var(--danger); }

.admin-event-list { display: grid; gap: 9px; }
.admin-event-card {
    --event-color: var(--primary);
    display: grid;
    grid-template-columns: 48px 46px minmax(0,1fr) auto 38px;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid color-mix(in srgb,var(--event-color) 18%,var(--line));
    border-radius: 18px;
    background: linear-gradient(100deg,color-mix(in srgb,var(--event-color) 5%,var(--surface)),var(--surface));
    transition: transform .18s ease, box-shadow .18s ease;
}
.admin-event-card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(23,33,27,.07); }
.admin-event-card.event-yellow { --event-color: #d69e00; }
.admin-event-card.event-red { --event-color: #c92a2a; }
.admin-event-card.event-substitution { --event-color: #276cc9; }
.admin-event-card.event-penalty-scored { --event-color: #087443; }
.admin-event-card.event-penalty-missed { --event-color: #a33a32; }
.admin-event-minute { color: var(--event-color); font-size: 15px; font-weight: 950; text-align: center; font-variant-numeric: tabular-nums; }
.admin-event-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid color-mix(in srgb,var(--event-color) 24%,var(--line));
    border-radius: 13px;
    background: color-mix(in srgb,var(--event-color) 9%,var(--surface));
    color: var(--event-color);
}
.admin-event-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-event-card.event-yellow .admin-event-icon svg rect { fill: #f6c90e; stroke: #af8500; }
.admin-event-card.event-red .admin-event-icon svg rect { fill: #e53935; stroke: #a51f1f; }
.admin-event-content { min-width: 0; }
.admin-event-content strong,
.admin-event-content p,
.admin-event-content small { display: block; margin: 0; overflow-wrap: anywhere; }
.admin-event-content p { color: var(--ink); font-size: 13px; }
.admin-event-content small,
.admin-event-team { color: var(--muted); font-size: 10px; }
.admin-event-team { max-width: 140px; text-align: center; }
.admin-event-delete {
    display: grid;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    place-items: center;
    border: 1px solid color-mix(in srgb,var(--danger) 20%,var(--line));
    border-radius: 12px;
    background: #fff;
    color: var(--danger);
}
.admin-event-delete svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.match-timeline-icon.event-yellow { color: #b88700; background: #fff9d9; }
.match-timeline-icon.event-red { color: #c92a2a; background: #fff0f0; }
.match-timeline-icon.event-substitution { color: #276cc9; background: #edf5ff; }
.match-timeline-icon.event-penalty-scored { color: #087443; background: #eaf8f0; }
.match-timeline-icon.event-penalty-missed { color: #a33a32; background: #fff0ee; }
.match-timeline-icon.event-yellow svg rect { fill: #f6c90e; stroke: #af8500; }
.match-timeline-icon.event-red svg rect { fill: #e53935; stroke: #a51f1f; }

@media (max-width: 980px) {
    .match-clock-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .match-period-select { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .match-control-toolbar { flex-direction: row; align-items: flex-start; }
    .match-control-toolbar > div { min-width: 0; flex: 1 1 auto; }
    .match-control-toolbar p { font-size: 11px; }
    .match-events-back { width: 42px; min-width: 42px; height: 42px; padding: 0; border-radius: 13px; }
    .match-events-back span { display: none; }
    .match-control-scoreboard { grid-template-columns: minmax(0,1fr) 105px minmax(0,1fr); padding: 18px 9px; gap: 6px; border-radius: 23px; }
    .match-control-logo { width: 66px; height: 66px; border-radius: 19px; }
    .match-control-team > strong { font-size: 12px; }
    .match-control-result { gap: 4px; }
    .match-control-result b { width: 34px; height: 44px; border-radius: 12px; font-size: 20px; }
    .match-control-result i { font-size: 18px; }
    .match-live-clock { min-width: 100px; padding: 7px 8px; }
    .match-live-clock strong { font-size: 16px; }
    .match-shootout-score { padding: 5px 8px; font-size: 10px; }
    .match-clock-panel,
    .match-events-section { padding: 14px; border-radius: 20px; }
    .match-clock-controls { grid-template-columns: 1fr 1fr; gap: 7px; }
    .match-clock-button { min-height: 45px; padding: 8px; font-size: 11px; }
    .admin-event-card { grid-template-columns: 38px 40px minmax(0,1fr) 34px; gap: 7px; padding: 10px 8px; }
    .admin-event-team { grid-column: 3; text-align: right; }
    .admin-event-delete { grid-column: 4; grid-row: 1 / span 2; align-self: center; }
}

@media (max-width: 420px) {
    .match-clock-button span { font-size: 10px; }
    .match-clock-button svg { width: 17px; height: 17px; }
    .match-event-heading > span,
    .match-clock-heading > span { width: 40px; height: 40px; flex-basis: 40px; }
    .match-event-heading h2,
    .match-clock-heading h2 { font-size: 16px; }
}

.public-match-live-clock {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: 'dot time' 'period period';
    align-items: center;
    justify-content: center;
    gap: 1px 6px;
    min-width: 118px;
    margin-top: 6px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb,var(--primary) 5%,var(--surface));
}
.public-match-live-clock > span { grid-area: dot; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.public-match-live-clock strong { grid-area: time; color: var(--primary-dark); font-size: 16px; font-variant-numeric: tabular-nums; }
.public-match-live-clock small { grid-area: period; color: var(--muted); font-size: 9px; font-weight: 900; text-align: center; }
.public-match-live-clock.is-running > span { background: #e11d48; box-shadow: 0 0 0 4px rgba(225,29,72,.12); animation: match-live-pulse 1.25s ease-in-out infinite; }
.match-detail-result [hidden] { display: none !important; }
.match-timeline-icon svg { stroke-linecap: round; stroke-linejoin: round; }


/* Professional responsive standings */
.standings-toolbar { align-items: flex-end; }
.standings-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.standings-actions .btn svg,
.standings-editor-footer .btn svg,
.standings-reset-form .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.standings-shell,
.modal-standings-shell {
    width: 100%;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(20, 43, 31, .09);
}
.standings-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
.standings-table col.standing-col-rank { width: 6%; }
.standings-table col.standing-col-team { width: 30%; }
.standings-table col:not(.standing-col-rank):not(.standing-col-team) { width: 8%; }
.standings-table th,
.standings-table td { padding: 13px 5px; text-align: center; white-space: nowrap; }
.standings-table th:nth-child(2),
.standings-table td:nth-child(2) { text-align: right; }
.standings-table thead th {
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 10%, #fff), color-mix(in srgb, var(--primary) 4%, #fff));
    color: color-mix(in srgb, var(--primary) 78%, #17211b);
    font-size: 12px;
    font-weight: 900;
}
.standings-table tbody tr { background: var(--surface); }
.standings-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--primary) 2.5%, var(--surface)); }
.standings-table tbody tr.top-rank { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.standing-rank-number {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 8%, #fff);
    color: var(--primary);
    font-weight: 950;
}
.rank-1 .standing-rank-number { background: #fff2b8; color: #8b6500; }
.rank-2 .standing-rank-number { background: #edf0f3; color: #5e6870; }
.rank-3 .standing-rank-number { background: #f7dfca; color: #925327; }
.standing-team-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.standing-team-cell i {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--primary);
}
.standing-team-cell i img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.standing-team-cell i svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.standing-team-cell strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.standing-points {
    display: inline-grid;
    min-width: 32px;
    height: 32px;
    place-items: center;
    padding: 0 5px;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
}
.goal-diff.positive { color: #087443; font-weight: 900; }
.goal-diff.negative { color: #c0392b; font-weight: 900; }
.label-short { display: none; }

.standings-editor-panel {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
    border-radius: 24px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 4%, #fff), #fff);
    box-shadow: 0 18px 45px rgba(20,43,31,.08);
}
.standings-editor-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.standings-editor-heading > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: color-mix(in srgb,var(--primary) 11%,#fff); color: var(--primary); }
.standings-editor-heading svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.standings-editor-heading h2 { margin: 0 0 3px; font-size: 18px; }
.standings-editor-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.standings-editor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.standing-edit-card { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.standing-edit-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.standing-edit-logo { display: grid; width: 44px; height: 44px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; color: var(--primary); }
.standing-edit-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.standing-edit-logo svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.standing-edit-card header div { display: grid; gap: 2px; }
.standing-edit-card header small { color: var(--muted); font-size: 10px; }
.standing-edit-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.standing-edit-fields label { display: grid; gap: 4px; font-size: 10px; font-weight: 850; color: var(--muted); }
.standing-edit-fields input { width: 100%; min-width: 0; padding: 9px 5px; text-align: center; border-radius: 10px; font-weight: 900; }
.standings-editor-footer { display: flex; justify-content: flex-end; margin-top: 15px; }
.standings-reset-form { display: flex; justify-content: flex-start; margin-top: 9px; }

@media (max-width: 720px) {
    .standings-toolbar { align-items: stretch; }
    .standings-actions .btn { width: 100%; justify-content: center; }
    .standings-shell,
    .modal-standings-shell { border-radius: 16px; }
    .standings-table col.standing-col-rank { width: 6%; }
    .standings-table col.standing-col-team { width: 30%; }
    .standings-table col:not(.standing-col-rank):not(.standing-col-team) { width: 8%; }
    .standings-table th,
    .standings-table td { padding: 8px 1px; font-size: 10px; letter-spacing: -.2px; }
    .standings-table thead th { font-size: 9px; }
    .label-full { display: none; }
    .label-short { display: inline; }
    .standing-rank-number { width: 21px; height: 24px; border-radius: 7px; font-size: 9px; }
    .standing-team-cell { gap: 4px; }
    .standing-team-cell i { width: 24px; height: 24px; flex-basis: 24px; border-radius: 7px; }
    .standing-team-cell i svg { width: 15px; height: 15px; }
    .standing-team-cell strong { font-size: 9.5px; }
    .standing-points { min-width: 22px; height: 25px; padding: 0 2px; border-radius: 7px; font-size: 10px; }
    .standings-editor-panel { padding: 14px; border-radius: 19px; }
    .standings-editor-grid { grid-template-columns: 1fr; }
    .standing-edit-fields { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .standings-editor-footer .btn,
    .standings-reset-form .btn { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
    .standings-table th,
    .standings-table td { font-size: 8.5px; }
    .standings-table thead th { font-size: 8px; }
    .standing-team-cell strong { font-size: 8.5px; }
    .standing-team-cell i { width: 21px; height: 21px; flex-basis: 21px; }
    .standing-rank-number { width: 18px; height: 22px; }
    .standing-points { min-width: 19px; height: 23px; font-size: 9px; }
}

/* Drinking break and professional penalty shootout */
.match-clock-button.drinks {
    color: #0369a1;
    border-color: rgba(14, 165, 233, .28);
    background: linear-gradient(145deg, rgba(224, 242, 254, .96), rgba(240, 249, 255, .96));
}
.match-clock-button.drinks:hover { box-shadow: 0 11px 28px rgba(14, 165, 233, .16); transform: translateY(-2px); }
.match-clock-button.drinks svg { filter: drop-shadow(0 4px 8px rgba(14,165,233,.18)); }
.admin-event-card.event-drinks-break { --event-color: #0284c7; }
.match-timeline-icon.event-drinks-break { color: #0284c7; background: #e0f2fe; }

.penalty-manager-panel {
    position: relative;
    display: none;
    overflow: hidden;
    margin: 18px 0;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 8% 10%, rgba(34,197,94,.22), transparent 26%),
        radial-gradient(circle at 92% 90%, rgba(239,68,68,.18), transparent 28%),
        linear-gradient(135deg, #111827 0%, #172033 48%, #0f172a 100%);
    box-shadow: 0 24px 60px rgba(15,23,42,.28);
}
.penalty-manager-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 28px 28px;
}
.penalty-manager-panel.is-active { display: block; animation: penalty-panel-in .45s cubic-bezier(.2,.8,.2,1); }
.penalty-manager-header,
.penalty-setup-form,
.penalty-teams-board,
.penalty-legend { position: relative; z-index: 1; }
.penalty-manager-header { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.penalty-manager-trophy {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    color: #facc15;
    background: rgba(255,255,255,.08);
    box-shadow: inset 0 1px rgba(255,255,255,.12), 0 12px 28px rgba(0,0,0,.18);
}
.penalty-manager-trophy svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.penalty-manager-header h2 { margin: 0 0 3px; font-size: 20px; }
.penalty-manager-header p { margin: 0; color: rgba(255,255,255,.66); font-size: 12px; }
.penalty-live-badge { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; padding: 7px 11px; border-radius: 999px; color: #bbf7d0; background: rgba(34,197,94,.12); font-size: 10px; font-weight: 900; }
.penalty-live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 5px rgba(34,197,94,.12); animation: penalty-live-pulse 1.4s infinite; }
.penalty-setup-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) auto; gap: 10px; align-items: end; margin-bottom: 16px; padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.055); backdrop-filter: blur(12px); }
.penalty-setup-form label { display: grid; gap: 5px; color: rgba(255,255,255,.74); font-size: 11px; font-weight: 800; }
.penalty-setup-form input { width: 100%; min-height: 43px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; color: #fff; background: rgba(3,7,18,.38); text-align: center; font-size: 17px; font-weight: 950; }
.penalty-setup-form button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px; border: 0; border-radius: 13px; color: #082f1b; background: linear-gradient(135deg,#86efac,#22c55e); font-weight: 950; box-shadow: 0 9px 22px rgba(34,197,94,.22); }
.penalty-setup-form button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.penalty-teams-board { display: grid; gap: 12px; }
.penalty-team-row { display: grid; grid-template-columns: minmax(170px,230px) minmax(0,1fr); align-items: center; gap: 16px; min-height: 92px; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; background: linear-gradient(110deg,rgba(255,255,255,.09),rgba(255,255,255,.035)); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.penalty-team-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.penalty-team-logo { display: grid; width: 58px; height: 58px; flex: 0 0 58px; place-items: center; overflow: hidden; border: 2px solid rgba(255,255,255,.13); border-radius: 18px; background: rgba(255,255,255,.08); }
.penalty-team-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.penalty-team-logo svg { width: 31px; height: 31px; fill: none; stroke: rgba(255,255,255,.72); stroke-width: 1.8; }
.penalty-team-info strong { display: block; max-width: 150px; overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.penalty-team-info small { display: block; margin-top: 3px; color: rgba(255,255,255,.58); font-size: 10px; }
.penalty-team-info small b { color: #facc15; font-size: 15px; }
.penalty-kicks-track { display: flex; align-items: center; gap: 9px; min-width: 0; overflow-x: auto; padding: 7px 2px 9px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.penalty-ball {
    position: relative;
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    min-height: 48px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    color: #d1d5db;
    background: radial-gradient(circle at 35% 28%, #9ca3af, #4b5563 62%, #374151);
    box-shadow: 0 8px 18px rgba(0,0,0,.27), inset 0 1px 4px rgba(255,255,255,.26);
    cursor: pointer;
    transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, filter .24s ease;
}
.penalty-ball:hover { transform: translateY(-5px) rotate(-5deg) scale(1.05); filter: brightness(1.08); }
.penalty-ball svg { width: 30px; height: 30px; fill: rgba(255,255,255,.06); stroke: currentColor; stroke-width: 1.7; opacity: .95; }
.penalty-ball span { position: absolute; inset-inline-end: -3px; inset-block-end: -3px; display: grid; width: 18px; height: 18px; place-items: center; border: 2px solid #111827; border-radius: 50%; color: #111827; background: #f8fafc; font-size: 9px; font-weight: 950; }
.penalty-ball.is-scored { color: #dcfce7; border-color: rgba(134,239,172,.62); background: radial-gradient(circle at 35% 28%,#4ade80,#16a34a 60%,#166534); box-shadow: 0 0 0 5px rgba(34,197,94,.1), 0 12px 26px rgba(34,197,94,.34), inset 0 1px 5px rgba(255,255,255,.35); animation: penalty-score-pop .48s cubic-bezier(.2,1.6,.4,1); }
.penalty-ball.is-missed { color: #fee2e2; border-color: rgba(252,165,165,.6); background: radial-gradient(circle at 35% 28%,#f87171,#dc2626 60%,#991b1b); box-shadow: 0 0 0 5px rgba(239,68,68,.1), 0 12px 26px rgba(239,68,68,.28), inset 0 1px 5px rgba(255,255,255,.28); animation: penalty-miss-shake .42s ease; }
.penalty-ball.is-updating { pointer-events: none; animation: penalty-ball-spin .7s linear infinite; }
.penalty-legend { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 14px; color: rgba(255,255,255,.64); font-size: 10px; }
.penalty-legend span { display: inline-flex; align-items: center; gap: 6px; }
.penalty-legend i { width: 11px; height: 11px; border-radius: 50%; background: #6b7280; }
.penalty-legend i.is-scored { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.1); }
.penalty-legend i.is-missed { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.1); }

.public-penalty-board { display: none; margin: 14px 0 20px; padding: 18px; overflow: hidden; border-radius: 24px; color: #fff; background: linear-gradient(135deg,#111827,#172033); box-shadow: 0 18px 46px rgba(15,23,42,.2); }
.public-penalty-board.is-visible { display: block; animation: penalty-panel-in .42s ease; }
.public-penalty-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.public-penalty-heading > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: #facc15; background: rgba(255,255,255,.08); }
.public-penalty-heading svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.public-penalty-heading strong,.public-penalty-heading small { display: block; }
.public-penalty-heading small { color: rgba(255,255,255,.58); font-size: 10px; }
.public-penalty-teams { display: grid; gap: 10px; }
.public-penalty-team { display: grid; grid-template-columns: minmax(150px,220px) minmax(0,1fr); gap: 13px; align-items: center; padding: 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.055); }
.public-penalty-team-name { display: grid; grid-template-columns: 42px minmax(0,1fr) 30px; align-items: center; gap: 8px; }
.public-penalty-team-name > span { display: grid; width: 42px; height: 42px; place-items: center; overflow: hidden; border-radius: 13px; background: rgba(255,255,255,.08); }
.public-penalty-team-name img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.public-penalty-team-name svg { width: 24px; height: 24px; fill: none; stroke: rgba(255,255,255,.72); stroke-width: 1.7; }
.public-penalty-team-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.public-penalty-team-name b { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; color: #111827; background: #facc15; font-size: 14px; }
.public-penalty-kicks { display: flex; gap: 7px; overflow-x: auto; padding: 5px 2px; }
.public-penalty-ball { position: relative; display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 50%; color: #d1d5db; background: radial-gradient(circle at 35% 28%,#9ca3af,#4b5563 65%); box-shadow: 0 6px 14px rgba(0,0,0,.22); }
.public-penalty-ball svg { width: 23px; height: 23px; fill: rgba(255,255,255,.04); stroke: currentColor; stroke-width: 1.7; }
.public-penalty-ball i { position: absolute; inset-inline-end: -2px; inset-block-end: -2px; display: grid; width: 14px; height: 14px; place-items: center; border: 1px solid #111827; border-radius: 50%; color: #111827; background: #fff; font-size: 7px; font-style: normal; font-weight: 950; }
.public-penalty-ball.is-scored { color: #dcfce7; background: radial-gradient(circle at 35% 28%,#4ade80,#16a34a 64%); box-shadow: 0 8px 18px rgba(34,197,94,.28); animation: penalty-score-pop .45s ease; }
.public-penalty-ball.is-missed { color: #fee2e2; background: radial-gradient(circle at 35% 28%,#f87171,#dc2626 64%); box-shadow: 0 8px 18px rgba(239,68,68,.24); animation: penalty-miss-shake .4s ease; }

@keyframes penalty-panel-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes penalty-score-pop { 0% { transform: scale(.7) rotate(-20deg); } 58% { transform: scale(1.17) rotate(8deg); } 100% { transform: scale(1); } }
@keyframes penalty-miss-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px) rotate(-7deg); } 55% { transform: translateX(5px) rotate(7deg); } 80% { transform: translateX(-2px); } }
@keyframes penalty-ball-spin { to { transform: rotate(360deg); } }
@keyframes penalty-live-pulse { 50% { opacity: .45; transform: scale(.82); } }

@media (max-width: 720px) {
    .penalty-manager-panel { padding: 15px 11px; border-radius: 22px; }
    .penalty-manager-header { align-items: flex-start; }
    .penalty-manager-trophy { width: 44px; height: 44px; flex-basis: 44px; border-radius: 14px; }
    .penalty-manager-header h2 { font-size: 16px; }
    .penalty-manager-header p { font-size: 10px; }
    .penalty-live-badge { display: none; }
    .penalty-setup-form { grid-template-columns: 1fr 1fr; padding: 9px; }
    .penalty-setup-form button { grid-column: 1 / -1; }
    .penalty-team-row { grid-template-columns: 1fr; gap: 8px; min-height: 0; padding: 11px; }
    .penalty-team-logo { width: 45px; height: 45px; flex-basis: 45px; border-radius: 14px; }
    .penalty-kicks-track { gap: 7px; }
    .penalty-ball { width: 42px; height: 42px; flex-basis: 42px; min-height: 42px; }
    .penalty-ball svg { width: 27px; height: 27px; }
    .penalty-legend { gap: 9px; }
    .public-penalty-board { padding: 13px 10px; border-radius: 20px; }
    .public-penalty-team { grid-template-columns: 1fr; gap: 7px; padding: 9px; }
    .public-penalty-kicks { gap: 6px; }
}

/* نافذة قرار ركلة الترجيح */
body.has-penalty-modal { overflow: hidden; }
.penalty-decision-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    padding: 18px;
    place-items: center;
    visibility: hidden;
    opacity: 0;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(10px);
    transition: opacity .22s ease, visibility .22s ease;
}
.penalty-decision-modal.is-open { visibility: visible; opacity: 1; }
.penalty-decision-card {
    position: relative;
    width: min(430px, 100%);
    padding: 25px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 15% 5%, rgba(34,197,94,.19), transparent 36%),
        radial-gradient(circle at 90% 88%, rgba(239,68,68,.16), transparent 38%),
        linear-gradient(145deg,#111827,#0b1220);
    box-shadow: 0 30px 80px rgba(0,0,0,.46);
    transform: translateY(18px) scale(.95);
    transition: transform .28s cubic-bezier(.2,.9,.2,1.15);
}
.penalty-decision-modal.is-open .penalty-decision-card { transform: none; }
.penalty-decision-close {
    position: absolute;
    inset-block-start: 13px;
    inset-inline-end: 13px;
    display: grid;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.07);
    font-size: 24px;
    line-height: 1;
}
.penalty-decision-ball {
    display: grid;
    width: 70px;
    height: 70px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 50%;
    color: #e5e7eb;
    background: radial-gradient(circle at 35% 28%,#9ca3af,#374151 68%);
    box-shadow: 0 15px 34px rgba(0,0,0,.32), inset 0 2px 7px rgba(255,255,255,.25);
    animation: penalty-choice-float 2.6s ease-in-out infinite;
}
.penalty-decision-ball svg { width: 44px; height: 44px; fill: rgba(255,255,255,.04); stroke: currentColor; stroke-width: 1.7; }
.penalty-decision-card > small,
.penalty-decision-card > h2,
.penalty-decision-card > p { display: block; margin-inline: auto; text-align: center; }
.penalty-decision-card > small { color: #facc15; font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.penalty-decision-card > h2 { margin-block: 6px 4px; font-size: 21px; }
.penalty-decision-card > p { margin-block: 0 18px; color: rgba(255,255,255,.62); font-size: 11px; }
.penalty-decision-actions { display: grid; gap: 9px; }
.penalty-decision-button {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr);
    min-height: 64px;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 18px;
    color: #fff;
    text-align: start;
    background: rgba(255,255,255,.055);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.penalty-decision-button:hover { transform: translateY(-2px); }
.penalty-decision-button > svg { width: 27px; height: 27px; padding: 5px; border-radius: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.penalty-decision-button span,.penalty-decision-button b,.penalty-decision-button small { display: block; }
.penalty-decision-button b { font-size: 13px; }
.penalty-decision-button small { margin-top: 2px; color: rgba(255,255,255,.58); font-size: 9px; }
.penalty-decision-button.scored { border-color: rgba(74,222,128,.24); }
.penalty-decision-button.scored > svg { color: #dcfce7; background: #16a34a; box-shadow: 0 7px 18px rgba(34,197,94,.25); }
.penalty-decision-button.scored:hover { border-color: rgba(74,222,128,.6); background: rgba(34,197,94,.12); }
.penalty-decision-button.missed { border-color: rgba(248,113,113,.22); }
.penalty-decision-button.missed > svg { color: #fee2e2; background: #dc2626; box-shadow: 0 7px 18px rgba(239,68,68,.22); }
.penalty-decision-button.missed:hover { border-color: rgba(248,113,113,.58); background: rgba(239,68,68,.11); }
.penalty-decision-button.pending > svg { color: #e5e7eb; background: #4b5563; }
.penalty-decision-button.pending:hover { border-color: rgba(209,213,219,.42); background: rgba(148,163,184,.1); }
.penalty-decision-button.is-loading { pointer-events: none; opacity: .65; }
.penalty-decision-cancel {
    width: 100%;
    min-height: 42px;
    margin-top: 11px;
    border: 0;
    border-radius: 13px;
    color: rgba(255,255,255,.66);
    background: transparent;
    font-size: 11px;
    font-weight: 850;
}
.penalty-decision-cancel:hover { color: #fff; background: rgba(255,255,255,.06); }
.match-period-select select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
@keyframes penalty-choice-float { 50% { transform: translateY(-5px) rotate(4deg); } }
@media (max-width: 520px) {
    .penalty-decision-modal { padding: 10px; align-items: end; }
    .penalty-decision-card { width: 100%; padding: 22px 14px 14px; border-radius: 25px 25px 18px 18px; }
    .penalty-decision-ball { width: 60px; height: 60px; }
    .penalty-decision-ball svg { width: 38px; height: 38px; }
    .penalty-decision-card > h2 { font-size: 18px; }
    .penalty-decision-button { min-height: 59px; grid-template-columns: 40px minmax(0,1fr); }
}

/* تحسين بطاقة تغطية المباراة على الهواتف: منع تراكب الفريقين والنتيجة */
@media (max-width: 720px) {
    .match-control-scoreboard {
        grid-template-columns: minmax(0,1fr) minmax(0,1fr);
        grid-template-areas:
            "home away"
            "center center";
        align-items: start;
        gap: 13px 8px;
        padding: 14px 10px;
        overflow: hidden;
    }
    .match-control-scoreboard > .match-control-team:first-child { grid-area: home; }
    .match-control-scoreboard > .match-control-center { grid-area: center; }
    .match-control-scoreboard > .match-control-team:last-child { grid-area: away; }
    .match-control-team {
        width: 100%;
        gap: 6px;
    }
    .match-control-logo {
        width: clamp(52px,18vw,66px);
        height: clamp(52px,18vw,66px);
        border-radius: 17px;
    }
    .match-control-team > strong {
        width: 100%;
        min-height: 2.5em;
        display: -webkit-box;
        overflow: hidden;
        font-size: 11px;
        line-height: 1.25;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .match-control-center {
        display: flex;
        width: 100%;
        min-width: 0;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 7px 10px;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }
    .match-control-result { order: 1; }
    .match-live-clock { order: 2; min-width: 104px; max-width: 130px; }
    .match-shootout-score { order: 3; flex: 0 0 auto; }
}

@media (max-width: 390px) {
    .match-control-scoreboard { padding-inline: 7px; }
    .match-control-logo { width: 50px; height: 50px; border-radius: 15px; }
    .match-control-result b { width: 31px; height: 40px; font-size: 18px; }
    .match-live-clock { min-width: 96px; padding-inline: 6px; }
    .match-shootout-score { width: 100%; justify-content: center; }
}

/* بطاقات جدول المباريات على الهواتف: توزيع الفريقين ثم النتيجة دون تداخل */
@media (max-width: 480px) {
    .public-match-link { padding: 12px 10px; }
    .public-match-topline {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .match-stage-label {
        min-width: 0;
        max-width: calc(100% - 88px);
        line-height: 1.3;
        overflow-wrap: anywhere;
    }
    .public-match-body {
        grid-template-columns: minmax(0,1fr) minmax(0,1fr);
        grid-template-areas:
            "home away"
            "center center";
        gap: 10px 7px;
        padding: 13px 0;
    }
    .public-match-body > .public-match-team:first-child { grid-area: home; }
    .public-match-body > .public-match-center { grid-area: center; padding-top: 9px; border-top: 1px solid var(--line); }
    .public-match-body > .public-match-team:last-child { grid-area: away; }
    .public-match-team { width: 100%; }
    .public-match-team strong {
        min-height: 2.45em;
        display: -webkit-box;
        overflow: hidden;
        line-height: 1.25;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .manager-match-card { padding: 13px 10px; overflow: hidden; }
    .manager-match-head { align-items: flex-start; flex-wrap: wrap; }
    .manager-match-stage { min-width: 0; overflow-wrap: anywhere; text-align: center; }
    .manager-match-clubs {
        grid-template-columns: minmax(0,1fr) minmax(0,1fr);
        grid-template-areas:
            "home away"
            "score score";
        gap: 10px 7px;
    }
    .manager-match-clubs > .manager-club:first-child { grid-area: home; }
    .manager-match-clubs > .manager-match-score { grid-area: score; padding-top: 8px; border-top: 1px solid var(--line); }
    .manager-match-clubs > .manager-club:last-child { grid-area: away; }
    .manager-club strong {
        min-height: 2.45em;
        display: -webkit-box;
        overflow: hidden;
        font-size: 11px;
        line-height: 1.25;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
}

/* المشاركة العامة وإعداداتها */
.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line));
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 900;
    font-size: .84rem;
    text-decoration: none;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 24%, transparent);
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.share-button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px color-mix(in srgb, var(--primary) 30%, transparent); filter: saturate(1.08); }
.share-button:active { transform: translateY(0) scale(.98); }
.share-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-button.is-compact { min-height: 36px; padding: 7px 11px; margin-inline-start: auto; font-size: .76rem; }
.share-toolbar-actions, .schedule-toolbar-actions, .standings-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modal-share-row { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.modal-share-row .share-button { min-height: 38px; padding: 8px 12px; }

.share-settings-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 25px;
    margin-bottom: 18px;
    border: 1px solid color-mix(in srgb, #25d366 24%, var(--line));
    border-radius: 26px;
    background: linear-gradient(135deg, color-mix(in srgb, #25d366 11%, var(--surface)), color-mix(in srgb, #128c7e 7%, var(--surface)));
    box-shadow: 0 18px 42px rgba(23, 33, 27, .09);
}
.share-settings-hero::after { content: ""; position: absolute; width: 210px; height: 210px; inset-inline-end: -70px; top: -105px; border-radius: 50%; background: radial-gradient(circle, rgba(37,211,102,.22), transparent 68%); pointer-events: none; }
.share-settings-hero > span { position: relative; z-index: 1; display: grid; place-items: center; width: 68px; height: 68px; flex: 0 0 68px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 15px 32px rgba(18,140,126,.25); }
.share-settings-hero > span svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.share-settings-hero h1 { margin: 4px 0 5px; font-size: clamp(1.35rem, 3vw, 2rem); }
.share-settings-hero p { margin: 0; color: var(--muted); }
.share-settings-back { display: inline-flex; align-items: center; gap: 6px; color: #128c7e; font-weight: 850; font-size: .78rem; text-decoration: none; }
.share-settings-back svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.share-settings-form { display: grid; gap: 18px; }
.share-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.share-setting-card { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 23px; background: var(--surface); box-shadow: 0 13px 30px rgba(23,33,27,.065); }
.share-setting-card header { display: flex; align-items: center; gap: 11px; }
.share-setting-card header > span { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 15px; color: #128c7e; background: color-mix(in srgb, #25d366 12%, var(--surface)); }
.share-setting-card header svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.share-setting-card h2 { margin: 0; font-size: 1rem; }
.share-setting-card header p { margin: 2px 0 0; color: var(--muted); font-size: .75rem; }
.share-setting-card label { display: grid; gap: 7px; font-weight: 850; font-size: .8rem; }
.share-setting-card textarea { width: 100%; min-height: 88px; resize: vertical; border-radius: 15px; line-height: 1.75; }
.share-setting-preview { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 14px; color: #0d705f; background: color-mix(in srgb, #25d366 8%, var(--surface)); }
.share-setting-preview span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: #fff; background: #25d366; }
.share-setting-preview svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.share-setting-preview small { color: inherit; font-weight: 750; }
.share-settings-savebar { position: sticky; bottom: 10px; z-index: 8; backdrop-filter: blur(14px); }

@media (max-width: 760px) {
    .share-settings-grid { grid-template-columns: 1fr; }
    .share-settings-hero { align-items: flex-start; padding: 18px; border-radius: 21px; }
    .share-settings-hero > span { width: 54px; height: 54px; flex-basis: 54px; border-radius: 17px; }
    .share-settings-hero > span svg { width: 27px; height: 27px; }
    .share-toolbar-actions, .schedule-toolbar-actions, .standings-actions { width: 100%; justify-content: stretch; }
    .share-toolbar-actions > *, .schedule-toolbar-actions > .share-button, .standings-actions > * { flex: 1 1 auto; }
    .share-button { min-height: 40px; padding: 8px 11px; font-size: .76rem; }
    .match-event-heading .share-button.is-compact { flex: 0 0 auto; width: auto; margin-inline-start: 0; }
    .modal-share-row { justify-content: stretch; }
    .modal-share-row .share-button { width: 100%; }
}


/* تغطية المباراة على الهاتف: صف مضغوط ثابت دون تداخل */
@media (max-width: 720px) {
    .match-control-scoreboard {
        grid-template-columns: minmax(0, 1fr) clamp(82px, 27vw, 104px) minmax(0, 1fr) !important;
        grid-template-areas: "home center away" !important;
        align-items: center !important;
        gap: clamp(3px, 1.8vw, 8px) !important;
        padding: 12px 6px !important;
        overflow: hidden;
    }
    .match-control-scoreboard > .match-control-team:first-child { grid-area: home; }
    .match-control-scoreboard > .match-control-center { grid-area: center; }
    .match-control-scoreboard > .match-control-team:last-child { grid-area: away; }
    .match-control-team {
        width: 100%;
        min-width: 0;
        gap: 5px;
    }
    .match-control-logo {
        width: clamp(42px, 13vw, 56px) !important;
        height: clamp(42px, 13vw, 56px) !important;
        border-radius: 14px !important;
    }
    .match-control-logo img { padding: 4px; }
    .match-control-logo svg { width: 27px; height: 27px; }
    .match-control-team > strong {
        width: 100%;
        min-height: 2.35em;
        display: -webkit-box;
        overflow: hidden;
        font-size: clamp(8px, 2.8vw, 11px) !important;
        line-height: 1.18;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .match-control-center {
        display: grid !important;
        width: 100%;
        min-width: 0;
        place-items: center;
        gap: 5px !important;
        padding: 0 !important;
        border: 0 !important;
    }
    .match-control-result {
        gap: 3px !important;
        white-space: nowrap;
    }
    .match-control-result b {
        width: clamp(27px, 8.5vw, 34px) !important;
        height: clamp(34px, 10.5vw, 42px) !important;
        border-radius: 10px !important;
        font-size: clamp(16px, 5vw, 20px) !important;
    }
    .match-control-result i { font-size: 15px !important; }
    .match-live-clock {
        min-width: 0 !important;
        width: 100%;
        max-width: 96px;
        grid-template-columns: 6px minmax(0, auto);
        column-gap: 4px;
        padding: 5px 4px !important;
        border-radius: 11px !important;
    }
    .match-live-dot { width: 6px; height: 6px; }
    .match-live-clock strong {
        font-size: clamp(12px, 4vw, 15px) !important;
        letter-spacing: 0;
    }
    .match-live-clock small {
        max-width: 100%;
        overflow: hidden;
        font-size: clamp(7px, 2.3vw, 9px) !important;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .match-shootout-score { display: none !important; }
}

@media (max-width: 360px) {
    .match-control-scoreboard {
        grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr) !important;
        padding-inline: 4px !important;
        gap: 2px !important;
    }
    .match-control-logo { width: 40px !important; height: 40px !important; }
    .match-control-team > strong { font-size: 8px !important; }
    .match-control-result b { width: 25px !important; height: 32px !important; font-size: 15px !important; }
    .match-live-clock { max-width: 78px; padding-inline: 2px !important; }
    .match-live-clock strong { font-size: 12px !important; }
}


/* إصلاح مستقل: قائمة المباريات مضغوطة وصفحة المباراة دون تداخل */
@media (max-width: 480px) {
    /* قائمة المباريات: كل مباراة في صف واحد مضغوط */
    .public-match-link {
        padding: 9px 8px !important;
    }
    .public-match-body {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) clamp(62px, 20vw, 76px) minmax(0, 1fr) !important;
        grid-template-areas: none !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 9px 0 !important;
    }
    .public-match-body > .public-match-team:first-child,
    .public-match-body > .public-match-center,
    .public-match-body > .public-match-team:last-child {
        grid-area: auto !important;
    }
    .public-match-body > .public-match-center {
        min-width: 0;
        padding: 0 !important;
        border: 0 !important;
    }
    .public-match-logo {
        width: 43px !important;
        height: 43px !important;
        border-radius: 13px !important;
    }
    .public-match-logo img { padding: 4px !important; }
    .public-match-team { min-width: 0; gap: 5px !important; }
    .public-match-team strong {
        min-height: 2.3em !important;
        font-size: 10px !important;
        line-height: 1.15 !important;
        -webkit-line-clamp: 2;
    }
    .public-score { gap: 2px !important; }
    .public-score b {
        width: 25px !important;
        height: 31px !important;
        border-radius: 9px !important;
        font-size: 15px !important;
    }
    .public-score i { font-size: 12px !important; }
    .public-match-center time { font-size: 15px !important; }
    .public-match-center .tag { padding: 4px 6px !important; font-size: 8px !important; }
    .public-match-footer { gap: 5px !important; padding-top: 7px !important; }
    .public-match-footer > span { font-size: 9px !important; }

    /* صفحة المباراة العامة: إبقاء النتيجة والتوقيت داخل العمود الأوسط */
    .match-detail-hero {
        gap: 11px !important;
        padding: 12px 7px !important;
        border-radius: 20px !important;
        overflow: hidden;
    }
    .match-detail-scoreboard {
        grid-template-columns: minmax(0, 1fr) clamp(72px, 24vw, 88px) minmax(0, 1fr) !important;
        gap: 3px !important;
        align-items: center !important;
    }
    .match-detail-team {
        min-width: 0;
        gap: 5px !important;
    }
    .match-detail-logo {
        width: clamp(43px, 14vw, 54px) !important;
        height: clamp(43px, 14vw, 54px) !important;
        border-radius: 15px !important;
    }
    .match-detail-logo img { padding: 4px !important; }
    .match-detail-team h1 {
        width: 100%;
        min-width: 0;
        min-height: 2.35em;
        display: -webkit-box;
        overflow: hidden;
        font-size: clamp(9px, 3vw, 11px) !important;
        line-height: 1.16;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .match-detail-result {
        min-width: 0;
        width: 100%;
        gap: 4px !important;
    }
    .match-detail-result > div[data-public-score] {
        gap: 2px !important;
        white-space: nowrap;
    }
    .match-detail-result b {
        width: clamp(25px, 8vw, 31px) !important;
        height: clamp(32px, 10vw, 38px) !important;
        border-radius: 10px !important;
        font-size: clamp(15px, 5vw, 18px) !important;
    }
    .match-detail-result i { font-size: 12px !important; }
    .match-detail-result time { font-size: clamp(17px, 6vw, 22px) !important; }
    .match-detail-result .public-match-live-clock {
        display: grid !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 84px !important;
        margin-top: 2px !important;
        padding: 5px 3px !important;
        gap: 1px 3px !important;
        border-radius: 10px !important;
        overflow: hidden;
    }
    .match-detail-result .public-match-live-clock strong {
        min-width: 0;
        font-size: 13px !important;
        letter-spacing: 0;
    }
    .match-detail-result .public-match-live-clock small {
        max-width: 100%;
        overflow: hidden;
        font-size: 7px !important;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .match-detail-meta { gap: 4px !important; }
    .match-detail-meta span { padding: 5px 6px !important; font-size: 8px !important; }
}

@media (max-width: 360px) {
    .match-detail-scoreboard {
        grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr) !important;
    }
    .match-detail-logo { width: 40px !important; height: 40px !important; }
    .match-detail-result .public-match-live-clock { max-width: 68px !important; }
    .match-detail-result .public-match-live-clock strong { font-size: 11px !important; }
    .match-detail-team h1 { font-size: 8px !important; }
}

/* ===== Match coverage collapsible clock controls ===== */
.match-clock-panel-launcher { margin-top: 18px; }
.match-clock-panel-toggle {
    display: grid;
    grid-template-columns: 46px minmax(0,1fr) 24px;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid color-mix(in srgb,var(--primary) 18%,var(--line));
    border-radius: 18px;
    background: linear-gradient(135deg,color-mix(in srgb,var(--primary) 9%,var(--surface)),var(--surface));
    color: var(--ink);
    text-align: right;
    box-shadow: 0 10px 28px rgba(23,33,27,.06);
}
.match-clock-panel-toggle > svg:first-child { width: 24px; height: 24px; padding: 10px; box-sizing: content-box; border-radius: 14px; background: var(--primary); color: #fff; fill: none; stroke: currentColor; }
.match-clock-panel-toggle > span { display: grid; gap: 2px; }
.match-clock-panel-toggle strong { font-size: 14px; }
.match-clock-panel-toggle small { color: var(--muted); font-size: 10px; }
.match-clock-panel-toggle > svg:last-child { width: 20px; height: 20px; fill: none; stroke: currentColor; transition: transform .22s ease; }
.match-clock-panel-toggle.is-open > svg:last-child { transform: rotate(180deg); }
.match-clock-panel[hidden] { display: none !important; }

/* ===== Match predictions ===== */
.match-prediction-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px;
    border-top: 1px solid var(--line);
    background: linear-gradient(135deg,color-mix(in srgb,var(--accent) 9%,var(--surface)),var(--surface));
}
.match-prediction-summary { display: flex; align-items: center; gap: 9px; min-width: 0; }
.match-prediction-summary > span { display: grid; width: 38px; height: 38px; place-items: center; flex: 0 0 38px; border-radius: 13px; background: color-mix(in srgb,var(--accent) 20%,var(--surface)); color: #85620a; }
.match-prediction-summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.match-prediction-summary div { display: grid; }
.match-prediction-summary strong { font-size: 12px; }
.match-prediction-summary small { color: var(--muted); font-size: 9px; }
.match-prediction-action { display: flex; justify-content: flex-end; }
.prediction-button,
.prediction-submitted,
.prediction-closed {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
}
.prediction-button { border: 0; background: var(--primary); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb,var(--primary) 22%,transparent); }
.prediction-button.is-login { background: #25324a; }
.prediction-button.is-phone { background: #9b6a0b; }
.prediction-button svg,
.prediction-submitted svg,
.prediction-closed svg { width: 16px; height: 16px; fill: none; stroke: currentColor; }
.prediction-submitted { background: rgba(8,116,67,.1); color: #087443; }
.prediction-closed { background: color-mix(in srgb,var(--muted) 9%,var(--surface)); color: var(--muted); }
.prediction-public-winner { display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 11px; padding: 12px 15px; border-top: 1px solid color-mix(in srgb,#d7a900 25%,var(--line)); background: linear-gradient(120deg,#fff9df,#fff); }
.prediction-public-winner > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: #f5c33d; color: #5c4300; box-shadow: 0 8px 20px rgba(213,163,0,.22); }
.prediction-public-winner svg { width: 23px; height: 23px; fill: none; stroke: currentColor; }
.prediction-public-winner div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1px 10px; align-items: center; }
.prediction-public-winner small { grid-column: 1/-1; color: #80661b; font-size: 9px; }
.prediction-public-winner strong { font-size: 13px; }
.prediction-public-winner b { color: #80661b; font-size: 11px; }

.prediction-dialog { width: min(92vw,480px); padding: 0; border: 0; border-radius: 26px; background: transparent; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.prediction-dialog::backdrop { background: rgba(8,16,12,.62); backdrop-filter: blur(6px); }
.prediction-dialog-card { position: relative; display: grid; gap: 17px; padding: 23px; border-radius: 26px; background: var(--surface); }
.prediction-dialog-close { position: absolute; top: 12px; left: 12px; display: grid; width: 36px; height: 36px; min-height: 36px; padding: 0; place-items: center; border-radius: 12px; background: color-mix(in srgb,var(--muted) 8%,var(--surface)); color: var(--ink); font-size: 24px; }
.prediction-dialog-heading { display: flex; align-items: center; gap: 12px; }
.prediction-dialog-heading > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; background: var(--primary); color: #fff; }
.prediction-dialog-heading svg { width: 25px; height: 25px; fill: none; stroke: currentColor; }
.prediction-dialog-heading small { color: var(--muted); font-size: 10px; }
.prediction-dialog-heading h2 { margin: 1px 0 0; font-size: 19px; }
.prediction-dialog-teams { display: grid; grid-template-columns: minmax(0,1fr) 22px minmax(0,1fr); align-items: center; gap: 10px; }
.prediction-dialog-teams label { display: grid; place-items: center; gap: 8px; text-align: center; }
.prediction-dialog-teams > i { color: var(--muted); font-size: 25px; font-style: normal; font-weight: 900; }
.prediction-dialog-logo { display: grid; width: 72px; height: 72px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: color-mix(in srgb,var(--primary) 6%,var(--surface)); color: var(--primary); }
.prediction-dialog-logo img { width: 100%; height: 100%; padding: 7px; object-fit: contain; }
.prediction-dialog-logo svg { width: 32px; height: 32px; fill: none; stroke: currentColor; }
.prediction-dialog-teams strong { min-height: 36px; font-size: 12px; }
.prediction-dialog-teams input { width: 74px; min-height: 58px; padding: 6px; border-radius: 17px; color: var(--primary-dark); font-size: 25px; font-weight: 950; text-align: center; }
.prediction-dialog-note { display: flex; align-items: center; gap: 7px; margin: 0; padding: 10px 12px; border-radius: 13px; background: color-mix(in srgb,var(--accent) 10%,var(--surface)); color: var(--muted); font-size: 10px; }
.prediction-dialog-note svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; }
.prediction-dialog-feedback { padding: 10px 12px; border-radius: 12px; font-size: 11px; font-weight: 800; }
.prediction-dialog-feedback.is-error { background: rgba(180,35,24,.1); color: var(--danger); }
.prediction-submit { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 8px; border-radius: 15px; }
.prediction-submit svg { width: 19px; height: 19px; fill: none; stroke: currentColor; }
.prediction-submit.is-loading { opacity: .65; pointer-events: none; }

/* Predictions manager */
.prediction-admin-hero { display: grid; grid-template-columns: minmax(0,1fr) 110px minmax(0,1fr); align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 25px; background: radial-gradient(circle at 50% -20%,color-mix(in srgb,var(--primary) 14%,transparent),transparent 50%),var(--surface); }
.prediction-admin-team { display: grid; min-width: 0; place-items: center; gap: 8px; text-align: center; }
.prediction-admin-team > span { display: grid; width: 76px; height: 76px; place-items: center; overflow: hidden; border-radius: 22px; background: color-mix(in srgb,var(--primary) 7%,var(--surface)); color: var(--primary); }
.prediction-admin-team img { width: 100%; height: 100%; padding: 7px; object-fit: contain; }
.prediction-admin-team svg { width: 34px; height: 34px; fill: none; stroke: currentColor; }
.prediction-admin-score { display: flex; align-items: center; justify-content: center; gap: 8px; }
.prediction-admin-score b { display: grid; width: 42px; height: 48px; place-items: center; border-radius: 14px; background: var(--primary); color: #fff; font-size: 23px; }
.prediction-admin-score i { color: var(--muted); font-style: normal; font-weight: 900; }
.prediction-admin-score span { color: var(--muted); font-weight: 900; }
.prediction-admin-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.prediction-admin-stats span { display: grid; place-items: center; gap: 2px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--muted); font-size: 10px; text-align: center; }
.prediction-admin-stats b { color: var(--primary-dark); font-size: 20px; }
.prediction-winner-card { display: grid; grid-template-columns: 64px minmax(0,1fr); align-items: center; gap: 15px; margin-bottom: 15px; padding: 18px; border: 1px solid #ead28a; border-radius: 22px; background: linear-gradient(120deg,#fff7d2,#fff); }
.prediction-winner-icon { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 19px; background: #f4c33f; color: #5f4600; }
.prediction-winner-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; }
.prediction-winner-card small { color: #846919; }
.prediction-winner-card h2 { margin: 2px 0 5px; }
.prediction-winner-card p { margin: 2px 0; color: var(--muted); font-size: 12px; }
.prediction-draw-panel { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.prediction-draw-panel h2 { margin: 0 0 4px; }
.prediction-draw-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.prediction-draw-panel button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.prediction-draw-panel svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.prediction-list-heading { margin-bottom: 13px; }
.prediction-list-heading h2 { margin: 0; }
.prediction-list-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.prediction-admin-list { display: grid; gap: 8px; }
.prediction-admin-item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.prediction-admin-item.is-correct { border-color: rgba(8,116,67,.3); background: rgba(8,116,67,.045); }
.prediction-admin-avatar { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: color-mix(in srgb,var(--primary) 8%,var(--surface)); color: var(--primary); }
.prediction-admin-avatar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }
.prediction-admin-item div { display: grid; min-width: 0; }
.prediction-admin-item small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.prediction-admin-value { padding: 8px 10px; border-radius: 12px; background: var(--primary); color: #fff; font-size: 15px; }

@media (max-width: 720px) {
    .match-clock-panel-toggle { grid-template-columns: 40px minmax(0,1fr) 20px; padding: 11px; }
    .match-clock-panel-toggle > svg:first-child { width: 20px; height: 20px; padding: 8px; }
    .match-prediction-strip { align-items: stretch; padding: 10px 11px; }
    .match-prediction-summary > span { width: 34px; height: 34px; flex-basis: 34px; }
    .prediction-button,.prediction-submitted,.prediction-closed { min-height: 34px; padding: 7px 9px; font-size: 9px; }
    .prediction-public-winner { padding: 10px 11px; }
    .prediction-dialog-card { padding: 20px 15px; }
    .prediction-dialog-logo { width: 60px; height: 60px; border-radius: 18px; }
    .prediction-dialog-teams input { width: 64px; min-height: 52px; font-size: 22px; }
    .prediction-admin-hero { grid-template-columns: minmax(0,1fr) 82px minmax(0,1fr); padding: 15px 9px; gap: 7px; }
    .prediction-admin-team > span { width: 58px; height: 58px; border-radius: 17px; }
    .prediction-admin-team strong { font-size: 11px; }
    .prediction-admin-score b { width: 33px; height: 40px; font-size: 19px; }
    .prediction-admin-stats { gap: 6px; }
    .prediction-admin-stats span { padding: 9px 5px; }
    .prediction-winner-card { grid-template-columns: 50px minmax(0,1fr); padding: 14px; }
    .prediction-winner-icon { width: 48px; height: 48px; }
    .prediction-draw-panel { align-items: stretch; flex-direction: column; }
    .prediction-draw-panel button { width: 100%; justify-content: center; }
    .prediction-admin-item { grid-template-columns: 36px minmax(0,1fr) auto; padding: 9px; }
    .prediction-admin-avatar { width: 34px; height: 34px; }
}

@media (max-width: 430px) {
    .match-prediction-strip { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
    .match-prediction-summary div small { display: none; }
    .prediction-button span { max-width: 105px; }
    .prediction-public-winner div { grid-template-columns: 1fr; }
    .prediction-public-winner small { grid-column: auto; }
    .prediction-dialog-teams { gap: 5px; }
    .prediction-dialog-teams strong { font-size: 10px; }
}


/* ===== Clock correction ===== */
body.has-clock-correction-modal { overflow: hidden; }
.clock-correction-modal { position: fixed; inset: 0; z-index: 1600; display: grid; place-items: center; padding: 16px; }
.clock-correction-modal[hidden] { display: none !important; }
.clock-correction-backdrop { position: absolute; inset: 0; background: rgba(7,18,12,.68); backdrop-filter: blur(7px); }
.clock-correction-card { position: relative; z-index: 1; display: grid; width: min(94vw,430px); gap: 10px; padding: 25px; border: 1px solid color-mix(in srgb,var(--primary) 24%,var(--line)); border-radius: 27px; background: var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.28); animation: clock-correction-in .24s ease both; text-align: center; }
.clock-correction-close { position: absolute; top: 10px; left: 10px; display: grid; width: 36px; height: 36px; min-height: 36px; padding: 0; place-items: center; border-radius: 12px; background: color-mix(in srgb,var(--muted) 9%,var(--surface)); color: var(--ink); font-size: 24px; }
.clock-correction-icon { display: grid; width: 60px; height: 60px; margin-inline: auto; place-items: center; border-radius: 19px; background: color-mix(in srgb,var(--primary) 14%,var(--surface)); color: var(--primary); }
.clock-correction-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; }
.clock-correction-card > small { color: var(--primary); font-weight: 900; }
.clock-correction-card h2 { margin: 0; }
.clock-correction-card p { margin: 0 0 7px; color: var(--muted); font-size: 11px; }
.clock-correction-inputs { display: grid; grid-template-columns: 1fr 22px 1fr; align-items: end; gap: 8px; }
.clock-correction-inputs label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; text-align: center; }
.clock-correction-inputs input { min-height: 66px; padding: 8px; border-radius: 18px; color: var(--primary-dark); font-size: 28px; font-weight: 950; text-align: center; }
.clock-correction-inputs b { padding-bottom: 17px; color: var(--muted); font-size: 25px; }
.clock-correction-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.clock-correction-actions button { justify-content: center; }
.match-clock-button.correct { background: color-mix(in srgb,#2563eb 10%,var(--surface)); color: #1d4ed8; }
@keyframes clock-correction-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* ===== Tournament PWA install ===== */
.tournament-pwa-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 13px; margin: 10px 0 18px; padding: 13px 15px; border: 1px solid color-mix(in srgb,var(--tournament-primary,var(--primary)) 20%,var(--line)); border-radius: 22px; background: linear-gradient(135deg,color-mix(in srgb,var(--tournament-primary,var(--primary)) 8%,var(--surface)),var(--surface)); }
.tournament-pwa-brand { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 11px; min-width: 0; }
.tournament-pwa-logo { display: grid; width: 48px; height: 48px; place-items: center; overflow: hidden; border-radius: 15px; background: color-mix(in srgb,var(--tournament-primary,var(--primary)) 11%,var(--surface)); color: var(--tournament-primary,var(--primary)); }
.tournament-pwa-logo img { width: 100%; height: 100%; padding: 5px; object-fit: contain; }
.tournament-pwa-logo svg { width: 25px; height: 25px; fill: none; stroke: currentColor; }
.tournament-pwa-brand strong,.tournament-pwa-brand small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tournament-pwa-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.tournament-pwa-actions { display: flex; align-items: center; gap: 7px; }
.tournament-pwa-button { display: inline-flex; min-height: 41px; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); font-size: 11px; font-weight: 900; }
.tournament-pwa-button.primary { border-color: transparent; background: var(--tournament-primary,var(--primary)); color: #fff; }
.tournament-pwa-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.tournament-pwa-button.is-active { border-color: rgba(8,116,67,.3); background: rgba(8,116,67,.08); color: #087443; }
.tournament-pwa-button[hidden] { display: none !important; }
.pwa-status { grid-column: 1 / -1; margin: -2px 0 0; color: var(--muted); font-size: 9px; }
@media (max-width: 620px) {
  .tournament-pwa-panel { grid-template-columns: 1fr; padding: 12px; }
  .tournament-pwa-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tournament-pwa-button { width: 100%; }
}

/* إخفاء بطاقة تثبيت التطبيق بعد اكتمال التثبيت والإشعارات وعدم وجود تحديث. */
.tournament-pwa-panel[hidden] { display: none !important; }


.prediction-identity-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.prediction-identity-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 850; }
.prediction-identity-fields input {
    width: 100%; min-width: 0; min-height: 47px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text);
    font: inherit; font-size: 13px; outline: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.prediction-identity-fields input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent); transform: translateY(-1px); }
@media (max-width: 520px) {
    .prediction-identity-fields { grid-template-columns: 1fr; gap: 8px; }
    .prediction-identity-fields input { min-height: 44px; }
}

/* ===== Tournament notification center ===== */
.notification-admin-hero {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
    border-radius: 26px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface));
    box-shadow: var(--theme-shadow, 0 18px 48px rgba(23, 33, 27, .1));
}
.notification-admin-hero-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
}
.notification-admin-hero-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; }
.notification-admin-hero h1 { margin: 4px 0 6px; }
.notification-admin-hero p { margin: 0; color: var(--muted); }
.notification-admin-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.notification-admin-stats article {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface);
}
.notification-admin-stats article > span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--primary);
}
.notification-admin-stats svg,
.notification-compose-card header > span svg,
.notification-history-card header > span svg { width: 23px; height: 23px; fill: none; stroke: currentColor; }
.notification-admin-stats strong,
.notification-admin-stats small { display: block; }
.notification-admin-stats strong { font-size: 22px; }
.notification-admin-stats small { color: var(--muted); font-size: 10px; }
.notification-compose-card,
.notification-history-card {
    margin-bottom: 16px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
}
.notification-compose-card > header,
.notification-history-card > header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    margin-bottom: 15px;
}
.notification-compose-card header > span,
.notification-history-card header > span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    background: color-mix(in srgb, var(--primary) 11%, var(--surface));
    color: var(--primary);
}
.notification-compose-card h2,
.notification-history-card h2 { margin: 0 0 3px; }
.notification-compose-card header p,
.notification-history-card header p { margin: 0; color: var(--muted); font-size: 11px; }
.notification-admin-empty {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    padding: 11px 12px;
    border: 1px solid color-mix(in srgb, #d99b21 35%, var(--line));
    border-radius: 15px;
    background: color-mix(in srgb, #f6c453 11%, var(--surface));
    color: #7b5a09;
    font-size: 11px;
}
.notification-admin-empty svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; }
.notification-compose-form { display: grid; gap: 12px; }
.notification-compose-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 850; }
.notification-compose-form input,
.notification-compose-form textarea,
.notification-compose-form select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    color: var(--ink);
}
.notification-compose-form textarea { resize: vertical; }
.notification-compose-form label small { color: var(--muted); font-size: 9px; }
.notification-send-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 15px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}
.notification-send-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; }
.notification-history-list { display: grid; gap: 8px; }
.notification-history-list article {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 10px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 96%, var(--primary));
}
.notification-history-list article > span,
.notification-history-list article > a {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    color: var(--primary);
}
.notification-history-list article > span svg,
.notification-history-list article > a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.notification-history-list strong,
.notification-history-list p,
.notification-history-list small { display: block; }
.notification-history-list p { margin: 3px 0; color: var(--muted); font-size: 10px; }
.notification-history-list small { color: var(--muted); font-size: 9px; }
@media (max-width: 620px) {
    .notification-admin-hero { grid-template-columns: 54px minmax(0, 1fr); padding: 16px; }
    .notification-admin-hero-icon { width: 52px; height: 52px; border-radius: 17px; }
    .notification-admin-stats { gap: 7px; }
    .notification-admin-stats article { grid-template-columns: 38px minmax(0, 1fr); padding: 11px 9px; }
    .notification-admin-stats article > span { width: 36px; height: 36px; border-radius: 12px; }
    .notification-admin-stats strong { font-size: 18px; }
    .notification-compose-card, .notification-history-card { padding: 14px; border-radius: 20px; }
    .notification-history-list article { grid-template-columns: 34px minmax(0, 1fr) 32px; gap: 7px; padding: 9px; }
    .notification-history-list article > span,
    .notification-history-list article > a { width: 32px; height: 32px; }
}


/* ===== Notification images and scheduling ===== */
.notification-admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.notification-image-field { display: grid; gap: 10px; }
.notification-image-picker {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 11px !important;
    min-height: 72px;
    padding: 11px 13px;
    border: 1px dashed color-mix(in srgb, var(--primary) 42%, var(--line));
    border-radius: 17px;
    background: color-mix(in srgb, var(--primary) 4%, var(--surface));
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.notification-image-picker:hover { border-color: var(--primary); transform: translateY(-1px); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.notification-image-picker > span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary) 11%, var(--surface));
    color: var(--primary);
}
.notification-image-picker svg { width: 23px; height: 23px; fill: none; stroke: currentColor; }
.notification-image-picker strong,
.notification-image-picker small { display: block; }
.notification-image-picker strong { color: var(--ink); font-size: 12px; }
.notification-image-picker small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.notification-image-picker input[type="file"] { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; opacity: 0; pointer-events: none; }
.notification-image-preview {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    max-height: 320px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, #000);
}
.notification-image-preview[hidden] { display: none !important; }
.notification-image-preview img { display: block; width: 100%; height: 100%; min-height: 160px; max-height: 320px; object-fit: cover; }
.notification-image-preview button {
    position: absolute;
    top: 9px;
    left: 9px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 24, 39, .78);
    color: #fff;
    backdrop-filter: blur(8px);
}
.notification-image-preview button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; }
.notification-schedule-fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 17px;
}
.notification-schedule-fieldset legend { padding: 0 7px; color: var(--ink); font-size: 11px; font-weight: 900; }
.notification-schedule-option {
    display: grid !important;
    grid-template-columns: 21px minmax(0, 1fr);
    align-items: center;
    gap: 9px !important;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    cursor: pointer;
}
.notification-schedule-option input { width: 19px !important; height: 19px; min-height: 0 !important; padding: 0 !important; accent-color: var(--primary); }
.notification-schedule-option strong,
.notification-schedule-option small { display: block; }
.notification-schedule-option strong { color: var(--ink); font-size: 11px; }
.notification-schedule-option small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.notification-schedule-option:has(input:checked) { border-color: color-mix(in srgb, var(--primary) 58%, var(--line)); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 8%, transparent); }
.notification-schedule-date { grid-column: 1 / -1; }
.notification-schedule-date[hidden] { display: none !important; }
.notification-history-item { grid-template-columns: 44px minmax(0, 1fr) auto !important; }
.notification-history-image { overflow: hidden; padding: 0 !important; background: var(--surface) !important; }
.notification-history-image img { width: 100%; height: 100%; object-fit: cover; }
.notification-history-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notification-status-badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 10%, var(--surface)); color: var(--muted); font-size: 8px; font-style: normal; font-weight: 900; }
.notification-status-badge.status-sent { background: rgba(8, 116, 67, .1); color: #087443; }
.notification-status-badge.status-scheduled { background: rgba(37, 99, 235, .1); color: #1d4ed8; }
.notification-status-badge.status-failed { background: rgba(190, 24, 93, .1); color: #be185d; }
.notification-status-badge.status-cancelled { opacity: .68; }
.notification-history-actions { display: flex; align-items: center; gap: 5px; }
.notification-history-actions a,
.notification-history-actions button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    color: var(--primary);
}
.notification-history-actions button { background: rgba(190, 24, 93, .08); color: #be185d; }
.notification-history-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; }
@media (max-width: 620px) {
    .notification-admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .notification-admin-stats article { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 5px; }
    .notification-admin-stats article > span { width: 34px; height: 34px; }
    .notification-admin-stats small { font-size: 8px; }
    .notification-schedule-fieldset { grid-template-columns: 1fr; }
    .notification-schedule-date { grid-column: auto; }
    .notification-history-title-row { align-items: flex-start; }
    .notification-history-item { grid-template-columns: 38px minmax(0, 1fr) auto !important; }
    .notification-history-actions { flex-direction: column; }
}


/* Players and professional match lineups */
.player-editor-panel{margin-bottom:18px}.player-photo-upload{grid-template-columns:130px minmax(0,1fr)}.player-photo-preview{width:124px;height:124px;border-radius:50%;background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 12%,#fff),#fff)}.player-photo-preview img{object-fit:cover;padding:0}.players-manager-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:14px}.player-manager-card{display:grid;grid-template-columns:82px minmax(0,1fr);gap:12px;padding:15px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--primary) 4%,var(--surface)));box-shadow:0 12px 30px rgba(23,33,27,.08)}.player-manager-photo{display:grid;width:82px;height:82px;place-items:center;overflow:hidden;border:3px solid color-mix(in srgb,var(--primary) 25%,#fff);border-radius:24px;background:color-mix(in srgb,var(--primary) 9%,#fff)}.player-manager-photo img{width:100%;height:100%;object-fit:cover}.player-manager-photo svg{width:38px;height:38px;fill:none;stroke:var(--primary);stroke-width:1.7}.player-manager-main{min-width:0}.player-manager-main small{color:var(--primary);font-weight:900}.player-manager-main h2{margin:1px 0;font-size:18px}.player-manager-main p{margin:0;color:var(--muted);font-size:12px}.player-manager-main p b{display:inline-grid;min-width:30px;place-items:center;margin-left:5px;padding:2px 7px;border-radius:9px;color:#fff;background:var(--primary)}.player-manager-stats{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.player-manager-stats span{display:grid;place-items:center;padding:7px;border-radius:12px;background:color-mix(in srgb,var(--primary) 6%,var(--surface));color:var(--muted);font-size:10px;font-weight:800}.player-manager-stats b{color:var(--ink);font-size:16px}.player-manager-actions{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}.player-manager-actions form{margin:0}
.lineup-manager-shell,.public-lineup-section{margin:18px 0;padding:clamp(14px,3vw,24px);border:1px solid color-mix(in srgb,var(--primary) 18%,var(--line));border-radius:28px;background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 5%,var(--surface)),var(--surface));box-shadow:0 18px 46px rgba(23,33,27,.1)}.lineup-manager-heading,.public-lineup-heading{display:flex;align-items:center;gap:12px;margin-bottom:16px}.lineup-manager-heading>span,.public-lineup-heading>span{display:grid;width:52px;height:52px;place-items:center;border-radius:18px;color:#fff;background:linear-gradient(135deg,var(--primary),var(--primary-dark));box-shadow:0 10px 25px color-mix(in srgb,var(--primary) 30%,transparent)}.lineup-manager-heading svg,.public-lineup-heading svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7}.lineup-manager-heading h2,.public-lineup-heading h2{margin:0}.lineup-manager-heading p,.public-lineup-heading p{margin:1px 0;color:var(--muted);font-size:12px}
.lineup-pitch{position:relative;width:min(720px,100%);aspect-ratio:68/105;margin:0 auto 20px;overflow:hidden;border:4px solid rgba(255,255,255,.8);border-radius:26px;background:repeating-linear-gradient(0deg,#238b4b 0 8.33%,#208347 8.33% 16.66%);box-shadow:0 22px 55px rgba(12,88,45,.25),inset 0 0 0 2px rgba(255,255,255,.28)}.lineup-pitch:before{content:"";position:absolute;inset:3%;border:2px solid rgba(255,255,255,.7);border-radius:4px}.pitch-center-line{position:absolute;left:3%;right:3%;top:50%;height:2px;background:rgba(255,255,255,.7)}.pitch-center-circle{position:absolute;left:50%;top:50%;width:18%;aspect-ratio:1;border:2px solid rgba(255,255,255,.7);border-radius:50%;transform:translate(-50%,-50%)}.pitch-box{position:absolute;left:25%;width:50%;height:14%;border:2px solid rgba(255,255,255,.7)}.pitch-box-top{top:3%;border-top:0}.pitch-box-bottom{bottom:3%;border-bottom:0}.lineup-pitch-empty{position:absolute;left:50%;top:50%;width:75%;padding:12px;border-radius:16px;color:#fff;background:rgba(0,0,0,.34);text-align:center;font-weight:900;transform:translate(-50%,-50%);backdrop-filter:blur(8px)}.pitch-player{position:absolute;left:var(--pitch-x);top:var(--pitch-y);display:grid;width:74px;justify-items:center;z-index:3;transform:translate(-50%,-50%);text-align:center}.pitch-player>span{position:relative;display:grid;width:52px;height:52px;place-items:center;overflow:hidden;border:3px solid #fff;border-radius:50%;color:#fff;background:linear-gradient(135deg,var(--primary),#073c24);box-shadow:0 8px 18px rgba(0,0,0,.28)}.pitch-player-away>span{background:linear-gradient(135deg,var(--accent),#9b6800)}.pitch-player img{width:100%;height:100%;object-fit:cover}.pitch-player svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7}.pitch-player b{position:absolute;right:-2px;bottom:-2px;display:grid;min-width:19px;height:19px;place-items:center;padding:0 3px;border:2px solid #fff;border-radius:50%;color:#111;background:#fff;font-size:8px}.pitch-player strong{display:block;width:100%;margin-top:3px;padding:2px 4px;overflow:hidden;border-radius:7px;color:#fff;background:rgba(0,0,0,.5);font-size:9px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px #000}.lineup-editors-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.lineup-team-editor{overflow:hidden;border:1px solid var(--line);border-radius:20px;background:var(--surface)}.lineup-team-editor summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:13px;cursor:pointer;list-style:none;background:color-mix(in srgb,var(--primary) 5%,var(--surface))}.lineup-team-editor summary::-webkit-details-marker{display:none}.lineup-team-editor summary>svg{width:20px;height:20px;fill:none;stroke:var(--muted);transition:transform .2s}.lineup-team-editor[open] summary>svg{transform:rotate(180deg)}.lineup-summary-logo{display:grid;width:48px;height:48px;place-items:center;overflow:hidden;border-radius:15px;background:#fff}.lineup-summary-logo img{width:100%;height:100%;object-fit:contain;padding:4px}.lineup-summary-logo svg{width:25px;height:25px;fill:none;stroke:var(--primary)}.lineup-team-editor summary strong,.lineup-team-editor summary small{display:block}.lineup-team-editor summary small{color:var(--muted);font-size:10px}.lineup-team-form{padding:13px}.lineup-player-editor-grid{display:grid;gap:9px}.lineup-player-editor-card{display:grid;grid-template-columns:48px minmax(0,1fr) minmax(105px,.7fr) minmax(125px,.9fr);align-items:center;gap:8px;padding:9px;border:1px solid var(--line);border-radius:15px;transition:.2s}.lineup-player-editor-card.is-starter{border-color:color-mix(in srgb,var(--primary) 40%,var(--line));background:color-mix(in srgb,var(--primary) 6%,var(--surface))}.lineup-player-editor-card.is-substitute{border-color:color-mix(in srgb,var(--accent) 45%,var(--line));background:color-mix(in srgb,var(--accent) 7%,var(--surface))}.lineup-player-photo{display:grid;width:48px;height:48px;place-items:center;overflow:hidden;border-radius:14px;background:color-mix(in srgb,var(--primary) 8%,#fff)}.lineup-player-photo img{width:100%;height:100%;object-fit:cover}.lineup-player-photo svg{width:24px;height:24px;fill:none;stroke:var(--primary)}.lineup-player-editor-card strong,.lineup-player-editor-card small{display:block}.lineup-player-editor-card small{color:var(--muted);font-size:9px}.lineup-player-editor-card label{gap:3px;font-size:9px}.lineup-player-editor-card select{min-height:36px;padding:6px 8px;font-size:11px}.lineup-player-editor-card label.is-disabled{opacity:.42}.lineup-staff-editor{margin-top:15px;padding-top:13px;border-top:1px solid var(--line)}.lineup-staff-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.lineup-staff-title h3,.lineup-staff-title p{margin:0}.lineup-staff-title p{color:var(--muted);font-size:10px}.lineup-staff-row{display:grid;grid-template-columns:1fr 1fr 36px;gap:7px;margin-bottom:7px}.lineup-staff-row input{min-height:40px}.lineup-staff-row button{border:0;border-radius:11px;color:var(--danger);background:rgba(180,35,24,.08);font-size:22px}.public-lineup-section{padding:clamp(12px,3vw,22px)}.public-lineup-pitch{max-width:620px}.public-lineup-lists{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.public-lineup-team-card{overflow:hidden;border:1px solid var(--line);border-radius:22px;background:var(--surface)}.public-lineup-team-card>header{display:flex;align-items:center;gap:10px;padding:13px;background:color-mix(in srgb,var(--primary) 7%,var(--surface))}.public-lineup-team-card>header span{display:grid;width:48px;height:48px;place-items:center;overflow:hidden;border-radius:15px;background:#fff}.public-lineup-team-card>header img{width:100%;height:100%;object-fit:contain;padding:4px}.public-lineup-team-card>header svg{width:25px;height:25px;fill:none;stroke:var(--primary)}.public-lineup-team-card h3{margin:0}.public-lineup-group,.public-lineup-staff{padding:12px;border-top:1px solid var(--line)}.public-lineup-group>strong,.public-lineup-staff>strong{display:block;margin-bottom:8px;color:var(--primary)}.public-lineup-group>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.public-lineup-group span{display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;column-gap:7px;align-items:center;padding:7px;border-radius:13px;background:color-mix(in srgb,var(--primary) 5%,var(--surface))}.public-lineup-group i{grid-row:1/3;display:grid;width:38px;height:38px;place-items:center;overflow:hidden;border-radius:12px;background:#fff}.public-lineup-group img{width:100%;height:100%;object-fit:cover}.public-lineup-group svg{width:21px;height:21px;fill:none;stroke:var(--primary)}.public-lineup-group b{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.public-lineup-group small{color:var(--muted);font-size:8px}.public-lineup-group em,.public-lineup-staff em{color:var(--muted);font-size:11px}.public-lineup-staff span{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 0;border-bottom:1px dashed var(--line)}.public-lineup-staff span:last-child{border-bottom:0}.public-lineup-staff small{color:var(--muted)}
@media(max-width:820px){.lineup-editors-grid,.public-lineup-lists{grid-template-columns:1fr}.lineup-player-editor-card{grid-template-columns:45px minmax(0,1fr) 105px}.lineup-player-editor-card label[data-lineup-position-wrap]{grid-column:2/4}.pitch-player{width:58px}.pitch-player>span{width:43px;height:43px}.pitch-player strong{font-size:7px}.player-photo-upload{grid-template-columns:1fr}.player-photo-preview{width:112px;height:112px}.public-lineup-group>div{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.lineup-manager-shell,.public-lineup-section{padding:10px;border-radius:20px}.lineup-pitch{border-radius:18px}.pitch-player{width:48px}.pitch-player>span{width:36px;height:36px;border-width:2px}.pitch-player strong{font-size:6px}.lineup-player-editor-card{grid-template-columns:42px minmax(0,1fr)}.lineup-player-editor-card label{grid-column:1/-1}.lineup-player-editor-card label[data-lineup-position-wrap]{grid-column:1/-1}.lineup-staff-row{grid-template-columns:1fr 34px}.lineup-staff-row input:nth-child(2){grid-column:1/2}.lineup-staff-row button{grid-column:2;grid-row:1/3}.public-lineup-group>div{grid-template-columns:1fr}.players-manager-grid{grid-template-columns:1fr}}

.ranking-player-cell{display:inline-flex;align-items:center;gap:8px}.ranking-player-cell i,.team-player-photo{display:inline-grid;width:38px;height:38px;flex:0 0 38px;place-items:center;overflow:hidden;border-radius:12px;background:color-mix(in srgb,var(--primary) 8%,#fff)}.ranking-player-cell img,.team-player-photo img{width:100%;height:100%;object-fit:cover}.ranking-player-cell svg,.team-player-photo svg{width:20px;height:20px;fill:none;stroke:var(--primary)}.team-player-item.has-photo{grid-template-columns:42px auto minmax(0,1fr)}

/* تحسين بطاقة مباراة اليوم: شعارات واضحة ومساحة مدمجة على الهاتف */
.today-match-hero {
    display: block !important;
    margin-bottom: 12px !important;
}
.today-match-hero .hero-live-card {
    width: 100%;
    min-height: 0 !important;
    gap: 8px !important;
    padding: 12px 14px !important;
    border-radius: 20px !important;
}
.today-match-hero .live-card-head {
    min-height: 30px;
    gap: 8px;
}
.today-match-hero .live-card-head strong {
    font-size: .9rem;
}
.today-match-hero .live-card-head .tag {
    min-height: 25px;
    padding: 3px 8px;
    font-size: .7rem;
}
.today-match-hero .live-card-icon {
    width: 31px;
    height: 31px;
    border-radius: 11px;
}
.today-match-hero .live-card-icon svg {
    width: 17px;
    height: 17px;
}
.today-match-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--tournament-primary) 16%, var(--line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--tournament-primary) 4%, var(--surface));
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.today-match-compact:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--tournament-primary) 36%, var(--line));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--tournament-primary) 10%, transparent);
}
.today-team {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.today-team:last-child {
    grid-template-columns: minmax(0, 1fr) 42px;
    text-align: left;
}
.today-team:last-child .today-team-logo { order: 2; }
.today-team strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .82rem;
}
.today-team-logo {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--tournament-primary) 18%, var(--line));
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 6px 14px rgba(23, 33, 27, .08);
}
.today-team-logo img {
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
}
.today-team-fallback {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--tournament-primary), color-mix(in srgb, var(--tournament-primary) 62%, #061a0f));
    font-weight: 900;
}
.today-match-score {
    display: grid;
    place-items: center;
    gap: 1px;
    min-width: 54px;
    color: var(--tournament-primary);
}
.today-match-score b {
    font-size: 1rem;
    line-height: 1;
    direction: ltr;
}
.today-match-score small {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
}
.compact-match-meta {
    display: flex !important;
    align-items: center;
    gap: 6px !important;
    min-width: 0;
    overflow: hidden;
}
.compact-match-meta span {
    min-width: 0;
    max-width: 50%;
    padding: 3px 7px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .68rem !important;
}
.compact-live-card-link {
    min-height: 30px !important;
    padding: 5px 9px !important;
    border-radius: 10px !important;
    font-size: .72rem !important;
}

/* زر صغير لإدارة الإشعارات بعد إخفاء لوحة تثبيت التطبيق */
.notification-quick-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    margin: 0 0 10px;
    padding: 7px 11px;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
    border-radius: 999px;
    color: var(--primary-dark);
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
    box-shadow: 0 8px 18px rgba(23, 33, 27, .06);
    font: inherit;
    font-size: .76rem;
    font-weight: 900;
    cursor: pointer;
}
.notification-quick-toggle[hidden] { display: none !important; }
.notification-quick-toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.notification-quick-toggle:hover { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }

/* توحيد مظهر أيقونات صفحات الاشتراك والدفع ومنع ظهورها ككتلة سوداء */
.registration-payment-icon svg,
.payment-result-icon svg,
.subscription-icon svg,
.subscription-card-icon svg,
.payment-security-note svg,
.gateway-status svg,
.payment-compact-stats svg,
.compact-panel-title svg,
.payment-purpose-icon svg,
.payment-record-user svg,
.payment-summary svg,
.subscriptions-summary svg,
.subscription-list-title svg,
.subscription-list-logo svg,
.subscriptions-empty svg,
.subscription-renew-button svg,
.payment-record-action svg,
.compact-price-form button svg {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.9 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}
.payment-compact-stats > div > span,
.payment-purpose-icon,
.payment-record-user > span,
.subscriptions-summary > div > span,
.subscription-card-icon,
.subscription-icon {
    color: var(--primary) !important;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface)) !important;
}
.gateway-status svg,
.compact-panel-title > span svg,
.registration-payment-icon svg,
.payment-result-icon svg {
    color: inherit !important;
}

@media (max-width: 600px) {
    .today-match-hero .hero-live-card {
        gap: 6px !important;
        padding: 10px !important;
    }
    .today-match-compact {
        grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
        gap: 5px;
        padding: 7px;
    }
    .today-team,
    .today-team:last-child {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 5px;
        text-align: right;
    }
    .today-team:last-child { grid-template-columns: minmax(0, 1fr) 34px; text-align: left; }
    .today-team-logo { width: 34px; height: 34px; border-radius: 11px; }
    .today-team strong { font-size: .72rem; }
    .today-match-score { min-width: 45px; }
    .today-match-score b { font-size: .9rem; }
    .compact-match-meta span { font-size: .62rem !important; }
    .compact-live-card-link { min-height: 27px !important; padding: 3px 8px !important; }
}


/* Detailed tournament theme controls */
body { font-family: var(--font-family, Tahoma, Arial, sans-serif); }
a:not(.btn):not(.app-icon-card):not(.brand-link) { color: var(--link-color, inherit); }
.topbar { background: var(--header-bg, var(--surface)); color: var(--header-text, var(--ink)); }
.topbar .brand, .topbar .brand-link, .topbar .dropdown-panel { color: var(--header-text, var(--ink)); }
.btn:not(.secondary):not(.danger), button:not([class]) { background-color: var(--button-bg, var(--primary)); color: var(--button-text, #fff); }
.btn.secondary, button.secondary { background: var(--secondary-button-bg, #fff); color: var(--secondary-button-text, var(--ink)); border-color: var(--input-border, var(--line)); }
th, .modal-data-table th, .standings-table thead th { background: var(--table-head-bg, #eef5ed); color: var(--table-head-text, #304238); }
input, select, textarea { background: var(--input-bg, #fff); color: var(--input-text, var(--ink)); border-color: var(--input-border, var(--line)); }
.site-footer { background: var(--footer-bg, transparent); color: var(--footer-text, var(--muted)); }
.site-footer a { color: inherit; }
.tournament-modal-dialog { background: var(--modal-bg, var(--surface)); }
.app-icon, .modal-empty-state span, .modal-stat-grid article > span { background: var(--icon-bg, color-mix(in srgb,var(--primary) 10%,var(--surface))); color: var(--icon-color, var(--primary)); }
.app-icon svg, .modal-stat-grid article svg, .modal-empty-state svg { fill: none !important; stroke: currentColor !important; stroke-width: 1.9 !important; }
.modal-match-teams b, .modal-result-card b, .match-detail-score b, .manager-match-score b, .today-match-score b { background: var(--score-bg, var(--primary)); color: var(--score-text, #fff); }
.tag-success { color: var(--success, #15803d); background: color-mix(in srgb,var(--success,#15803d) 12%,var(--surface)); }
.tag-live { color: var(--warning, #d97706); background: color-mix(in srgb,var(--warning,#d97706) 13%,var(--surface)); }
.tag-info { color: var(--info, #1769aa); background: color-mix(in srgb,var(--info,#1769aa) 12%,var(--surface)); }
.btn.danger, button.danger { background: var(--danger, #b42318); }
.lineup-pitch { background: repeating-linear-gradient(0deg,var(--field-color,#238b4b) 0 8.33%,color-mix(in srgb,var(--field-color,#238b4b) 90%,#000) 8.33% 16.66%); }
.lineup-pitch:before,.pitch-center-circle,.pitch-box { border-color: color-mix(in srgb,var(--field-line,#fff) 74%,transparent); }
.pitch-center-line { background: color-mix(in srgb,var(--field-line,#fff) 74%,transparent); }

/* Clear statistics icons and professional charts */
.professional-stat-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.professional-stat-grid article { grid-template-columns: 52px minmax(0,1fr); justify-items: stretch; text-align: right; padding: 14px; }
.professional-stat-grid article > span { width: 52px; height: 52px; border-radius: 17px; box-shadow: inset 0 0 0 1px color-mix(in srgb,currentColor 18%,transparent); }
.professional-stat-grid article > span svg { width: 28px; height: 28px; fill: none !important; stroke: currentColor !important; stroke-width: 2 !important; stroke-linecap: round; stroke-linejoin: round; }
.professional-stat-grid article > div { display:grid;align-content:center;gap:0; }
.professional-stat-grid article strong { font-size:24px;line-height:1.1; }
.professional-stat-grid article small { font-weight:800; }
.professional-stat-grid .is-live > span,.professional-stat-grid .is-red > span{color:var(--danger);background:color-mix(in srgb,var(--danger) 10%,var(--surface))}
.professional-stat-grid .is-yellow > span{color:var(--warning);background:color-mix(in srgb,var(--warning) 12%,var(--surface))}
.professional-stat-grid .is-results > span,.professional-stat-grid .is-goals > span{color:var(--accent);background:color-mix(in srgb,var(--accent) 13%,var(--surface))}
.professional-stat-grid .is-players > span,.professional-stat-grid .is-matches > span{color:var(--info);background:color-mix(in srgb,var(--info) 10%,var(--surface))}
.statistics-charts-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:14px;margin-top:16px}
.statistics-chart-card{padding:17px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--primary) 3%,var(--surface)));box-shadow:0 14px 35px rgba(23,33,27,.07)}
.statistics-chart-card>header{display:flex;align-items:center;gap:10px;margin-bottom:16px}.statistics-chart-card>header>span{display:grid;width:44px;height:44px;place-items:center;border-radius:15px;color:var(--icon-color);background:var(--icon-bg)}.statistics-chart-card>header svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9}.statistics-chart-card>header strong,.statistics-chart-card>header small{display:block}.statistics-chart-card>header small{color:var(--muted);font-size:10px}
.team-goals-chart{display:grid;gap:11px}.team-goals-row{display:grid;grid-template-columns:34px minmax(70px,120px) minmax(90px,1fr) 28px;align-items:center;gap:8px}.chart-team-logo{display:grid;width:34px;height:34px;place-items:center;overflow:hidden;border-radius:11px;background:#fff}.chart-team-logo img{width:100%;height:100%;object-fit:contain;padding:3px}.chart-team-logo svg{width:19px;height:19px;fill:none;stroke:var(--icon-color)}.team-goals-row>strong{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.team-goals-row>b{text-align:center;color:var(--primary)}.chart-bar-track{height:12px;overflow:hidden;border-radius:999px;background:color-mix(in srgb,var(--primary) 8%,var(--surface));box-shadow:inset 0 1px 3px rgba(0,0,0,.08)}.chart-bar-track i{display:block;width:var(--chart-value);height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--primary),var(--accent));box-shadow:0 4px 12px color-mix(in srgb,var(--primary) 28%,transparent);animation:chart-bar-grow .7s cubic-bezier(.2,.8,.2,1) both}@keyframes chart-bar-grow{from{width:0}}
.match-status-chart{display:grid;grid-template-columns:150px minmax(0,1fr);align-items:center;gap:18px}.status-donut{display:grid;width:145px;aspect-ratio:1;place-items:center;border-radius:50%;background:conic-gradient(var(--info) 0 var(--scheduled),var(--danger) var(--scheduled) var(--live),var(--success) var(--live) var(--finished),var(--muted) var(--finished) 100%);box-shadow:0 12px 30px rgba(23,33,27,.13)}.status-donut:before{content:"";grid-area:1/1;width:70%;aspect-ratio:1;border-radius:50%;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}.status-donut>span{grid-area:1/1;z-index:1;text-align:center}.status-donut b,.status-donut small{display:block}.status-donut b{font-size:28px}.status-donut small{color:var(--muted);font-size:10px}.status-chart-legend{display:grid;gap:9px}.status-chart-legend span{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border-radius:12px;background:color-mix(in srgb,var(--primary) 3%,var(--surface))}.status-chart-legend i{width:10px;height:10px;border-radius:50%}.status-chart-legend .scheduled i{background:var(--info)}.status-chart-legend .live i{background:var(--danger)}.status-chart-legend .finished i{background:var(--success)}.status-chart-legend .cancelled i{background:var(--muted)}.status-chart-legend b{font-size:11px}.status-chart-legend em{font-style:normal;font-weight:900}

/* Results logos and ranking photos */
.modal-result-card .result-clubs>span{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:8px;text-align:inherit}.modal-result-card .result-clubs>span:last-child{grid-template-columns:minmax(0,1fr) 42px}.modal-result-card .result-clubs>span:last-child i{grid-column:2;grid-row:1}.modal-result-card .result-clubs i{display:grid;width:42px;height:42px;place-items:center;overflow:hidden;border-radius:13px;background:#fff}.modal-result-card .result-clubs img{width:100%;height:100%;object-fit:contain;padding:4px}.modal-result-card .result-clubs svg{width:22px;height:22px;fill:none;stroke:var(--icon-color)}.modal-result-card .result-clubs strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ranking-player-photo{display:grid;width:44px;height:44px;place-items:center;overflow:hidden;border:2px solid color-mix(in srgb,var(--primary) 18%,var(--line));border-radius:14px;background:var(--icon-bg);color:var(--icon-color)}.ranking-player-photo img{width:100%;height:100%;object-fit:cover}.ranking-player-photo svg{width:23px;height:23px;fill:none;stroke:currentColor}.cards-ranking{grid-template-columns:auto auto minmax(0,1fr) auto auto}.ranking-player-cell>span{display:grid;gap:0}.ranking-player-age{color:var(--muted);font-size:9px;font-weight:700}.player-age{color:var(--primary);font-weight:800}.field-optional,.field-help{color:var(--muted);font-size:9px;font-weight:600}

/* Compact lineup manager during live coverage */
.lineup-manager-toggle{margin:16px 0;border:1px solid color-mix(in srgb,var(--primary) 18%,var(--line));border-radius:22px;background:var(--surface);box-shadow:0 12px 30px rgba(23,33,27,.07)}.lineup-manager-toggle>summary{list-style:none}.lineup-manager-toggle>summary::-webkit-details-marker{display:none}.lineup-manager-toggle-summary{display:grid;grid-template-columns:46px minmax(0,1fr) 22px;align-items:center;gap:10px;padding:12px 14px;cursor:pointer}.lineup-manager-toggle-summary>span{display:grid;width:46px;height:46px;place-items:center;border-radius:15px;color:var(--icon-color);background:var(--icon-bg)}.lineup-manager-toggle-summary>span svg{width:24px;height:24px;fill:none;stroke:currentColor}.lineup-manager-toggle-summary strong,.lineup-manager-toggle-summary small{display:block}.lineup-manager-toggle-summary small{color:var(--muted);font-size:10px}.lineup-manager-toggle-summary>svg{width:20px;height:20px;fill:none;stroke:var(--muted);transition:transform .2s}.lineup-manager-toggle[open] .lineup-manager-toggle-summary>svg{transform:rotate(180deg)}.lineup-manager-toggle .lineup-manager-shell{margin:0;border:0;border-top:1px solid var(--line);border-radius:0 0 22px 22px;box-shadow:none}

/* Detailed appearance settings */
.appearance-form-pro{display:grid;gap:16px}.appearance-section-card{padding:18px;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:0 14px 34px rgba(23,33,27,.07)}.appearance-section-card>header{display:flex;align-items:center;gap:11px;margin-bottom:16px}.appearance-section-card>header>span{display:grid;width:48px;height:48px;place-items:center;border-radius:16px;color:var(--icon-color);background:var(--icon-bg)}.appearance-section-card>header svg{width:25px;height:25px;fill:none;stroke:currentColor}.appearance-section-card h2,.appearance-section-card p{margin:0}.appearance-section-card p{color:var(--muted);font-size:11px}.appearance-color-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.appearance-color-field{display:grid;grid-template-columns:54px minmax(0,1fr);align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb,var(--surface) 97%,var(--primary) 3%)}.appearance-color-swatch{display:grid;width:54px;height:54px;overflow:hidden;border:1px solid var(--line);border-radius:15px}.appearance-color-swatch input{width:70px;height:70px;min-height:0;padding:0;border:0;transform:translate(8px,-8px);cursor:pointer}.appearance-color-field>span:last-child{display:grid;gap:1px}.appearance-color-field strong{font-size:11px}.appearance-color-field small{color:var(--muted);font-size:8px}.appearance-color-field code{width:max-content;padding:2px 5px;border-radius:6px;background:color-mix(in srgb,var(--primary) 5%,var(--surface));color:var(--muted);font-size:8px;direction:ltr}.appearance-save-bar{position:sticky;bottom:10px;z-index:20;display:flex;justify-content:center;padding:10px;border:1px solid var(--line);border-radius:18px;background:color-mix(in srgb,var(--surface) 90%,transparent);box-shadow:0 18px 45px rgba(23,33,27,.18);backdrop-filter:blur(14px)}.appearance-save-bar button{min-width:min(360px,100%)}

@media(max-width:850px){.professional-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.statistics-charts-grid{grid-template-columns:1fr}.appearance-color-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.professional-stat-grid article{grid-template-columns:44px minmax(0,1fr);padding:10px}.professional-stat-grid article>span{width:44px;height:44px}.professional-stat-grid article strong{font-size:20px}.statistics-chart-card{padding:12px}.team-goals-row{grid-template-columns:30px 76px minmax(65px,1fr) 24px}.match-status-chart{grid-template-columns:116px minmax(0,1fr);gap:10px}.status-donut{width:112px}.appearance-color-grid{grid-template-columns:1fr}.appearance-section-card{padding:13px;border-radius:19px}.modal-result-card .result-clubs>span{grid-template-columns:34px minmax(0,1fr)}.modal-result-card .result-clubs>span:last-child{grid-template-columns:minmax(0,1fr) 34px}.modal-result-card .result-clubs i{width:34px;height:34px}.cards-ranking{grid-template-columns:auto 40px minmax(0,1fr) auto auto;gap:7px}.lineup-manager-toggle-summary{padding:10px}}

.team-ranking-row.has-player-photo{grid-template-columns:auto 42px minmax(0,1fr) auto}.team-ranking-row.cards-row.has-player-photo{grid-template-columns:42px minmax(0,1fr) auto auto}.appearance-color-field input[type=color]{cursor:pointer}

.public-lineup-toggle{margin:16px 0;border:1px solid color-mix(in srgb,var(--primary) 18%,var(--line));border-radius:22px;background:var(--surface);box-shadow:0 12px 30px rgba(23,33,27,.07)}.public-lineup-toggle>summary{display:grid;grid-template-columns:46px minmax(0,1fr) 22px;align-items:center;gap:10px;padding:12px 14px;cursor:pointer;list-style:none}.public-lineup-toggle>summary::-webkit-details-marker{display:none}.public-lineup-toggle>summary>span{display:grid;width:46px;height:46px;place-items:center;border-radius:15px;color:var(--icon-color);background:var(--icon-bg)}.public-lineup-toggle>summary>span svg{width:24px;height:24px;fill:none;stroke:currentColor}.public-lineup-toggle>summary strong,.public-lineup-toggle>summary small{display:block}.public-lineup-toggle>summary small{color:var(--muted);font-size:10px}.public-lineup-toggle>summary>svg{width:20px;height:20px;fill:none;stroke:var(--muted);transition:transform .2s}.public-lineup-toggle[open]>summary>svg{transform:rotate(180deg)}.public-lineup-toggle .public-lineup-section{margin:0;border:0;border-top:1px solid var(--line);border-radius:0 0 22px 22px;box-shadow:none}

/* تطبيق الخط المختار فعلياً على جميع عناصر صفحات البطولة */
body.theme-font-cairo { --font-family: 'Cairo', Tahoma, Arial, sans-serif; }
body.theme-font-tajawal { --font-family: 'Tajawal', Tahoma, Arial, sans-serif; }
body.theme-font-noto-kufi { --font-family: 'Noto Kufi Arabic', Tahoma, Arial, sans-serif; }
body.theme-font-noto-sans { --font-family: 'Noto Sans Arabic', Tahoma, Arial, sans-serif; }
body.theme-font-tahoma { --font-family: Tahoma, Arial, sans-serif; }
body.theme-font-arial { --font-family: Arial, Tahoma, sans-serif; }
body.theme-font-system { --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif; }
body,
body button,
body input,
body select,
body textarea,
body [contenteditable="true"] { font-family: var(--font-family, Tahoma, Arial, sans-serif) !important; }

/* زر حفظ المظهر: حجم طبيعي لا يتأثر بحجم أيقونات الأقسام */
.appearance-save-bar { justify-content: flex-end; padding: 8px; }
.appearance-save-bar button {
    display: inline-flex;
    width: auto;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 13px;
    font-size: 13px;
}
.appearance-save-bar button svg { width: 18px !important; height: 18px !important; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; }

/* إدارة المدونة والمحرر الاحترافي */
.blog-admin-toolbar .actions { flex-wrap: wrap; }
.blog-admin-toolbar .btn svg,
.blog-save-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.blog-editor-card {
    margin-bottom: 18px;
    padding: clamp(14px, 2.4vw, 24px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--theme-shadow);
}
.blog-editor-form { display: grid; gap: 18px; }
.blog-meta-grid { display: grid; grid-template-columns: minmax(180px, .45fr) minmax(0, 1fr); gap: 12px; }
.blog-meta-grid label { display: grid; gap: 7px; font-weight: 800; }
.blog-meta-grid .wide { grid-column: 1 / -1; }
.blog-cover-uploader {
    display: grid;
    grid-template-columns: minmax(180px, 310px) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px dashed color-mix(in srgb, var(--primary) 35%, var(--line));
    border-radius: 20px;
    background: color-mix(in srgb, var(--primary) 3%, var(--surface));
}
.blog-cover-preview {
    display: grid;
    width: 100%;
    aspect-ratio: 16 / 9;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    color: var(--icon-color);
    background: var(--icon-bg);
}
.blog-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.blog-cover-preview svg { width: 36px; height: 36px; fill: none; stroke: currentColor; }
.blog-cover-preview small { color: var(--muted); font-size: 11px; }
.blog-cover-uploader > div { display: grid; justify-items: start; gap: 7px; }
.blog-cover-uploader > div > small { color: var(--muted); }

.rich-editor-shell {
    overflow: hidden;
    border: 1px solid var(--input-border, var(--line));
    border-radius: 20px;
    background: var(--input-bg, var(--surface));
    box-shadow: 0 12px 34px rgba(23, 33, 27, .07);
}
.rich-editor-toolbar {
    position: sticky;
    top: 68px;
    z-index: 8;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(14px);
}
.editor-tool-group { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.rich-editor-toolbar button {
    display: inline-grid;
    width: auto;
    min-width: 34px;
    min-height: 34px;
    place-items: center;
    padding: 5px 8px;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    background: transparent;
    box-shadow: none;
    font-size: 12px;
}
.rich-editor-toolbar button:hover,
.rich-editor-toolbar button.is-active { color: var(--button-text); background: var(--button-bg); }
.editor-select-tool,
.editor-color-tool {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 40px;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    font-size: 10px;
    font-weight: 800;
}
.editor-select-tool select { width: auto; min-width: 84px; min-height: 31px; padding: 3px 7px; border-radius: 8px; font-size: 11px; }
.editor-color-tool input { width: 30px; height: 30px; min-height: 0; padding: 0; border: 0; border-radius: 8px; }
.editor-image-tools {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--primary) 3%, var(--surface));
}
.editor-image-tools > label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; }
.editor-image-tools > label:not(.editor-image-upload-button) { grid-template-columns: auto auto; align-items: center; }
.editor-image-tools input,
.editor-image-tools select { width: 88px; min-height: 34px; padding: 4px 7px; font-size: 11px; }
.editor-image-tools label > :first-child { grid-column: 1 / -1; }
.editor-image-upload-button {
    display: inline-flex !important;
    min-height: 38px;
    align-items: center;
    grid-auto-flow: column;
    gap: 7px !important;
    padding: 8px 11px;
    border-radius: 11px;
    color: var(--button-text) !important;
    background: var(--button-bg);
    cursor: pointer;
}
.editor-image-upload-button input { display: none; }
.editor-image-upload-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.editor-upload-status { min-height: 20px; color: var(--muted); font-size: 10px; }
.editor-upload-status.error { color: var(--danger); }
.rich-editor-content {
    min-height: 430px;
    padding: clamp(18px, 4vw, 42px);
    outline: none;
    color: var(--input-text, var(--ink));
    background: var(--input-bg, var(--surface));
    font-size: 16px;
    line-height: 1.95;
}
.rich-editor-content:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent); }
.rich-editor-content h2 { font-size: 1.85em; }
.rich-editor-content h3 { font-size: 1.45em; }
.rich-editor-content h4 { font-size: 1.2em; }
.rich-editor-content blockquote { margin: 16px 0; padding: 12px 16px; border-right: 4px solid var(--primary); border-radius: 12px; background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.rich-editor-content img { max-width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 25px rgba(0, 0, 0, .12); cursor: pointer; }
.rich-editor-content img.editor-image-selected { outline: 3px solid var(--accent); outline-offset: 4px; }
.blog-form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.blog-save-button { display: inline-flex; width: auto; min-width: 0; align-items: center; gap: 8px; }

.blog-admin-list { display: grid; gap: 12px; }
.blog-admin-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(23, 33, 27, .06);
}
.blog-admin-cover { display: grid; width: 150px; aspect-ratio: 16/10; place-items: center; overflow: hidden; border-radius: 15px; color: var(--icon-color); background: var(--icon-bg); }
.blog-admin-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-admin-cover svg { width: 34px; height: 34px; fill: none; stroke: currentColor; }
.blog-admin-copy { min-width: 0; }
.blog-admin-copy h2,
.blog-admin-copy p { margin: 0; }
.blog-admin-copy p { display: -webkit-box; margin-top: 5px; overflow: hidden; color: var(--muted); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.blog-admin-copy small { color: var(--muted); font-size: 10px; }
.blog-admin-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.blog-admin-title-row h2 { font-size: 17px; }
.blog-admin-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.blog-admin-actions form { margin: 0; }

/* المدونة العامة */
.blog-public-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface));
    box-shadow: var(--theme-shadow);
}
.blog-public-hero > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; color: var(--icon-color); background: var(--icon-bg); }
.blog-public-hero svg { width: 30px; height: 30px; fill: none; stroke: currentColor; }
.blog-public-hero h1,
.blog-public-hero p { margin: 0; }
.blog-public-hero p { color: var(--muted); }
.blog-public-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.blog-public-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 12px 30px rgba(23, 33, 27, .07); transition: transform .2s ease, box-shadow .2s ease; }
.blog-public-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(23, 33, 27, .11); }
.blog-public-cover { display: grid; width: 100%; aspect-ratio: 16/10; place-items: center; overflow: hidden; color: var(--icon-color); background: var(--icon-bg); }
.blog-public-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.blog-public-card:hover .blog-public-cover img { transform: scale(1.035); }
.blog-public-cover span svg { width: 44px; height: 44px; fill: none; stroke: currentColor; }
.blog-public-copy { display: grid; gap: 8px; padding: 14px; }
.blog-public-copy small { color: var(--muted); font-size: 10px; }
.blog-public-copy h2,
.blog-public-copy p { margin: 0; }
.blog-public-copy h2 { font-size: 17px; line-height: 1.5; }
.blog-public-copy h2 a { text-decoration: none; }
.blog-public-copy p { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.blog-read-more { display: inline-flex; width: max-content; align-items: center; gap: 5px; color: var(--link-color); font-size: 12px; font-weight: 900; text-decoration: none; }
.blog-read-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; }

.blog-article-page { width: min(920px, 100%); margin: 0 auto; }
.blog-article-header { display: grid; gap: 10px; margin-bottom: 16px; padding: clamp(18px, 4vw, 34px); border: 1px solid var(--line); border-radius: 25px; background: var(--surface); box-shadow: var(--theme-shadow); }
.blog-article-header h1,
.blog-article-header p { margin: 0; }
.blog-article-header h1 { font-size: clamp(26px, 5vw, 46px); line-height: 1.35; }
.blog-article-header p { color: var(--muted); font-size: 15px; }
.blog-back-link { display: inline-flex; width: max-content; align-items: center; gap: 6px; color: var(--link-color); font-weight: 900; text-decoration: none; }
.blog-back-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; }
.blog-article-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 800; }
.blog-article-meta span { display: inline-flex; align-items: center; gap: 5px; }
.blog-article-meta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; }
.blog-article-cover { margin: 0 0 16px; overflow: hidden; border-radius: 25px; box-shadow: var(--theme-shadow); }
.blog-article-cover img { display: block; width: 100%; max-height: 620px; object-fit: cover; }
.blog-article-content { padding: clamp(20px, 5vw, 50px); border: 1px solid var(--line); border-radius: 25px; background: var(--surface); box-shadow: var(--theme-shadow); font-size: clamp(15px, 2.2vw, 18px); line-height: 2; overflow-wrap: anywhere; }
.blog-article-content h2 { margin-top: 1.5em; font-size: 1.75em; }
.blog-article-content h3 { margin-top: 1.4em; font-size: 1.4em; }
.blog-article-content h4 { margin-top: 1.3em; font-size: 1.2em; }
.blog-article-content img { display: block; max-width: 100%; border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.blog-article-content blockquote { margin: 20px 0; padding: 14px 18px; border-right: 4px solid var(--primary); border-radius: 13px; background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }

@media (max-width: 900px) {
    .blog-public-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .blog-admin-card { grid-template-columns: 120px minmax(0, 1fr); }
    .blog-admin-cover { width: 120px; }
    .blog-admin-actions { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
    .appearance-save-bar { bottom: 6px; justify-content: stretch; }
    .appearance-save-bar button { width: 100%; }
    .blog-meta-grid { grid-template-columns: 1fr; }
    .blog-meta-grid .wide { grid-column: auto; }
    .blog-cover-uploader { grid-template-columns: 1fr; }
    .rich-editor-toolbar { top: 61px; max-height: 180px; overflow: auto; }
    .rich-editor-content { min-height: 360px; padding: 16px; }
    .editor-image-tools { align-items: stretch; }
    .editor-image-tools > label:not(.editor-image-upload-button) { flex: 1 1 125px; }
    .editor-image-upload-button { flex: 1 1 100%; justify-content: center; }
    .blog-public-grid { grid-template-columns: 1fr; }
    .blog-admin-card { grid-template-columns: 86px minmax(0, 1fr); align-items: start; }
    .blog-admin-cover { width: 86px; border-radius: 13px; }
    .blog-admin-title-row h2 { font-size: 14px; }
    .blog-admin-copy p { font-size: 11px; -webkit-line-clamp: 2; }
    .blog-admin-actions { justify-content: stretch; }
    .blog-admin-actions > * { flex: 1; }
    .blog-admin-actions .btn,
    .blog-admin-actions button { width: 100%; }
    .blog-public-hero { padding: 14px; border-radius: 19px; }
    .blog-public-hero > span { width: 48px; height: 48px; }
    .blog-article-content { padding: 18px; border-radius: 19px; }
}


/* ===== Compact match cards, generic sharing and mobile editor refinements ===== */
.share-button {
    font-family: inherit;
    cursor: pointer;
}
.share-button:disabled,
.share-button.is-sharing {
    opacity: .65;
    pointer-events: none;
}

.public-match-card {
    border-radius: 18px;
}
.public-match-link {
    padding: 10px 12px;
}
.compact-status-line {
    min-height: 24px;
    justify-content: flex-end;
}
.public-match-body {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    gap: 7px;
    padding: 7px 0 5px;
}
.public-match-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
}
.public-match-team {
    gap: 5px;
}
.public-match-team strong {
    font-size: 12px;
    line-height: 1.25;
}
.public-match-center time {
    font-size: 18px;
}
.public-score b {
    width: 32px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
}
.match-prediction-strip {
    padding: 8px 10px;
}
.match-prediction-summary > span {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
}
.match-prediction-summary strong {
    font-size: 11px;
}
.prediction-button,
.prediction-submitted,
.prediction-closed {
    min-height: 32px;
    padding: 6px 9px;
}

.manager-match-card {
    gap: 9px;
    padding: 12px;
    border-radius: 18px;
}
.manager-match-clubs {
    grid-template-columns: minmax(0,1fr) 72px minmax(0,1fr);
}
.manager-club > span {
    width: 56px;
    height: 56px;
    border-radius: 17px;
}
.manager-match-score time {
    font-size: 18px;
}
.manager-match-actions {
    gap: 5px;
}
.manager-match-actions .btn,
.manager-match-actions button {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 10px;
}

@media (max-width: 620px) {
    .rich-editor-toolbar {
        position: static;
        top: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        max-height: none;
        gap: 7px;
        overflow: visible;
        padding: 8px;
        backdrop-filter: none;
    }
    .editor-tool-group {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
        width: 100%;
        gap: 4px;
    }
    .rich-editor-toolbar button {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        padding: 5px 4px;
        white-space: normal;
        line-height: 1.25;
    }
    .editor-select-tool {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        width: 100%;
        min-width: 0;
        min-height: 42px;
    }
    .editor-select-tool select {
        width: 100%;
        min-width: 0;
    }
    .editor-color-tool {
        width: 100%;
        justify-content: space-between;
    }
    .rich-editor-content {
        min-height: 330px;
        padding: 15px;
    }

    .public-match-link {
        padding: 8px;
    }
    .public-match-topline {
        justify-content: flex-end;
    }
    .public-match-body {
        grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr) !important;
        grid-template-areas: none !important;
        gap: 5px !important;
        padding: 5px 0 !important;
    }
    .public-match-body > .public-match-team:first-child,
    .public-match-body > .public-match-center,
    .public-match-body > .public-match-team:last-child {
        grid-area: auto !important;
    }
    .public-match-body > .public-match-center {
        padding-top: 0 !important;
        border-top: 0 !important;
    }
    .public-match-logo {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }
    .public-match-team strong {
        min-height: 0 !important;
        font-size: 10px;
        -webkit-line-clamp: 1 !important;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .public-match-center time {
        font-size: 15px;
    }
    .public-match-center small {
        font-size: 8px;
    }
    .public-score {
        gap: 4px;
    }
    .public-score b {
        width: 27px;
        height: 31px;
        font-size: 15px;
    }
    .match-prediction-strip {
        padding: 7px 8px;
    }
    .match-prediction-summary > span {
        display: none;
    }
    .match-prediction-summary strong {
        font-size: 10px;
    }

    .manager-match-card {
        padding: 10px 8px;
    }
    .manager-match-clubs {
        grid-template-columns: minmax(0,1fr) 62px minmax(0,1fr) !important;
        grid-template-areas: none !important;
        gap: 5px !important;
    }
    .manager-match-clubs > .manager-club:first-child,
    .manager-match-clubs > .manager-match-score,
    .manager-match-clubs > .manager-club:last-child {
        grid-area: auto !important;
    }
    .manager-match-clubs > .manager-match-score {
        padding-top: 0 !important;
        border-top: 0 !important;
    }
    .manager-club > span {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }
    .manager-club strong {
        min-height: 0 !important;
        font-size: 10px;
        -webkit-line-clamp: 1 !important;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

.editor-cover-only-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-radius: 12px;
    color: var(--muted);
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
    font-size: 11px;
    font-weight: 800;
}
.editor-cover-only-note svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--primary);
}

/* إعدادات مظهر المنصة الرئيسية */
.platform-identity-preview {
    width: 112px;
    height: 78px;
    border-radius: 18px;
}
.platform-app-icon-preview {
    width: 112px;
    height: 112px;
    border-radius: 26px;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}
.platform-app-icon-preview img,
.platform-identity-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.platform-appearance-save button {
    display: inline-flex;
    width: auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 22px;
}
.platform-appearance-save button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
}
@media (max-width: 620px) {
    .platform-appearance-form .appearance-section-card { padding: 13px; border-radius: 18px; }
    .platform-appearance-form .media-upload-card { grid-template-columns: 82px minmax(0, 1fr); }
    .platform-identity-preview { width: 82px; height: 66px; }
    .platform-app-icon-preview { width: 82px; height: 82px; border-radius: 21px; }
    .platform-appearance-save button { width: 100%; }
}

/* استهلاك قاعدة بيانات البطولات والسعة الإضافية */
.storage-meter-card {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}
.storage-meter-head,
.storage-meter-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.storage-meter-head > span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.storage-meter-head .ui-icon,
.storage-meter-head svg { width: 18px; height: 18px; color: var(--primary); }
.storage-meter-head b { font-size: 12px; }
.storage-meter-head strong { color: var(--primary-dark); font-size: 13px; white-space: nowrap; }
.storage-meter-track {
    position: relative;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 74%, var(--surface));
}
.storage-meter-track i {
    display: block;
    min-width: 2px;
    max-width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.storage-meter-card[data-storage-percent^="9"] .storage-meter-track i,
.storage-meter-card[data-storage-percent="100.00"] .storage-meter-track i {
    background: linear-gradient(90deg, var(--warning), var(--danger));
}
.storage-meter-meta { color: var(--muted); font-size: 10px; font-weight: 800; }
.tournament-card-storage { margin-top: 10px; }
.storage-meter-card.is-full {
    border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
    background: color-mix(in srgb, var(--danger) 5%, var(--surface));
}
.compact-subscription-details { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.renewal-months-form,
.storage-upgrade-form {
    display: grid;
    grid-template-columns: minmax(105px, .35fr) minmax(210px, 1fr);
    align-items: end;
    gap: 8px;
    width: 100%;
}
.renewal-months-select,
.storage-upgrade-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
}
.renewal-months-select select,
.storage-upgrade-form select { min-height: 42px; }
.storage-upgrade-form { grid-template-columns: minmax(180px, 1fr) auto; }
.storage-upgrade-form .btn { min-height: 42px; }

@media (max-width: 720px) {
    .storage-meter-card { padding: 10px 11px; border-radius: 14px; }
    .storage-meter-head b { font-size: 10px; }
    .storage-meter-meta { font-size: 9px; }
    .renewal-months-form,
    .storage-upgrade-form { grid-template-columns: 1fr; }
    .renewal-months-form .subscription-renew-button,
    .storage-upgrade-form .btn { width: 100%; }
}

/* بطاقات قائمة البطولات المختصرة: الاشتراك والاستهلاك والإجراءات فقط */
.pro-tournament-card {
    gap: 14px;
    min-height: 0;
}

.tournament-subscription-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(175px, .52fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--card-primary, #107c41) 20%, var(--card-line, #dbe4d8));
    border-radius: 20px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 12px 32px rgba(23,33,27,.07);
    backdrop-filter: blur(12px);
}

.tournament-subscription-card.is-active {
    border-color: color-mix(in srgb, #0d9f62 30%, var(--card-line, #dbe4d8));
    background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(236,253,243,.88));
}

.tournament-subscription-card.is-expired {
    border-color: color-mix(in srgb, #d92d20 30%, var(--card-line, #dbe4d8));
    background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(254,243,242,.9));
}

.tournament-subscription-main,
.tournament-subscription-expiry {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.tournament-subscription-expiry {
    padding-inline-start: 13px;
    border-inline-start: 1px solid color-mix(in srgb, var(--card-primary, #107c41) 15%, var(--card-line, #dbe4d8));
}

.tournament-feature-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 1px solid color-mix(in srgb, var(--card-primary, #107c41) 24%, transparent);
    border-radius: 14px;
    color: var(--card-primary, var(--primary));
    background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--card-primary, #107c41) 10%, #fff));
    box-shadow: 0 9px 20px color-mix(in srgb, var(--card-primary, #107c41) 13%, transparent);
}

.tournament-feature-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tournament-subscription-card.is-expired .subscription-state-icon {
    color: #b42318;
    border-color: rgba(217,45,32,.24);
    background: #fff5f4;
}

.tournament-subscription-copy,
.tournament-subscription-expiry > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.tournament-subscription-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
}

.tournament-subscription-card small {
    color: var(--card-muted, var(--muted));
    font-size: 11px;
    font-weight: 900;
}

.tournament-subscription-card strong {
    color: var(--card-ink, var(--ink));
    font-size: 13px;
    line-height: 1.6;
}

.tournament-subscription-copy em {
    color: #b42318;
    font-size: 10px;
    font-style: normal;
    font-weight: 850;
}

.subscription-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #087443;
    background: #dcfae6;
    border: 1px solid #a6f4c5;
    font-size: 10px;
    font-weight: 950;
    white-space: nowrap;
}

.is-expired .subscription-status-badge {
    color: #b42318;
    background: #fee4e2;
    border-color: #fecdca;
}

.tournament-card-storage {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,.76);
    backdrop-filter: blur(12px);
}

.tournament-card-storage .storage-meter-head > span:first-child {
    gap: 9px;
}

.tournament-card-storage .storage-meter-head svg {
    width: 22px;
    height: 22px;
    padding: 3px;
    border-radius: 7px;
    color: var(--card-primary, var(--primary));
    background: color-mix(in srgb, var(--card-primary, #107c41) 10%, #fff);
    stroke-width: 2.1;
}

.tournament-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.tournament-card-actions .tournament-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-height: 48px;
    padding: 8px 10px;
    text-align: start;
}

.tournament-card-actions .tournament-action-button > span {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 11px;
    color: inherit;
    background: color-mix(in srgb, currentColor 9%, rgba(255,255,255,.9));
    border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

.tournament-card-actions .tournament-open-btn > span {
    color: #fff;
    background: rgba(255,255,255,.17);
    border-color: rgba(255,255,255,.24);
}

.tournament-card-actions .tournament-action-button svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.2;
}

@media (max-width: 720px) {
    .tournament-subscription-card {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .tournament-subscription-expiry {
        padding-block-start: 11px;
        padding-inline-start: 0;
        border-inline-start: 0;
        border-block-start: 1px solid color-mix(in srgb, var(--card-primary, #107c41) 15%, var(--card-line, #dbe4d8));
    }

    .tournament-card-actions {
        grid-template-columns: 1fr;
    }
}


/* أيقونة شريط الإشعارات: معاينة على خلفية داكنة توضح PNG الشفافة */
.notification-badge-preview {
    width: 112px;
    height: 112px;
    border-radius: 26px;
    background:
        linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.06) 75%),
        linear-gradient(45deg, rgba(255,255,255,.06) 25%, #1f2937 25%, #1f2937 75%, rgba(255,255,255,.06) 75%);
    background-position: 0 0, 8px 8px;
    background-size: 16px 16px;
    border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
}
.notification-badge-preview img {
    width: 72px;
    height: 72px;
    padding: 0;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,.3));
}
.notification-badge-upload-card .media-upload-copy > small {
    max-width: 720px;
    line-height: 1.8;
}
@media (max-width: 620px) {
    .notification-badge-preview { width: 82px; height: 82px; border-radius: 21px; }
    .notification-badge-preview img { width: 54px; height: 54px; }
}

/* ===== Optional image below tournament homepage icons ===== */
.tournament-homepage-image {
    width: min(var(--homepage-image-width, 100%), 100%);
    height: var(--homepage-image-height, 240px);
    margin: 14px auto 22px;
    overflow: hidden;
    border-radius: max(12px, var(--theme-radius, 8px));
    background: color-mix(in srgb, var(--surface) 92%, var(--primary) 8%);
    box-shadow: var(--theme-shadow, 0 14px 32px rgba(23, 33, 27, .12));
}
.tournament-homepage-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--homepage-image-fit, contain);
    object-position: center;
}

.homepage-image-settings-card .homepage-image-upload-preview {
    width: 150px;
    min-width: 150px;
    height: 105px;
    border-radius: 16px;
}
.homepage-image-settings-card .homepage-image-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.homepage-image-dimension-preview {
    width: min(var(--homepage-preview-width, 100%), 100%);
    height: var(--homepage-preview-height, 240px);
    min-height: 80px;
    max-height: 800px;
    margin: 18px auto 0;
    overflow: hidden;
    border: 1px dashed color-mix(in srgb, var(--primary) 38%, var(--line));
    border-radius: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 5%, var(--surface)), var(--surface));
    transition: width .2s ease, height .2s ease;
}
.homepage-image-dimension-preview.is-removing {
    opacity: .42;
    filter: grayscale(1);
}
.homepage-image-dimension-preview > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--homepage-preview-fit, contain);
    object-position: center;
}
.homepage-image-dimension-preview > span {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 9px;
    padding: 18px;
    color: var(--muted);
    text-align: center;
}
.homepage-image-dimension-preview > span svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
}
.homepage-image-dimension-preview > span strong {
    font-size: .82rem;
}

@media (max-width: 640px) {
    .tournament-homepage-image {
        margin-top: 11px;
        border-radius: 13px;
    }
    .homepage-image-settings-card .homepage-image-upload-preview {
        width: 100%;
        min-width: 0;
        height: 150px;
    }
}


/* القائمة الطويلة داخل البنر: سحب وتمرير داخلي دون تغيير المظهر */
.dropdown-panel {
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary) 38%, transparent) transparent;
}
.dropdown-panel::-webkit-scrollbar { width: 6px; }
.dropdown-panel::-webkit-scrollbar-track { background: transparent; }
.dropdown-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 38%, transparent);
}
@media (max-width: 720px) {
    .dropdown-panel { max-height: calc(100dvh - 76px); }
}


/* تصنيفات الصلاحيات المخصصة */
.permissions-page-toolbar { margin-bottom: 16px; }
.permission-profile-editor,
.permission-member-add { margin-bottom: 16px; }
.permission-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}
.permission-section-heading > span,
.permission-profile-card-head > span {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 15px;
    color: var(--icon-color, var(--primary));
    background: var(--icon-bg, color-mix(in srgb, var(--primary) 10%, var(--surface)));
}
.permission-section-heading svg,
.permission-profile-card-head svg,
.permission-option-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
}
.permission-section-heading h2,
.permission-profile-card h3 { margin: 0; }
.permission-section-heading p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.permission-profile-form { display: grid; gap: 14px; }
.permission-profile-name { display: grid; gap: 7px; max-width: 520px; font-weight: 800; }
.permission-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.permission-option-card {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 88px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.permission-option-card:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}
.permission-option-card:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}
.permission-option-card input { width: 18px; height: 18px; accent-color: var(--primary); }
.permission-option-icon {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 13px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
.permission-option-card > span:last-child { display: grid; min-width: 0; gap: 3px; }
.permission-option-card strong { font-size: .9rem; }
.permission-option-card small { color: var(--muted); font-size: .73rem; line-height: 1.5; }
.permission-profiles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.permission-profile-card {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(23, 33, 27, .06);
}
.permission-profile-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}
.permission-profile-card-head div { min-width: 0; }
.permission-profile-card-head small { color: var(--muted); }
.permission-profile-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.permission-profile-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    font-size: .7rem;
    font-weight: 800;
}
.permission-member-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(190px, 1fr) auto;
    align-items: end;
    gap: 11px;
}
.permission-member-form label { display: grid; gap: 6px; font-weight: 800; }
.permission-inline-form {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 260px;
}
.permission-inline-form select { min-width: 180px; }
.permission-member-email { display: block; color: var(--muted); font-size: .75rem; }

@media (max-width: 980px) {
    .permission-profiles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .permission-options-grid,
    .permission-profiles-grid { grid-template-columns: 1fr; }
    .permission-option-card { min-height: 78px; padding: 10px; }
    .permission-member-form { grid-template-columns: 1fr; }
    .permission-member-form button { width: 100%; }
    .permission-inline-form { min-width: 220px; }
}
.permission-profile-form .actions button svg,
.permission-member-form button svg,
.permission-inline-form button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
}

.prediction-admin-match-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.prediction-admin-match-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(23, 33, 27, .07);
}
.prediction-admin-match-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}
.prediction-admin-mini-team {
    display: grid;
    justify-items: center;
    min-width: 0;
    gap: 6px;
    text-align: center;
}
.prediction-admin-mini-team i {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
}
.prediction-admin-mini-team img { width: 100%; height: 100%; object-fit: contain; }
.prediction-admin-mini-team svg { width: 25px; height: 25px; fill: none; stroke: var(--primary); }
.prediction-admin-mini-team strong {
    max-width: 100%;
    overflow: hidden;
    font-size: .8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.prediction-admin-mini-score { font-size: 1.2rem; color: var(--primary); }
.prediction-admin-match-meta { display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: .75rem; }
@media (max-width: 720px) {
    .prediction-admin-match-grid { grid-template-columns: 1fr; }
}


/* تحسين نافذة الإنذارات والمدونة في الصفحة الرئيسية */
.modal-share-row { margin-bottom: 10px; }
.modal-share-row .modal-share-button {
    width: auto;
    min-height: 34px;
    padding: 6px 10px;
    gap: 6px;
    font-size: 10px;
}
.modal-share-row .modal-share-button svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}
.cards-ranking {
    grid-template-columns: auto 44px minmax(0, 1fr) auto !important;
    gap: 9px;
}
.ranking-player-copy { min-width: 0; }
.ranking-player-copy strong,
.ranking-player-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.discipline-pair {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    white-space: nowrap;
}
.cards-ranking .discipline-count {
    min-width: 38px;
    justify-content: center;
    gap: 5px;
    padding: 5px 7px;
    border-radius: 9px;
    font-size: 11px;
}
.cards-ranking .discipline-count i {
    width: 9px;
    height: 14px;
    border-radius: 2px;
}
.modal-blog-manager {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 11px;
}
.modal-blog-list { display: grid; gap: 11px; }
.modal-blog-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 9px 24px rgba(23, 33, 27, .06);
}
.modal-blog-cover {
    display: grid;
    min-height: 128px;
    place-items: center;
    overflow: hidden;
    color: var(--icon-color);
    background: var(--icon-bg);
}
.modal-blog-cover img { width: 100%; height: 100%; object-fit: cover; }
.modal-blog-cover svg { width: 38px; height: 38px; fill: none; stroke: currentColor; }
.modal-blog-copy { display: grid; align-content: center; gap: 6px; min-width: 0; padding: 12px; }
.modal-blog-copy > small { color: var(--muted); font-size: 9px; }
.modal-blog-copy > strong { font-size: 15px; line-height: 1.5; }
.modal-blog-copy > p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.modal-blog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.modal-blog-actions .btn,
.modal-blog-actions .share-button { min-height: 32px; padding: 5px 9px; font-size: 9px; }
.modal-blog-actions svg { width: 14px; height: 14px; }

@media (max-width: 500px) {
    .cards-ranking {
        grid-template-columns: 28px 38px minmax(0, 1fr) auto !important;
        gap: 6px;
        padding: 9px 7px;
    }
    .cards-ranking .ranking-player-photo { width: 38px; height: 38px; }
    .cards-ranking .discipline-pair { gap: 3px; }
    .cards-ranking .discipline-count { min-width: 32px; padding: 4px 5px; font-size: 10px; }
    .cards-ranking .discipline-count i { width: 8px; height: 12px; }
    .modal-blog-card { grid-template-columns: 94px minmax(0, 1fr); border-radius: 15px; }
    .modal-blog-cover { min-height: 112px; }
    .modal-blog-copy { padding: 9px; gap: 4px; }
    .modal-blog-copy > strong { font-size: 12px; }
    .modal-blog-copy > p { font-size: 9px; -webkit-line-clamp: 2; }
}

.google-popup-status {
    margin: 12px 0 0;
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}
.google-popup-status.is-error {
    border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
    background: color-mix(in srgb, var(--danger) 8%, var(--surface));
    color: var(--danger);
}

/* Team registration workflow */
.registration-login-card{display:grid;max-width:680px;margin:28px auto;padding:28px;justify-items:center;gap:15px;border:1px solid var(--line);border-radius:26px;background:var(--surface);box-shadow:var(--theme-shadow);text-align:center}.registration-login-card>span{display:grid;width:76px;height:76px;place-items:center;border-radius:24px;background:var(--icon-bg);color:var(--icon-color)}.registration-login-card>span svg{width:38px;height:38px;fill:none;stroke:currentColor}.registration-login-card h1,.registration-login-card p{margin:0}.registration-login-card p{color:var(--muted)}
.registration-toolbar{margin-bottom:16px}.registration-status-card{display:flex;align-items:flex-start;gap:15px;margin-bottom:16px;padding:18px;border:1px solid var(--line);border-radius:22px;background:var(--surface);box-shadow:0 10px 25px rgba(23,33,27,.07)}.registration-status-card>span{display:grid;width:50px;height:50px;flex:0 0 auto;place-items:center;border-radius:16px;background:var(--icon-bg);color:var(--icon-color)}.registration-status-card>span svg{width:26px;height:26px;fill:none;stroke:currentColor}.registration-status-card h2,.registration-status-card p{margin:2px 0 0}.registration-status-card small{color:var(--muted)}.registration-status-card.tag-success{border-color:color-mix(in srgb,var(--success) 35%,var(--line))}.registration-status-card.tag-warning{border-color:color-mix(in srgb,var(--warning) 35%,var(--line))}.registration-status-card.tag-danger{border-color:color-mix(in srgb,var(--danger) 35%,var(--line))}
.registration-step{margin-bottom:18px;padding:20px;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:0 10px 28px rgba(23,33,27,.06)}.registration-step>header{display:flex;align-items:center;gap:12px;margin-bottom:18px}.registration-step>header>span{display:grid;width:42px;height:42px;place-items:center;border-radius:14px;background:var(--primary);color:var(--button-text);font-weight:900}.registration-step h2,.registration-step p{margin:0}.registration-step p{color:var(--muted);font-size:12px}.registration-form,.registration-add-form{margin:0}.registration-add-form{margin-top:14px;padding-top:14px;border-top:1px dashed var(--line)}.file-field small{color:var(--muted);font-weight:600}
.registration-member-list{display:grid;gap:9px}.registration-member-list>article{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:11px;padding:10px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb,var(--primary) 3%,var(--surface))}.registration-member-photo{display:grid;width:48px;height:48px;place-items:center;overflow:hidden;border-radius:14px;background:var(--icon-bg);color:var(--icon-color)}.registration-member-photo img{width:100%;height:100%;object-fit:cover}.registration-member-photo svg{width:23px;height:23px;fill:none;stroke:currentColor}.registration-member-list strong,.registration-member-list small{display:block}.registration-member-list small{color:var(--muted);font-size:11px}.registration-member-list form{margin:0}.registration-member-list button svg{width:17px;height:17px}
.registration-submit-card,.registration-locked{display:flex;align-items:center;gap:15px;margin:18px 0;padding:20px;border:1px solid color-mix(in srgb,var(--primary) 30%,var(--line));border-radius:23px;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--primary) 7%,var(--surface)))}.registration-submit-card>span,.registration-locked>span{display:grid;width:52px;height:52px;flex:0 0 auto;place-items:center;border-radius:17px;background:var(--primary);color:var(--button-text)}.registration-submit-card>span svg,.registration-locked>span svg{width:25px;height:25px;fill:none;stroke:currentColor}.registration-submit-card>div{min-width:0;flex:1}.registration-submit-card h2,.registration-submit-card p,.registration-locked h2,.registration-locked p{margin:0}.registration-submit-card p,.registration-locked p{color:var(--muted);font-size:12px}.registration-submit-card form{margin:0}.registration-closed{display:grid;justify-items:center;gap:8px;padding:35px}.registration-closed svg{width:34px;height:34px;fill:none;stroke:currentColor}
.registration-pending-counter{padding:8px 12px;border-radius:999px;background:var(--warning);color:#fff;font-size:12px;font-weight:900}.registration-filter-bar{display:flex;gap:7px;margin-bottom:15px;padding-bottom:5px;overflow-x:auto}.registration-filter-bar a{flex:0 0 auto;padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:11px;font-weight:800;text-decoration:none}.registration-filter-bar a.active{border-color:var(--primary);background:var(--primary);color:var(--button-text)}.registration-requests-list{display:grid;gap:15px}.registration-request-card{padding:18px;border:1px solid var(--line);border-radius:23px;background:var(--surface);box-shadow:0 12px 30px rgba(23,33,27,.07)}.registration-request-card>header{display:grid;grid-template-columns:62px minmax(0,1fr) auto;align-items:center;gap:12px}.registration-request-card h2,.registration-request-card p{margin:0}.registration-request-card p{color:var(--muted);font-size:12px}.registration-request-logo{display:grid;width:62px;height:62px;place-items:center;overflow:hidden;border-radius:19px;background:var(--icon-bg);color:var(--icon-color)}.registration-request-logo img{width:100%;height:100%;object-fit:contain}.registration-request-logo svg{width:31px;height:31px;fill:none;stroke:currentColor}.registration-contact-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}.registration-contact-grid span{display:grid;gap:3px;padding:10px;border-radius:14px;background:color-mix(in srgb,var(--primary) 5%,var(--surface));font-size:11px}.registration-contact-grid b{color:var(--muted);font-size:9px}.registration-request-notes,.registration-review-note{margin:12px 0 0;padding:11px;border-radius:14px;background:color-mix(in srgb,var(--info) 7%,var(--surface));font-size:12px}.registration-request-details{margin-top:13px;border:1px solid var(--line);border-radius:16px}.registration-request-details summary{padding:11px 13px;cursor:pointer;font-weight:900}.registration-review-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:0 13px 13px}.registration-review-columns h3{margin:0 0 8px;font-size:14px}.registration-review-list{display:grid;gap:7px}.registration-review-list article{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:9px;padding:8px;border-radius:12px;background:color-mix(in srgb,var(--primary) 4%,var(--surface))}.registration-review-list article>span{display:grid;width:40px;height:40px;place-items:center;overflow:hidden;border-radius:11px;background:var(--icon-bg)}.registration-review-list img{width:100%;height:100%;object-fit:cover}.registration-review-list svg{width:20px;height:20px;fill:none;stroke:currentColor}.registration-review-list strong,.registration-review-list small{display:block}.registration-review-list small{color:var(--muted);font-size:10px}.registration-decision-form{display:grid;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}.registration-decision-actions{display:flex;flex-wrap:wrap;gap:8px}.registration-decision-actions .success{background:var(--success);color:#fff}.registration-decision-actions button{display:inline-flex;align-items:center;gap:6px}.registration-decision-actions svg{width:17px;height:17px;fill:none;stroke:currentColor}
@media(max-width:700px){.registration-step{padding:14px}.registration-submit-card,.registration-locked{align-items:flex-start;flex-wrap:wrap}.registration-submit-card form,.registration-submit-card button{width:100%}.registration-request-card>header{grid-template-columns:52px minmax(0,1fr)}.registration-request-logo{width:52px;height:52px}.registration-request-card>header>.tag{grid-column:1/-1;width:max-content}.registration-contact-grid{grid-template-columns:1fr 1fr}.registration-review-columns{grid-template-columns:1fr}.registration-decision-actions{display:grid}.registration-decision-actions button{justify-content:center;width:100%}}
.team-staff-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.team-staff-item{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:15px;background:color-mix(in srgb,var(--primary) 4%,var(--surface))}.team-staff-item strong,.team-staff-item small{display:block}.team-staff-item small{color:var(--muted);font-size:10px}@media(max-width:600px){.team-staff-grid{grid-template-columns:1fr}}

/* Enhanced team registration, requirements, and team-submitted lineups */
.registration-icon-quality svg{fill:none;stroke:currentColor;stroke-width:2.15;stroke-linecap:round;stroke-linejoin:round}
.registration-icon-quality>span,.registration-step-icon{box-shadow:0 12px 28px color-mix(in srgb,var(--primary) 18%,transparent);background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 15%,var(--surface)),color-mix(in srgb,var(--accent) 12%,var(--surface)));border:1px solid color-mix(in srgb,var(--primary) 22%,var(--line))}
.registration-step>header .registration-step-icon{position:relative;display:grid;width:54px;height:54px;place-items:center;border-radius:18px;color:var(--primary);flex:0 0 auto}
.registration-step-icon svg{width:28px;height:28px}.registration-step-icon b{position:absolute;inset-inline-end:-5px;bottom:-5px;display:grid;width:22px;height:22px;place-items:center;border-radius:8px;background:var(--primary);color:var(--button-text);font-size:10px;border:2px solid var(--surface)}
.registration-requirements-banner{display:flex;align-items:flex-start;gap:14px;margin-bottom:18px;padding:17px;border:1px solid color-mix(in srgb,var(--primary) 24%,var(--line));border-radius:22px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 6%,var(--surface)),var(--surface));box-shadow:0 12px 30px rgba(23,33,27,.06)}
.registration-requirements-banner>span{display:grid;width:52px;height:52px;place-items:center;flex:0 0 auto;border-radius:17px;color:var(--primary)}.registration-requirements-banner>span svg{width:27px;height:27px}.registration-requirements-banner strong{display:block;margin-bottom:3px}.registration-requirements-banner p{margin:0;color:var(--muted);font-size:12px}.registration-requirements-banner>div>div{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.registration-requirements-banner small{padding:5px 8px;border-radius:999px;background:color-mix(in srgb,var(--primary) 8%,var(--surface));border:1px solid color-mix(in srgb,var(--primary) 13%,var(--line));font-size:10px;font-weight:800}
.required-mark{display:inline-flex;margin-inline-start:4px;padding:2px 6px;border-radius:999px;background:color-mix(in srgb,var(--danger) 10%,transparent);color:var(--danger);font-size:9px;font-style:normal;font-weight:900}.registration-upload-card strong em{display:inline-flex;margin-inline-start:6px;padding:3px 7px;border-radius:999px;background:var(--danger);color:#fff;font-size:9px;font-style:normal}.registration-upload-card strong small{color:var(--muted);font-weight:700}
.registration-status-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.registration-status-actions a{display:inline-flex;align-items:center;gap:6px}.registration-status-actions svg{width:17px;height:17px}
.staff-role-other[hidden]{display:none!important}
.registration-requirement-counts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px}.registration-requirement-counts>label{display:grid;grid-template-columns:48px minmax(0,1fr) 84px;align-items:center;gap:11px;padding:13px;border:1px solid var(--line);border-radius:18px;background:color-mix(in srgb,var(--primary) 4%,var(--surface))}.registration-requirement-counts>label>span{display:grid;width:48px;height:48px;place-items:center;border-radius:15px;background:var(--icon-bg);color:var(--icon-color)}.registration-requirement-counts svg{width:24px;height:24px;fill:none;stroke:currentColor}.registration-requirement-counts strong,.registration-requirement-counts small{display:block}.registration-requirement-counts small{color:var(--muted);font-size:10px}.registration-requirement-counts input{width:84px;text-align:center}.settings-subheading{margin:18px 0 10px;font-size:14px}
.registration-modal-overview{display:flex;align-items:center;gap:14px;padding:16px;border-radius:20px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 10%,var(--surface)),var(--surface));border:1px solid color-mix(in srgb,var(--primary) 20%,var(--line))}.registration-modal-hero-icon{display:grid;width:60px;height:60px;place-items:center;flex:0 0 auto;border-radius:19px;background:var(--primary);color:var(--button-text);box-shadow:0 14px 28px color-mix(in srgb,var(--primary) 25%,transparent)}.registration-modal-hero-icon svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:2}.registration-modal-overview strong{display:block;font-size:16px}.registration-modal-overview p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.7}
.registration-modal-status{display:grid;grid-template-columns:64px minmax(0,1fr);gap:13px;margin-top:13px;padding:14px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}.registration-modal-team-logo{display:grid;width:64px;height:64px;place-items:center;overflow:hidden;border-radius:19px;background:var(--icon-bg);color:var(--icon-color)}.registration-modal-team-logo img{width:100%;height:100%;object-fit:contain}.registration-modal-team-logo svg{width:31px;height:31px;fill:none;stroke:currentColor}.registration-modal-copy>small,.registration-modal-copy>strong{display:block}.registration-modal-copy>small{color:var(--muted);font-size:10px}.registration-modal-copy>strong{font-size:16px;margin:2px 0 7px}.registration-modal-counts{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.registration-modal-counts span{display:inline-flex;align-items:center;gap:5px;padding:6px 8px;border-radius:10px;background:color-mix(in srgb,var(--primary) 5%,var(--surface));font-size:10px}.registration-modal-counts svg{width:16px;height:16px;fill:none;stroke:currentColor}.registration-modal-note{margin:10px 0 0;padding:9px;border-radius:12px;background:color-mix(in srgb,var(--warning) 8%,var(--surface));font-size:11px}.registration-modal-instructions,.registration-modal-required{margin-top:13px;padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}.registration-modal-instructions strong,.registration-modal-required>strong{display:block;margin-bottom:8px}.registration-modal-instructions ol{margin:0;padding-inline-start:20px;color:var(--muted);font-size:12px;line-height:1.9}.registration-modal-required>div{display:flex;flex-wrap:wrap;gap:6px}.registration-modal-required>div span{display:inline-flex;align-items:center;gap:4px;padding:6px 8px;border-radius:999px;background:color-mix(in srgb,var(--success) 8%,var(--surface));font-size:10px;font-weight:800}.registration-modal-required svg{width:14px;height:14px;fill:none;stroke:currentColor}.registration-modal-required>small{display:block;margin-top:8px;color:var(--muted)}.registration-modal-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}.registration-modal-actions a{display:inline-flex;align-items:center;justify-content:center;gap:6px}.registration-modal-actions svg{width:18px;height:18px}
.team-lineups-intro,.team-lineup-editor-head{display:flex;align-items:center;gap:14px;margin-bottom:16px;padding:17px;border:1px solid color-mix(in srgb,var(--primary) 22%,var(--line));border-radius:22px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 7%,var(--surface)),var(--surface))}.team-lineups-intro>span,.team-lineup-editor-head>span:first-child{display:grid;width:62px;height:62px;place-items:center;overflow:hidden;flex:0 0 auto;border-radius:19px;background:var(--icon-bg);color:var(--icon-color)}.team-lineups-intro img,.team-lineup-editor-head img{width:100%;height:100%;object-fit:contain}.team-lineups-intro svg,.team-lineup-editor-head>span:first-child svg{width:31px;height:31px}.team-lineups-intro strong,.team-lineup-editor-head strong{display:block;font-size:16px}.team-lineups-intro p,.team-lineup-editor-head p{margin:3px 0 0;color:var(--muted);font-size:12px}.team-lineup-editor-head>.tag{margin-inline-start:auto}
.team-lineups-list{display:grid;gap:12px}.team-lineup-match-card{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:15px;border:1px solid var(--line);border-radius:21px;background:var(--surface);box-shadow:0 10px 25px rgba(23,33,27,.06)}.team-lineup-opponent{display:flex;align-items:center;gap:12px}.team-lineup-opponent>span{display:grid;width:54px;height:54px;place-items:center;overflow:hidden;flex:0 0 auto;border-radius:16px;background:var(--icon-bg);color:var(--icon-color)}.team-lineup-opponent img{width:100%;height:100%;object-fit:contain}.team-lineup-opponent svg{width:27px;height:27px;fill:none;stroke:currentColor}.team-lineup-opponent small,.team-lineup-opponent strong,.team-lineup-opponent p{display:block;margin:0}.team-lineup-opponent small,.team-lineup-opponent p{color:var(--muted);font-size:10px}.team-lineup-state{display:grid;justify-items:center;gap:5px}.team-lineup-state small{color:var(--muted);font-size:10px}.team-lineup-match-card>a{display:inline-flex;align-items:center;gap:6px}.team-lineup-match-card>a svg{width:17px;height:17px}
.team-lineup-editor-form{display:grid;gap:16px}.team-lineup-player-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.team-lineup-player-card{display:grid;grid-template-columns:48px minmax(0,1fr);gap:9px;padding:11px;border:1px solid var(--line);border-radius:17px;background:color-mix(in srgb,var(--primary) 3%,var(--surface))}.team-lineup-player-card>label{font-size:10px}.team-lineup-player-card>label select{margin-top:4px}.team-lineup-player-card strong,.team-lineup-player-card small{display:block}.team-lineup-player-card small{color:var(--muted);font-size:10px}.team-lineup-staff-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.team-lineup-staff-grid>label{display:grid;grid-template-columns:auto 44px minmax(0,1fr);align-items:center;gap:9px;padding:10px;border:1px solid var(--line);border-radius:15px;background:var(--surface);cursor:pointer}.team-lineup-staff-grid>label>span{display:grid;width:44px;height:44px;place-items:center;overflow:hidden;border-radius:13px;background:var(--icon-bg);color:var(--icon-color)}.team-lineup-staff-grid img{width:100%;height:100%;object-fit:cover}.team-lineup-staff-grid svg{width:22px;height:22px;fill:none;stroke:currentColor}.team-lineup-staff-grid strong,.team-lineup-staff-grid small{display:block}.team-lineup-staff-grid small{color:var(--muted);font-size:10px}
.team-lineup-submit-card{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:13px;padding:18px;border:1px solid color-mix(in srgb,var(--primary) 25%,var(--line));border-radius:22px;background:linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--primary) 7%,var(--surface)))}.team-lineup-submit-card>span{display:grid;width:54px;height:54px;place-items:center;border-radius:17px;background:var(--primary);color:var(--button-text)}.team-lineup-submit-card>span svg{width:27px;height:27px}.team-lineup-submit-card strong{display:block}.team-lineup-submit-card p{margin:3px 0 0;color:var(--muted);font-size:11px}.team-lineup-submit-card>div:last-child{display:flex;gap:8px}.team-lineup-submit-card button{display:inline-flex;align-items:center;gap:6px}.team-lineup-submit-card button svg{width:17px;height:17px}
@media(max-width:760px){.registration-requirement-counts{grid-template-columns:1fr}.team-lineups-toolbar{align-items:flex-start}.team-lineup-match-card{grid-template-columns:1fr}.team-lineup-state{justify-items:start}.team-lineup-match-card>a{justify-content:center;width:100%}.team-lineup-player-grid,.team-lineup-staff-grid{grid-template-columns:1fr}.team-lineup-submit-card{grid-template-columns:48px minmax(0,1fr)}.team-lineup-submit-card>div:last-child{grid-column:1/-1;display:grid}.team-lineup-submit-card button{justify-content:center;width:100%}.registration-modal-actions{display:grid}.registration-modal-actions a{width:100%}}
@media(max-width:520px){.registration-requirements-banner{align-items:center}.registration-requirements-banner>span{width:46px;height:46px}.registration-requirement-counts>label{grid-template-columns:42px minmax(0,1fr) 70px}.registration-requirement-counts>label>span{width:42px;height:42px}.registration-requirement-counts input{width:70px}.team-lineup-editor-head{align-items:flex-start;flex-wrap:wrap}.team-lineup-editor-head>.tag{margin-inline-start:0}.team-lineup-player-card{grid-template-columns:44px minmax(0,1fr)}.team-lineup-player-card>label{grid-column:1/-1}.registration-modal-status{grid-template-columns:52px minmax(0,1fr)}.registration-modal-team-logo{width:52px;height:52px}}
.lineup-team-editor>summary>.tag{margin-inline-start:auto;white-space:nowrap}.lineup-team-editor>summary>svg:last-child{flex:0 0 auto}
@media(max-width:620px){.lineup-team-editor>summary>.tag{order:4;margin-inline-start:0}.lineup-team-editor>summary{flex-wrap:wrap}}


/* ===== Full public-section controls, larger launcher icons and warning ranking ===== */
.apps-only-launcher .modal-app-grid {
    width: min(1020px, 100%);
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    gap: clamp(20px, 3vw, 34px) clamp(12px, 2.3vw, 26px);
}
.apps-only-launcher .app-icon {
    width: clamp(68px, 8vw, 86px);
    height: clamp(68px, 8vw, 86px);
    border-radius: clamp(20px, 2.3vw, 26px);
}
.apps-only-launcher .app-icon svg { width: 44%; height: 44%; stroke-width: 2; }
.apps-only-launcher .app-icon-card strong { max-width: 128px; font-size: 14px; }
.statistics-discipline-card {
    margin-top: 16px;
    padding: clamp(14px, 2.5vw, 22px);
    border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(18, 32, 24, .07);
}
.statistics-discipline-card > header { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.statistics-discipline-card > header > span {
    display:grid; width:48px; height:48px; flex:0 0 48px; place-items:center; border-radius:15px;
    background:color-mix(in srgb,#e9a400 16%,var(--surface)); color:#9b6500;
}
.statistics-discipline-card > header svg { width:25px; height:25px; fill:none; stroke:currentColor; }
.statistics-discipline-card > header strong,.statistics-discipline-card > header small { display:block; }
.statistics-discipline-card > header small { margin-top:3px; color:var(--muted); font-size:11px; }
.discipline-team-ranking { display:grid; gap:8px; }
.discipline-team-row {
    display:grid; grid-template-columns:34px 44px minmax(0,1fr) auto auto; align-items:center; gap:10px;
    padding:10px 12px; border:1px solid color-mix(in srgb,var(--primary) 9%,var(--line)); border-radius:16px;
    background:color-mix(in srgb,var(--surface) 97%,var(--primary) 3%);
}
.discipline-team-rank { display:grid; width:30px; height:30px; place-items:center; border-radius:10px; background:color-mix(in srgb,var(--primary) 10%,var(--surface)); color:var(--primary); }
.discipline-team-logo { display:grid; width:42px; height:42px; place-items:center; overflow:hidden; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--primary); }
.discipline-team-logo img { width:100%; height:100%; object-fit:contain; }
.discipline-team-logo svg { width:24px; height:24px; fill:none; stroke:currentColor; }
.discipline-team-count { display:grid; grid-template-columns:10px auto; align-items:center; column-gap:5px; min-width:65px; padding:6px 8px; border-radius:12px; text-align:center; }
.discipline-team-count i { width:9px; height:14px; border-radius:2px; grid-row:1 / span 2; }
.discipline-team-count b { font-size:14px; line-height:1; }
.discipline-team-count small { color:var(--muted); font-size:8px; line-height:1.2; }
.discipline-team-count.yellow { background:#fff8d8; color:#8a6200; }
.discipline-team-count.yellow i { background:#f1c40f; }
.discipline-team-count.red { background:#ffe8e5; color:#a52a1d; }
.discipline-team-count.red i { background:#d4382a; }
@media (max-width:700px) {
    .apps-only-launcher .modal-app-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:22px 8px; }
    .apps-only-launcher .app-icon { width:clamp(64px,15vw,76px); height:clamp(64px,15vw,76px); }
}
@media (max-width:540px) {
    .apps-only-launcher .modal-app-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .discipline-team-row { grid-template-columns:30px 40px minmax(0,1fr) auto auto; gap:7px; padding:9px 8px; }
    .discipline-team-logo { width:38px; height:38px; }
    .discipline-team-count { min-width:46px; padding:5px; grid-template-columns:8px auto; }
    .discipline-team-count small { display:none; }
}


/* ===== Clear tournament control center, true maintenance polish and rich homepage content ===== */
.settings-app-icon {
    --control-tone: var(--primary);
    --control-soft: color-mix(in srgb, var(--control-tone) 12%, var(--surface));
    min-height: 158px;
    gap: 10px;
    border-width: 1.5px;
}
.settings-app-icon > span {
    width: 66px;
    height: 66px;
    border: 1px solid color-mix(in srgb, var(--control-tone) 28%, var(--line));
    border-radius: 21px;
    color: var(--control-tone);
    background: linear-gradient(145deg, color-mix(in srgb, var(--control-tone) 8%, #fff), color-mix(in srgb, var(--control-tone) 18%, #fff));
    box-shadow: 0 13px 28px color-mix(in srgb, var(--control-tone) 18%, transparent), inset 0 1px 0 rgba(255,255,255,.8);
}
.settings-app-icon > span svg {
    width: 33px;
    height: 33px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.06));
}
.settings-app-icon strong { font-size: 15.5px; font-weight: 900; }
.settings-app-icon small { max-width: 150px; line-height: 1.55; }
.settings-app-icon:hover > span { transform: scale(1.05); }
.settings-app-icon.control-basic { --control-tone:#2563eb; }
.settings-app-icon.control-timezone { --control-tone:#0f766e; }
.settings-app-icon.control-appearance { --control-tone:#7c3aed; }
.settings-app-icon.control-share { --control-tone:#0284c7; }
.settings-app-icon.control-notifications { --control-tone:#c2410c; }
.settings-app-icon.control-format { --control-tone:#4f46e5; }
.settings-app-icon.control-public { --control-tone:#059669; }
.settings-app-icon.control-registration { --control-tone:#0891b2; }
.settings-app-icon.control-teams { --control-tone:#15803d; }
.settings-app-icon.control-matches { --control-tone:#b45309; }
.settings-app-icon.control-players { --control-tone:#0369a1; }
.settings-app-icon.control-permissions { --control-tone:#475569; }
.settings-app-icon.control-billing { --control-tone:#9333ea; }
.settings-app-icon.control-maintenance { --control-tone:#d97706; }
.settings-app-icon.control-danger { --control-tone:#dc2626; }
.settings-app-icon.is-warning > span,
.settings-app-icon.is-danger > span { color:var(--control-tone); background:linear-gradient(145deg,color-mix(in srgb,var(--control-tone) 8%,#fff),color-mix(in srgb,var(--control-tone) 18%,#fff)); }

/* Registration buttons must not inherit the large homepage icon dimension. */
.registration-step .actions button,
.registration-submit-card button {
    width: auto;
    min-height: 44px;
    flex: 0 0 auto;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 13px;
}
.registration-step .actions button svg,
.registration-submit-card button svg,
.registration-form .actions button svg,
.registration-add-form .actions button svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.tournament-home-content {
    display: grid;
    gap: 14px;
    width: min(1120px, 100%);
    margin-inline: auto;
}
.tournament-home-content-top { margin-block: 8px 22px; }
.tournament-home-content-bottom { margin-block: 20px 8px; }
.tournament-home-rich-text {
    width: 100%;
    padding: var(--home-text-padding, 16px);
    border-radius: var(--home-text-radius, 18px);
    color: var(--home-text-color, var(--ink));
    background: var(--home-text-bg, transparent);
    font-size: var(--home-text-size, 18px);
    font-weight: var(--home-text-weight, 700);
    line-height: 1.9;
    text-align: var(--home-text-align, center);
    overflow-wrap: anywhere;
}
.tournament-homepage-image.align-center,
.homepage-image-dimension-preview.align-center { margin-inline: auto; }
.tournament-homepage-image.align-right,
.homepage-image-dimension-preview.align-right { margin-inline-start: 0; margin-inline-end: auto; }
.tournament-homepage-image.align-left,
.homepage-image-dimension-preview.align-left { margin-inline-start: auto; margin-inline-end: 0; }
.homepage-content-settings-card { overflow: hidden; }
.homepage-content-settings-card > header > span { background: color-mix(in srgb,var(--primary) 11%,var(--surface)); color:var(--primary); }
.homepage-content-form-grid { margin-bottom: 14px; }
.homepage-transparent-option { display:flex !important; align-items:center; gap:9px; min-height:46px; padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:color-mix(in srgb,var(--primary) 3%,var(--surface)); }
.homepage-transparent-option input { width:20px; height:20px; margin:0; }
.homepage-rich-text-preview {
    margin-bottom: 18px;
    padding: var(--preview-text-padding, 16px);
    border: 1px dashed color-mix(in srgb,var(--primary) 30%,var(--line));
    border-radius: var(--preview-text-radius, 18px);
    color: var(--preview-text-color, var(--ink));
    background: var(--preview-text-bg, transparent);
    font-size: var(--preview-text-size, 18px);
    font-weight: var(--preview-text-weight, 700);
    line-height: 1.9;
    text-align: var(--preview-text-align, center);
    overflow-wrap:anywhere;
}
.homepage-image-editor-grid { padding-top:18px; border-top:1px dashed var(--line); }

@media (max-width: 520px) {
    .settings-app-icon { min-height: 142px; padding: 15px 9px; }
    .settings-app-icon > span { width: 60px; height: 60px; border-radius: 19px; }
    .settings-app-icon > span svg { width: 30px; height: 30px; }
    .registration-step .actions button { width:auto !important; flex:0 0 auto !important; }
    .tournament-home-content { gap:10px; }
    .tournament-home-rich-text { line-height:1.75; }
}

/* ===== Prediction challenge experience v2 ===== */
.prediction-challenge-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    align-items: center;
    gap: 18px;
    overflow: hidden;
    margin: 14px 0;
    padding: 22px;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
    border-radius: 26px;
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface));
    box-shadow: 0 18px 48px color-mix(in srgb, var(--primary) 11%, transparent);
}
.prediction-challenge-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -38px;
    bottom: -70px;
    width: 180px;
    height: 180px;
    border: 28px solid color-mix(in srgb, var(--primary) 7%, transparent);
    border-radius: 50%;
    pointer-events: none;
}
.prediction-challenge-copy { position: relative; z-index: 1; display: flex; align-items: center; gap: 15px; min-width: 0; }
.prediction-challenge-icon { display: grid; width: 66px; height: 66px; flex: 0 0 66px; place-items: center; border-radius: 21px; background: var(--primary); color: var(--button-text, #fff); box-shadow: 0 13px 30px color-mix(in srgb, var(--primary) 28%, transparent); }
.prediction-challenge-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.prediction-challenge-copy small { color: var(--primary); font-weight: 900; }
.prediction-challenge-copy h2 { margin: 2px 0 5px; font-size: clamp(1.15rem, 2.8vw, 1.65rem); }
.prediction-challenge-copy p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.8; }
.prediction-score-rules { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prediction-score-rules > span { display: grid; min-height: 84px; place-items: center; align-content: center; gap: 2px; padding: 10px 6px; border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); text-align: center; backdrop-filter: blur(8px); }
.prediction-score-rules b { color: var(--primary); font-size: 1.45rem; line-height: 1; }
.prediction-score-rules small { color: var(--muted); font-size: .62rem; font-weight: 850; }

.prediction-leaderboard { margin: 14px 0 18px; padding: 16px; }
.prediction-leaderboard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.prediction-leaderboard-head small { color: var(--primary); font-weight: 900; }
.prediction-leaderboard-head h2 { margin: 1px 0 0; font-size: 1.08rem; }
.prediction-leaderboard-head > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 15px; background: color-mix(in srgb, #f5c33d 28%, var(--surface)); color: #806000; }
.prediction-leaderboard-head svg { width: 23px; height: 23px; fill: none; stroke: currentColor; }
.prediction-leaderboard-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.prediction-leaderboard-item { display: grid; grid-template-columns: 30px 42px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--primary) 2.5%, var(--surface)); }
.prediction-leaderboard-item.is-podium { border-color: color-mix(in srgb, #d9a800 28%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, #f5c33d 12%, var(--surface)), var(--surface)); }
.prediction-rank { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--primary); font-size: .75rem; }
.prediction-leader-avatar { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: var(--surface); color: var(--primary); box-shadow: 0 5px 15px rgba(0,0,0,.06); }
.prediction-leader-avatar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }
.prediction-leaderboard-item > div { min-width: 0; }
.prediction-leaderboard-item strong, .prediction-leaderboard-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-leaderboard-item strong { font-size: .78rem; }
.prediction-leaderboard-item small { color: var(--muted); font-size: .6rem; }
.prediction-points { display: grid; min-width: 58px; justify-items: center; padding: 6px 8px; border-radius: 12px; background: var(--primary); color: var(--button-text, #fff); font-size: .55rem; }
.prediction-points b { font-size: .95rem; line-height: 1; }

.match-prediction-zone { border-top: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface)); }
.match-prediction-zone .match-prediction-strip { border-top: 0; background: transparent; }
.prediction-lock-countdown { display: grid; min-width: 72px; justify-items: center; gap: 1px; padding: 6px 9px; border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--surface) 86%, transparent); }
.prediction-lock-countdown[hidden] { display: none !important; }
.prediction-lock-countdown small { color: var(--muted); font-size: .52rem; }
.prediction-lock-countdown b { color: var(--primary); font-size: .75rem; }
.prediction-lock-countdown.is-urgent { border-color: color-mix(in srgb, var(--danger) 28%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.prediction-lock-countdown.is-urgent b { color: var(--danger); }
.prediction-submitted { flex-wrap: wrap; }
.prediction-submitted em { padding: 2px 6px; border-radius: 8px; background: color-mix(in srgb, #087443 14%, transparent); font-size: .58rem; font-style: normal; }
.prediction-submitted.has-points { box-shadow: inset 0 0 0 1px rgba(8,116,67,.18); }
.prediction-crowd { display: grid; gap: 6px; padding: 0 15px 12px; }
.prediction-crowd[hidden] { display: none !important; }
.prediction-crowd-labels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; color: var(--muted); font-size: .55rem; font-weight: 800; }
.prediction-crowd-labels span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.prediction-crowd-labels b { color: var(--ink); }
.prediction-crowd-bar { display: flex; height: 7px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--muted) 10%, var(--surface)); }
.prediction-crowd-bar i { display: block; height: 100%; transition: width .45s ease; }
.prediction-crowd-bar .is-home { background: var(--primary); }
.prediction-crowd-bar .is-draw { background: #c89b20; }
.prediction-crowd-bar .is-away { background: #4361a8; }
.prediction-crowd.is-updated { animation: prediction-crowd-pop .55s ease; }

.prediction-score-stepper { display: grid; grid-template-columns: 30px 58px 30px; align-items: center; gap: 4px; direction: ltr; }
.prediction-score-stepper button { width: 30px; height: 34px; min-height: 34px; padding: 0; border-radius: 10px; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--primary); font-size: 1.15rem; line-height: 1; box-shadow: none; }
.prediction-score-stepper button:hover { box-shadow: none; }
.prediction-dialog-teams .prediction-score-stepper input { width: 58px; min-height: 48px; margin: 0; border-radius: 14px; font-size: 1.35rem; -moz-appearance: textfield; }
.prediction-dialog-teams .prediction-score-stepper input::-webkit-inner-spin-button,
.prediction-dialog-teams .prediction-score-stepper input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.prediction-dialog-teams input.is-pulsing { animation: prediction-score-pulse .22s ease; }
.prediction-quick-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.prediction-quick-picks button { min-height: 36px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: .72rem; box-shadow: none; }
.prediction-quick-picks button.is-active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--primary); }
.prediction-reward-hint { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid color-mix(in srgb, #d9a800 25%, var(--line)); border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, #f5c33d 13%, var(--surface)), var(--surface)); }
.prediction-reward-hint > span { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 12px; background: #f5c33d; color: #6b5000; }
.prediction-reward-hint svg { width: 19px; height: 19px; fill: none; stroke: currentColor; }
.prediction-reward-hint strong, .prediction-reward-hint small { display: block; }
.prediction-reward-hint strong { font-size: .75rem; }
.prediction-reward-hint small { color: var(--muted); font-size: .6rem; }
.prediction-success-card { animation: prediction-card-success .7s ease; }
.prediction-success-pop { position: absolute; z-index: 20; inset: 50% auto auto 50%; display: grid; min-width: 190px; gap: 2px; padding: 13px 16px; border-radius: 16px; background: #087443; color: #fff; box-shadow: 0 18px 45px rgba(0,0,0,.22); text-align: center; transform: translate(-50%, -50%); animation: prediction-success-pop 2.4s ease both; pointer-events: none; }
.prediction-success-pop small { opacity: .82; font-size: .65rem; }
.public-match-card { position: relative; }

.prediction-admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prediction-admin-item.is-outcome { border-color: color-mix(in srgb, #c89b20 32%, var(--line)); background: color-mix(in srgb, #f5c33d 6%, var(--surface)); }
.prediction-admin-result { display: grid; justify-items: end; gap: 3px; }
.prediction-earned-points { color: var(--muted); font-size: .55rem; white-space: nowrap; }

/* Keep action icons from inflating regular buttons. */
:where(.btn, button):not(.app-icon-card):not(.settings-app-icon):not(.prediction-dialog-close):not([data-score-step]):not([data-quick-score]) > svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
    flex: 0 0 18px;
}
:where(.btn, button):not(.app-icon-card):not(.settings-app-icon):not(.prediction-dialog-close):not([data-score-step]):not([data-quick-score]) svg {
    max-width: 18px !important;
    max-height: 18px !important;
}
.btn.secondary > svg,
button.secondary > svg { width: 17px !important; height: 17px !important; flex-basis: 17px; }

@keyframes prediction-score-pulse { 50% { transform: scale(1.08); } }
@keyframes prediction-crowd-pop { 50% { transform: scale(1.015); } }
@keyframes prediction-card-success { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, #087443 17%, transparent), 0 18px 40px rgba(8,116,67,.13); } }
@keyframes prediction-success-pop { 0% { opacity: 0; transform: translate(-50%, -35%) scale(.85); } 12%, 78% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -70%) scale(.94); } }

@media (max-width: 820px) {
    .prediction-challenge-hero { grid-template-columns: 1fr; padding: 18px; }
    .prediction-leaderboard-list { grid-template-columns: 1fr; }
    .prediction-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .prediction-challenge-copy { align-items: flex-start; }
    .prediction-challenge-icon { width: 52px; height: 52px; flex-basis: 52px; border-radius: 17px; }
    .prediction-challenge-icon svg { width: 26px; height: 26px; }
    .prediction-score-rules > span { min-height: 70px; }
    .match-prediction-zone .match-prediction-strip { grid-template-columns: minmax(0,1fr) auto; }
    .prediction-lock-countdown { display: none; }
    .prediction-crowd { padding-inline: 10px; }
    .prediction-crowd-labels { font-size: .5rem; }
    .prediction-dialog-card { gap: 13px; }
    .prediction-dialog-teams { grid-template-columns: minmax(0,1fr) 14px minmax(0,1fr); }
    .prediction-score-stepper { grid-template-columns: 27px 48px 27px; gap: 3px; }
    .prediction-score-stepper button { width: 27px; height: 31px; min-height: 31px; }
    .prediction-dialog-teams .prediction-score-stepper input { width: 48px; min-height: 44px; }
    .prediction-quick-picks { gap: 5px; }
    .prediction-quick-picks button { min-height: 34px; font-size: .65rem; }
    .prediction-leaderboard-item { grid-template-columns: 26px 36px minmax(0,1fr) auto; gap: 7px; padding: 8px; }
    .prediction-leader-avatar { width: 35px; height: 35px; }
}

/* Post-login notification prompt and compact notification preference controls. */
.notification-login-overlay{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:20px;background:rgba(8,20,13,.62);backdrop-filter:blur(8px)}
.notification-login-overlay[hidden]{display:none!important}.notification-login-card{position:relative;display:grid;width:min(520px,100%);gap:17px;padding:26px;border:1px solid color-mix(in srgb,var(--primary) 24%,var(--line));border-radius:28px;background:var(--surface);box-shadow:0 28px 90px rgba(0,0,0,.28)}.notification-login-close{position:absolute;top:14px;left:14px;display:grid;width:38px;height:38px;place-items:center;padding:0;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:var(--muted);cursor:pointer}.notification-login-close svg{width:18px;height:18px}.notification-login-icon{display:grid;width:66px;height:66px;place-items:center;border-radius:22px;background:linear-gradient(135deg,var(--primary),color-mix(in srgb,var(--primary) 65%,var(--accent)));color:#fff;box-shadow:0 16px 34px color-mix(in srgb,var(--primary) 30%,transparent)}.notification-login-icon svg{width:31px;height:31px}.notification-login-card h2{margin:0 0 7px;font-size:clamp(22px,4vw,29px)}.notification-login-card p{margin:0;color:var(--muted);line-height:1.8}.notification-login-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.notification-login-actions .btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:11px 14px}.notification-login-actions .btn svg{width:19px;height:19px}.notification-login-card .pwa-status{padding:10px 12px;border-radius:13px;background:color-mix(in srgb,var(--primary) 7%,var(--surface));font-size:12px;font-weight:800}.global-google-popup-status{position:fixed;right:18px;bottom:18px;z-index:5200;max-width:min(420px,calc(100% - 36px));margin:0;padding:12px 15px;border:1px solid var(--line);border-radius:15px;background:var(--surface);color:var(--ink);box-shadow:var(--theme-shadow);font-size:12px;font-weight:800}.global-google-popup-status.is-error{color:var(--danger)}
.notification-category-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:color-mix(in srgb,var(--primary) 9%,var(--surface));color:var(--primary);font-size:10px;font-weight:900}
@media(max-width:620px){.notification-login-card{padding:22px 17px 18px;border-radius:23px}.notification-login-actions{grid-template-columns:1fr}.notification-login-actions .btn{width:100%}.notification-login-icon{width:56px;height:56px;border-radius:18px}}
