/* ============================================================
   TriArt Admin — Design System
   Bootstrap 5 + MDB 7 + Material Icons
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --accent:        #C9A84C;
    --accent-dark:   #a8882e;
    --accent-light:  rgba(201,168,76,.12);
    --sidebar-bg:    #111318;
    --sidebar-w:     256px;
    --surface:       #F7F7F8;
    --border:        #E4E4E7;
    --text-primary:  #18181B;
    --text-secondary:#71717A;
    --text-muted:    #A1A1AA;
    --success:       #16A34A;
    --danger:        #DC2626;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:     0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
    --radius:        10px;
    --radius-lg:     14px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Roboto', -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

/* ── Layout wrapper ─────────────────────────────────────────── */
.layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Logo zone */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-decoration: none;
    flex-shrink: 0;
}
.sidebar-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.sidebar-logo-sub   { font-size: .68rem; color: rgba(255,255,255,.3); margin-top: 1px; }

/* Nav */
.sidebar-nav { flex: 1; padding: 10px 10px; }

.sidebar-label {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.2);
    padding: 16px 8px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 7px;
    font-size: .84rem;
    font-weight: 400;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    transition: background .15s, color .15s;
    margin-bottom: 1px;
    white-space: nowrap;
}
.sidebar-link .material-icons { font-size: 18px; flex-shrink: 0; }
.sidebar-link:hover {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.85);
}
.sidebar-link.is-active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 500;
}
.sidebar-link.is-active .material-icons { color: var(--accent); }

/* Collapsible group (Pages) */
.sidebar-group > summary { list-style: none; cursor: pointer; }
.sidebar-group > summary::-webkit-details-marker { display: none; }
.sidebar-group > summary.is-open { color: rgba(255,255,255,.85); }
.sidebar-caret { margin-left: auto; transition: transform .15s; }
.sidebar-group[open] .sidebar-caret { transform: rotate(180deg); }
.sidebar-sub {
    margin: 2px 0 6px 19px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,.08);
}
.sidebar-sublink {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: .8rem;
    color: rgba(255,255,255,.45);
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.sidebar-sublink:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.sidebar-sublink.is-active { background: var(--accent-light); color: var(--accent); font-weight: 500; }

/* Badge in nav */
.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #111;
    font-size: .6rem;
    font-weight: 700;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
}

/* User footer */
.sidebar-footer {
    padding: 12px 12px;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    color: #111;
    flex-shrink: 0;
}
.sidebar-user-name  { font-size: .8rem; font-weight: 500; color: rgba(255,255,255,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: .68rem; color: rgba(255,255,255,.3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout {
    background: none;
    border: none;
    color: rgba(255,255,255,.3);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    transition: color .15s, background .15s;
}
.sidebar-logout:hover { color: rgba(255,255,255,.7); background: rgba(255,255,255,.06); }
.sidebar-logout .material-icons { font-size: 17px; }

/* ── Main area ──────────────────────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 16px;
}
.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}
.topbar-breadcrumb {
    font-size: .75rem;
    color: var(--text-muted);
    margin: 0;
    margin-top: 1px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ── Scrollable content ─────────────────────────────────────── */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 32px;
}

/* ── Flash messages ─────────────────────────────────────────── */
.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 16px 28px 0;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 500;
    flex-shrink: 0;
}
.flash-success { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.flash-error   { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.flash .material-icons { font-size: 1rem; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    background: #fff;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    overflow: hidden;
}
.card + .card { margin-top: 0; }

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-primary);
}
.section-header .bar {
    width: 3px; height: 16px;
    border-radius: 2px;
    flex-shrink: 0;
}
.section-header .hint {
    margin-left: auto;
    font-size: .72rem;
    font-weight: 400;
    color: var(--text-muted);
}
.section-header .material-icons { font-size: 18px; color: var(--text-muted); }

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon .material-icons { font-size: 22px; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-secondary); margin-top: 3px; }
.stat-sub   { font-size: .72rem; margin-top: 3px; }

/* ── Tables ─────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr {
    background: #FAFAFA;
    border-bottom: 1px solid var(--border);
}
.data-table thead th {
    padding: 11px 16px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-secondary);
    white-space: nowrap;
}
.data-table tbody tr {
    border-bottom: 1px solid #F4F4F5;
    transition: background .1s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #FAFAFA; }
.data-table td { padding: 13px 16px; vertical-align: middle; }
.data-table .col-img { padding-left: 20px; }

/* ── Thumbnail ──────────────────────────────────────────────── */
.thumb {
    width: 44px; height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.thumb-placeholder {
    width: 44px; height: 44px;
    border-radius: 8px;
    background: #F4F4F5;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.thumb-placeholder .material-icons { font-size: 18px; color: var(--text-muted); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn { font-size: .83rem; font-weight: 500; border-radius: 8px !important; transition: all .15s; }

.btn-accent {
    background: var(--accent);
    color: #111;
    border: 1px solid var(--accent);
}
.btn-accent:hover, .btn-accent:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #111;
    box-shadow: 0 2px 8px rgba(201,168,76,.35);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--surface); color: var(--text-primary); }

.btn-icon {
    width: 32px; height: 32px;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 7px !important;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all .15s;
}
.btn-icon:hover { background: var(--surface); color: var(--text-primary); }
.btn-icon.btn-danger-ghost:hover { background: #FEF2F2; border-color: #FECACA; color: var(--danger); }
.btn-icon .material-icons { font-size: 16px; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge-pill {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-active   { background: #F0FDF4; color: #15803D; }
.badge-inactive { background: #F4F4F5; color: #71717A; }
.badge-new      { background: var(--accent); color: #111; }
.badge-cat {
    background: #F4F4F5;
    color: #52525B;
    font-size: .72rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── Status toggle button ───────────────────────────────────── */
.status-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

/* ── Toggle switch ──────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.toggle-info .toggle-name  { font-size: .875rem; font-weight: 500; color: var(--text-primary); }
.toggle-info .toggle-desc  { font-size: .72rem; color: var(--text-muted); margin-top: 1px; }
.toggle {
    position: relative;
    width: 42px; height: 23px;
    flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
    position: absolute; inset: 0;
    background: #D4D4D8;
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s;
}
.toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 17px; height: 17px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .2s;
    pointer-events: none;
}
.toggle input:checked ~ .toggle-track { background: var(--accent); }
.toggle input:checked ~ .toggle-thumb { transform: translateX(19px); }

/* ── Drop zone ──────────────────────────────────────────────── */
.drop-zone {
    border: 2px dashed #D4D4D8;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.drop-zone:hover {
    border-color: var(--accent);
    background: rgba(201,168,76,.04);
}
.drop-zone .material-icons { font-size: 32px; color: #A1A1AA; display: block; margin: 0 auto 6px; }
.drop-zone .dz-title { font-size: .82rem; font-weight: 500; color: var(--text-secondary); }
.drop-zone .dz-sub   { font-size: .72rem; color: var(--text-muted); margin-top: 3px; }

/* ── MDB Floating labels override ──────────────────────────── */
.form-outline { position: relative; }
.form-outline .form-control,
.form-outline .form-select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px 6px;
    font-size: .875rem;
    color: var(--text-primary);
    background: #fff;
    transition: border-color .15s;
    height: auto;
    min-height: 48px;
}
.form-outline .form-control:focus,
.form-outline .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
    outline: none;
}
.form-outline .form-label {
    position: absolute;
    top: 50%; left: 14px;
    font-size: .875rem;
    color: var(--text-muted);
    pointer-events: none;
    transform-origin: left center;
    transform: translateY(-50%);
    transition: all .15s;
    background: transparent;
    padding: 0;
    margin: 0;
    white-space: nowrap;
}
.form-outline .form-control:focus   ~ .form-label,
.form-outline .form-select:focus    ~ .form-label,
.form-outline .form-control:not(:placeholder-shown) ~ .form-label,
.form-outline .form-select:not([value=""]):valid    ~ .form-label {
    top: 0;
    left: 10px;
    transform: translateY(-50%) scale(.75);
    color: var(--accent);
    background: #fff;
    padding: 0 4px;
}
.form-outline .form-control.is-invalid { border-color: var(--danger); }
.form-outline textarea.form-control { min-height: 100px; padding-top: 20px; resize: vertical; }

/* Standalone (non-outline) inputs */
.form-control-plain {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .875rem;
    color: var(--text-primary);
    background: #fff;
    transition: border-color .15s;
}
.form-control-plain:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
    outline: none;
}
.form-label-plain {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ── Quill editor ───────────────────────────────────────────── */
.ql-toolbar.ql-snow {
    border: 1px solid var(--border) !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
    background: #FAFAFA;
    padding: 6px 10px !important;
}
.ql-container.ql-snow {
    border: 1px solid var(--border) !important;
    border-radius: 0 0 8px 8px !important;
    font-size: .875rem;
    color: var(--text-primary);
}
.ql-editor { min-height: 120px; }

/* ── Image preview grid ─────────────────────────────────────── */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.media-item {
    position: relative; border-radius: 8px; overflow: hidden;
    opacity: 0; transform: scale(.9);
    transition: opacity .2s ease, transform .2s ease;
}
.media-item.is-ready { opacity: 1; transform: scale(1); }
.media-item.is-marked { opacity: .3; }
.media-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.media-item-cap {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: .7rem;
    padding: 4px 8px;
    border: none;
    width: 100%;
}
.media-item-cap::placeholder { color: rgba(255,255,255,.5); }
.media-item-del {
    position: absolute; top: 6px; right: 6px;
    width: 20px; height: 20px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: .7rem;
    cursor: pointer;
    display: none;
    align-items: center; justify-content: center;
}
.media-item:hover .media-item-del { display: flex; }

/* ── Drop zone states ───────────────────────────────────────── */
@keyframes dz-spin { to { transform: rotate(360deg); } }
.drop-zone.dz-dragover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: scale(1.015);
}
.drop-zone.dz-loading {
    border-color: var(--accent);
    background: var(--accent-light);
    pointer-events: none;
}
.drop-zone.dz-loading .material-icons {
    animation: dz-spin .75s linear infinite;
    color: var(--accent);
}
.drop-zone.dz-done {
    border-color: var(--success);
    background: #F0FDF4;
}
.drop-zone.dz-done .material-icons { color: var(--success); }

/* Cover image loading spinner */
.cover-spinner {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cover-spinner .material-icons {
    font-size: 2rem; color: var(--accent);
    animation: dz-spin .75s linear infinite;
}

/* ── File count badge in section-header ─────────────────────── */
.file-count-badge {
    margin-left: auto;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: .68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(201,168,76,.25);
}

/* ── Toast notifications ────────────────────────────────────── */
#toast-stack {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast-msg {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: .83rem; font-weight: 500;
    box-shadow: var(--shadow-md);
    max-width: 320px;
    animation: toast-in .2s ease;
    pointer-events: all;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
    to { opacity: 0; transform: translateX(16px); }
}
.toast-success { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.toast-error   { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.toast-info    { background: var(--accent-light); color: var(--accent-dark); border: 1px solid rgba(201,168,76,.3); }
.toast-msg .material-icons { font-size: 1rem; flex-shrink: 0; }

/* ── Video row ──────────────────────────────────────────────── */
.video-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state { padding: 60px 20px; text-align: center; }
.empty-state .material-icons { font-size: 3rem; color: var(--text-muted); display: block; margin-bottom: 12px; }
.empty-state p { color: var(--text-secondary); font-size: .9rem; margin-bottom: 16px; }

/* ── List group ─────────────────────────────────────────────── */
.list-group-item {
    border: none !important;
    border-bottom: 1px solid #F4F4F5 !important;
    padding: 13px 20px !important;
    transition: background .1s;
}
.list-group-item:last-child { border-bottom: none !important; }
.list-group-item:hover { background: #FAFAFA; }
.list-group-item.is-unread { background: #FFFBEB; }
.list-group-item.is-unread:hover { background: #FFF8E1; }

/* ── Section divider ────────────────────────────────────────── */
.section-divider {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-top: 0;
}

/* ── Login page ─────────────────────────────────────────────── */
.login-body {
    min-height: 100vh;
    background: #111318;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo {
    width: 52px; height: 52px;
    background: var(--accent);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.login-logo .material-icons { font-size: 26px; color: #111; }

/* ── Card footer ────────────────────────────────────────────── */
.card-foot {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: #FAFAFA;
}

/* ── Pagination override ────────────────────────────────────── */
.pagination .page-link {
    border-radius: 6px !important;
    border-color: var(--border);
    color: var(--text-secondary);
    font-size: .8rem;
    padding: 5px 11px;
}
.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #111;
}

/* ── Hero Slides list ───────────────────────────────────────── */
.slide-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    transition: background .12s;
}
.slide-row:last-child { border-bottom: none; }
.slide-row:hover { background: var(--surface); }
.slide-thumb {
    width: 88px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--border);
}
.slide-info {
    flex: 1;
    min-width: 0;
}

/* ── Media type tabs (hero slides) ──────────────────────────── */
.media-type-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
}
.media-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .12s, color .12s;
    line-height: 1.1;
}
.media-tab .material-icons { font-size: 18px; }
.media-tab:hover { background: #fff; color: var(--text-secondary); }
.media-tab.is-active {
    background: #fff;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}
.media-tab.is-active .material-icons { color: var(--accent); }

.media-hint {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: .4rem;
}
.media-type-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .75rem;
}

/* ── Video entries (project create/edit) ────────────────────── */
.video-entry {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    transition: border-color .15s;
}
.video-entry:focus-within { border-color: var(--accent); }

.video-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.video-source-tabs {
    display: flex;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 3px;
}
.vsrc-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: none;
    background: transparent;
    border-radius: 5px;
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.vsrc-tab .material-icons { font-size: 14px; }
.vsrc-tab:hover { background: var(--surface); color: var(--text-secondary); }
.vsrc-tab.is-active { background: var(--accent-light); color: var(--accent); }
.vsrc-tab.is-active .material-icons { color: var(--accent); }

.yt-preview-box {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 16/9;
    max-height: 160px;
}

/* Existing video rows in edit */
.video-existing-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    transition: opacity .15s;
}
.video-existing-row.is-marked { opacity: .35; }
.del-label {
    font-size: .75rem;
    color: var(--danger);
    cursor: pointer;
    white-space: nowrap;
}
.del-label input { accent-color: var(--danger); }

/* ── Articles — éditeur Quill & media-type toggle ─────────── */
.ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; border-color: var(--border); background: var(--bg); }
.ql-container.ql-snow { border-radius: 0 0 8px 8px; border-color: var(--border); font-size: .9rem; }
.ql-editor { min-height: 280px; }
.media-type-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: border-color .15s, color .15s, background .15s;
    user-select: none;
}
.media-type-btn:hover { border-color: var(--accent); color: var(--accent); }
.media-type-btn.is-active { border-color: var(--accent); background: #FFF7ED; color: var(--accent); }
.media-type-btn .material-icons { font-size: 1.1rem; }

/* ── Équipe — photo preview & thumb rond ──────────────────── */
.thumb-round {
    border-radius: 50% !important;
    object-fit: cover;
    width: 44px;
    height: 44px;
}
.thumb-placeholder.thumb-round {
    border-radius: 50%;
    width: 44px;
    height: 44px;
}
.team-photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.team-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-photo-preview .material-icons {
    font-size: 2.2rem;
    color: var(--text-secondary);
}
