/* TTFLUX_DASHBOARD_V2 */

:root {
    --dash-bg: #06172c;
    --dash-bg-deep: #041224;
    --dash-panel: rgba(8, 31, 59, 0.88);
    --dash-panel-soft: rgba(11, 39, 72, 0.77);
    --dash-border: rgba(92, 159, 224, 0.22);
    --dash-border-strong: rgba(83, 173, 255, 0.4);
    --dash-text: #f4f8ff;
    --dash-muted: #91a8c2;
    --dash-blue: #308eff;
    --dash-blue-soft: #55aaff;
    --dash-red: #ed304d;
    --dash-green: #31c68a;
    --dash-yellow: #e5b94f;
    --dash-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

html {
    scroll-behavior: smooth;
}

body.dashboard-page {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(
            circle at 82% 5%,
            rgba(24, 102, 200, 0.22),
            transparent 32rem
        ),
        linear-gradient(
            145deg,
            var(--dash-bg-deep),
            var(--dash-bg)
        );
    color: var(--dash-text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.dashboard-page *,
.dashboard-page *::before,
.dashboard-page *::after {
    box-sizing: border-box;
}

.dashboard-page button,
.dashboard-page input {
    font: inherit;
}

.dashboard-page button {
    color: inherit;
}

.dashboard-page a {
    color: inherit;
}

.dashboard-page [hidden] {
    display: none !important;
}

.ui-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: 100vh;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 1rem 0.8rem;
    overflow-y: auto;
    border-right: 1px solid var(--dash-border);
    background:
        linear-gradient(
            180deg,
            rgba(4, 20, 39, 0.98),
            rgba(4, 17, 34, 0.96)
        );
    box-shadow: 18px 0 45px rgba(0, 0, 0, 0.18);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 88px;
    padding: 0.3rem 0.55rem 1rem;
    border-bottom: 1px solid rgba(113, 164, 215, 0.12);
}

.sidebar-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.sidebar-brand span {
    font-size: 1.12rem;
    font-weight: 760;
    letter-spacing: -0.02em;
}

.sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    padding-top: 0.8rem;
}

.sidebar-heading {
    margin: 1.1rem 0.65rem 0.4rem;
    color: #7189a4;
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.72rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 0.62rem;
    background: transparent;
    color: #aebed1;
    font-size: 0.82rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 160ms ease,
        border-color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    color: #fff;
    border-color: rgba(67, 146, 229, 0.18);
    background: rgba(37, 104, 177, 0.12);
    outline: none;
}

.sidebar-link.active {
    color: #fff;
    border-color: rgba(67, 156, 248, 0.26);
    background:
        linear-gradient(
            90deg,
            rgba(42, 118, 205, 0.32),
            rgba(25, 79, 142, 0.2)
        );
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: auto;
    padding: 1rem 0.7rem 0.4rem;
    border-top: 1px solid rgba(113, 164, 215, 0.12);
}

.sidebar-footer strong {
    font-size: 0.78rem;
}

.sidebar-footer span {
    color: var(--dash-muted);
    font-size: 0.7rem;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 0 1.4rem;
    border-bottom: 1px solid var(--dash-border);
    background: rgba(5, 23, 45, 0.88);
    backdrop-filter: blur(18px);
}

.mobile-brand {
    display: none;
}

.top-tabs {
    display: flex;
    align-items: stretch;
    height: 72px;
}

.top-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.9rem;
    border: 0;
    background: transparent;
    color: #a8b9cc;
    font-size: 0.78rem;
    text-decoration: none;
    cursor: pointer;
}

.top-tab::after {
    content: "";
    position: absolute;
    right: 0.8rem;
    bottom: 0;
    left: 0.8rem;
    height: 2px;
    border-radius: 999px;
    background: transparent;
}

.top-tab:hover,
.top-tab:focus-visible,
.top-tab.active {
    color: #fff;
    outline: none;
}

.top-tab.active::after {
    background:
        linear-gradient(
            90deg,
            var(--dash-red),
            #ff5a6f
        );
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
}

.search-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 210px;
    min-height: 2.55rem;
    padding: 0 0.75rem;
    border: 1px solid var(--dash-border);
    border-radius: 0.65rem;
    background: rgba(2, 17, 34, 0.35);
    color: #7890aa;
    font-size: 0.75rem;
    cursor: default;
}

.top-icon-button,
.profile-button,
.card-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dash-border);
    background: rgba(6, 28, 53, 0.55);
    color: #b8c8da;
    cursor: pointer;
}

.top-icon-button {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 50%;
}

.profile-button {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 750;
}

.dashboard-content {
    width: min(100%, 1510px);
    margin: 0 auto;
    padding: 1.15rem 1.4rem 2rem;
}

.dashboard-hero {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--dash-border);
    border-radius: 1rem;
    background:
        linear-gradient(
            115deg,
            rgba(4, 22, 43, 0.96) 0%,
            rgba(8, 38, 74, 0.78) 58%,
            rgba(15, 70, 139, 0.58) 100%
        );
    box-shadow: var(--dash-shadow);
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-position: center;
    background-size: cover;
    opacity: 0.28;
    filter:
        saturate(0.7)
        contrast(1.05)
        blur(0.6px);
    transform: scale(1.02);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(3, 17, 33, 0.94) 0%,
            rgba(5, 27, 53, 0.72) 44%,
            rgba(6, 36, 75, 0.48) 100%
        ),
        radial-gradient(
            circle at 88% 30%,
            rgba(36, 132, 255, 0.33),
            transparent 32%
        );
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            154deg,
            transparent 68%,
            rgba(24, 131, 255, 0.18) 68.2%,
            transparent 69%
        ),
        linear-gradient(
            160deg,
            transparent 76%,
            rgba(232, 42, 70, 0.2) 76.2%,
            transparent 77%
        );
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns:
        minmax(260px, 340px)
        minmax(0, 1fr);
    align-items: end;
    gap: 1.8rem;
    min-height: 320px;
    padding: 1.8rem;
}

.upload-widget {
    padding: 0.65rem;
    border: 1px solid rgba(111, 174, 235, 0.3);
    border-radius: 0.85rem;
    background: rgba(3, 20, 39, 0.74);
    backdrop-filter: blur(14px);
}

.upload-dropzone {
    padding: 1.15rem;
    border: 1px dashed rgba(137, 184, 230, 0.42);
    border-radius: 0.75rem;
    text-align: center;
    transition:
        border-color 160ms ease,
        background 160ms ease;
}

.upload-dropzone.dragging {
    border-color: var(--dash-blue-soft);
    background: rgba(42, 135, 229, 0.12);
}

.upload-dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.32rem;
    color: var(--dash-muted);
    font-size: 0.72rem;
    cursor: pointer;
}

.upload-dropzone-label strong {
    margin-top: 0.4rem;
    color: #fff;
    font-size: 1rem;
}

.upload-cloud {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.1rem;
    height: 3.1rem;
    border: 1px solid rgba(104, 177, 246, 0.25);
    border-radius: 50%;
    color: #9acbff;
    background: rgba(55, 135, 218, 0.12);
}

.upload-cloud .ui-icon {
    width: 1.7rem;
    height: 1.7rem;
}

.upload-browse {
    color: #64adff;
}

.upload-selected-file {
    min-height: 1.2rem;
    margin: 0.75rem 0 0.55rem;
    overflow: hidden;
    color: #b7c8da;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-submit {
    width: 100%;
    min-height: 2.35rem;
    border: 1px solid rgba(89, 173, 255, 0.45);
    border-radius: 0.55rem;
    background:
        linear-gradient(
            135deg,
            #1e78e5,
            #3d9cff
        );
    color: #fff;
    font-size: 0.75rem;
    font-weight: 720;
    cursor: pointer;
}

.upload-submit:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.upload-pipeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    margin-top: 0.7rem;
}

.upload-step {
    display: flex;
    align-items: center;
    gap: 0.34rem;
    min-width: 0;
    padding: 0.35rem;
    border-radius: 0.4rem;
    color: #7087a0;
    font-size: 0.62rem;
}

.upload-step > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(117, 144, 170, 0.18);
}

.upload-step.active {
    color: #8fc8ff;
    background: rgba(42, 130, 220, 0.12);
}

.upload-step.done {
    color: #74ddb0;
}

.upload-step.failed {
    color: #ff8493;
}

.upload-widget progress {
    width: 100%;
    height: 0.35rem;
    margin-top: 0.6rem;
}

.upload-status {
    min-height: 1.1rem;
    margin: 0.55rem 0 0;
    color: #718aa5;
    font-size: 0.63rem;
}

.hero-stats {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(145px, 1fr));
    gap: 0.8rem;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 122px;
    padding: 1rem;
    border: 1px solid rgba(107, 172, 234, 0.3);
    border-radius: 0.8rem;
    background:
        linear-gradient(
            145deg,
            rgba(7, 30, 58, 0.9),
            rgba(9, 44, 84, 0.72)
        );
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.17);
    backdrop-filter: blur(10px);
}

.hero-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #58a9ff;
}

.hero-stat-icon .ui-icon {
    width: 2rem;
    height: 2rem;
}

.hero-stat > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hero-stat strong {
    color: #fff;
    font-size: clamp(1.15rem, 2vw, 1.75rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.hero-stat span:not(.hero-stat-icon) {
    margin-top: 0.32rem;
    color: #e4eef9;
    font-size: 0.76rem;
    font-weight: 680;
}

.hero-stat small {
    margin-top: 0.42rem;
    color: #6498cf;
    font-size: 0.62rem;
}

.dashboard-columns {
    display: grid;
    grid-template-columns:
        minmax(0, 1.65fr)
        minmax(330px, 0.9fr);
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--dash-border);
    border-radius: 1rem;
    background:
        linear-gradient(
            145deg,
            rgba(7, 29, 55, 0.88),
            rgba(7, 26, 50, 0.75)
        );
    box-shadow: var(--dash-shadow);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.panel-heading h2 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.panel-eyebrow {
    margin: 0 0 0.2rem;
    color: #5f8cbb;
    font-size: 0.59rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.small-action,
.primary-action,
.load-more,
.all-clips-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--dash-border);
    border-radius: 0.5rem;
    background: rgba(8, 35, 65, 0.55);
    color: #d5e3f2;
    font-size: 0.68rem;
    text-decoration: none;
    cursor: pointer;
}

.primary-action {
    border-color: rgba(73, 158, 247, 0.45);
    background:
        linear-gradient(
            135deg,
            #1f75de,
            #318fff
        );
    color: #fff;
}

.media-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.media-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(86, 145, 204, 0.22);
    border-radius: 0.72rem;
    background: rgba(9, 37, 69, 0.72);
    transition:
        transform 170ms ease,
        border-color 170ms ease,
        box-shadow 170ms ease;
}

.media-card:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 174, 255, 0.44);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.23);
}

.media-thumbnail {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #071426;
}

.media-thumbnail::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            transparent 50%,
            rgba(2, 10, 20, 0.72)
        );
}

.media-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition:
        transform 220ms ease,
        filter 220ms ease;
}

.media-card:hover .media-thumbnail img {
    transform: scale(1.025);
    filter: brightness(1.05);
}

.media-play,
.featured-play {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.23);
    border-radius: 50%;
    background: rgba(3, 13, 26, 0.65);
    color: #fff;
    backdrop-filter: blur(6px);
}

.media-play {
    top: 50%;
    left: 50%;
    width: 2.4rem;
    height: 2.4rem;
    opacity: 0;
    transform: translate(-50%, -46%);
    transition:
        opacity 170ms ease,
        transform 170ms ease;
}

.media-card:hover .media-play {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.media-duration {
    position: absolute;
    right: 0.45rem;
    bottom: 0.42rem;
    z-index: 3;
    padding: 0.15rem 0.35rem;
    border-radius: 0.3rem;
    background: rgba(2, 9, 17, 0.82);
    color: #fff;
    font-size: 0.59rem;
    font-weight: 720;
}

.media-status {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 3;
    width: 0.55rem;
    height: 0.55rem;
    border: 2px solid rgba(3, 13, 26, 0.72);
    border-radius: 50%;
    background: var(--dash-yellow);
    box-shadow: 0 0 0 3px rgba(226, 182, 68, 0.15);
}

.media-status.ready {
    background: var(--dash-green);
    box-shadow: 0 0 0 3px rgba(49, 198, 138, 0.15);
}

.media-status.processing {
    background: var(--dash-blue-soft);
}

.media-status.failed {
    background: var(--dash-red);
}

.media-card-body {
    padding: 0.68rem;
}

.media-card h3 {
    min-height: 2.35em;
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.18;
}

.media-card h3 a {
    color: #fff;
    text-decoration: none;
}

.media-secondary {
    min-height: 1.15rem;
    margin: 0.35rem 0 0;
    overflow: hidden;
    color: #91a8c0;
    font-size: 0.63rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.55rem;
    color: #758ea9;
    font-size: 0.59rem;
}

.media-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-icon-button {
    position: relative;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border-radius: 0.42rem;
    text-decoration: none;
}

.card-icon-button .ui-icon {
    width: 0.95rem;
    height: 0.95rem;
}

.load-more {
    margin: 1rem auto 0;
}

.featured-clip {
    position: relative;
    display: block;
    aspect-ratio: 16 / 7.8;
    overflow: hidden;
    border: 1px solid rgba(80, 154, 226, 0.26);
    border-radius: 0.72rem;
    background: #071426;
}

.featured-clip img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.featured-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            transparent 40%,
            rgba(2, 10, 21, 0.86)
        );
}

.featured-play {
    top: 50%;
    left: 50%;
    width: 3rem;
    height: 3rem;
    transform: translate(-50%, -50%);
}

.featured-caption {
    position: absolute;
    right: 0.8rem;
    bottom: 0.7rem;
    left: 0.8rem;
    z-index: 2;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.5rem;
}

.featured-caption strong {
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-caption small {
    color: #c2d2e3;
    font-size: 0.62rem;
}

.clip-list {
    margin-top: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(86, 145, 204, 0.2);
    border-radius: 0.72rem;
}

.clip-row {
    display: grid;
    grid-template-columns:
        1.6rem
        2.5rem
        minmax(0, 1fr)
        1.75rem
        1.75rem;
    align-items: center;
    gap: 0.45rem;
    min-height: 3.55rem;
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid rgba(86, 145, 204, 0.16);
}

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

.clip-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: rgba(42, 133, 225, 0.28);
    color: #8fc7ff;
    font-size: 0.62rem;
    font-weight: 750;
}

.clip-time {
    color: #7d98b5;
    font-size: 0.58rem;
}

.clip-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-decoration: none;
}

.clip-copy strong {
    overflow: hidden;
    color: #eaf3fc;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clip-copy small {
    margin-top: 0.15rem;
    overflow: hidden;
    color: #788fa8;
    font-size: 0.58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.all-clips-action {
    width: 100%;
    margin-top: 0.75rem;
}

.dashboard-empty {
    display: grid;
    min-height: 180px;
    place-items: center;
    border: 1px dashed rgba(104, 160, 215, 0.24);
    border-radius: 0.72rem;
    color: var(--dash-muted);
    font-size: 0.75rem;
}

.dashboard-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-top: 2.4rem;
}

.dashboard-footer > span {
    height: 1px;
    background:
        linear-gradient(
            90deg,
            transparent,
            var(--dash-red)
        );
}

.dashboard-footer > span:last-child {
    background:
        linear-gradient(
            90deg,
            var(--dash-red),
            transparent
        );
}

.dashboard-footer p {
    margin: 0;
    color: #879bb3;
    font-size: 0.62rem;
    font-weight: 720;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.dashboard-footer b {
    color: var(--dash-red);
}

.is-placeholder {
    position: relative;
}

.is-placeholder::before {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 100;
    left: 50%;
    bottom: calc(100% + 0.55rem);
    width: max-content;
    max-width: 230px;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(118, 172, 225, 0.28);
    border-radius: 0.45rem;
    background: rgba(2, 14, 28, 0.96);
    color: #dceafa;
    font-size: 0.64rem;
    font-weight: 520;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transform:
        translate(-50%, 0.25rem);
    transition:
        opacity 140ms ease,
        transform 140ms ease;
}

.is-placeholder:hover::before,
.is-placeholder:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, 0);
}

.sidebar-link.is-placeholder::before {
    bottom: auto;
    left: calc(100% + 0.6rem);
    top: 50%;
    transform:
        translate(0.25rem, -50%);
}

.sidebar-link.is-placeholder:hover::before,
.sidebar-link.is-placeholder:focus-visible::before {
    transform: translate(0, -50%);
}

.feature-toast {
    position: fixed;
    z-index: 200;
    right: 1.2rem;
    bottom: 1.2rem;
    max-width: min(360px, calc(100vw - 2rem));
    padding: 0.8rem 1rem;
    border: 1px solid rgba(90, 167, 240, 0.35);
    border-radius: 0.65rem;
    background: rgba(4, 20, 39, 0.96);
    color: #dceafa;
    font-size: 0.72rem;
    box-shadow: var(--dash-shadow);
    backdrop-filter: blur(14px);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1280px) {
    .hero-inner {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stat {
        min-height: 96px;
    }

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

@media (max-width: 1040px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: none;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        margin-right: 0.8rem;
        font-size: 0.8rem;
        font-weight: 750;
        text-decoration: none;
    }

    .mobile-brand img {
        width: 2rem;
        height: 2rem;
        object-fit: contain;
    }

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

@media (max-width: 820px) {
    .dashboard-topbar {
        min-height: 64px;
        padding: 0 0.8rem;
    }

    .top-tabs {
        height: 64px;
        overflow-x: auto;
    }

    .top-tab {
        padding: 0 0.62rem;
    }

    .top-tab span {
        display: none;
    }

    .search-placeholder {
        display: none;
    }

    .dashboard-content {
        padding: 0.75rem;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 1rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .mobile-brand span {
        display: none;
    }

    .profile-button {
        display: none;
    }

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

    .media-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading {
        align-items: flex-start;
    }

    .primary-action {
        padding-inline: 0.5rem;
    }

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

    .dashboard-footer > span {
        display: none;
    }

    .dashboard-footer p {
        text-align: center;
    }
}

/* TTFLUX_PUBLIC_DELETE_STYLE_V1 */

.delete-inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.62rem 1rem;
    border: 1px solid rgba(248, 113, 113, 0.68);
    border-radius: 0.7rem;
    background: rgba(127, 29, 29, 0.34);
    color: #fecaca;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition:
        background 140ms ease,
        border-color 140ms ease,
        transform 140ms ease;
}

.delete-button:hover,
.delete-button:focus-visible {
    border-color: #f87171;
    background: rgba(185, 28, 28, 0.58);
    color: #ffffff;
}

.delete-button:active {
    transform: translateY(1px);
}

.delete-button.compact {
    min-height: 32px;
    padding: 0.42rem 0.62rem;
    border-radius: 0.55rem;
    font-size: 0.76rem;
}

.media-actions {
    flex-wrap: wrap;
}

.clip-row .delete-inline-form {
    flex: 0 0 auto;
}

.header-actions {
    flex-wrap: wrap;
}

/* TTFLUX_CLIP_PLAYER_STYLE_V1 */

.featured-clip-player {
    overflow: hidden;
    border: 1px solid rgba(53, 133, 220, 0.38);
    border-radius: 0.9rem;
    background: rgba(5, 24, 46, 0.72);
}

.featured-clip-player video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000000;
    object-fit: contain;
}

.featured-clip-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
}

.featured-clip-copy {
    display: grid;
    min-width: 0;
    gap: 0.25rem;
}

.featured-clip-copy strong {
    overflow: hidden;
    color: #ffffff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-clip-copy small {
    color: #91a9c5;
}

.clip-player-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.65rem;
}

.clip-page-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(53, 133, 220, 0.5);
    border-radius: 0.55rem;
    color: #dbeafe;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
}

.clip-page-action:hover,
.clip-page-action:focus-visible {
    border-color: #60a5fa;
    background: rgba(37, 99, 235, 0.24);
    color: #ffffff;
}

.clip-select-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.clip-row.is-selected {
    background: rgba(37, 99, 235, 0.12);
    box-shadow:
        inset 3px 0 0 rgba(96, 165, 250, 0.9);
}

.playback-speed-control {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #a9bad0;
    font-size: 0.76rem;
    font-weight: 700;
}

.playback-speed-control select {
    min-height: 34px;
    padding: 0.35rem 1.8rem 0.35rem 0.55rem;
    border: 1px solid rgba(53, 133, 220, 0.46);
    border-radius: 0.5rem;
    background: #061b33;
    color: #ffffff;
    font: inherit;
    cursor: pointer;
}

@media (max-width: 760px) {
    .featured-clip-summary,
    .clip-player-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .clip-page-action {
        width: 100%;
    }
}

/* TTFLUX_RAW_CARD_PLAYER_STYLE_V1 */

.raw-video-card {
    cursor: pointer;
}

.raw-video-card:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.95);
    outline-offset: 3px;
}

.raw-video-card .media-card-body {
    cursor: pointer;
}

.raw-video-player {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: default;
    background: #000000;
}

.raw-card-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000000;
    object-fit: cover;
    cursor: default;
}

.raw-video-player .media-duration {
    top: 0.5rem;
    right: 0.5rem;
    bottom: auto;
    pointer-events: none;
}

.raw-video-player .media-status {
    pointer-events: none;
}

.raw-video-card:hover .raw-card-video {
    filter: brightness(1.03);
}

.raw-card-video:fullscreen {
    object-fit: contain;
}

/* TTFLUX_RAW_VIDEO_OVERLAY_FIX_V1 */

/*
 * L'ancien calque décoratif des vignettes recouvrait la vidéo
 * et capturait les clics à la place de l'élément <video>.
 */
.raw-video-player::before,
.raw-video-player::after {
    pointer-events: none;
}

.raw-video-player {
    isolation: isolate;
}

.raw-video-player .raw-card-video {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.raw-video-player .media-duration,
.raw-video-player .media-status {
    z-index: 3;
    pointer-events: none;
}

/* TTFLUX_PLACEHOLDER_MODAL_STYLE_V1 */

/*
 * Les anciens labels au survol sont remplacés par une
 * fenêtre explicite ouverte au clic.
 */
.is-placeholder[data-tooltip]::before,
.is-placeholder[data-tooltip]::after {
    display: none !important;
    content: none !important;
}

.feature-notice-dialog {
    width: min(92vw, 440px);
    padding: 0;
    border: 1px solid rgba(96, 165, 250, 0.38);
    border-radius: 1rem;
    background:
        linear-gradient(
            145deg,
            rgba(9, 35, 65, 0.98),
            rgba(5, 22, 42, 0.99)
        );
    color: #ffffff;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.025);
}

.feature-notice-dialog::backdrop {
    background: rgba(2, 8, 18, 0.76);
    backdrop-filter: blur(4px);
}

.feature-notice-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem 1.35rem 1rem;
}

.feature-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.4rem;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(96, 165, 250, 0.48);
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.2);
    color: #bfdbfe;
    font-size: 1rem;
    font-weight: 800;
}

.feature-notice-copy {
    min-width: 0;
}

.feature-notice-eyebrow {
    margin: 0 0 0.35rem;
    color: #60a5fa;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.feature-notice-copy h2 {
    margin: 0 0 0.55rem;
    color: #ffffff;
    font-size: 1.08rem;
}

.feature-notice-copy p:last-child {
    margin: 0;
    color: #a9bad0;
    line-height: 1.55;
}

.feature-notice-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 1.35rem 1.25rem;
}

.feature-notice-ok {
    min-width: 86px;
    min-height: 40px;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(96, 165, 250, 0.68);
    border-radius: 0.65rem;
    background: rgba(37, 99, 235, 0.72);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.feature-notice-ok:hover,
.feature-notice-ok:focus-visible {
    border-color: #93c5fd;
    background: rgba(37, 99, 235, 0.95);
}

@media (max-width: 560px) {
    .feature-notice-content {
        padding: 1.1rem 1.1rem 0.9rem;
    }

    .feature-notice-actions {
        padding: 0 1.1rem 1.1rem;
    }

    .feature-notice-ok {
        width: 100%;
    }
}


/* TTFLUX_PING_SEPARATOR_V1 */

.ttflux-ping-separator {
    position: relative;
    width: min(720px, 92%);
    height: 28px;
    margin: 2.2rem auto 0.45rem auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0.96;
}

.ttflux-ping-separator__line {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    height: 1px;
    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,0.04) 0%,
            rgba(54,146,255,0.42) 18%,
            rgba(255,255,255,0.18) 50%,
            rgba(54,146,255,0.42) 82%,
            rgba(255,255,255,0.04) 100%
        );
}

.ttflux-ping-separator__post {
    position: absolute;
    bottom: 2px;
    width: 3px;
    height: 20px;
    border-radius: 3px;
    background: linear-gradient(
        180deg,
        rgba(145, 198, 255, 0.9) 0%,
        rgba(59, 118, 214, 0.85) 100%
    );
    box-shadow: 0 0 10px rgba(65, 149, 255, 0.22);
}

.ttflux-ping-separator__post--left {
    left: calc(50% - 94px);
}

.ttflux-ping-separator__post--right {
    left: calc(50% + 92px);
}

.ttflux-ping-separator__net {
    position: relative;
    width: 184px;
    height: 18px;
    margin-bottom: 6px;
}

.ttflux-ping-separator__net-top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        rgba(230, 243, 255, 0.95) 0%,
        rgba(175, 220, 255, 0.98) 50%,
        rgba(230, 243, 255, 0.95) 100%
    );
    box-shadow: 0 0 8px rgba(115, 190, 255, 0.18);
}

.ttflux-ping-separator__mesh {
    position: absolute;
    left: 0;
    right: 0;
    top: 3px;
    bottom: 0;
    border-left: 1px solid rgba(160, 210, 255, 0.55);
    border-right: 1px solid rgba(160, 210, 255, 0.55);
    background:
        repeating-linear-gradient(
            90deg,
            rgba(185, 225, 255, 0.18) 0px,
            rgba(185, 225, 255, 0.18) 1px,
            transparent 1px,
            transparent 10px
        ),
        repeating-linear-gradient(
            180deg,
            rgba(185, 225, 255, 0.12) 0px,
            rgba(185, 225, 255, 0.12) 1px,
            transparent 1px,
            transparent 6px
        );
    border-radius: 0 0 8px 8px;
}

.ttflux-ping-separator__ball {
    position: absolute;
    width: 12px;
    height: 12px;
    right: calc(50% - 142px);
    bottom: 14px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 35% 35%,
            rgba(255,255,255,1) 0%,
            rgba(255,255,255,0.96) 45%,
            rgba(210,225,255,0.85) 100%
        );
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.12),
        0 0 14px rgba(120, 190, 255, 0.15);
}

.ttflux-ping-separator__ball::before {
    content: "";
    position: absolute;
    width: 44px;
    height: 2px;
    left: 8px;
    top: 5px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(90, 175, 255, 0.65) 0%,
        rgba(90, 175, 255, 0.18) 100%
    );
}

.ttflux-ping-separator__caption {
    width: 100%;
    text-align: center;
    margin: 0.2rem auto 1.5rem auto;
    font-size: 0.78rem;
    letter-spacing: 0.28rem;
    text-transform: uppercase;
    color: rgba(198, 221, 245, 0.72);
    text-shadow: 0 0 10px rgba(42, 108, 190, 0.12);
}

@media (max-width: 720px) {
    .ttflux-ping-separator {
        width: min(94%, 520px);
        margin-top: 1.6rem;
    }

    .ttflux-ping-separator__net {
        width: 140px;
    }

    .ttflux-ping-separator__post--left {
        left: calc(50% - 72px);
    }

    .ttflux-ping-separator__post--right {
        left: calc(50% + 70px);
    }

    .ttflux-ping-separator__ball {
        right: calc(50% - 110px);
    }

    .ttflux-ping-separator__caption {
        font-size: 0.68rem;
        letter-spacing: 0.18rem;
    }
}

/* TTFLUX_PING_NET_STYLE_V2 */

.ttflux-net-footer {
    width: 100%;
    margin: 2.6rem 0 1.3rem;
    text-align: center;
}

.ttflux-net-scene {
    position: relative;
    width: min(680px, 88%);
    height: 42px;
    margin: 0 auto;
}

.ttflux-net-table-line {
    position: absolute;
    right: 0;
    bottom: 8px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(66, 153, 225, 0.3) 12%,
            rgba(134, 197, 255, 0.68) 50%,
            rgba(66, 153, 225, 0.3) 88%,
            transparent
        );
    box-shadow: 0 0 12px rgba(56, 145, 235, 0.15);
}

.ttflux-net {
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 190px;
    height: 28px;
    transform: translateX(-50%);
}

.ttflux-net-band {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            #8abced,
            #d5edff 50%,
            #8abced
        );
    box-shadow: 0 0 8px rgba(115, 190, 255, 0.25);
}

.ttflux-net-mesh {
    position: absolute;
    top: 3px;
    right: 1px;
    bottom: 0;
    left: 1px;
    border-right: 1px solid rgba(126, 184, 235, 0.45);
    border-left: 1px solid rgba(126, 184, 235, 0.45);
    background:
        repeating-linear-gradient(
            90deg,
            rgba(125, 181, 229, 0.22) 0,
            rgba(125, 181, 229, 0.22) 1px,
            transparent 1px,
            transparent 10px
        ),
        repeating-linear-gradient(
            180deg,
            rgba(125, 181, 229, 0.18) 0,
            rgba(125, 181, 229, 0.18) 1px,
            transparent 1px,
            transparent 7px
        );
}

.ttflux-net-post {
    position: absolute;
    z-index: 3;
    bottom: 4px;
    width: 4px;
    height: 35px;
    border-radius: 3px;
    background:
        linear-gradient(
            180deg,
            #9dd3ff,
            #367cb8
        );
    box-shadow: 0 0 8px rgba(70, 160, 235, 0.22);
}

.ttflux-net-post-left {
    left: calc(50% - 98px);
}

.ttflux-net-post-right {
    left: calc(50% + 94px);
}

.ttflux-net-ball {
    position: absolute;
    z-index: 4;
    top: 3px;
    left: calc(50% + 125px);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 35% 30%,
            #ffffff 0,
            #f4f8ff 48%,
            #b9cce0 100%
        );
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.32),
        0 0 8px rgba(206, 235, 255, 0.24);
}

.ttflux-net-ball-trail {
    position: absolute;
    top: 9px;
    left: calc(50% + 138px);
    width: 72px;
    height: 2px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            rgba(104, 180, 247, 0.5),
            transparent
        );
    transform: rotate(-6deg);
    transform-origin: left center;
}

.ttflux-net-caption {
    margin: 0.4rem 0 0;
    color: rgba(159, 193, 224, 0.68);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

@media (max-width: 680px) {
    .ttflux-net-scene {
        width: 90%;
    }

    .ttflux-net {
        width: 150px;
    }

    .ttflux-net-post-left {
        left: calc(50% - 78px);
    }

    .ttflux-net-post-right {
        left: calc(50% + 74px);
    }

    .ttflux-net-ball {
        left: calc(50% + 96px);
    }

    .ttflux-net-ball-trail {
        left: calc(50% + 108px);
        width: 40px;
    }

    .ttflux-net-caption {
        letter-spacing: 0.15em;
    }
}

/* TTFLUX_LEGACY_FOOTER_REMOVAL_V1 */

/*
 * Ancien bandeau Travail / Partage / Progression.
 * Le nouveau séparateur utilise .ttflux-net-footer.
 */
.dashboard-footer {
    display: none !important;
}

/* TTFLUX_BODY_SLOGAN_REMOVAL_V1 */

/*
 * Ancien slogan injecté directement par un pseudo-élément
 * du body. Le séparateur .ttflux-net-footer le remplace.
 */
body.dashboard-page::after {
    display: none !important;
    content: none !important;
}

/* TTFLUX_DESKTOP_DENSITY_V1 */

/*
 * Agrandissement global réservé aux écrans de bureau larges.
 *
 * À 100 % dans le navigateur :
 * - l'interface est agrandie de 20 % ;
 * - la largeur est compensée pour éviter un débordement horizontal.
 *
 * Sur téléphone, tablette ou fenêtre étroite :
 * - aucun changement.
 */
@media
    (min-width: 1360px)
    and (pointer: fine)
{
    html {
        overflow-x: hidden;
    }

    body.dashboard-page {
        width: 83.333333%;
        min-height: 83.333333vh;
        zoom: 1.2;
    }
}

/* TTFLUX_DESKTOP_SCALE_FIX_V2 */

/*
 * Annule l'ancien couple width + zoom, mal interprété
 * par Firefox et responsable de l'espace vide à droite.
 */
@media
    (min-width: 1360px)
    and (pointer: fine)
{
    html {
        font-size: 18px;
        overflow-x: hidden;
    }

    body.dashboard-page {
        width: 100% !important;
        min-width: 100% !important;
        min-height: 100vh !important;
        zoom: 1 !important;
    }
}

/*
 * Téléphones, tablettes et fenêtres étroites :
 * dimensions d'origine conservées.
 */
@media (max-width: 1359px) {
    html {
        font-size: 16px;
    }

    body.dashboard-page {
        width: 100%;
        min-height: 100vh;
        zoom: 1;
    }
}
