:root {
    /* Otika light admin + Vidfy accents */
    --fa-blue: #6777EF;
    --fa-blue-dark: #5163e0;
    --fa-red: #fc544b;
    --fa-green: #63ed7a;
    --fa-orange: #ffa426;
    --fa-bg: #f6f7fb;
    --fa-panel: #ffffff;
    --fa-ink: #34395e;
    --fa-muted: #98a6ad;
    --fa-border: #e4e6fc;
    --fa-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    --fa-lavender: #f0eefc;

    --vidfy-mint: #63ed7a;
    --vidfy-cyan: #3abaf4;
    --vidfy-violet: #6777EF;
    --vidfy-gradient: linear-gradient(135deg, #63ed7a 0%, #6777EF 55%, #a55eea 100%);

    --sidebar-width: 260px;

    --el-ink: var(--fa-ink);
    --el-muted: var(--fa-muted);
    --el-border: var(--fa-border);
    --el-soft: #fafafa;
    --el-radius: 8px;
    --el-shadow: var(--fa-shadow);

    --bs-primary: #6777EF;
    --bs-primary-rgb: 103, 119, 239;
    --bs-body-font-family: "Nunito", "Manrope", system-ui, sans-serif;
    --bs-body-color: #34395e;
    --bs-border-radius: 6px;
    --bs-link-color: #6777EF;
    --bs-link-hover-color: #5163e0;
}

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

body {
    min-height: 100vh;
    color: var(--fa-ink);
    background: var(--fa-bg);
    font-family: "Nunito", "Manrope", system-ui, sans-serif;
}

h1, h2, h3, .brand-title, .stat-value, .kpi-value, .dash-title {
    font-family: "Nunito", "Manrope", system-ui, sans-serif;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--fa-ink);
}

.text-gradient {
    background: var(--vidfy-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-muted,
.text-muted-glass { color: var(--fa-muted) !important; }

/* ——— Shell / sidebar ——— */
.app-shell { min-height: 100vh; display: block; }
.app-sidebar { display: none; }
.app-main { width: 100%; min-height: 100vh; min-width: 0; background: var(--fa-bg); }

@media (min-width: 992px) {
    .app-shell {
        display: grid;
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    }
    .app-sidebar {
        display: flex;
        flex-direction: column;
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
        max-width: var(--sidebar-width);
        height: 100vh;
        position: sticky;
        top: 0;
        overflow-y: auto;
        overflow-x: hidden;
        background: #fff;
        border-right: 1px solid var(--fa-border);
        z-index: 30;
        box-shadow: 2px 0 12px rgba(62, 57, 107, 0.04);
    }
    .app-sidebar .sidebar-inner { width: 100%; min-height: 100%; }
    .app-main { width: auto; min-width: 0; max-width: 100%; }
}

.app-offcanvas {
    background: #fff;
    color: var(--fa-ink);
    width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width);
    border-right: 1px solid var(--fa-border);
}
.app-offcanvas .offcanvas-body { overflow-x: hidden; }
.app-offcanvas .btn-close { filter: none; }

.sidebar-inner {
    width: 100%;
    box-sizing: border-box;
    padding: 0 !important;
}

.sidebar-brand {
    background: #fff;
    margin: 0;
    padding: 1.1rem 1.15rem 0.95rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    min-height: 0;
    border-bottom: 1px solid var(--fa-border);
}
.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}
.brand-mark {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    flex: 0 0 auto;
}
.sidebar-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6777EF, #a55eea);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    flex: 0 0 auto;
    box-shadow: 0 4px 12px rgba(103, 119, 239, 0.35);
}

.brand-wordmark {
    color: #34395e !important;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
    line-height: 1;
    text-transform: lowercase;
}
.brand-wordmark-dark {
    color: #34395e !important;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.04em;
    line-height: 1;
    white-space: nowrap;
}

.app-offcanvas .offcanvas-header {
    background: #fff;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--fa-border);
}
.app-offcanvas .offcanvas-header .btn-close {
    filter: none;
}
.app-offcanvas .offcanvas-header .brand-wordmark {
    color: #34395e !important;
}

.sidebar-profile {
    display: none;
}

.sidebar-nav-wrap {
    padding: 0.35rem 0.65rem 0.75rem;
}

.brand {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}
.brand-logo {
    width: auto;
    max-width: 150px;
    max-height: 36px;
    height: auto;
    object-fit: contain;
    display: block;
}
.brand-sub, .nav-section-label {
    color: #adb5bb;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}
.nav-section-label { margin: 0.85rem 0.85rem 0.35rem; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 0;
    color: #6c757d !important;
    padding: 0.55rem 0.85rem;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid transparent;
}
.sidebar-link i {
    color: #868e96;
    flex: 0 0 1.1rem;
    width: 1.1rem;
    text-align: center;
}
.sidebar-link:hover {
    background: var(--fa-lavender);
    color: var(--fa-blue) !important;
}
.sidebar-link:hover i { color: var(--fa-blue); }
.sidebar-link.active {
    background: transparent;
    color: var(--fa-blue) !important;
    font-weight: 700;
    border-left-color: var(--fa-blue);
    box-shadow: none;
}
.sidebar-link.active i { color: var(--fa-blue); }

/* ——— Topbar ——— */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid var(--fa-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    min-height: 64px;
}
.hamburger-btn,
.topbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
}
.hamburger-btn:hover,
.topbar-icon-btn:hover {
    color: var(--fa-blue);
    background: var(--fa-lavender);
}
.topbar-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #3abaf4;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
    padding: 0 4px;
}
.topbar-badge.is-warn { background: var(--fa-orange); }
.notif-menu {
    width: min(360px, 92vw);
    max-height: 70vh;
    overflow: hidden;
}
.notif-menu-head {
    border-bottom: 1px solid #eef1f5;
    background: #fff;
}
.notif-menu-list {
    max-height: 55vh;
    overflow: auto;
}
.notif-item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
}
.notif-item:hover { background: #f8f9fb; }
.notif-item.is-unread { background: #f5f6ff; }
.notif-item-title { font-weight: 700; font-size: 0.88rem; color: #1e2635; }
.notif-item-body { font-size: 0.78rem; color: #6c757d; margin-top: 0.15rem; }
.notif-item-time { font-size: 0.7rem; color: #9aa0a6; margin-top: 0.25rem; }
.studio-process {
    min-width: 0;
    flex: 1;
}
.studio-process.is-busy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6777EF;
    font-size: 0.85rem;
    font-weight: 600;
}
.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6777EF, #a55eea);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: grid;
    place-items: center;
}
.topbar-logo {
    height: 34px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
}

.live-badge {
    font-weight: 600;
    background: rgba(99, 237, 122, 0.15) !important;
    color: #28a745 !important;
    border: 1px solid rgba(99, 237, 122, 0.35) !important;
}
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fa-green);
    margin-right: 6px;
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 237, 122, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(99, 237, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 237, 122, 0); }
}

.app-content { padding-top: 1.25rem; width: 100%; max-width: none; }

/* ——— Buttons ——— */
.btn-primary,
.btn-dark {
    background: var(--fa-blue) !important;
    border: 0 !important;
    color: #fff !important;
    border-radius: 4px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(103, 119, 239, 0.28);
}
.btn-primary:hover,
.btn-dark:hover {
    background: var(--fa-blue-dark) !important;
    color: #fff !important;
    filter: none;
    transform: none;
}

.btn-glass,
.btn-outline-secondary,
.btn-light {
    border-radius: 4px;
    font-weight: 600;
    background: #fff !important;
    border: 1px solid var(--fa-border) !important;
    color: #6c757d !important;
    box-shadow: none;
}
.btn-glass:hover,
.btn-outline-secondary:hover,
.btn-light:hover {
    border-color: var(--fa-blue) !important;
    color: var(--fa-blue) !important;
    background: var(--fa-lavender) !important;
}

/* ——— Cards / panels ——— */
.glass-card,
.card-soft,
.card {
    background: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: var(--fa-shadow);
    color: var(--fa-ink);
    backdrop-filter: none;
}

.glass-heading {
    font-size: 1.05rem;
    color: var(--fa-ink);
    font-weight: 700;
}

.glass-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(103, 119, 239, 0.1);
    color: var(--fa-blue);
    border: 0;
}

/* ——— Dashboard Otika KPIs ——— */
.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}
.dash-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fa-blue);
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.dash-title {
    font-size: clamp(1.55rem, 2.5vw, 1.9rem);
    color: var(--fa-ink);
}

.kpi-card {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.25rem 1.2rem;
    position: relative;
    overflow: hidden;
    color: var(--fa-ink) !important;
    background: #fff !important;
    border: 0 !important;
    box-shadow: var(--fa-shadow) !important;
}
.kpi-card::after { display: none; }
.kpi-card .kpi-label {
    color: var(--fa-muted) !important;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.kpi-card .kpi-meta { color: var(--fa-muted) !important; font-size: 0.78rem; }
.kpi-card .kpi-unit { color: inherit !important; font-size: 0.85em; }
.kpi-card .kpi-value {
    color: var(--fa-ink) !important;
    font-size: 1.75rem;
    line-height: 1.15;
    font-weight: 800;
}
.kpi-card .kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 0.35rem;
}
.kpi-card .kpi-delta.is-up { color: #47c363; }
.kpi-card .kpi-delta.is-down { color: var(--fa-orange); }
.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.45rem;
    flex: 0 0 auto;
    margin-left: auto;
    order: 2;
}
.kpi-body { flex: 1; min-width: 0; order: 1; }
.kpi-mint .kpi-icon { background: rgba(252, 84, 75, 0.12); color: #fc544b; }
.kpi-cyan .kpi-icon { background: rgba(103, 119, 239, 0.12); color: #6777EF; }
.kpi-violet .kpi-icon { background: rgba(58, 186, 244, 0.12); color: #3abaf4; }
.kpi-rate .kpi-icon { background: rgba(99, 237, 122, 0.18); color: #47c363; }
.kpi-mint, .kpi-cyan, .kpi-violet, .kpi-rate {
    background: #fff !important;
}
.kpi-label { font-size: 0.85rem; font-weight: 600; }
.kpi-value { font-size: 1.75rem; line-height: 1.1; }
.kpi-unit { font-size: 1rem; margin-left: 2px; }
.kpi-meta { font-size: 0.78rem; margin-top: 0.15rem; }
.text-success-soft { color: #47c363 !important; }

.chart-wrap { position: relative; width: 100%; }
.chart-wrap-lg { height: 280px; }
.chart-wrap-md { height: 260px; }
.chart-legend {
    display: flex;
    gap: 0.85rem;
    font-size: 0.8rem;
    color: var(--fa-muted);
}
.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.35rem;
}
.legend-mint { background: var(--fa-blue); }
.legend-violet { background: #98a6ad; }

.donut-wrap {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.donut-wrap canvas { max-height: 220px; }
.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.donut-big { font-size: 2rem; font-weight: 800; color: var(--fa-ink); line-height: 1; }
.donut-sub { font-size: 0.78rem; color: var(--fa-muted); }
.donut-keys {
    display: grid;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--fa-muted);
}
.donut-keys strong { color: var(--fa-ink); float: right; }
.donut-keys .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.4rem;
}
.donut-keys .mint { background: var(--fa-blue); }
.donut-keys .rose { background: var(--fa-red); }
.donut-keys .violet { background: #98a6ad; }

.quick-stack { display: grid; gap: 0.45rem; }
.quick-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    color: #505458;
    background: #f8fafc;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.92rem;
}
.quick-link i { color: var(--fa-blue); }
.quick-link:hover {
    border-color: rgba(70, 128, 255, 0.25);
    background: var(--fa-lavender);
    color: var(--fa-blue);
}

.alert-glass {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.7rem 0.8rem;
    border-radius: 6px;
    font-size: 0.86rem;
    font-weight: 500;
    margin-bottom: 0.55rem;
    border: 1px solid transparent;
}
.alert-ok { background: rgba(46,216,182,.12); color: #1aa383; border-color: rgba(46,216,182,.2); }
.alert-info { background: rgba(103,119,239,.1); color: var(--fa-blue); border-color: rgba(103,119,239,.2); }
.alert-warn { background: rgba(255,182,77,.15); color: #c98720; border-color: rgba(255,182,77,.25); }
.alert-err { background: rgba(255,83,112,.1); color: var(--fa-red); border-color: rgba(255,83,112,.2); }

.activity-list { display: grid; gap: 0.2rem; }
.activity-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.35rem;
    border-bottom: 1px solid #f0f0f0;
}
.activity-row:last-child { border-bottom: 0; }
.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: var(--fa-blue);
    flex: 0 0 auto;
}
.activity-title { font-weight: 700; color: var(--fa-ink); }
.activity-meta { font-size: 0.78rem; color: var(--fa-muted); }

.status-pill {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.28rem 0.55rem;
    border-radius: 4px;
    white-space: nowrap;
}
.status-completed { background: rgba(46,216,182,.15); color: #1aa383; }
.status-failed { background: rgba(255,83,112,.12); color: var(--fa-red); }
.status-pending, .status-processing { background: rgba(255,182,77,.15); color: #c98720; }

/* ——— Forms / tables ——— */
.form-control,
.form-select {
    border-radius: 4px;
    border-color: #ced4da;
    background: #fff;
    color: var(--fa-ink);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--fa-blue);
    box-shadow: 0 0 0 0.2rem rgba(70, 128, 255, 0.15);
    background: #fff;
    color: var(--fa-ink);
}
.form-label { color: #505458; font-weight: 600; }
.form-text { color: var(--fa-muted) !important; }

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--fa-ink);
    --bs-table-border-color: #f0f0f0;
    --bs-table-hover-bg: #f8fafc;
    --bs-table-hover-color: var(--fa-ink);
}
.table thead th { color: var(--fa-muted); font-weight: 600; font-size: 0.82rem; }

.badge.text-bg-light,
.badge.text-bg-secondary {
    background: #f0f2f5 !important;
    color: #505458 !important;
    border: 0;
}
.badge.text-bg-success { background: rgba(46,216,182,.18) !important; color: #1aa383 !important; }
.badge.text-bg-danger { background: rgba(255,83,112,.15) !important; color: var(--fa-red) !important; }

.alert { border-radius: 6px; }
.alert-success { background: rgba(46,216,182,.12); color: #1aa383; border-color: rgba(46,216,182,.25); }
.alert-danger { background: rgba(255,83,112,.1); color: var(--fa-red); border-color: rgba(255,83,112,.25); }
.alert-warning { background: rgba(255,182,77,.15); color: #c98720; border-color: rgba(255,182,77,.3); }
.alert-info { background: rgba(103,119,239,.1); color: var(--fa-blue); border-color: rgba(103,119,239,.25); }

.pagination .page-link {
    color: var(--fa-blue);
    background: #fff;
    border-radius: 4px !important;
    margin: 0 0.15rem;
    border: 1px solid var(--fa-border);
}
.pagination .page-item.active .page-link {
    background: var(--fa-blue);
    border-color: var(--fa-blue);
    color: #fff;
}

.modal-content {
    background: #fff;
    border: 0;
    box-shadow: 0 12px 40px rgba(62, 57, 107, 0.16);
    color: var(--fa-ink);
}
.modal-header, .modal-footer { border-color: #f0f0f0; }
.btn-close { filter: none; }

.el-page-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin: 0;
    color: var(--fa-ink);
}

.el-tabs {
    display: flex;
    gap: 1.25rem;
    border-bottom: 1px solid var(--fa-border);
    margin-bottom: 1.25rem;
}
.el-tabs a {
    color: var(--fa-muted);
    text-decoration: none;
    padding: 0.75rem 0;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}
.el-tabs a.active {
    color: var(--fa-blue);
    border-bottom: 3px solid var(--fa-blue);
}

.el-search {
    background: var(--fa-lavender);
    border: 0;
    border-radius: 30px;
    padding: 0.45rem 0.85rem 0.45rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: none;
    max-width: 520px;
}
.el-search i { color: #6777EF; opacity: 0.7; order: 2; }
.el-search input {
    border: 0;
    outline: none;
    box-shadow: none !important;
    flex: 1;
    background: transparent;
    color: var(--fa-ink);
    order: 1;
}
.el-search input::placeholder { color: #a6a9c4; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-pill {
    border: 1px solid var(--fa-border);
    background: #fff;
    color: #505458;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}
.filter-pill:hover { border-color: var(--fa-blue); color: var(--fa-blue); }
.filter-pill.active {
    background: var(--fa-blue);
    color: #fff;
    border-color: var(--fa-blue);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.75rem 0 0.9rem;
}
.section-head h2 { font-size: 1.15rem; margin: 0; color: var(--fa-ink); }

.voice-mini {
    background: #fff;
    border: 0;
    border-radius: 10px;
    padding: 0.9rem;
    height: 100%;
    box-shadow: var(--fa-shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.voice-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.voice-avatar,
.footer-player-avatar,
.lang-chip {
    background: var(--fa-blue);
    color: #fff;
}

.play-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--fa-border);
    background: #fff;
    color: var(--fa-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.play-btn:hover,
.play-btn.is-playing,
.preview-play.is-playing {
    background: var(--fa-blue);
    color: #fff;
    border-color: var(--fa-blue);
}

.handpick-card { display: none; }

.avatar-tile { display: none; }

.spotlight-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid #f0f0f0;
}
.spotlight-row:last-child { border-bottom: 0; }

.lang-card {
    border-radius: 8px;
    border: 0;
    background: #fff;
    padding: 1rem;
    height: 100%;
    box-shadow: var(--fa-shadow);
}
.lang-chip {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.studio-shell {
    background: #fff;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    min-height: 70vh;
    box-shadow: var(--fa-shadow);
}
.studio-main {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    min-height: 70vh;
}
.studio-editor {
    padding: 1.25rem 1.35rem 5.5rem;
    border-right: 1px solid #f0f0f0;
    position: relative;
}
.studio-side {
    padding: 1.25rem;
    background: #fafbfd;
}
.studio-textarea {
    width: 100%;
    min-height: 420px;
    border: 0;
    resize: vertical;
    outline: none;
    font-size: 1.15rem;
    line-height: 1.6;
    background: transparent;
    color: var(--fa-ink);
}
.studio-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.setting-block {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 0.9rem;
    margin-bottom: 0.85rem;
    box-shadow: none;
}
.voice-picker-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
}
.voice-picker-item:hover,
.voice-picker-item.active {
    background: var(--fa-lavender);
    border-color: rgba(70, 128, 255, 0.2);
}
.voice-picker-list { max-height: 280px; overflow: auto; }

@media (max-width: 991px) {
    .studio-main { grid-template-columns: 1fr; }
    .studio-editor { border-right: 0; border-bottom: 1px solid #f0f0f0; }
}

body.has-footer-player { padding-bottom: 92px; }

.footer-player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: #fff;
    border-top: 3px solid var(--fa-blue);
    box-shadow: 0 -8px 24px rgba(62, 57, 107, 0.1);
    transform: translateY(110%);
    transition: transform .22s ease;
}
@media (min-width: 992px) {
    .footer-player { left: var(--sidebar-width); }
}
.footer-player.is-open { transform: translateY(0); }
.footer-player-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.2fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1.25rem;
    width: 100%;
}
.footer-player-meta { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.footer-player-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex: 0 0 auto;
}
.footer-player-title {
    font-weight: 700;
    color: var(--fa-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.footer-player-sub {
    font-size: 0.8rem;
    color: var(--fa-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.footer-player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.footer-play-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: var(--fa-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(70, 128, 255, 0.35);
}
.footer-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(420px, 100%);
}
.footer-progress {
    flex: 1;
    height: 4px;
    appearance: none;
    background: #e9ecef;
    border-radius: 999px;
    outline: none;
}
.footer-progress::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--fa-blue);
    cursor: pointer;
}
.footer-time { font-size: 0.72rem; color: var(--fa-muted); min-width: 34px; }
.footer-player-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}
@media (max-width: 767px) {
    .footer-player-inner { grid-template-columns: 1fr; gap: 0.55rem; }
    .footer-player-actions { justify-content: flex-start; }
}

.ajax-loading {
    position: fixed;
    inset: 0;
    background: rgba(30, 38, 53, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.ajax-loading-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem 1.75rem;
    text-align: center;
    min-width: 180px;
    border: 0;
    box-shadow: 0 12px 40px rgba(62, 57, 107, 0.18);
    color: var(--fa-ink);
}

.project-card {
    background: #fff;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--fa-shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(62, 57, 107, 0.12);
}
.project-card .fw-bold.text-dark { color: var(--fa-ink) !important; }
.project-thumb {
    height: 180px;
    background: linear-gradient(135deg, #6777EF, #2ed8b6), #111;
    background-size: cover;
    background-position: center;
}

.mode-pills {
    display: inline-flex;
    gap: 0.35rem;
    background: #f0f2f5;
    border: 0;
    border-radius: 999px;
    padding: 0.25rem;
}
.mode-pill {
    color: #888c95;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.mode-pill.active {
    background: var(--fa-blue);
    color: #fff;
}

.drop-zone {
    border: 2px dashed #d0d7e2;
    border-radius: 8px;
    padding: 2.5rem 1.25rem;
    background: #fafbfd;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--fa-ink);
}

.lipsync-studio .studio-side { background: #fafbfd; color: var(--fa-ink); }
.lipsync-studio .setting-block {
    background: #fff;
    border-color: #f0f0f0;
}
.lipsync-studio .form-label,
.lipsync-studio .fw-semibold,
.lipsync-studio .form-text { color: #505458 !important; }

.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-label { color: var(--fa-muted); font-size: 0.85rem; }
.stat-card .stat-value {
    font-size: 1.85rem;
    margin-top: 0.25rem;
    color: var(--fa-ink);
}

pre.result-json {
    background: #f8fafc;
    border: 1px solid var(--fa-border);
    border-radius: 6px;
    padding: 1rem;
    max-height: 420px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--fa-ink);
}

.avatar-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.avatar-pick {
    display: block;
    cursor: pointer;
    border: 2px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s ease, transform .15s ease;
}
.avatar-pick:hover { border-color: #a8c1ff; transform: translateY(-2px); }
.avatar-pick:has(input:checked) {
    border-color: var(--fa-blue);
    box-shadow: 0 0 0 2px rgba(103,119,239,0.2);
}
.avatar-pick video,
.avatar-pick img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    background: #111;
}
.avatar-pick span {
    display: block;
    padding: 0.4rem 0.55rem;
    font-size: 0.75rem;
    color: #505458;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Shared drag-drop + record uploader */
.vidfy-upload-zone {
    border: 1.5px dashed #d5dbe3;
    border-radius: 12px;
    background: #fafbfd;
    padding: 1.15rem 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.vidfy-upload-zone.is-drag,
.vidfy-upload.has-file .vidfy-upload-zone {
    border-color: var(--fa-blue);
    background: #eef3ff;
}
.vidfy-upload-zone.is-drag {
    box-shadow: 0 0 0 3px rgba(103,119,239,.12);
}
.vidfy-upload-label {
    font-weight: 600;
    color: #1e1e2d;
}
.vidfy-upload-meta {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}
.vidfy-upload-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
}
/* Stom select (custom voice picker trigger) */
.stom-select { width: 100%; }
.stom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
    border: 1px solid #e3e8ef;
    background: #fff;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    transition: border-color .15s ease, box-shadow .15s ease;
    cursor: pointer;
}
.stom-select-trigger:hover { border-color: #c9d8ff; }
.stom-select-trigger:focus {
    outline: none;
    border-color: var(--fa-blue);
    box-shadow: 0 0 0 3px rgba(103,119,239,.15);
}
.stom-select-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--fa-blue); color: #fff;
    display: grid; place-items: center;
    font-size: 0.8rem; font-weight: 700; flex: 0 0 auto;
}
.stom-select-text { min-width: 0; flex: 1; }
.stom-select-name {
    display: block; font-weight: 600; color: #1e2635;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 0.9rem;
}
.stom-select-hint {
    display: block; font-size: 0.72rem; color: #9aa0a6;
}
.stom-select-caret { color: #9aa0a6; flex: 0 0 auto; }

/* Compact variant inside dialogue chips */
.dlg-speaker-chip .stom-select { width: auto; min-width: 150px; }
.dlg-speaker-chip .stom-select-trigger {
    border: 0; background: transparent; padding: 0.15rem 0.25rem; border-radius: 999px; gap: 0.4rem;
}
.dlg-speaker-chip .stom-select-avatar { width: 22px; height: 22px; font-size: 0.65rem; }
.dlg-speaker-chip .stom-select-hint { display: none; }
.dlg-speaker-chip .stom-select-name { font-size: 0.82rem; max-width: 140px; }

/* Voice picker modal */
.voice-picker {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    min-height: min(72vh, 640px);
}
.voice-picker-head {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem 1rem 0.5rem;
}
.voice-picker-back {
    width: 36px; height: 36px; padding: 0;
    display: grid; place-items: center;
}
.voice-picker-title {
    font-size: 1.15rem; font-weight: 700; margin: 0; color: #1e2635;
}
.voice-picker-tabs {
    border-bottom: 1px solid #eef1f5;
}
.voice-picker-tabs .nav-link {
    border: 0; border-bottom: 2px solid transparent; border-radius: 0;
    color: #888c95; font-weight: 600; padding: 0.75rem 0.9rem;
}
.voice-picker-tabs .nav-link.active {
    color: #1e2635; border-bottom-color: #1e2635; background: transparent;
}
.voice-picker-tools { padding: 0.85rem 1rem 0.5rem; }
.voice-picker-search {
    display: flex; align-items: center; gap: 0.55rem;
    background: #f3f4f6; border-radius: 10px; padding: 0.55rem 0.8rem;
}
.voice-picker-search i { color: #9aa0a6; }
.voice-picker-search input {
    border: 0; background: transparent; outline: none; width: 100%;
    font-size: 0.95rem; color: #1e2635;
}
.voice-picker-filters {
    display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem;
}
.voice-filter-chip {
    border: 1px solid #e3e8ef; background: #fff; color: #505458;
    border-radius: 999px; padding: 0.25rem 0.7rem; font-size: 0.78rem; font-weight: 600;
}
.voice-filter-chip.active {
    background: #1e2635; border-color: #1e2635; color: #fff;
}
.voice-picker-list {
    max-height: 52vh; overflow: auto; padding: 0.25rem 0.5rem 1rem;
}
.voice-row {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 0.75rem; border-radius: 12px; cursor: pointer;
}
.voice-row:hover, .voice-row.is-active { background: #f3f4f6; }
.voice-row-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    color: #fff; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto;
}
.voice-row-body { min-width: 0; flex: 1; }
.voice-row-name { font-weight: 700; color: #1e2635; }
.voice-row-desc {
    font-size: 0.8rem; color: #6c757d;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.voice-row-meta { font-size: 0.72rem; color: #9aa0a6; text-transform: capitalize; margin-top: 0.1rem; }
.voice-row-play {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid #e3e8ef;
    background: #fff; color: #1e2635; display: grid; place-items: center; flex: 0 0 auto;
}
.voice-row-play:hover { border-color: var(--fa-blue); color: var(--fa-blue); }
.voice-row-play.is-disabled { opacity: 0.35; }
