@import 'tailwindcss';

/* =========================
   THEME
========================= */

:root {
    --bg: #0b1020;
    --bg-soft: #12192b;
    --panel: #151d31;
    --panel-2: #1a233a;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8edf7;
    --text-soft: #97a3bd;
    --accent: #4f8cff;
    --accent-2: #22c55e;
    --danger: #ef4444;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    --radius: 18px;
}

/* =========================
   BASE
========================= */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

/* =========================
   LAYOUT
========================= */

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.admin-sidebar {
    background: linear-gradient(180deg, #0d1325 0%, #0a1020 100%);
    border-right: 1px solid var(--border);
    padding: 20px;
}

.admin-main-wrap {
    min-width: 0;
}

.admin-main {
    padding: 24px;
}

/* =========================
   SIDEBAR
========================= */

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.admin-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #7f9cff);
    font-size: 20px;
}

.admin-brand-title {
    font-weight: 800;
}

.admin-brand-sub {
    color: var(--text-soft);
    font-size: 13px;
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text-soft);
    transition: 0.2s ease;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

/* =========================
   TOPBAR
========================= */

.admin-topbar {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    background: rgba(11, 16, 32, 0.92);
}

.admin-page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
}

.admin-page-subtitle {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 14px;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

/* =========================
   PANELS & CARDS
========================= */

.panel,
.stat-card {
    background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel {
    padding: 18px;
}

.stat-card {
    padding: 18px;
}

.stat-label {
    color: var(--text-soft);
    font-size: 13px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

/* =========================
   PANEL HEADER
========================= */

.panel-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-title {
    font-size: 18px;
    font-weight: 800;
}

.panel-subtitle {
    color: var(--text-soft);
    font-size: 14px;
}

.panel-actions {
    display: flex;
    gap: 10px;
}

/* =========================
   BUTTONS
========================= */

.btn {
    border-radius: 12px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-ghost {
    background: rgba(255,255,255,0.06);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}

/* =========================
   SYNC GRID FIX (ВАЖНО)
========================= */

.sync-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 18px;
}

.sync-grid-2 {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.sync-card {
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-height: 160px;
}

.sync-card-title {
    font-weight: 800;
    font-size: 16px;
}

.sync-card-text {
    color: var(--text-soft);
    font-size: 13px;
}

/* =========================
   TABLE
========================= */

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    color: var(--text-soft);
}

/* =========================
   STATUS
========================= */

.status-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.status-success {
    background: rgba(34,197,94,0.15);
    color: #86efac;
}

.status-muted {
    background: rgba(255,255,255,0.08);
    color: #9ca3af;
}

/* =========================
   ACTIONS
========================= */

.row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sync-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }

    .dashboard-grid,
    .sync-grid,
    .sync-grid-2 {
        grid-template-columns: 1fr;
    }
}

.filters-bar {
    display: block;
}

.filters-grid {
    display: grid;
    gap: 14px;
    align-items: end;
}

.filters-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}

.filter-control {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: #7e7e7e;
    padding: 0 14px;
    outline: none;
}

.filter-control::placeholder {
    color: var(--text-soft);
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.league-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.league-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
}

.league-name {
    font-weight: 700;
}

.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

@media (max-width: 1300px) {
    .filters-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .filters-grid-5 {
        grid-template-columns: 1fr;
    }
}

/* =========================
   PUBLIC LAYOUT
========================= */

.site-body {
    background: var(--bg);
    color: var(--text);
}

.site-container {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: rgba(11, 16, 32, 0.92);
    backdrop-filter: blur(10px);
}

.site-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    color: var(--text);
}

.site-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #7f9cff);
}

.site-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.site-nav-link {
    color: var(--text-soft);
    font-weight: 600;
}

.site-nav-link:hover {
    color: var(--text);
}

.site-main {
    padding: 28px 0 40px;
}

/* =========================
   HERO
========================= */

.hero-block {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.hero-copy,
.hero-stat-card,
.league-block,
.empty-block .panel {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 24px;
}

.hero-title {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.1;
}

.hero-subtitle {
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.hero-stat-card {
    padding: 20px;
}

.hero-stat-label {
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 10px;
}

.hero-stat-value {
    font-size: 30px;
    font-weight: 800;
}

/* =========================
   LEAGUE BLOCKS
========================= */

.league-block {
    padding: 18px;
    margin-bottom: 22px;
}

.league-block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.league-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.league-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    padding: 4px;
}

.league-title {
    margin: 0;
    font-size: 20px;
}

.league-subtitle {
    color: var(--text-soft);
    font-size: 13px;
    margin-top: 4px;
}

.matches-list {
    display: grid;
    gap: 12px;
}

.match-card {
    display: block;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    transition: 0.2s ease;
}

.match-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.14);
}

.match-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.match-teams {
    display: grid;
    gap: 10px;
}

.team-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.team-name {
    font-weight: 700;
}

.match-score-box {
    text-align: right;
}

.match-score {
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.match-meta {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-soft);
    font-size: 13px;
}

.public-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.14);
    color: #bdd2ff;
    font-size: 12px;
    font-weight: 700;
}

.empty-block {
    margin-top: 20px;
}

.empty-block .panel {
    padding: 24px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .hero-block {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .match-main {
        grid-template-columns: 1fr;
    }

    .match-score-box {
        text-align: left;
    }

    .match-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}



* {
    box-sizing: border-box;
}


a {
    text-decoration: none;
    color: inherit;
}

.fs-container {
    width: min(1400px, calc(100% - 24px));
    margin: 0 auto;
}

.fs-header {
    background: var(--dark);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.fs-header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.fs-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.fs-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4f8cff, #7f9cff);
}

.fs-topnav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fs-topnav-link {
    color: rgba(255,255,255,.76);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
}

.fs-topnav-link.active,
.fs-topnav-link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.fs-page {
    padding: 18px 0 28px;
}

.fs-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 16px;
    align-items: start;
}

.fs-sidebar {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 16px;
}

.fs-sidecard {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
}

.fs-sidecard-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 12px;
}

.fs-league-list {
    display: grid;
    gap: 6px;
}

.fs-league-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--text);
}

.fs-league-link:hover {
    background: var(--panel-soft);
}

.fs-league-link-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.fs-mini-stats {
    display: grid;
    gap: 10px;
}

.fs-mini-stat {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.fs-mini-stat:last-child {
    border-bottom: 0;
}

.fs-mini-stat span {
    color: var(--text-soft);
}

.fs-main {
    display: grid;
    gap: 16px;
}

.fs-filterbar {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.fs-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fs-tab {
    padding: 10px 14px;
    border-radius: 10px;
    background: #efefef;
    color: #555;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
}

.fs-tab.active {
    background: var(--accent);
    color: #fff;
}

.fs-datebox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fs-date-input {
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
}

.fs-date-btn {
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #eceff3;
    padding: 0 14px;
    font-weight: 700;
    cursor: pointer;
}

.fs-league-block {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.fs-league-head {
    background: #edf3f8;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.fs-league-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fs-league-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.fs-league-name {
    font-size: 14px;
    font-weight: 800;
    color: #4b5563;
    text-transform: uppercase;
}

.fs-league-head-link {
    color: #6b7280;
    font-size: 13px;
    text-decoration: underline;
}

.fs-match-table {
    display: grid;
}

.fs-match-row {
    display: grid;
    grid-template-columns: 120px 1fr 90px;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #edf0f3;
    align-items: center;
    transition: background .15s ease;
}

.fs-match-row:last-child {
    border-bottom: 0;
}

.fs-match-row:hover {
    background: #fafbfc;
}

.fs-col-time {
    color: var(--text-soft);
    font-size: 13px;
}

.fs-live {
    color: var(--live);
    font-weight: 800;
}

.fs-col-teams {
    display: grid;
    gap: 8px;
}

.fs-team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fs-team-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fs-team-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.fs-team-name {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fs-team-score {
    min-width: 16px;
    text-align: right;
    font-size: 16px;
    font-weight: 800;
}

.fs-col-status {
    text-align: right;
}

.fs-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #4b5563;
    font-size: 12px;
    font-weight: 800;
}

.fs-empty {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    text-align: center;
}

.fs-empty-small {
    color: var(--text-soft);
    font-size: 13px;
}

@media (max-width: 1100px) {
    .fs-layout {
        grid-template-columns: 1fr;
    }

    .fs-sidebar {
        position: static;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .fs-header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }

    .fs-sidebar {
        grid-template-columns: 1fr;
    }

    .fs-match-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .fs-col-status {
        text-align: left;
    }

    .fs-team-name {
        white-space: normal;
    }
}


trix-editor .trix-attachment__caption,
trix-editor figcaption {
    display: none !important;
}


.pp-post-content figure figcaption {
    display: none !important;
}

.pp-post-content img,
trix-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.pp-post-content figure,
trix-editor figure {
    margin: 18px 0;
}

.pp-post-content img.img-small,
trix-editor img.img-small {
    width: 180px;
}

.pp-post-content img.img-medium,
trix-editor img.img-medium {
    width: 320px;
}

.pp-post-content img.img-large,
trix-editor img.img-large {
    width: 520px;
}

.pp-post-content img.img-full,
trix-editor img.img-full {
    width: 100%;
}

.pp-user-menu {
    position: relative;
}

.pp-user-trigger {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    cursor: pointer;
    font-weight: 700;
}

.pp-user-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    width: 200px;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    z-index: 100;
}

.pp-user-dropdown a,
.pp-user-dropdown button {
    padding: 10px 12px;
    color: #fff;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
}

.pp-user-dropdown a:hover,
.pp-user-dropdown button:hover {
    background: rgba(255,255,255,.08);
}

.pp-user-dropdown.active {
    display: flex;
}

.pp-register {
    background: #4f8cff;
    color: #fff !important;
}

.pp-post-content{
    color:#e5edf7;
    font-size:16px;
    line-height:1.8;
}

.pp-post-content h2,
.pp-post-content h3,
.pp-post-content h4{
    color:#fff;
    margin:26px 0 12px;
    line-height:1.25;
}

.pp-post-content p{
    margin:0 0 16px;
}

.pp-post-content ul,
.pp-post-content ol{
    margin:0 0 16px 22px;
}

.pp-post-content li{
    margin-bottom:8px;
}

.pp-post-content a{
    color:#93c5fd;
    text-decoration:underline;
}

.pp-post-content img{
    max-width:100%;
    height:auto;
    border-radius:14px;
    margin:18px 0;
    display:block;
}

.pp-post-content blockquote{
    margin:20px 0;
    padding:14px 18px;
    border-left:4px solid #4f8cff;
    background:rgba(255,255,255,0.04);
    border-radius:12px;
    color:#dbe4f0;
}

.pp-status-live {
    color: #ff3b3b;
    font-weight: bold;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0.4; }
}