/* ==========================================================================
   AZ LEARN WEB PORTAL — CLINICAL OPERATIONS STUDIO SYSTEM
   ========================================================================== */
@import url('tokens.css');
@import url('base.css');
@import url('chrome.css');

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-nav {
    background: rgba(14, 20, 34, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 1.5rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo-img {
    height: 34px;
    width: auto;
    display: block;
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--brand-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-item a {
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-item a:hover {
    color: var(--text-primary);
}

.btn-nav-action {
    background: var(--brand-primary);
    color: #ffffff !important;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-nav-action:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--brand-glow);
}

/* ==========================================================================
   BUTTONS & INPUTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--brand-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--brand-glow);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg-surface-subtle);
    border-color: var(--border-accent);
}

.btn-danger {
    background: var(--danger-red);
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
}

.form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.input-icon-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
}

.input-icon-btn:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   ROLE BADGES
   ========================================================================== */
.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-tutor {
    background: var(--tutor-purple-bg);
    color: var(--tutor-purple);
    border: 1px solid var(--tutor-purple-border);
}

.badge-admin {
    background: var(--admin-gold-bg);
    color: var(--admin-gold);
    border: 1px solid var(--admin-gold-border);
}

.badge-student {
    background: var(--success-green-bg);
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   LANDING PAGE HERO & SECTIONS
   ========================================================================== */
.hero-section {
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(234, 88, 12, 0.12) 0%, transparent 70%);
}

.hero-container {
    max-width: 860px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(234, 88, 12, 0.12);
    border: 1px solid var(--border-accent);
    color: var(--brand-accent);
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.hero-title span {
    color: var(--brand-accent);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.download-cta-grid {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.download-card-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 240px;
}

.download-card-btn:hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.download-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-accent);
}

.download-text-box {
    text-align: left;
}

.download-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.download-headline {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Features Grid */
.features-section {
    padding: 4rem 1.5rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.features-container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    color: var(--brand-accent);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.75rem;
}

.feature-card {
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.feature-icon-bubble {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-accent);
    margin-bottom: 1.25rem;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   PRIVACY POLICY PAGE
   ========================================================================== */
.policy-page {
    padding: 3rem 1.5rem 5rem;
    flex: 1;
}

.policy-container {
    max-width: 820px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 3rem;
}

.policy-header {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1.75rem;
    margin-bottom: 2rem;
}

.policy-title {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.policy-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.policy-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2rem 0 0.85rem;
    color: var(--text-primary);
}

.policy-body p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.7;
}

.policy-body ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.policy-body li {
    margin-bottom: 0.5rem;
}

.policy-callout {
    background: var(--bg-surface-elevated);
    border-left: 4px solid var(--brand-primary);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
}

.policy-callout p {
    margin-bottom: 0;
    color: var(--text-primary);
}

/* ==========================================================================
   LOGIN CARD & AUTH
   ========================================================================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 2.5rem 1.5rem;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-elevated);
    text-align: center;
}

.auth-card-logo {
    height: 48px;
    width: auto;
    margin: 0 auto 1.25rem;
    display: block;
}

.auth-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.auth-card-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
}

.alert-banner {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    text-align: left;
}

.alert-banner.active {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.alert-banner.error {
    background: var(--danger-red-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* ==========================================================================
   DASHBOARD PAGES (TUTOR & ADMIN WELCOME)
   ========================================================================== */
.dash-page {
    flex: 1;
    padding: 2.5rem 1.5rem;
}

.dash-container {
    max-width: 960px;
    margin: 0 auto;
}

.dash-welcome-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-elevated);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dash-welcome-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.dash-welcome-card.tutor-card::before {
    background: linear-gradient(90deg, var(--tutor-purple), var(--brand-accent));
}

.dash-welcome-card.admin-card::before {
    background: linear-gradient(90deg, var(--admin-gold), #f97316);
}

.user-avatar-large {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    border: 3px solid var(--bg-surface-elevated);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    display: block;
    background: var(--bg-surface-subtle);
}

.dash-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.dash-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.dash-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.info-item-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.info-item-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.dash-action-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   MODALS (STUDENT LOCKOUT DIALOG)
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    max-width: 480px;
    width: 100%;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icon-bubble {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(234, 88, 12, 0.14);
    border: 1px solid var(--border-accent);
    color: var(--brand-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.modal-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 1.5rem;
    margin-top: auto;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .policy-container,
    .dash-welcome-card {
        padding: 1.75rem;
    }
}

/* ==========================================================================
   ADMIN OPERATIONS WORKSPACE (VANILLA CSS — NO CDNS)
   ========================================================================== */

.admin-workspace {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 65px - 70px);
    /* Subtract header & footer */
    background: var(--bg-base);
}

.admin-sidebar {
    width: 280px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.admin-sidebar-header {
    padding: 0.5rem 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.25rem;
}

.admin-sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-sidebar-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-top: 0.25rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    font-family: inherit;
}

.admin-nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.admin-nav-item.active {
    background: rgba(234, 88, 12, 0.12);
    color: var(--foil-bright);
    border-left-color: var(--brand-accent);
    font-weight: 600;
    box-shadow: inset 0 0 12px rgba(234, 88, 12, 0.08);
}

.admin-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
}

.admin-sidebar-footer {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.admin-stage {
    flex: 1;
    padding: 2.5rem 3rem;
    overflow-y: auto;
    max-width: 1100px;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: tabSlideFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tabSlideFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-section-header {
    margin-bottom: 2rem;
}

.admin-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-section-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

.admin-panel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-panel-card.danger-card {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.04) 0%, var(--bg-surface) 100%);
}

.admin-alert-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: #fca5a5;
    font-size: 0.88rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-label-btn {
    background: none;
    border: none;
    color: var(--brand-accent);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
}

.form-label-btn:hover {
    color: var(--foil-bright);
    text-decoration: underline;
}

.form-control {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
    background: var(--surface-1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.88rem;
    line-height: 1.6;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.92rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

.btn-danger {
    background: var(--danger-red);
    color: #ffffff;
    border: 1px solid rgba(239, 68, 68, 0.6);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.results-panel {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: none;
}

.results-panel.visible {
    display: block;
    animation: tabSlideFade 0.25s ease;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.results-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Toast Notifications */
.admin-toast-wrap {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.admin-toast {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: var(--shadow-elevated);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    max-width: 420px;
}

.admin-toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.admin-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    font-weight: 700;
}

.admin-toast.success {
    border-color: rgba(16, 185, 129, 0.4);
}

.admin-toast.success .admin-toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.admin-toast.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.admin-toast.error .admin-toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@media (max-width: 900px) {
    .admin-workspace {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .admin-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .admin-nav-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .admin-nav-item.active {
        border-bottom-color: var(--brand-accent);
    }

    .admin-stage {
        padding: 1.5rem;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   COURSE SELECTOR BUBBLES & CHIPS (GIFT CARD BATCH GENERATOR)
   ========================================================================== */

.course-selection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.course-selection-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.course-count-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: rgba(234, 88, 12, 0.14);
    color: var(--foil-bright);
    border: 1px solid rgba(234, 88, 12, 0.35);
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.course-selection-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.course-bubbles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
    min-height: 48px;
    align-items: center;
}

.course-bubble {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    padding: 0.55rem 1.1rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    outline: none;
}

.course-bubble:hover {
    border-color: var(--border-accent);
    background: var(--bg-surface-subtle);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.course-bubble:active {
    transform: translateY(0);
}

.course-bubble.selected {
    background: rgba(234, 88, 12, 0.14);
    border-color: var(--brand-accent);
    color: var(--foil-bright);
    box-shadow: 0 0 14px rgba(234, 88, 12, 0.22), inset 0 0 8px rgba(234, 88, 12, 0.12);
    font-weight: 600;
}

.course-bubble-check {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: transparent;
}

.course-bubble.selected .course-bubble-check {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #ffffff;
}

.course-bubble-title {
    line-height: 1.2;
}

.course-bubble-loading {
    color: var(--text-muted);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

/* ==========================================================================
   STUDENT DIRECTORY & EXPANDABLE DETAILS DRAWER
   ========================================================================== */

.students-list-container {
    min-height: 80px;
}

.students-directory-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.student-entry-card {
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.student-entry-card:hover {
    border-color: var(--border-strong);
}

.student-entry-main {
    display: flex;
    align-items: center;
    padding: 0.95rem 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.student-avatar-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(234, 88, 12, 0.14);
    border: 1px solid rgba(234, 88, 12, 0.35);
    color: var(--foil-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    flex-shrink: 0;
    user-select: none;
    letter-spacing: 0.05em;
}

.student-entry-info {
    flex: 1;
    min-width: 200px;
}

.student-entry-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.student-entry-contacts {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.student-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.student-contact-separator {
    color: var(--border-strong);
}

.student-entry-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.student-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.student-expand-btn:hover {
    background: var(--bg-surface-subtle);
    border-color: var(--brand-accent);
    color: var(--foil-bright);
}

.student-expand-btn .expand-icon {
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.btn-danger-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-danger-icon:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: var(--danger-red);
    color: #ffffff;
    transform: translateY(-1px);
}

/* On-demand Detail Drawer */
.student-details-drawer {
    border-top: 1px solid var(--border-subtle);
    background: #06090f;
    padding: 1.25rem 1.5rem;
    animation: tabSlideFade 0.2s ease;
}

.student-detail-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.drawer-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.drawer-column {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.drawer-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.drawer-field-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
}

.drawer-label {
    color: var(--text-muted);
    font-weight: 500;
    min-width: 90px;
}

.drawer-value {
    color: var(--text-primary);
    font-weight: 600;
}

.drawer-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    word-break: break-all;
}

/* Role Badges */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

.role-admin {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.role-tutor {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.role-student {
    background: rgba(234, 88, 12, 0.14);
    color: var(--foil-bright);
    border: 1px solid rgba(234, 88, 12, 0.35);
}

/* Status Pill */
.status-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 9999px;
}

.status-verified {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-unverified {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Hardware Slot Badges */
.slot-badge {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    line-height: 1.4;
}

.slot-bound {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

.slot-unbound {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.slot-os {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-sm);
    margin-left: 0.35rem;
    font-weight: 600;
}

.slot-uuid {
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Enrollments Section */
.drawer-enrollments-section {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.95rem;
}

.student-enrollments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.student-enrollment-chip {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.45rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
}

.enrollment-title {
    font-weight: 600;
    color: var(--text-primary);
}

.enrollment-exp {
    font-size: 0.72rem;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

@media (max-width: 768px) {
    .drawer-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .student-entry-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-entry-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ==========================================================================
   SUBSCRIPTIONS & ENROLLMENTS HUB STYLING
   ========================================================================== */

/* Telemetry KPI Summary Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.35rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.kpi-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.kpi-icon {
    font-size: 1.1rem;
}

.kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0.35rem 0 0.15rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    line-height: 1.1;
}

.kpi-subtitle {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.kpi-card.kpi-warning .kpi-value {
    color: var(--admin-gold);
}

/* Sub-Navigation Segmented Switcher */
.subview-switcher-bar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.35rem;
    width: fit-content;
}

.subview-pill {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.subview-pill:hover {
    color: var(--text-primary);
}

.subview-pill.active {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(234, 88, 12, 0.40);
}

/* Status Filter Pills for Codes */
.filter-pill-group {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-status-pill {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-status-pill:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.filter-status-pill.active {
    background: var(--bg-surface-subtle);
    border-color: var(--brand-accent);
    color: var(--brand-accent);
    font-weight: 600;
}

/* Active Subscriptions Table */
.subs-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.subs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    min-width: 780px;
}

.subs-table th {
    text-align: left;
    padding: 0.8rem 1rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface-elevated);
}

.subs-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.sub-row {
    transition: background 0.15s ease;
}

.sub-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.sub-row.row-expiring-soon {
    background: rgba(245, 158, 11, 0.035);
}

.sub-student-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sub-avatar-sm {
    width: 34px;
    height: 34px;
    font-size: 0.76rem;
    flex-shrink: 0;
}

.sub-student-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.sub-student-contacts {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.sub-contact-sep {
    opacity: 0.4;
}

.sub-course-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 500;
}

.sub-course-name {
    color: var(--text-primary);
}

.sub-course-year {
    color: var(--brand-accent);
    font-size: 0.72rem;
    background: rgba(234, 88, 12, 0.12);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.sub-date-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sub-date-exp {
    color: var(--text-primary);
    font-weight: 500;
}

.sub-urgency-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
}

.sub-urgency-pill.pill-success {
    background: var(--success-green-bg);
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.sub-urgency-pill.pill-info {
    background: rgba(234, 88, 12, 0.12);
    color: var(--brand-accent);
    border: 1px solid rgba(234, 88, 12, 0.28);
}

.sub-urgency-pill.pill-warning {
    background: var(--admin-gold-bg);
    color: var(--admin-gold);
    border: 1px solid var(--admin-gold-border);
}

.sub-urgency-pill.pill-critical {
    background: var(--danger-red-bg);
    color: var(--danger-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 700;
}

.sub-action-group {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

/* ==========================================================================
   PRODUCTION CARD BATCHES & INVENTORY
   ========================================================================== */

.batch-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
}

.batch-card-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.batch-card-item:hover {
    border-color: var(--border-strong);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.batch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.batch-id-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.batch-number-badge {
    font-family: monospace;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--foil-bright);
    background: rgba(234, 88, 12, 0.14);
    border: 1px solid rgba(234, 88, 12, 0.35);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.06em;
    user-select: all;
}

.batch-title-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

.batch-sub-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.batch-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.batch-courses-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.batch-metrics-bar {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}

.batch-progress-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
    width: 100%;
}

.batch-progress-fill-active {
    background: #10b981;
    height: 100%;
    transition: width 0.3s ease;
}

.batch-progress-fill-used {
    background: #8b5cf6;
    height: 100%;
    transition: width 0.3s ease;
}

.batch-progress-fill-expired {
    background: #ef4444;
    height: 100%;
    transition: width 0.3s ease;
}

.batch-stats-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    font-size: 0.82rem;
}

.batch-stat-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

.batch-cards-drawer {
    margin-top: 0.5rem;
    border-top: 1px dashed var(--border-subtle);
    padding-top: 1.15rem;
    animation: fadeInDrawer 0.25s ease;
}

@keyframes fadeInDrawer {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scratch Card Inventory Grid */
.codes-inventory-list {
    margin-top: 1rem;
}

.codes-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.code-card-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: transform 0.2s, border-color 0.2s;
}

.code-card-item:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.code-card-item.card-state-used {
    border-color: rgba(139, 92, 246, 0.25);
    background: rgba(139, 92, 246, 0.03);
}

.code-card-item.card-state-expired {
    opacity: 0.7;
}

.code-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.code-number-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-mono {
    font-family: monospace;
    font-size: 1.08rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.btn-copy-code {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.74rem;
    padding: 0.22rem 0.55rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-code:hover {
    color: #fff;
    border-color: var(--brand-accent);
    background: var(--brand-primary);
}

.code-status-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

.code-status-pill.pill-used {
    background: var(--tutor-purple-bg);
    color: var(--tutor-purple);
    border: 1px solid var(--tutor-purple-border);
}

.code-status-pill.pill-active {
    background: var(--success-green-bg);
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.code-status-pill.pill-expired {
    background: var(--danger-red-bg);
    color: var(--danger-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.code-card-courses {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.code-field-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.code-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.code-course-chip {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.76rem;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.code-redemption-info {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
}

.redemption-icon {
    font-size: 0.95rem;
}

.redemption-name {
    font-weight: 600;
    color: #d8b4fe;
}

.redemption-email {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.code-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.65rem;
    margin-top: auto;
}

.code-meta-col {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.code-meta-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.code-meta-val {
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-family: monospace;
}

/* ==========================================================================
   BATCH ACCESS PAUSE & REVOCATION STYLING
   ========================================================================== */
.badge-status-paused {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
    letter-spacing: 0.04em;
}

.badge-status-active {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    letter-spacing: 0.04em;
}

.batch-card-item.is-batch-paused {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, var(--bg-surface) 100%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.06);
}

.batch-paused-alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #fde68a;
    line-height: 1.45;
}

.batch-paused-alert-banner .paused-banner-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: -1px;
}

.student-enrollment-chip.chip-paused {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.05);
}

/* ==========================================================================
   FACULTY GOOGLE DRIVE MATERIAL INGESTION STATION
   ========================================================================== */
.ingestion-section {
    margin-top: 2rem;
}

.ingestion-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-elevated);
    position: relative;
    overflow: hidden;
}

.ingestion-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4285F4, #34A853, #FBBC05, #EA4335);
}

.ingestion-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.ingestion-title-group h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ingestion-title-group p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    max-width: 700px;
}

.ingestion-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-quota {
    background: rgba(234, 88, 12, 0.12);
    border: 1px solid var(--border-accent);
    color: var(--brand-accent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.drive-action-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .drive-action-container {
        grid-template-columns: 1.2fr 1fr;
    }
}

.drive-cta-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.drive-cta-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drive-cta-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.drive-btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-drive-launch {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.8rem 1.4rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.35);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-drive-launch:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5);
    color: #ffffff;
}

.drive-url-box {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.drive-url-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drive-url-input-group {
    display: flex;
    gap: 0.5rem;
}

.drive-url-input {
    flex: 1;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-family: monospace;
}

.drive-url-input:focus {
    border-color: var(--brand-primary);
    outline: none;
}

.btn-save-url {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-save-url:hover {
    background: var(--brand-primary);
}

.pipeline-features-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.pipeline-features-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    color: var(--text-primary);
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.feature-list li strong {
    color: var(--text-primary);
}

.feature-bullet {
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Directory Tree Hierarchy Visualizer */
.hierarchy-guide-box {
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}

.hierarchy-guide-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-accent);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tree-pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #e2e8f0;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.25);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tree-folder { color: #60a5fa; font-weight: 600; }
.tree-vid    { color: #34d399; }
.tree-pdf    { color: #f87171; }
.tree-quiz   { color: #fbbf24; }
.tree-comment{ color: var(--text-muted); font-style: italic; }

.naming-tip-bar {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #cbd5e1;
    background: rgba(234, 88, 12, 0.08);
    border: 1px solid rgba(234, 88, 12, 0.22);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   FORM ROW LAYOUT UTILITIES
   ========================================================================== */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

/* ==========================================================================
   ADMIN MODAL COMPONENT (VANILLA CSS DIALOGS)
   ========================================================================== */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 7, 14, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
    animation: fadeInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.admin-modal-dialog {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-modal-dialog.admin-modal-lg {
    max-width: 680px;
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.15);
}

.admin-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
}

.admin-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-surface-subtle);
}

.admin-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.admin-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   PROVIDERS SECTION (CARDS GRID & STYLING)
   ========================================================================== */
.providers-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.provider-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.provider-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-card);
}

.provider-card-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.provider-avatar-frame {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-primary), var(--tutor-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    overflow: hidden;
}

.provider-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.provider-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.provider-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.provider-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.5rem;
}

.provider-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    background: var(--bg-surface-subtle);
    color: var(--brand-accent);
    border: 1px solid var(--border-subtle);
    font-weight: 600;
}

.provider-card-actions {
    display: flex;
    gap: 0.4rem;
}

/* ==========================================================================
   COURSES MANAGEMENT CARDS GRID
   ========================================================================== */
.courses-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.course-manage-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.course-manage-card:hover {
    transform: translateY(-2px);
    border-color: rgba(234, 88, 12, 0.40);
    box-shadow: var(--shadow-card);
}

.course-card-header-banner {
    position: relative;
    height: 110px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.course-card-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transition: opacity 0.3s;
}

.course-manage-card:hover .course-card-banner-img {
    opacity: 0.75;
}

.course-card-banner-overlay {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.4rem;
}

.course-card-body-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card-title-text {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.course-card-provider-text {
    font-size: 0.85rem;
    color: var(--tutor-purple);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.course-card-id-row {
    background: var(--bg-base);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.course-id-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: monospace;
}

.course-id-val {
    font-size: 0.75rem;
    color: #e2e8f0;
    font-family: monospace;
    font-weight: 600;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-card-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    margin-top: auto;
}

.course-badge-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    background: var(--bg-surface-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.course-badge-pill.pill-pc-enabled {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.course-badge-pill.pill-pc-disabled {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.course-card-actions-row {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   MANAGE UNITS & CONTENT BREAKDOWN ACCORDION
   ========================================================================== */
.unit-manage-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.unit-manage-card.expanded {
    border-color: var(--brand-accent);
}

.unit-card-header-bar {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
    background: rgba(0, 0, 0, 0.15);
    transition: background 0.15s ease;
}

.unit-card-header-bar:hover {
    background: var(--bg-surface-subtle);
}

.unit-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.unit-order-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.unit-header-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unit-type-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.unit-type-tag.tag-lecture { background: rgba(234, 88, 12, 0.16); color: var(--foil-bright); border: 1px solid rgba(234, 88, 12, 0.35); }
.unit-type-tag.tag-quiz { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.unit-type-tag.tag-pdf { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.unit-type-tag.tag-flashcards { background: rgba(139, 92, 246, 0.18); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.35); }
.unit-type-tag.tag-mixed { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }

.unit-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.unit-count-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.unit-content-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.unit-expand-arrow {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.unit-manage-card.expanded .unit-expand-arrow {
    transform: rotate(180deg);
}

.unit-contents-tree-panel {
    padding: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    display: none;
}

.unit-manage-card.expanded .unit-contents-tree-panel {
    display: block;
}

.unit-content-group {
    margin-bottom: 1.25rem;
}

.unit-content-group:last-child {
    margin-bottom: 0;
}

.unit-group-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.unit-content-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.unit-content-row {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: background 0.15s ease;
}

.unit-content-row:hover {
    background: var(--bg-surface-subtle);
}

.unit-content-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex: 1;
}

.unit-content-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unit-content-uuid {
    font-size: 0.72rem;
    font-family: monospace;
    color: var(--text-muted);
    background: var(--bg-base);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-icon-danger {
    background: none;
    border: none;
    color: var(--danger-red);
    opacity: 0.7;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: opacity 0.15s, background 0.15s;
}

.btn-icon-danger:hover {
    opacity: 1;
    background: var(--danger-red-bg);
}

.unit-quick-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px dashed var(--border-subtle);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   DRAG-AND-DROP & VIDEO REORDERING STYLES
   ========================================================================== */

.unit-content-row.draggable-video {
    cursor: default;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.35rem;
    color: var(--text-muted);
    user-select: none;
    font-size: 0.95rem;
    line-height: 1;
    border-radius: 4px;
    letter-spacing: -1px;
    transition: color 0.15s, background 0.15s;
}

.drag-handle:hover {
    color: var(--brand-teal);
    background: rgba(13, 148, 136, 0.1);
}

.drag-handle:active {
    cursor: grabbing;
}

.unit-content-row.dragging {
    opacity: 0.35;
    background: rgba(13, 148, 136, 0.12) !important;
    border: 1px dashed var(--brand-teal) !important;
    transform: scale(0.99);
}

.unit-content-row.drag-over {
    border-top: 2px solid var(--brand-teal) !important;
    background: rgba(13, 148, 136, 0.08) !important;
}

/* Reorder nudge controls (accessible one-click up/down) */
.reorder-nudge-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.btn-reorder-nudge {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 0.15rem 0.35rem;
    font-size: 0.72rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s ease;
}

.btn-reorder-nudge:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-reorder-nudge:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* Unit Provider Badge */
.unit-provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.55rem;
    font-size: 0.73rem;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ==========================================================================
   VIDEO LECTURE DRM INGESTION PIPELINE STYLES
   ========================================================================== */
.video-upload-dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: rgba(14, 20, 34, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-upload-dropzone:hover,
.video-upload-dropzone.drag-over {
    border-color: var(--brand-accent);
    background: rgba(234, 88, 12, 0.08);
    box-shadow: 0 0 20px var(--brand-glow);
}

.dropzone-icon {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.dropzone-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.dropzone-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 480px;
}

.video-probe-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--brand-accent);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1rem;
    animation: fadeIn 0.25s ease;
}

.probe-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-subtle);
}

.probe-icon {
    font-size: 1.1rem;
}

.probe-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    flex: 1;
}

.probe-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    background: var(--brand-glow);
    color: var(--brand-accent);
    border: 1px solid var(--border-accent);
}

.probe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.probe-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.probe-key {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.probe-val {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: monospace;
}

.video-progress-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    animation: fadeIn 0.3s ease;
}

.progress-steps-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.progress-step-pill {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.progress-step-pill .step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.progress-step-pill.active {
    background: rgba(234, 88, 12, 0.14);
    border-color: var(--brand-accent);
    color: var(--text-primary);
    box-shadow: 0 0 12px var(--brand-glow);
}

.progress-step-pill.active .step-num {
    background: var(--brand-accent);
    color: #fff;
    animation: pulse 1.5s infinite;
}

.progress-step-pill.completed {
    background: var(--success-green-bg);
    border-color: var(--success-green);
    color: #34d399;
}

.progress-step-pill.completed .step-num {
    background: var(--success-green);
    color: #fff;
}

.progress-bar-wrap {
    width: 100%;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    border-radius: 9999px;
    transition: width 0.25s ease;
}

.video-log-box {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.video-log-box .log-line {
    line-height: 1.5;
    margin-bottom: 2px;
}

.video-log-box .log-success {
    color: #34d399;
}

.video-log-box .log-warn {
    color: #fbbf24;
}

.video-log-box .log-err {
    color: #f87171;
}

.video-log-box .log-dim {
    color: #64748b;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}