/* Modern Light Theme - v1.2.0 */
:root {
    --jadwal-bg: #f3f6f9;
    /* Softer, cooler gray */
    --jadwal-card-bg: #ffffff;
    --jadwal-text: #1a1a2e !important;
    /* Force dark text */
    --jadwal-text-muted: #6c757d;
    --jadwal-border: #e2e8f0;
    --jadwal-primary: #3b82f6;
    --jadwal-accent: #e94560;
    --jadwal-hover-bg: #f8fafc;
    --jadwal-font: 'Tajawal', sans-serif;
    --jadwal-radius: 12px;
}

.jadwal-container {
    font-family: var(--jadwal-font);
    background-color: var(--jadwal-bg);
    color: var(--jadwal-text);
    padding: 25px;
    border-radius: var(--jadwal-radius);
    max-width: 100%;
    margin: 20px auto;
    direction: rtl;
    box-sizing: border-box;
}

/* Header */
.jadwal-header {
    margin-bottom: 25px;
    text-align: right;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
}

.jadwal-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    color: #1a1a2e;
    /* Hardcoded dark */
    position: relative;
    display: inline-block;
}

.jadwal-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--jadwal-accent);
    margin-top: 8px;
    border-radius: 2px;
}

/* Competitions Scroller */
.jadwal-competitions-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 5px 2px 15px 2px;
    /* Pad for scrollbar */
    scrollbar-width: thin;
}

.jadwal-competitions-scroll::-webkit-scrollbar {
    height: 6px;
}

.jadwal-competitions-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.comp-card {
    background: #ffffff;
    /* Force white */
    min-width: 120px;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--jadwal-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #333 !important;
    /* Force text color */
}

.comp-card:hover {
    border-color: var(--jadwal-primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.comp-card.active {
    background: var(--jadwal-primary);
    color: #ffffff !important;
    /* White text only on active */
    border-color: var(--jadwal-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.comp-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 4px;
}

.comp-card.active img {
    filter: brightness(0) invert(1);
}

.comp-card span {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

/* Tabs Modern Redesign */
.jadwal-tabs {
    display: inline-flex;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 25px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #e2e8f0;
}

.jadwal-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #64748b;
    font-family: var(--jadwal-font);
    font-size: 14px;
    font-weight: 700;
    padding: 12px 10px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none !important;
}

.jadwal-tab i {
    font-size: 16px;
    opacity: 0.7;
}

.jadwal-tab:hover {
    color: var(--jadwal-primary);
}

.jadwal-tab.active {
    background: #ffffff;
    color: #000000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: scale(1.02);
}

.jadwal-tab.active i {
    opacity: 1;
    color: #000000 !important;
}

/* Table Header Refinement */
.jadwal-table th {
    background: #f8fafc;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    padding: 18px 15px;
    border-bottom: 2px solid #edf2f7;
}

.jadwal-table td {
    border-bottom: 1px solid #f8fafc;
    transition: background 0.2s;
}

/* --- Modern & Harmonious Premium Design --- */
.jadwal-tab-content {
    display: none;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    margin-top: 15px;
    overflow: hidden;
    animation: contentFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.jadwal-tab-content.active {
    display: block !important;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jadwal-table {
    width: 100%;
    border-collapse: collapse;
}

.jadwal-table th {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    color: #475569;
    font-weight: 800;
    font-size: 12px;
    padding: 18px 15px;
    text-align: right;
    border-bottom: 2px solid #eef2f7;
}

.jadwal-table tbody tr {
    opacity: 0;
    animation: rowEntry 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--row-index, 0) * 0.04s);
    transition: background 0.3s ease;
}

@keyframes rowEntry {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.jadwal-table td {
    padding: 16px 15px;
    font-size: 14px;
    color: #334155;
    font-weight: 700;
    border-bottom: 1px solid #f1f5f9;
}

.jadwal-table tr:hover td {
    background: rgba(59, 130, 246, 0.03);
    color: var(--jadwal-primary);
}

/* Harmonious Row Accents (Qualification Zones) */
.rank-1 td:first-child {
    border-right: 4px solid #3b82f6;
    background: rgba(59, 130, 246, 0.02);
}

.rank-2 td:first-child {
    border-right: 4px solid #60a5fa;
}

.rank-3 td:first-child {
    border-right: 4px solid #93c5fd;
}

.rank-4 td:first-child {
    border-right: 4px solid #bfdbfe;
}

/* Rank Identity */
.rank-cell {
    font-size: 16px;
    font-weight: 900;
    color: #94a3b8;
    width: 30px;
}

.rank-1 .rank-cell {
    color: #3b82f6;
    font-size: 18px;
}

/* Team & Identity */
.team-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.jadwal-table tr:hover .team-logo {
    transform: scale(1.25) rotate(8deg);
}

.points-cell {
    color: #1e293b;
    font-weight: 900;
    font-size: 16px;
    background: #f8fafc;
    text-align: center;
    border-radius: 6px;
}

/* Player Image in Scorers */
.scorers-table .player-img-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
}

.scorers-table .player-img-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Fixes */
@media (max-width: 600px) {
    .jadwal-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .team-logo {
        width: 24px;
        height: 24px;
    }

    .jadwal-table th {
        padding: 10px 8px;
        font-size: 10px;
    }
}

.jadwal-loader {
    width: 45px;
    height: 45px;
    border: 3px solid #f1f5f9;
    border-top-color: var(--jadwal-primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
    margin: 50px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Transfers Section --- */
.jadwal-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 20px 0 15px;
    color: var(--jadwal-text);
    border-right: 4px solid var(--jadwal-primary);
    padding-right: 10px;
}

/* --- Modern Transfers Design --- */
.jadwal-transfers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    padding: 10px 2px;
}

.jadwal-transfer-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    gap: 12px;
}

/* Important Transfers Glimmer Effect */
.jadwal-transfers-grid.important .jadwal-transfer-card {
    border: 1px solid rgba(233, 69, 96, 0.1);
    background: linear-gradient(to bottom right, #ffffff, #fffdfd);
}

.jadwal-transfers-grid.important .jadwal-transfer-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--jadwal-accent);
}

.jadwal-transfer-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--jadwal-primary);
}

.t-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.from-club,
.to-club {
    width: 60px;
    height: 60px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
    transition: transform 0.3s;
}

.jadwal-transfer-card:hover .from-club,
.jadwal-transfer-card:hover .to-club {
    background: #ffffff;
}

.from-club img,
.to-club img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.player-detail {
    flex: 1;
    display: flex;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
    background: #fbfcfd;
    padding: 10px;
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
}

.p-img {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.p-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.p-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.p-name {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-pos {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.action-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 70px;
}

.t-type {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

/* الألوان المخصصة للأنواع */
.t-type.type-transfer {
    background: #dcfce7;
    /* أخضر خفيف */
    color: #166534;
    /* أخضر غامق */
}

.t-type.type-loan {
    background: #fee2e2;
    /* أحمر خفيف */
    color: #991b1b;
    /* أحمر غامق */
}

.t-type.type-free {
    background: #f3e8ff;
    /* بنفسجي خفيف */
    color: #6b21a8;
    /* بنفسجي غامق */
}

.t-type.type-default {
    background: #f1f5f9;
    color: #475569;
}

.arrow-icon {
    font-size: 18px;
    color: var(--jadwal-primary);
    animation: moveLR 1.5s infinite ease-in-out;
    display: block;
}

@keyframes moveLR {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-5px);
    }
}

.t-date {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
}

/* Stagger Animation for Cards */
.jadwal-transfer-card {
    animation: slideUpFade 0.5s ease backwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Filtration Tags --- */
.jadwal-filter-tags {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    /* Space for scrollbar */
    scrollbar-width: thin;
}

.jadwal-filter-tags::-webkit-scrollbar {
    height: 5px;
}

.jadwal-filter-tags::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.jadwal-filter-tag {
    padding: 6px 14px;
    background: #ffffff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.jadwal-filter-tag:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.jadwal-filter-tag.active {
    background: var(--jadwal-primary);
    color: white;
    border-color: var(--jadwal-primary);
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3);
}

.jadwal-filter-section-title {
    font-size: 14px;
    font-weight: 800;
    margin: 15px 0 8px;
    color: #64748b;
}

.jadwal-divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}


/* Compact Widget Mode (Sidebar) */
.jadwal-edge-widget .jadwal-container {
    padding: 15px;
    margin: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
    background: #fff;
    border-radius: 8px;
}

.jadwal-edge-widget .jadwal-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.jadwal-edge-widget .jadwal-title {
    font-size: 18px;
}

.jadwal-edge-widget .jadwal-competitions-scroll {
    padding-bottom: 10px;
}

.jadwal-edge-widget .comp-card {
    min-width: 70px;
    padding: 8px;
}

.jadwal-edge-widget .comp-card img {
    width: 32px;
    height: 32px;
    margin-bottom: 0;
}

.jadwal-edge-widget .comp-card span {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    max-width: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hide detailed columns for Standings (Compact) */
.jadwal-edge-widget .standings-table th:nth-child(4),
.jadwal-edge-widget .standings-table td:nth-child(4),
/* Won */
.jadwal-edge-widget .standings-table th:nth-child(5),
.jadwal-edge-widget .standings-table td:nth-child(5),
/* Drawn */
.jadwal-edge-widget .standings-table th:nth-child(6),
.jadwal-edge-widget .standings-table td:nth-child(6),
/* Lost */
.jadwal-edge-widget .standings-table th:nth-child(7),
.jadwal-edge-widget .standings-table td:nth-child(7),
/* Goals */
.jadwal-edge-widget .standings-table th:nth-child(8),
.jadwal-edge-widget .standings-table td:nth-child(8)

/* Diff */
    {
    display: none !important;
}

/* Hide Team column for Scorers (Compact) to make room for Goals */
.jadwal-edge-widget .scorers-table th:nth-child(3),
.jadwal-edge-widget .scorers-table td:nth-child(3) {
    display: none !important;
}

.jadwal-edge-widget .jadwal-table th,
.jadwal-edge-widget .jadwal-table td {
    padding: 8px 3px;
    font-size: 11px;
}

.jadwal-edge-widget .team-cell {
    gap: 4px;
}

.jadwal-edge-widget .team-logo {
    width: 18px;
    height: 18px;
}

.jadwal-edge-widget .team-cell span {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 115px;
    /* Tuned for col-lg-3 */
    display: inline-block;
}

/* --- Team Profile Page --- */
.jadwal-profile-root {
    font-family: var(--jadwal-font);
    background-color: var(--jadwal-bg);
    border-radius: var(--jadwal-radius);
    padding: 20px;
    direction: rtl;
    color: var(--jadwal-text);
}

.jadwal-tp-header-section {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.jadwal-tp-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.tp-logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tp-info h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
}

/* Tabs Scroller */
.jadwal-tp-tabs-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--jadwal-border);
    scrollbar-width: thin;
}

.jadwal-tp-tab {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    color: var(--jadwal-text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
}

.jadwal-tp-tab:hover {
    color: var(--jadwal-primary);
}

.jadwal-tp-tab.active {
    color: var(--jadwal-primary);
    border-bottom-color: var(--jadwal-primary);
}

/* Matches Grid */
.jadwal-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.jadwal-match-card-mini {
    background: white;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--jadwal-border);
}

.jadwal-match-card-mini .m-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 35%;
    text-align: center;
}

.jadwal-match-card-mini .m-team img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.jadwal-match-card-mini .m-team span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.jadwal-match-card-mini .m-info {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.jadwal-match-card-mini .m-time {
    font-size: 12px;
    color: var(--jadwal-text-muted);
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
}

.jadwal-match-card-mini .m-vs {
    font-size: 18px;
    font-weight: 900;
    color: #cbd5e1;
}

.jadwal-match-card-mini.result .m-result {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #1a1a2e;
}

/* News List */
.jadwal-news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.jadwal-news-item {
    display: flex;
    gap: 15px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: transform 0.2s;
    border: 1px solid transparent;
}

.jadwal-news-item:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--jadwal-border);
}

.jadwal-news-item .n-img img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.jadwal-news-item .n-content h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--jadwal-text);
}

@media (max-width: 600px) {
    .jadwal-tp-header-section {
        padding: 20px;
    }

    .tp-logo img {
        width: 70px;
        height: 70px;
    }
}

/* Teams Directory */
.jadwal-dir-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.jadwal-dir-card {
    background: #ffffff;
    border: 1px solid var(--jadwal-border);
    border-radius: 12px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    text-align: center;
    color: var(--jadwal-text) !important;
}

.jadwal-dir-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.15);
    border-color: var(--jadwal-primary);
}

.dir-card-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.dir-card-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}