/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

/* ========================================
   VIMEDIO — Theme Variables
   ======================================== */
:root,
[data-theme="dark"] {
    --vm-bg: #0F0F1A;
    --vm-surface: #1A1A2E;
    --vm-surface-2: #252540;
    --vm-surface-3: #2A2A45;
    --vm-border: #2D2D4A;
    --vm-accent: #E53E3E;
    --vm-accent-hover: #C53030;
    --vm-accent-bg: rgba(229, 62, 62, 0.12);
    --vm-text: #FFFFFF;
    --vm-text-2: #9CA3AF;
    --vm-text-3: #6B7280;
    --vm-hover: rgba(255, 255, 255, 0.05);
    --vm-shadow: rgba(0, 0, 0, 0.4);
    --vm-logo-text: #FFFFFF;
    --vm-avatar-bg: #E53E3E;
    --vm-input-bg: #2A2A45;
    --vm-input-border: #2D2D4A;
    --vm-input-text: #FFFFFF;
    --vm-input-placeholder: #6B7280;
    --vm-featured-gradient: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    --vm-chip-border: #2D2D4A;
    --vm-chip-text: #9CA3AF;
    --vm-chip-hover-bg: rgba(255, 255, 255, 0.06);
    --vm-auth-shadow: rgba(0, 0, 0, 0.5);
    --vm-error-bg: rgba(229, 62, 62, 0.15);
    --vm-error-border: rgba(229, 62, 62, 0.3);
    --vm-error-text: #FC8181;
}

[data-theme="light"] {
    --vm-bg: #F7F7FA;
    --vm-surface: #FFFFFF;
    --vm-surface-2: #F0F0F5;
    --vm-surface-3: #E8E8F0;
    --vm-border: #E2E2EA;
    --vm-accent: #E53E3E;
    --vm-accent-hover: #C53030;
    --vm-accent-bg: rgba(229, 62, 62, 0.08);
    --vm-text: #1A202C;
    --vm-text-2: #6B7280;
    --vm-text-3: #9CA3AF;
    --vm-hover: rgba(0, 0, 0, 0.04);
    --vm-shadow: rgba(0, 0, 0, 0.08);
    --vm-logo-text: #1A202C;
    --vm-avatar-bg: #E53E3E;
    --vm-input-bg: #F0F0F5;
    --vm-input-border: #E2E2EA;
    --vm-input-text: #1A202C;
    --vm-input-placeholder: #9CA3AF;
    --vm-featured-gradient: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    --vm-chip-border: #E2E2EA;
    --vm-chip-text: #6B7280;
    --vm-chip-hover-bg: rgba(0, 0, 0, 0.04);
    --vm-auth-shadow: rgba(0, 0, 0, 0.12);
    --vm-error-bg: #FFF5F5;
    --vm-error-border: #FEB2B2;
    --vm-error-text: #C53030;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--vm-text);
    background: var(--vm-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

.app { display: flex; flex: 1; min-height: 0; }

/* Sidebar */
.sidebar {
    width: 300px;
    min-width: 300px;
    border-right: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #fff;
}
.sidebar-header {
    padding: 16px 20px;
}
.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 2px solid #E53E3E;
    border-radius: 20px;
    background: #fff;
    color: #E53E3E;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.btn-refresh:hover { background: #FFF5F5; }
.sidebar-search {
    padding: 0 8px 8px;
}
.search-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
    font-size: 13px;
    color: #1A202C;
    background: #FFFFFF;
    outline: none;
    box-sizing: border-box;
}
.search-input:focus {
    border-color: #E53E3E;
}
.search-input::placeholder {
    color: #A0AEC0;
}
.search-results {
    padding-top: 4px;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    font-size: 13px;
    color: #4A5568;
    border-radius: 4px;
    cursor: pointer;
}
.search-result-item:hover {
    background: #F7FAFC;
}
.search-result-path {
    margin-left: auto;
    font-size: 11px;
    color: #A0AEC0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.search-empty {
    padding: 8px;
    font-size: 13px;
    color: #A0AEC0;
}
.sidebar-tree {
    flex: 1;
    padding: 0 8px 16px;
    overflow-y: auto;
}
.storage-section {
    margin-bottom: 12px;
}
.storage-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #718096;
    padding: 10px 8px 4px;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 4px;
}
.tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tree-list .tree-list {
    padding-left: 20px;
}
.tree-item { padding: 2px 0; }
.tree-folder-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #1A202C;
    width: 100%;
    text-align: left;
    border-radius: 4px;
}
.tree-folder-toggle:hover { background: #F7FAFC; }
.tree-folder-toggle .arrow {
    display: inline-block;
    width: 16px;
    font-size: 10px;
    color: #718096;
    transition: transform .15s;
    flex-shrink: 0;
}
.tree-folder-toggle.open .arrow { transform: rotate(90deg); }
.tree-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 14px;
    color: #4A5568;
    border-radius: 4px;
    cursor: pointer;
}
.tree-link:hover { background: #F7FAFC; }
.tree-link.active { color: #E53E3E; background: #FFF5F5; }
.tree-note {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 28px;
    font-size: 14px;
    color: #4A5568;
    border-radius: 4px;
    cursor: pointer;
}
.tree-note:hover { background: #F7FAFC; }
.tree-note.active { background: #EDF2F7; color: #E53E3E; font-weight: 500; }
.tree-note-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #A0AEC0;
}
.tree-children { display: none; }
.tree-children.open { display: block; }

/* Content area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
}
.content-header {
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
}
.content-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #2D3748;
}
.tab-bar {
    display: flex;
    align-items: center;
    padding: 0;
    background: #F7FAFC;
    border-bottom: 1px solid #E2E8F0;
}
.tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: #4A5568;
    background: #fff;
    border-right: 1px solid #E2E8F0;
}
.tab-close {
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    cursor: pointer;
    color: #A0AEC0;
    font-size: 16px;
    line-height: 1;
}
.tab-close:hover { color: #E53E3E; }
.nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
}
.nav-arrow {
    width: 28px;
    height: 28px;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 14px;
}
.nav-arrow:hover { background: #F7FAFC; }
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #718096;
    margin-left: 8px;
}
.breadcrumbs span { color: #A0AEC0; }
.content-body {
    padding: 24px 32px;
}
.content-body h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.tags { display: flex; gap: 8px; margin-bottom: 20px; }
.tag {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #E53E3E;
    border-radius: 16px;
    font-size: 13px;
    color: #E53E3E;
}
.content-body p { font-size: 15px; line-height: 1.7; margin-bottom: 8px; }
.content-body h2 { font-size: 22px; font-weight: 600; margin: 20px 0 12px; }
.content-body ul { padding-left: 24px; margin-bottom: 12px; }
.content-body li { font-size: 15px; line-height: 1.7; }
.welcome-message {
    color: #718096;
    font-size: 15px;
    margin-top: 40px;
    text-align: center;
}

/* Footer */
.footer {
    background: #E2E8F0;
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #718096;
}
.footer a { color: #718096; }
.footer a:hover { color: #4A5568; }

/* User menu */
.user-menu {
    font-size: 13px;
    color: #718096;
}
.user-menu a {
    color: #E53E3E;
    margin-left: 12px;
}
.user-menu a:hover { text-decoration: underline; }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table th, .table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #E2E8F0;
}
.table th {
    font-weight: 600;
    color: #2D3748;
    background: #F7FAFC;
}
.table td { color: #4A5568; }
.table tr:hover td { background: #FAFAFA; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary {
    background: #E53E3E;
    color: #fff;
}
.btn-primary:hover { background: #C53030; }
.btn-outline {
    background: #fff;
    border: 1px solid #E2E8F0;
    color: #4A5568;
}
.btn-outline:hover { background: #F7FAFC; }
.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #2D3748;
    margin-bottom: 4px;
}
.form-control {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 14px;
    color: #1A202C;
}
.form-control:focus {
    outline: none;
    border-color: #E53E3E;
    box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.1);
}
select.form-control {
    max-width: 200px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}
.badge-green { background: #C6F6D5; color: #276749; }
.badge-gray { background: #E2E8F0; color: #718096; }
.badge-red { background: #FED7D7; color: #9B2C2C; }

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #C6F6D5; color: #276749; }
.alert-error { background: #FED7D7; color: #9B2C2C; }
.alert-info { background: #E6FFFA; color: #234E52; }

/* Access editor */
.user-info-card {
    background: #F7FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.user-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
}
.user-info-label {
    font-weight: 600;
    color: #2D3748;
    min-width: 120px;
}

/* Layout helpers */
.content-max-width {
    max-width: 980px;
    margin: 0 auto;
}
.heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.form-error-list {
    margin-top: 8px;
    padding-left: 18px;
}
.form-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ========================================
   VIMEDIO — Global Header
   ======================================== */
.vm-header {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid #E2E8F0;
}
.vm-header-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    color: #2D3748;
    flex-shrink: 0;
    transition: background .15s;
}
.vm-header-burger:hover { background: #F7FAFC; }
.vm-header-burger svg { width: 20px; height: 20px; }
.vm-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1A202C;
}
.vm-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #E53E3E;
    border-radius: 6px;
}
.vm-logo-mark svg { width: 14px; height: 14px; fill: #fff; }
.vm-header-search {
    flex: 1;
    max-width: 540px;
    margin: 0 auto;
    display: flex;
}
.vm-search-form {
    display: flex;
    width: 100%;
    height: 38px;
}
.vm-search-input {
    flex: 1;
    padding: 0 14px;
    border: 1px solid #E2E8F0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    color: #1A202C;
    background: #F7FAFC;
    outline: none;
    transition: border-color .15s, background .15s;
}
.vm-search-input::placeholder { color: #A0AEC0; }
.vm-search-input:focus {
    border-color: #E53E3E;
    background: #fff;
}
.vm-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    border: 1px solid #E2E8F0;
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: #F7FAFC;
    cursor: pointer;
    color: #718096;
    transition: background .15s, color .15s;
}
.vm-search-btn:hover { background: #E2E8F0; color: #2D3748; }
.vm-search-btn svg { width: 18px; height: 18px; }
.vm-header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.vm-header-nav-link {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #4A5568;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.vm-header-nav-link:hover { background: #F7FAFC; color: #1A202C; }
.vm-header-nav-link.active { color: #E53E3E; background: #FFF5F5; }
.vm-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-left: 8px;
    border-left: 1px solid #E2E8F0;
    margin-left: 4px;
}
.vm-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2D3748;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}
.vm-header-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: #E53E3E;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s;
}
.vm-header-login:hover { background: #C53030; }

/* ========================================
   VIMEDIO — Collapsible Sidebar
   ======================================== */
.vm-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}
.vm-sidebar {
    width: 240px;
    min-width: 240px;
    background: #fff;
    border-right: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: width .2s ease, min-width .2s ease, opacity .2s ease;
}
.vm-sidebar.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    border-right: none;
}
.vm-sidebar-section {
    padding: 16px 14px 8px;
}
.vm-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #A0AEC0;
    padding: 0 8px 8px;
}
.vm-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.vm-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 14px;
    color: #4A5568;
    border-radius: 8px;
    transition: background .12s, color .12s;
    margin: 1px 6px;
}
.vm-sidebar-link:hover { background: #F7FAFC; color: #1A202C; }
.vm-sidebar-link.active { background: #FFF5F5; color: #E53E3E; font-weight: 600; }
.vm-sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
}
.vm-sidebar-link.active svg { opacity: 1; color: #E53E3E; }
.vm-sidebar-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 8px 14px;
}
.vm-sidebar-channel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
    color: #4A5568;
    border-radius: 8px;
    margin: 1px 6px;
    transition: background .12s;
}
.vm-sidebar-channel:hover { background: #F7FAFC; }
.vm-sidebar-channel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E53E3E;
    flex-shrink: 0;
}

/* ========================================
   VIMEDIO — Main Content Area
   ======================================== */
.vm-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    background: #F7FAFC;
}
.vm-content {
    max-width: 1360px;
    margin: 0 auto;
    padding: 28px 32px;
}

/* ========================================
   VIMEDIO — Hero (Guest)
   ======================================== */
.vm-hero {
    position: relative;
    background: #2D3748;
    padding: 72px 32px 64px;
    overflow: hidden;
}
.vm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 100%, rgba(229,62,62,0.12) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 80% 0%, rgba(229,62,62,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.vm-hero-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.vm-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(229,62,62,0.15);
    border: 1px solid rgba(229,62,62,0.25);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #FC8181;
    letter-spacing: 0.03em;
    margin-bottom: 24px;
}
.vm-hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}
.vm-hero h1 span {
    color: #E53E3E;
}
.vm-hero-sub {
    font-size: 17px;
    line-height: 1.6;
    color: #A0AEC0;
    max-width: 520px;
    margin: 0 auto 32px;
}
.vm-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.vm-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: transform .12s, box-shadow .15s, background .15s;
    cursor: pointer;
    border: none;
}
.vm-hero-btn:hover { transform: translateY(-1px); }
.vm-hero-btn-primary {
    background: #E53E3E;
    color: #fff;
    box-shadow: 0 4px 20px rgba(229,62,62,0.35);
}
.vm-hero-btn-primary:hover {
    background: #C53030;
    box-shadow: 0 6px 28px rgba(229,62,62,0.45);
}
.vm-hero-btn-ghost {
    background: rgba(255,255,255,0.08);
    color: #E2E8F0;
    border: 1px solid rgba(255,255,255,0.15);
}
.vm-hero-btn-ghost:hover {
    background: rgba(255,255,255,0.14);
}
.vm-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.vm-hero-stat-num {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}
.vm-hero-stat-label {
    font-size: 13px;
    color: #718096;
    margin-top: 2px;
}

/* ========================================
   VIMEDIO — Section Headers
   ======================================== */
.vm-section {
    margin-bottom: 36px;
}
.vm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.vm-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1A202C;
    letter-spacing: -0.01em;
    margin: 0;
}
.vm-section-link {
    font-size: 13px;
    font-weight: 600;
    color: #E53E3E;
    transition: color .12s;
}
.vm-section-link:hover { color: #C53030; }

/* ========================================
   VIMEDIO — Video Grid & Cards
   ======================================== */
.vm-video-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.vm-video-card {
    display: block;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    transition: transform .18s ease, box-shadow .18s ease;
}
.vm-video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(45,55,72,0.10);
}
.vm-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #2D3748;
    overflow: hidden;
}
.vm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vm-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .18s;
}
.vm-video-card:hover .vm-thumb-play { opacity: 1; }
.vm-thumb-play-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(229,62,62,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.vm-thumb-play-circle svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    margin-left: 2px;
}
.vm-thumb-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 2px 7px;
    background: rgba(0,0,0,0.75);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
}
.vm-card-body {
    padding: 12px 14px 14px;
}
.vm-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #1A202C;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vm-card-channel {
    font-size: 13px;
    color: #718096;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vm-card-channel:hover { color: #E53E3E; }
.vm-card-date {
    font-size: 12px;
    color: #A0AEC0;
}

/* ========================================
   VIMEDIO — Empty states
   ======================================== */
.vm-empty {
    text-align: center;
    padding: 48px 24px;
    color: #718096;
    font-size: 15px;
}
.vm-empty svg {
    width: 48px;
    height: 48px;
    color: #CBD5E0;
    margin-bottom: 12px;
}

/* ========================================
   VIMEDIO — Channel grid & cards
   ======================================== */
.vm-channel-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.vm-channel-card {
    display: flex; align-items: center; gap: 16px;
    padding: 20px; border-radius: 12px; background: #fff;
    border: 1px solid #E2E8F0; transition: transform .18s ease, box-shadow .18s ease;
}
.vm-channel-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(45,55,72,0.08); }
.vm-channel-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: #E53E3E; color: #fff; display: flex;
    align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; text-transform: uppercase; flex-shrink: 0;
}
.vm-channel-info { min-width: 0; }
.vm-channel-name { font-size: 15px; font-weight: 600; color: #1A202C; margin-bottom: 2px; }
.vm-channel-slug { font-size: 13px; color: #718096; }
.vm-channel-date { font-size: 12px; color: #A0AEC0; margin-top: 2px; }

/* ========================================
   VIMEDIO — Channel page header
   ======================================== */
.vm-channel-hero { padding: 32px 0 24px; border-bottom: 1px solid #E2E8F0; margin-bottom: 28px; }
.vm-channel-hero-handle { font-size: 14px; color: #718096; margin-bottom: 4px; }
.vm-channel-hero-title { font-size: 28px; font-weight: 800; color: #1A202C; letter-spacing: -0.02em; margin-bottom: 8px; }
.vm-channel-hero-desc { font-size: 15px; line-height: 1.6; color: #4A5568; max-width: 640px; }

/* ========================================
   VIMEDIO — Watch page restyled
   ======================================== */
.vm-watch-title { font-size: 24px; font-weight: 700; color: #1A202C; margin-bottom: 12px; letter-spacing: -0.01em; }
.vm-watch-description { font-size: 15px; line-height: 1.6; color: #4A5568; margin-bottom: 20px; }
.vm-watch-player-wrap { width: 100%; margin-bottom: 20px; }
.vm-watch-share-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border: 1px solid #E2E8F0; border-radius: 8px;
    background: #fff; cursor: pointer; font-size: 14px; color: #4A5568;
    transition: background .12s;
}
.vm-watch-share-toggle:hover { background: #F7FAFC; }
.vm-watch-share-panel {
    display: none; margin-top: 12px; padding: 16px;
    border: 1px solid #E2E8F0; border-radius: 12px; background: #F7FAFC;
}
.vm-watch-share-label { font-size: 13px; font-weight: 600; color: #2D3748; margin-bottom: 6px; }
.vm-watch-share-label + .vm-watch-share-label { margin-top: 14px; }
.vm-watch-share-textarea {
    width: 100%; min-height: 80px; padding: 10px 12px;
    border: 1px solid #E2E8F0; border-radius: 8px; font-family: monospace;
    font-size: 12px; color: #1A202C; background: #fff; resize: vertical;
}
.vm-watch-share-textarea-lg { min-height: 140px; }
.vm-watch-copy-btn {
    margin-top: 6px; padding: 6px 14px; border: 1px solid #E2E8F0;
    border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px;
    color: #4A5568; transition: background .12s;
}
.vm-watch-copy-btn:hover { background: #EDF2F7; }

/* ========================================
   VIMEDIO — Author channel pages
   ======================================== */
.vm-author-content-wide {
    max-width: 1180px;
}
.vm-author-content-narrow {
    max-width: 840px;
}

.vm-author-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 14px;
}
.vm-author-kicker {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #FFF5F5;
    color: #C53030;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}
.vm-author-title {
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #1A202C;
    margin: 0;
}
.vm-author-subtitle {
    margin-top: 8px;
    font-size: 14px;
    color: #718096;
}
.vm-author-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vm-author-panel {
    margin-bottom: 18px;
    padding: 22px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
}
.vm-author-panel-narrow {
    max-width: 840px;
}
.vm-author-panel-danger {
    border-color: #FEB2B2;
    background: #FFF5F5;
}
.vm-author-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #2D3748;
    margin-bottom: 12px;
}

.vm-channel-tabs {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 18px;
}
.vm-channel-tab {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #E2E8F0;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #4A5568;
    text-align: center;
    line-height: 1.2;
    transition: border-color .12s, color .12s, background .12s;
}
.vm-channel-tab:hover {
    border-color: #CBD5E0;
    background: #F7FAFC;
}
.vm-channel-tab.active {
    border-color: #FEB2B2;
    background: #FFF5F5;
    color: #C53030;
}

.vm-form-grid {
    display: grid;
    gap: 16px;
}
.vm-field {
    display: grid;
    gap: 6px;
}
.vm-label {
    font-size: 14px;
    font-weight: 600;
    color: #2D3748;
}
.vm-input,
.vm-textarea,
.vm-select {
    width: 100%;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #fff;
    color: #1A202C;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color .12s, box-shadow .12s;
}
.vm-input,
.vm-select {
    height: 42px;
    padding: 0 12px;
}
.vm-textarea {
    padding: 10px 12px;
    resize: vertical;
    min-height: 104px;
}
.vm-input:focus,
.vm-textarea:focus,
.vm-select:focus {
    outline: none;
    border-color: #E53E3E;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.14);
}
.vm-help {
    font-size: 12px;
    color: #718096;
}
.vm-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2D3748;
}
.vm-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #E53E3E;
}

.vm-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.vm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.vm-btn-sm {
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 8px;
}
.vm-btn-primary {
    background: #E53E3E;
    color: #fff;
}
.vm-btn-primary:hover {
    background: #C53030;
}
.vm-btn-ghost {
    border-color: #E2E8F0;
    background: #fff;
    color: #4A5568;
}
.vm-btn-ghost:hover {
    background: #F7FAFC;
    color: #1A202C;
}
.vm-btn-danger {
    background: #C53030;
    color: #fff;
}
.vm-btn-danger:hover {
    background: #9B2C2C;
}

.vm-error {
    margin-bottom: 16px;
    border: 1px solid #FEB2B2;
    background: #FFF5F5;
    border-radius: 12px;
    padding: 14px 16px;
    color: #9B2C2C;
    font-size: 14px;
}
.vm-error-title {
    font-weight: 700;
    margin-bottom: 6px;
}
.vm-error-list {
    margin: 0;
    padding-left: 18px;
}

.vm-author-meta {
    display: grid;
    gap: 8px;
}
.vm-author-meta-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #EDF2F7;
}
.vm-author-meta-row:last-child {
    border-bottom: none;
}
.vm-author-meta-row-top {
    align-items: start;
}
.vm-author-meta-label {
    font-size: 13px;
    font-weight: 600;
    color: #718096;
}
.vm-author-meta-value {
    font-size: 14px;
    color: #2D3748;
    line-height: 1.6;
}
.vm-author-value-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}

.vm-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.vm-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.vm-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.vm-status-pill.is-ready {
    background: #C6F6D5;
    color: #22543D;
}
.vm-status-pill.is-processing {
    background: #FEEBC8;
    color: #9C4221;
}
.vm-status-pill.is-error {
    background: #FED7D7;
    color: #9B2C2C;
}
.vm-status-pill.is-muted {
    background: #EDF2F7;
    color: #4A5568;
}

.vm-table-wrap {
    overflow-x: auto;
}
.vm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.vm-table th,
.vm-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #EDF2F7;
    vertical-align: middle;
}
.vm-table th {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #718096;
}
.vm-table-title {
    font-weight: 600;
    color: #1A202C;
    margin-bottom: 3px;
}
.vm-table-meta {
    font-size: 12px;
    color: #718096;
}

.vm-progress {
    width: 130px;
    height: 6px;
    border-radius: 999px;
    background: #EDF2F7;
    overflow: hidden;
    margin-bottom: 4px;
}
.vm-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #FC8181 0%, #E53E3E 100%);
}
.vm-progress-label {
    font-size: 12px;
    color: #718096;
}

.vm-warning-text {
    color: #742A2A;
    line-height: 1.6;
}

.vm-muted {
    color: #A0AEC0;
}

.vm-author-channel-grid .vm-author-channel-card {
    align-items: flex-start;
}

/* ========================================
   VIMEDIO — Login/Register branding
   ======================================== */
.vm-auth-body {
    background: #2D3748; min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.vm-auth-logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 28px; font-weight: 800; color: #fff;
    letter-spacing: -0.03em; margin-bottom: 32px;
    text-decoration: none;
}
.vm-auth-logo .vm-logo-mark { width: 36px; height: 36px; border-radius: 8px; }
.vm-auth-card {
    background: #fff; border-radius: 16px; padding: 40px;
    width: 420px; max-width: 92vw;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.vm-auth-card h1 {
    color: #E53E3E; text-align: center;
    font-size: 24px; font-weight: 700; margin-bottom: 24px;
}

/* ========================================
   VIMEDIO — Footer
   ======================================== */
.vm-footer {
    padding: 16px 24px;
    text-align: right;
    font-size: 13px;
    color: #A0AEC0;
    border-top: 1px solid #E2E8F0;
    background: #fff;
}
.vm-footer a { color: #718096; transition: color .12s; }
.vm-footer a:hover { color: #E53E3E; }

/* ========================================
   VIMEDIO — Sidebar overlay (mobile)
   ======================================== */
.vm-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 149;
}
.vm-sidebar-overlay.open { display: block; }

/* ========================================
   VIMEDIO — Theme Overrides
   ======================================== */
.vm-header {
    background: var(--vm-surface);
    border-bottom-color: var(--vm-border);
}
.vm-header-burger {
    color: var(--vm-text-2);
}
.vm-header-burger:hover {
    background: var(--vm-hover);
}
.vm-logo {
    color: var(--vm-logo-text);
}
.vm-search-input {
    border-color: var(--vm-input-border);
    background: var(--vm-input-bg);
    color: var(--vm-input-text);
}
.vm-search-input::placeholder {
    color: var(--vm-input-placeholder);
}
.vm-search-input:focus {
    border-color: var(--vm-accent);
    background: var(--vm-surface);
}
.vm-search-btn {
    border-color: var(--vm-input-border);
    background: var(--vm-input-bg);
    color: var(--vm-text-3);
}
.vm-search-btn:hover {
    background: var(--vm-surface-2);
    color: var(--vm-text);
}
.vm-header-nav-link {
    color: var(--vm-text-2);
}
.vm-header-nav-link:hover {
    background: var(--vm-hover);
    color: var(--vm-text);
}
.vm-header-nav-link.active {
    color: var(--vm-accent);
    background: var(--vm-accent-bg);
}
.vm-header-user {
    border-left-color: var(--vm-border);
}
.vm-avatar {
    background: var(--vm-avatar-bg);
    color: #fff;
}
.vm-header-login {
    background: var(--vm-accent);
}
.vm-header-login:hover {
    background: var(--vm-accent-hover);
}

.vm-sidebar {
    background: var(--vm-surface);
    border-right-color: var(--vm-border);
}
.vm-sidebar-label {
    color: var(--vm-text-3);
}
.vm-sidebar-link {
    color: var(--vm-text-2);
}
.vm-sidebar-link:hover {
    background: var(--vm-hover);
    color: var(--vm-text);
}
.vm-sidebar-link.active {
    background: var(--vm-accent-bg);
    color: var(--vm-accent);
}
.vm-sidebar-link.active svg {
    color: var(--vm-accent);
}
.vm-sidebar-divider {
    background: var(--vm-border);
}
.vm-sidebar-channel {
    color: var(--vm-text-2);
}
.vm-sidebar-channel:hover {
    background: var(--vm-hover);
}

.vm-main {
    background: var(--vm-bg);
}

.vm-section-title {
    color: var(--vm-accent);
}
.vm-section-link {
    color: var(--vm-text-2);
}
.vm-section-link:hover {
    color: var(--vm-accent);
}
.vm-section-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: var(--vm-text-3);
}

.vm-video-card {
    background: var(--vm-surface);
    border-color: var(--vm-border);
}
.vm-video-card:hover {
    box-shadow: 0 8px 30px var(--vm-shadow);
}
.vm-thumb {
    background: var(--vm-surface-2);
}
.vm-card-title {
    color: var(--vm-text);
}
.vm-card-channel {
    color: var(--vm-text-2);
}
.vm-card-channel:hover {
    color: var(--vm-accent);
}
.vm-card-date {
    color: var(--vm-text-3);
}

.vm-empty svg,
.vm-empty p {
    color: var(--vm-text-3);
}

.vm-channel-card {
    background: var(--vm-surface);
    border-color: var(--vm-border);
}
.vm-channel-card:hover {
    box-shadow: 0 6px 24px var(--vm-shadow);
}
.vm-channel-name {
    color: var(--vm-text);
}
.vm-channel-slug {
    color: var(--vm-text-2);
}
.vm-channel-date {
    color: var(--vm-text-3);
}

.vm-channel-hero {
    border-bottom-color: var(--vm-border);
}
.vm-channel-hero-handle {
    color: var(--vm-text-2);
}
.vm-channel-hero-title {
    color: var(--vm-text);
}
.vm-channel-hero-desc {
    color: var(--vm-text-2);
}

.vm-watch-title {
    color: var(--vm-text);
}
.vm-watch-description {
    color: var(--vm-text-2);
}
.vm-watch-share-toggle {
    border-color: var(--vm-border);
    background: var(--vm-surface);
    color: var(--vm-text-2);
}
.vm-watch-share-toggle:hover {
    background: var(--vm-surface-2);
}
.vm-watch-share-panel {
    border-color: var(--vm-border);
    background: var(--vm-surface);
}
.vm-watch-share-label {
    color: var(--vm-text);
}
.vm-watch-share-textarea {
    border-color: var(--vm-border);
    background: var(--vm-bg);
    color: var(--vm-text);
}
.vm-watch-copy-btn {
    border-color: var(--vm-border);
    background: var(--vm-surface);
    color: var(--vm-text-2);
}
.vm-watch-copy-btn:hover {
    background: var(--vm-surface-2);
}

.vm-footer {
    border-top-color: var(--vm-border);
    background: var(--vm-bg);
    color: var(--vm-text-3);
}
.vm-footer a {
    color: var(--vm-text-3);
}
.vm-footer a:hover {
    color: var(--vm-accent);
}

.vm-sidebar-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* ========================================
   VIMEDIO — Featured Banner
   ======================================== */
.vm-featured-wrap {
    margin-bottom: 36px;
}
.vm-featured-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--vm-text-3);
    margin-bottom: 10px;
}
.vm-featured {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
}
.vm-featured-main {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    display: block;
    background: var(--vm-surface-2);
}
.vm-featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vm-featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: var(--vm-featured-gradient);
}
.vm-featured-badge {
    display: inline-block;
    padding: 4px 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: var(--vm-accent);
}
.vm-featured-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}
.vm-featured-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.vm-featured-side-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--vm-surface-2);
}
.vm-featured-side-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vm-featured-side-card .vm-featured-overlay {
    padding: 16px;
}
.vm-featured-side-card .vm-featured-title {
    font-size: 16px;
}

/* ========================================
   VIMEDIO — Discover Chips
   ======================================== */
.vm-discover-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.vm-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--vm-chip-border);
    background: transparent;
    color: var(--vm-chip-text);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.vm-chip:hover {
    background: var(--vm-chip-hover-bg);
    color: var(--vm-text);
}
.vm-chip.active {
    background: var(--vm-accent);
    border-color: var(--vm-accent);
    color: #fff;
}

/* ========================================
   VIMEDIO — Theme Toggle
   ======================================== */
.vm-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    color: var(--vm-text-2);
    transition: background .15s, color .15s;
}
.vm-theme-toggle:hover {
    background: var(--vm-hover);
    color: var(--vm-text);
}
.vm-theme-toggle svg {
    width: 20px;
    height: 20px;
}
.vm-theme-toggle .vm-icon-sun {
    display: block;
}
.vm-theme-toggle .vm-icon-moon {
    display: none;
}
[data-theme="light"] .vm-theme-toggle .vm-icon-sun {
    display: none;
}
[data-theme="light"] .vm-theme-toggle .vm-icon-moon {
    display: block;
}

/* ========================================
   VIMEDIO — Auth Form Controls
   ======================================== */
.vm-auth-body {
    background: var(--vm-bg);
}
.vm-auth-logo {
    color: var(--vm-logo-text);
}
.vm-auth-card {
    background: var(--vm-surface);
    box-shadow: 0 8px 40px var(--vm-auth-shadow);
}
.vm-auth-card h1 {
    color: var(--vm-accent);
}
.vm-auth-card .form-group label {
    color: var(--vm-text);
}
.vm-auth-card .form-group input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--vm-input-border);
    border-radius: 10px;
    background: var(--vm-input-bg);
    color: var(--vm-input-text);
    font-size: 14px;
}
.vm-auth-card .form-group input:focus {
    outline: none;
    border-color: var(--vm-accent);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}
.vm-auth-card .form-group input::placeholder {
    color: var(--vm-input-placeholder);
}
.btn-login {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    background: var(--vm-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s;
}
.btn-login:hover {
    background: var(--vm-accent-hover);
}
.error-message {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--vm-error-border);
    border-radius: 10px;
    background: var(--vm-error-bg);
    color: var(--vm-error-text);
    font-size: 14px;
}
.vm-auth-card .tree-link {
    color: var(--vm-text-2);
}
.vm-auth-card .tree-link:hover {
    color: var(--vm-accent);
}
.vm-auth-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    border-top: none;
    background: transparent;
}

/* ========================================
   VIMEDIO — Author Theme Overrides
   ======================================== */
.vm-author-kicker {
    background: var(--vm-accent-bg);
    color: var(--vm-accent);
}
.vm-author-title {
    color: var(--vm-text);
}
.vm-author-subtitle {
    color: var(--vm-text-2);
}

.vm-author-panel {
    background: var(--vm-surface);
    border-color: var(--vm-border);
}
.vm-author-panel-danger {
    border-color: var(--vm-error-border);
    background: var(--vm-error-bg);
}
.vm-author-panel-title {
    color: var(--vm-text);
}

.vm-channel-tab {
    border-color: var(--vm-border);
    background: var(--vm-surface);
    color: var(--vm-text-2);
}
.vm-channel-tab:hover {
    border-color: var(--vm-text-3);
    background: var(--vm-hover);
    color: var(--vm-text);
}
.vm-channel-tab.active {
    border-color: var(--vm-accent);
    background: var(--vm-accent-bg);
    color: var(--vm-accent);
}

.vm-label {
    color: var(--vm-text);
}
.vm-input,
.vm-textarea,
.vm-select {
    border-color: var(--vm-input-border);
    background: var(--vm-input-bg);
    color: var(--vm-input-text);
}
.vm-help {
    color: var(--vm-text-2);
}
.vm-checkbox {
    color: var(--vm-text);
}

.vm-btn-ghost {
    border-color: var(--vm-border);
    background: var(--vm-surface);
    color: var(--vm-text-2);
}
.vm-btn-ghost:hover {
    background: var(--vm-surface-2);
    color: var(--vm-text);
}

.vm-error {
    border-color: var(--vm-error-border);
    background: var(--vm-error-bg);
    color: var(--vm-error-text);
}

.vm-author-meta-row {
    border-bottom-color: var(--vm-border);
}
.vm-author-meta-label {
    color: var(--vm-text-2);
}
.vm-author-meta-value {
    color: var(--vm-text);
}

.vm-status-pill.is-muted {
    background: var(--vm-surface-2);
    color: var(--vm-text-2);
}

.vm-table th,
.vm-table td {
    border-bottom-color: var(--vm-border);
}
.vm-table th {
    color: var(--vm-text-2);
}
.vm-table td {
    color: var(--vm-text);
}
.vm-table-title {
    color: var(--vm-text);
}
.vm-table-meta {
    color: var(--vm-text-2);
}

.vm-progress {
    background: var(--vm-surface-3);
}
.vm-progress-label {
    color: var(--vm-text-2);
}

.vm-warning-text {
    color: var(--vm-error-text);
}
.vm-muted {
    color: var(--vm-text-3);
}

/* Legacy home classes (keep for compatibility) */
.home-sidebar-title {
    font-weight: 600;
    margin-bottom: 8px;
}
.home-sidebar-note {
    padding: 8px 12px;
    color: #718096;
    font-size: 14px;
}
.home-header-title {
    padding: 14px 18px;
    font-size: 20px;
    font-weight: 600;
}
.home-section {
    margin-bottom: 28px;
}
.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.home-section-title {
    margin: 0;
}
.home-video-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.home-video-grid-wide {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.home-video-card {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}
.home-video-title {
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.35;
}
.home-video-meta {
    font-size: 12px;
    color: #718096;
    margin-bottom: 6px;
}
.home-video-date {
    font-size: 12px;
    color: #a0aec0;
}

/* Public pages */
.public-page-title {
    font-size: 28px;
    margin-bottom: 16px;
}
.public-channel-handle {
    font-size: 32px;
    margin-bottom: 6px;
}
.public-channel-title {
    font-size: 24px;
    margin-bottom: 12px;
}
.public-channel-description {
    color: #4A5568;
    margin-bottom: 18px;
}

/* Playback watch page */
.watch-title {
    font-size: 30px;
    margin-bottom: 16px;
}
.watch-content {
    width: 75vw;
    min-width: 75vw;
    max-width: 75vw;
}
.watch-description {
    margin-bottom: 16px;
    color: #444;
}
.watch-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    background: #000;
}
.watch-player-container {
    width: 100%;
}
.watch-content .video-js {
    width: 100%;
    max-width: 100%;
}
.watch-share-wrap {
    margin-top: 12px;
}
.watch-share-toggle {
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}
.watch-share-panel {
    display: none;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    background: #fafafa;
}
.watch-share-heading {
    font-weight: 600;
    margin-bottom: 6px;
}
.watch-share-heading-second {
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 6px;
}
.watch-share-textarea {
    width: 100%;
    min-height: 84px;
    font-family: monospace;
    font-size: 12px;
    padding: 8px;
}
.watch-share-textarea-large {
    width: 100%;
    min-height: 160px;
    font-family: monospace;
    font-size: 12px;
    padding: 8px;
}
.watch-copy-btn {
    margin-top: 8px;
    padding: 6px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

/* Author pages */
.author-delete-question {
    margin-bottom: 18px;
}
.author-top-margin {
    margin-top: 14px;
}
.author-about-first-col {
    width: 220px;
}
.auth-login-link-wrap {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

/* Note content (markdown) */
.content-body .note-title { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 600; color: #1A202C; border-bottom: 2px solid #E2E8F0; padding-bottom: 0.5rem; }
.content-body .note-content h1 { font-size: 1.6rem; margin: 1.5rem 0 0.75rem; color: #1A202C; }
.content-body .note-content h2 { font-size: 1.35rem; margin: 1.25rem 0 0.6rem; color: #1A202C; }
.content-body .note-content h3 { font-size: 1.15rem; margin: 1rem 0 0.5rem; color: #1A202C; }
.content-body .note-content p { margin: 0.5rem 0; line-height: 1.7; }
.content-body .note-content ul,
.content-body .note-content ol { padding-left: 1.5rem; margin: 0.5rem 0; }
.content-body .note-content li { margin: 0.25rem 0; line-height: 1.6; }
.content-body .note-content code { background: #EDF2F7; padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.9em; color: #E53E3E; }
.content-body .note-content pre { background: #2D3748; color: #E2E8F0; padding: 1rem; border-radius: 6px; overflow-x: auto; margin: 0.75rem 0; }
.content-body .note-content pre code { background: none; color: inherit; padding: 0; }
.content-body .note-content blockquote { border-left: 4px solid #E53E3E; padding: 0.5rem 1rem; margin: 0.75rem 0; background: #FFF5F5; color: #718096; }
.content-body .note-content table { border-collapse: collapse; width: 100%; margin: 0.75rem 0; }
.content-body .note-content th,
.content-body .note-content td { border: 1px solid #E2E8F0; padding: 0.5rem 0.75rem; text-align: left; }
.content-body .note-content th { background: #F7FAFC; font-weight: 600; }
.content-body .note-content a { color: #E53E3E; text-decoration: none; }
.content-body .note-content a:hover { text-decoration: underline; }
.content-body .note-content img { max-width: 100%; height: auto; border-radius: 4px; }
.content-body .note-content .internal-link { color: #E53E3E; text-decoration: none; cursor: pointer; border-bottom: 1px dashed #E53E3E; }
.content-body .note-content .internal-link:hover { text-decoration: none; border-bottom-style: solid; }
.content-body .note-content .internal-link-broken { color: #A0AEC0; border-bottom: 1px dashed #A0AEC0; }
.content-body .loading { color: #718096; font-style: italic; }
.content-body .error { color: #E53E3E; }

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #E53E3E;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
}
.sidebar-toggle svg { width: 22px; height: 22px; }
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}

/* Responsive */
@media (max-width: 768px) {
    /* Public layout */
    .app { flex-direction: column; }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 100;
        width: 280px;
        min-width: 280px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 16px rgba(0,0,0,0.15);
    }
    .sidebar-overlay.open { display: block; }
    .sidebar-toggle { display: flex; }
    .main-content { min-height: 0; }
    .content-body { padding: 16px; }
    .content-body h1 { font-size: 22px; }
    .content-body h2 { font-size: 18px; }
    .watch-content {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
    .user-menu { font-size: 12px; }
    .table { font-size: 13px; }
    .table th, .table td { padding: 8px; }
    .form-control { max-width: 100%; }
    select.form-control { max-width: 100%; }
    .footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        padding: 12px 16px;
    }

    /* Note content */
    .content-body .note-title { font-size: 1.2rem; }
    .content-body .note-content pre { font-size: 13px; padding: 0.75rem; }
    .content-body .note-content table { display: block; overflow-x: auto; }

    /* VIMEDIO header */
    .vm-header { padding: 0 12px; gap: 8px; }
    .vm-header-search { display: none; }
    .vm-header-nav-link { display: none; }
    .vm-logo { font-size: 17px; }

    /* VIMEDIO sidebar */
    .vm-sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        bottom: 0;
        z-index: 150;
        width: 260px;
        min-width: 260px;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: none;
    }
    .vm-sidebar.collapsed { transform: translateX(-100%); opacity: 1; }
    .vm-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        width: 260px;
        min-width: 260px;
        opacity: 1;
        overflow-y: auto;
    }
    .vm-sidebar-overlay.open { display: block; z-index: 149; }

    /* VIMEDIO hero */
    .vm-hero { padding: 48px 20px 40px; }
    .vm-hero h1 { font-size: 30px; }
    .vm-hero-sub { font-size: 15px; }
    .vm-hero-stats { gap: 24px; margin-top: 32px; padding-top: 24px; }
    .vm-hero-stat-num { font-size: 22px; }

    /* VIMEDIO content */
    .vm-content { padding: 20px 16px; }
    .vm-video-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
    .vm-section-title { font-size: 18px; }
    .vm-theme-toggle { width: 34px; height: 34px; }

    .vm-featured {
        grid-template-columns: 1fr;
    }
    .vm-featured-side {
        display: none;
    }
    .vm-featured-overlay {
        padding: 16px;
    }
    .vm-featured-title {
        font-size: 18px;
    }

    .vm-author-title { font-size: 24px; }
    .vm-author-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .vm-channel-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .vm-channel-tab {
        flex: 0 0 132px;
        white-space: nowrap;
    }
    .vm-author-panel {
        padding: 16px;
    }
    .vm-author-panel-narrow {
        max-width: 100%;
    }
    .vm-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .vm-author-meta-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .vm-table {
        min-width: 860px;
    }
    .vm-progress {
        width: 100px;
    }

    /* VIMEDIO channel grid */
    .vm-channel-grid { grid-template-columns: 1fr; }

    /* VIMEDIO auth */
    .vm-auth-card { padding: 24px 20px; }
}
