/* Small global refinements kept separate from the compiled interface stylesheet. */
.public-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    padding-top: 16px;
}

.video-upload-progress {
    display: grid;
    gap: 9px;
    padding: 12px 14px;
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 8px;
    background: rgba(11, 11, 12, .46);
}

.video-upload-progress[hidden] {
    display: none;
}

.video-upload-progress > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 13px;
}

.video-upload-progress strong {
    color: var(--text-primary);
    font-weight: 700;
}

.video-upload-progress progress {
    width: 100%;
    height: 11px;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, .08);
}

.video-upload-progress progress::-webkit-progress-bar {
    background: rgba(255, 255, 255, .08);
}

.video-upload-progress progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
}

.video-upload-progress progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
}

/* Live-analysis schedule and destination controls. */
.live-analysis-panel {
    grid-column: 1 / -1;
    padding: 28px;
}

.live-analysis-panel .panel-heading {
    margin-bottom: 19px;
}

.live-analysis-panel .panel-heading h3 {
    font: 700 24px/1.15 "Space Grotesk", sans-serif;
}

.live-analysis-panel .panel-heading a {
    font-size: 14px;
    font-weight: 700;
}

.live-analysis-panel .live-event {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) minmax(280px, .82fr);
    gap: 20px 25px;
    align-items: center;
    padding: 26px;
    border: 1px solid rgba(78, 143, 220, .28);
    border-radius: 14px;
    background: radial-gradient(circle at 70% 5%, rgba(28, 112, 255, .08), transparent 34%), linear-gradient(135deg, rgba(4, 21, 38, .98), rgba(2, 12, 23, .98));
}

.live-analysis-panel .live-event > svg {
    width: 56px;
    height: 56px;
    color: #317cff;
    stroke-width: 1.55;
}

.live-event-copy {
    min-width: 0;
}

.live-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.live-title-row > strong {
    font: 700 26px/1.16 "Space Grotesk", sans-serif;
}

.live-event-copy > small {
    display: block;
    margin-top: 6px;
    color: #b8c7da;
    font-size: 14px;
}

.live-event-copy > p {
    max-width: 610px;
    margin: 15px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.live-now-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border: 1px solid rgba(83, 231, 114, .72);
    border-radius: 20px;
    color: #79f593;
    background: rgba(20, 113, 52, .27);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.live-analysis-panel .countdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(78, 143, 220, .26);
    border-radius: 12px;
    background: rgba(2, 13, 25, .62);
    text-align: center;
}

.live-analysis-panel .countdown-unit {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 17px 8px 14px;
}

.live-analysis-panel .countdown-unit + .countdown-unit {
    border-left: 1px solid rgba(78, 143, 220, .2);
}

.live-analysis-panel .countdown b {
    color: #627fff;
    font: 700 32px/1 "Space Grotesk", sans-serif;
}

.live-analysis-panel .countdown small {
    color: #aab8ca;
    font-size: 11px;
}

.live-platforms {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.live-platform-btn {
    min-width: 0;
    min-height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 12px 18px;
    border: 1px solid #356d9a;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(6, 30, 51, .98), rgba(3, 15, 28, .98));
    color: #f4f7ff;
    font: 700 18px/1 "Space Grotesk", sans-serif;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}

.live-platform-btn:hover {
    transform: translateY(-2px);
}

.live-platform-btn .platform-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
}

.live-platform-btn--tiktok {
    border-color: #1aafcd;
    box-shadow: inset 0 0 0 1px rgba(244, 73, 173, .2);
}

.live-platform-btn--tiktok .platform-icon {
    color: #eefaff;
    filter: drop-shadow(-2px 1px 0 #f0449d) drop-shadow(2px -1px 0 #22d4e7);
}

.live-platform-btn--youtube {
    border-color: #d73543;
    box-shadow: inset 0 0 0 1px rgba(242, 53, 65, .17);
}

.live-platform-btn--youtube .platform-icon {
    color: #ff3440;
    fill: rgba(255, 52, 64, .12);
}

.live-platform-btn--instagram {
    border-color: #b256df;
    box-shadow: inset -1px 0 0 #ff9a3b, inset 1px 0 0 rgba(205, 62, 239, .7);
}

.live-platform-btn--instagram .platform-icon {
    color: #ec70db;
}

.live-event.is-live {
    border-color: rgba(82, 220, 110, .58);
    box-shadow: inset 0 0 36px rgba(32, 151, 73, .07);
}

.live-event.is-live .live-event-copy > p {
    color: #cde7d5;
    font-weight: 600;
}

.live-event.is-ended {
    border-color: rgba(111, 131, 155, .36);
}

.live-event.is-ended .live-event-copy > p,
.live-event.is-ended .live-event-copy > small {
    color: #8f9baa;
}

.live-unlock-button {
    grid-column: 1 / -1;
    justify-self: start;
}

.admin-fieldset {
    margin: 3px 0;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.admin-fieldset legend {
    padding: 0 8px;
    color: #dfe9f7;
    font-weight: 700;
}

.fieldset-help {
    margin: -2px 0 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.streaming-platform-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.streaming-platform-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(72, 132, 201, .3);
    border-radius: 9px;
    background: rgba(3, 17, 31, .55);
}

.streaming-platform-card h2 {
    margin: 0;
    font: 700 17px/1 "Space Grotesk", sans-serif;
}

.streaming-platform-card--tiktok { border-color: rgba(31, 188, 213, .55); }
.streaming-platform-card--youtube { border-color: rgba(212, 56, 70, .55); }
.streaming-platform-card--instagram { border-color: rgba(204, 82, 216, .55); }

.live-admin-row {
    align-items: flex-start;
}

.live-admin-row > div:last-child {
    flex: 0 0 auto;
}

/* Keep landing content below the fixed 84px desktop navigation. */
.landing-shell > main {
    padding-top: 84px;
}

@media (max-width: 880px) {
    .landing-shell > main {
        padding-top: 73px;
    }

    /* Keep responsive grid/table overflow inside a card, never on the page. */
    .site-body,
    .landing-shell,
    .dashboard-shell,
    .admin-shell,
    .dashboard-main,
    .admin-main {
        max-width: 100%;
        overflow-x: clip;
    }

    .admin-content,
    .admin-content > *,
    .admin-panel,
    .two-form-grid {
        min-width: 0;
        max-width: 100%;
    }

    .admin-content {
        overflow-x: clip;
    }

    .admin-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-panel {
        min-width: 0;
        max-width: 100%;
        overflow-x: clip;
    }

    .admin-panel .data-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .admin-panel .data-table th,
    .admin-panel .data-table td {
        overflow-wrap: anywhere;
        white-space: normal;
    }

    /* The compact overview tables fit their cards instead of stretching them. */
    .admin-grid .data-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .admin-grid .data-table th,
    .admin-grid .data-table td {
        padding: 9px 5px;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .admin-grid .data-table th:first-child,
    .admin-grid .data-table td:first-child {
        width: 52%;
    }
}

@media (max-width: 560px) {
    .admin-content {
        overflow-x: hidden;
    }

    .admin-panel {
        padding: 14px;
    }

    .admin-grid .data-table th,
    .admin-grid .data-table td {
        font-size: 11px;
    }

    .admin-grid .data-table td small {
        font-size: 10px;
    }
}

/* Dashboard support contact. The existing email remains a fallback until
   an administrator saves a Telegram destination in Course Settings. */
.help-card .help-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.help-card .telegram-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: currentColor;
}

/* TradeStone-compatible crypto choices retain the existing checkout cards. */
.payment-options .coin-option span {
    min-width: 0;
}

.payment-options .coin-logo {
    width: 33px;
    height: 33px;
    flex: 0 0 auto;
    object-fit: contain;
}

.payment-options .coin-option-label {
    min-width: 0;
    flex: 1;
    line-height: 1.2;
}

/* Turn high-column admin tables into compact labelled records before they can
   outgrow a narrow screen. Desktop and tablet table layouts remain unchanged. */
@media (max-width: 700px) {
    .responsive-data-table,
    .responsive-data-table tbody,
    .responsive-data-table tr,
    .responsive-data-table td {
        display: block;
        width: 100%;
    }

    .responsive-data-table {
        table-layout: auto;
    }

    .responsive-data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .responsive-data-table tbody {
        display: grid;
        gap: 10px;
    }

    .responsive-data-table tr {
        padding: 4px 13px;
        border: 1px solid rgba(87, 139, 199, .25);
        border-radius: 8px;
        background: rgba(3, 15, 27, .5);
    }

    .responsive-data-table td {
        display: grid;
        grid-template-columns: minmax(88px, 35%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 10px 0 !important;
        border: 0 !important;
        min-width: 0;
    }

    .responsive-data-table td + td {
        border-top: 1px solid rgba(87, 139, 199, .16) !important;
    }

    .responsive-data-table td::before {
        content: attr(data-label);
        color: #8fa1b7;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .04em;
        overflow-wrap: anywhere;
    }

    .responsive-data-table td[colspan] {
        display: block;
    }

    .responsive-data-table td[colspan]::before {
        display: none;
    }

    .responsive-data-table .admin-button-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        width: 100%;
    }

    .responsive-data-table .admin-button-row input[type="text"] {
        width: 100%;
        min-width: 0;
        min-height: 36px;
        padding: 7px 9px;
        color: var(--ink);
        background: #041323;
        border: 1px solid #294564;
        border-radius: 7px;
    }

    .responsive-data-table .admin-button-row .btn {
        min-width: 76px;
    }
}

@media (max-width: 880px) {
    .live-analysis-panel {
        padding: 21px;
    }

    .live-analysis-panel .live-event {
        grid-template-columns: 60px minmax(0, 1fr);
        padding: 20px;
    }

    .live-analysis-panel .live-event > svg {
        width: 47px;
        height: 47px;
    }

    .live-analysis-panel .countdown,
    .live-platforms,
    .live-unlock-button {
        grid-column: 1 / -1;
    }

    .streaming-platform-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .live-analysis-panel {
        padding: 15px;
    }

    .live-analysis-panel .panel-heading h3 {
        font-size: 19px;
    }

    .live-analysis-panel .live-event {
        grid-template-columns: 47px minmax(0, 1fr);
        gap: 16px 11px;
        padding: 15px 12px;
    }

    .live-analysis-panel .live-event > svg {
        width: 38px;
        height: 38px;
    }

    .live-title-row > strong {
        font-size: 19px;
    }

    .live-event-copy > small {
        font-size: 12px;
    }

    .live-event-copy > p {
        margin-top: 9px;
        font-size: 12px;
    }

    .live-analysis-panel .countdown {
        display: grid;
    }

    .live-analysis-panel .countdown-unit {
        padding: 13px 4px 11px;
    }

    .live-analysis-panel .countdown b {
        font-size: 25px;
    }

    .live-platforms {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .live-platform-btn {
        min-height: 52px;
        font-size: 16px;
    }

    .admin-fieldset {
        padding: 14px 11px;
    }

    .live-admin-row > div:last-child {
        width: 100%;
    }
}
