:root {
    --bg: #0a0a0a;
    --bg-card: #141414;
    --bg-elevated: #1a1a1a;
    --purple: #924eea;
    --purple-light: #b06ff0;
    --purple-glow: rgba(146, 78, 234, 0.35);
    --text: #ffffff;
    --text-muted: #a3a3a3;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 12px;
    --font: 'Sora', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(ellipse at 20% 20%, var(--purple-glow), transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(146, 78, 234, 0.15), transparent 50%),
        var(--bg);
}

.login-card {
    width: min(420px, 92vw);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.brand { text-align: center; margin-bottom: 2rem; }
.brand h1 { font-size: 1.75rem; font-weight: 700; margin-top: 1rem; }
.brand p { color: var(--text-muted); font-size: 0.9rem; }

.brand-icon {
    width: 64px; height: 64px;
    margin: 0 auto;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--purple), #6b2fd4);
    display: grid; place-items: center;
    font-size: 1.75rem; font-weight: 700;
    box-shadow: 0 8px 32px var(--purple-glow);
}
.brand-icon.sm { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; }

.login-form label { display: block; margin-bottom: 1rem; }
.login-form span { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.login-form input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}
.login-form input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-glow);
}

.btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.9rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--purple), #7a3fd4);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--purple-glow); }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}
.btn-ghost:hover { border-color: var(--purple); color: var(--text); }

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* App shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    background: #050505;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.sidebar-nav { flex: 1; }

/* Plataformas na sidebar */
.platforms-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.platform-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.platform-item:hover,
.platform-item.active {
    background: rgba(146, 78, 234, 0.2);
    border-color: rgba(146, 78, 234, 0.45);
}
.home-item .home-icon {
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text);
}
.platform-logo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 48px;
    object-fit: contain;
    filter: brightness(1.05);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--purple-light);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item.active, .nav-item:hover {
    background: var(--purple);
    color: white;
}

.sidebar-footer { margin-top: auto; }
.user-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--purple);
    display: grid; place-items: center;
    font-size: 0.8rem; font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 2rem 2.5rem 4rem;
    overflow-x: hidden;
}

.page-header { margin-bottom: 2.5rem; }
.page-header h1 { font-size: 2rem; font-weight: 700; }
.page-header p { color: var(--text-muted); margin-top: 0.25rem; }

.home-header {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.home-search {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
    max-width: 980px;
}

.home-search__query {
    flex: 1 1 280px;
    min-width: 220px;
    position: relative;
    display: flex;
    align-items: center;
}

.home-search__icon {
    position: absolute;
    left: 0.9rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    line-height: 1;
}

.home-search__query input[type="search"] {
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 1rem 0 2.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    appearance: none;
    -webkit-appearance: none;
}

.home-search__query input[type="search"]::-webkit-search-decoration,
.home-search__query input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.home-search__select {
    flex: 0 1 180px;
    min-width: 150px;
    height: 44px;
    margin: 0;
    padding: 0 2rem 0 0.95rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a3a3a3' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.home-search__query input[type="search"]:focus,
.home-search__select:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-glow);
}

.home-search__submit {
    flex: 0 0 auto;
    height: 44px;
    margin: 0;
    padding: 0 1.35rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--purple), #7a3fd4);
    color: #fff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    width: auto;
}

.home-search__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--purple-glow);
}

.home-search__clear {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin: 0;
    padding: 0 1.1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
    background: transparent;
}

.home-search__clear:hover {
    border-color: var(--purple);
    color: var(--text);
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.section-heading .section-title { margin-bottom: 0; }
.section-link {
    color: var(--purple-light);
    font-size: 0.9rem;
}
.section-link:hover { color: var(--text); }
.section-count {
    margin-left: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
.search-grid .course-card {
    width: 100%;
    flex: none;
}

.welcome-empty {
    max-width: 560px;
    margin: 4rem auto;
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(180deg, rgba(146, 78, 234, 0.12), transparent);
    border: 1px solid var(--border);
    border-radius: 20px;
}
.welcome-empty .brand-icon {
    margin: 0 auto 1.25rem;
}
.welcome-empty h2 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}
.welcome-empty p {
    color: var(--text-muted);
}
.welcome-empty__hint {
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

@media (max-width: 760px) {
    .home-search__select {
        flex: 1 1 calc(50% - 0.65rem);
    }
    .home-search__submit,
    .home-search__clear {
        flex: 1 1 auto;
    }
}

/* Carousel / Netflix cards */
.carousel-section { margin-bottom: 2.5rem; }
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.carousel-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--purple) transparent;
}
.carousel-row::-webkit-scrollbar { height: 6px; }
.carousel-row::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

/* Desenho 101 — grade em colunas por subcategoria */
.d101-section { margin-bottom: 2.5rem; }
.d101-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.d101-grid .course-card {
    width: 100%;
    flex: none;
    max-width: 280px;
    justify-self: center;
}
.d101-card {
    flex: none;
    scroll-snap-align: unset;
}
.d101-card .course-card__overlay h3 {
    font-size: 0.75rem;
    line-height: 1.25;
    text-transform: none;
    letter-spacing: 0;
}

.course-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    transition: transform 0.25s ease;
}
.course-card:hover { transform: scale(1.05); z-index: 2; }

.course-card__media {
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #111;
}
.course-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.card-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.2);
    z-index: 2;
}
.card-progress span {
    display: block;
    height: 100%;
    background: var(--purple);
}

.course-card__image {
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.course-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.35) 35%, transparent 55%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.badge {
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.9);
}

.course-card__overlay h3 {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.professor {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    letter-spacing: 0.05em;
}
.progress-text {
    font-size: 0.65rem;
    color: var(--purple-light);
    margin-top: 0.35rem;
}

/* Progress bars */
.progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.35rem;
}
.progress-bar.large { height: 6px; margin: 0.75rem 0 0.35rem; }
.progress-bar.thin { height: 3px; }
.progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--purple-light));
    border-radius: 2px;
    transition: width 0.3s ease;
}
.progress-label { font-size: 0.8rem; color: var(--text-muted); }

/* Continue watching */
.continue-section { margin-bottom: 2rem; }
.continue-card .course-card__overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 60%);
}
.continue-label {
    font-size: 0.8rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.35rem;
}
.continue-course {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Course detail */
.back-link {
    display: inline-block;
    color: var(--purple-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.back-link:hover { color: var(--text); }

.course-hero {
    min-height: 360px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}
.course-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.course-hero__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0a0a0a 0%, rgba(10,10,10,0.55) 35%, transparent 65%);
}
.course-hero__info {
    position: relative;
    z-index: 1;
    max-width: 600px;
}
.course-progress-block { margin-top: 1rem; }
.btn-resume {
    display: inline-block;
    width: auto;
    margin-top: 1rem;
    padding: 0.7rem 1.25rem;
    font-size: 0.9rem;
    text-align: center;
}
.course-hero h1 { font-size: 2.25rem; font-weight: 700; margin: 0.75rem 0; }
.course-hero p { color: #d4d4d4; font-size: 0.95rem; }

.module-block { margin-bottom: 2rem; }
.module-block h2 {
    font-size: 1.1rem;
    color: var(--purple-light);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.lessons-grid { display: grid; gap: 0.5rem; }
.lesson-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s, background 0.15s;
}
.lesson-item:hover { border-color: var(--purple); background: var(--bg-elevated); }
.lesson-item.has-video .lesson-num { color: var(--purple-light); }
.lesson-num { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; min-width: 24px; }
.lesson-item strong { display: block; font-size: 0.9rem; }
.lesson-info { flex: 1; min-width: 0; }
.lesson-meta { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.lesson-item small { color: var(--text-muted); font-size: 0.75rem; }
.lesson-progress-tag { color: var(--purple-light) !important; }
.offline-tag { color: #4ade80 !important; }

/* Watch page */
.watch-layout { min-height: 100vh; background: var(--bg); }
.watch-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    background: #050505;
}
.watch-header h1 { font-size: 1.1rem; margin-top: 0.25rem; }

.watch-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 0;
    min-height: calc(100vh - 80px);
}

.player-area {
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}
.player-wrap {
    width: 100%;
    position: relative;
}
.player-area video,
.player-area iframe {
    width: 100%;
    max-height: calc(100vh - 160px);
    aspect-ratio: 16/9;
    border: none;
    background: #000;
}
.player-area iframe.pdf-viewer {
    aspect-ratio: auto;
    min-height: calc(100vh - 200px);
    height: calc(100vh - 200px);
}
.pdf-actions {
    padding: 0.75rem;
    text-align: center;
}
.pdf-tag { color: var(--purple-light); }
.file-download-panel {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text);
}
.file-download-panel p {
    color: var(--text-muted);
    margin: 0.75rem 0 1.5rem;
}
.file-tag { color: #7dd3fc; }
.platform-logo--blend {
    width: 100%;
    height: auto;
    max-height: 48px;
    object-fit: contain;
    filter: none;
    mix-blend-mode: screen;
}
.player-controls-extra {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 0.75rem;
    background: #0d0d0d;
    border-top: 1px solid var(--border);
}
.quality-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.quality-select select {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-family: inherit;
}
.no-video {
    color: var(--text-muted);
    padding: 3rem;
    text-align: center;
}

.watch-sidebar {
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    padding: 1.25rem;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}
.watch-sidebar h3 { font-size: 0.9rem; margin-bottom: 1rem; color: var(--text-muted); }
.sidebar-module { margin-bottom: 1.25rem; }
.sidebar-module h4 {
    font-size: 0.8rem;
    color: var(--purple-light);
    margin-bottom: 0.5rem;
}
.sidebar-lesson {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}
.sidebar-lesson small { color: var(--purple-light); font-size: 0.7rem; flex-shrink: 0; }
.sidebar-lesson:hover { background: var(--bg-elevated); color: var(--text); }
.sidebar-lesson.active { background: var(--purple); color: white; }

.lesson-description {
    padding: 2rem;
    max-width: 900px;
    color: #d4d4d4;
    font-size: 0.95rem;
    line-height: 1.6;
}
.lesson-description h3 {
    margin: 0 0 0.75rem;
    color: var(--text);
    font-size: 1.05rem;
}
.lesson-description h4 { margin: 1rem 0 0.5rem; color: var(--text); }

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state code {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    color: var(--purple-light);
}

/* Admin */
.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-eyebrow {
    color: var(--purple-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}
.btn-inline {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    margin-top: 0;
    text-decoration: none;
}
.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.error-list { margin: 0; padding-left: 1.1rem; }
.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.admin-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-platforms-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.platform-chip {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-muted);
}
.admin-badge {
    display: inline-flex;
    margin-left: 0.4rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}
.admin-badge.admin { background: rgba(146, 78, 234, 0.2); color: var(--purple-light); margin-left: 0; }
.admin-badge.student { background: rgba(255,255,255,0.06); color: var(--text-muted); margin-left: 0; }
.admin-badge.you { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.admin-badge.active { background: rgba(34, 197, 94, 0.15); color: #86efac; margin-left: 0; }
.admin-badge.inactive { background: rgba(239, 68, 68, 0.15); color: #fca5a5; margin-left: 0; }
.admin-table tr.is-inactive td { opacity: 0.55; }
.admin-switch {
    display: flex !important;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.5rem;
    cursor: pointer;
}
.admin-switch input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.2rem;
    accent-color: var(--purple);
    flex-shrink: 0;
}
.admin-switch strong {
    display: block;
    color: var(--text);
    font-size: 0.95rem;
}
.admin-switch small {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}
.password-reveal {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.password-reveal__label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.password-reveal__row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.password-reveal__input {
    flex: 1;
    min-width: 0;
}
.admin-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    white-space: nowrap;
}
.btn-ghost.danger { color: #fca5a5; }
.btn-ghost.danger:hover { border-color: #ef4444; color: #fecaca; }
.admin-form {
    display: grid;
    gap: 1rem;
    max-width: 760px;
}
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
}
.admin-card h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
}
.admin-card label {
    display: block;
    margin-bottom: 0.9rem;
}
.admin-card label span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.admin-card input[type="text"],
.admin-card input[type="email"],
.admin-card input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}
.admin-card input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-glow);
}
.form-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
}
.platform-checks {
    display: grid;
    gap: 0.55rem;
}
.platform-check {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
    cursor: pointer;
    margin-bottom: 0 !important;
}
.platform-check input {
    margin-top: 0.25rem;
    accent-color: var(--purple);
}
.platform-check-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.platform-check-body strong { font-size: 0.92rem; }
.platform-check-body small { color: var(--text-muted); font-size: 0.75rem; }
.admin-form-actions { margin-top: 0.25rem; }
.admin-reset-form { margin-top: 1.5rem; }
.admin-link {
    display: block;
    text-align: center;
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}
.admin-link:hover,
.admin-link.active {
    border-color: var(--purple);
    color: var(--text);
    background: rgba(146, 78, 234, 0.12);
}
.text-muted { color: var(--text-muted); }

@media (max-width: 900px) {
    .app-shell { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    .sidebar-nav { display: none; }
    .watch-body { grid-template-columns: 1fr; }
    .watch-sidebar { max-height: none; border-left: none; border-top: 1px solid var(--border); }
}
