@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
    --ink: #18242c;
    --ink-soft: #52616a;
    --paper: #f5f8f7;
    --panel: #ffffff;
    --line: #dce6e3;
    --teal: #187c76;
    --teal-deep: #0f5b5a;
    --teal-wash: #e1f2ee;
    --amber: #d78c2e;
    --amber-wash: #fff3d9;
    --coral: #c85c52;
    --coral-wash: #fff0ed;
    --shadow: 0 16px 40px rgba(24, 48, 53, 0.08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    font-family: 'IBM Plex Sans', 'Noto Sans TC', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 90% 0%, rgba(197, 232, 223, 0.64), transparent 34rem),
        radial-gradient(circle at 0% 100%, rgba(255, 231, 194, 0.45), transparent 30rem),
        var(--paper);
}

body { min-width: 320px; }

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    padding: 0.75rem 1rem;
    color: #5b1f1a;
    background: #fff0ed;
    box-shadow: 0 -2px 8px rgba(24, 36, 44, 0.16);
    text-align: center;
}

#blazor-error-ui .reload {
    margin-left: 0.5rem;
    color: var(--coral);
    font-weight: 700;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.52; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0.5rem; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 1.6rem; letter-spacing: 0; }

.admin-loading {
    display: grid;
    min-height: 100vh;
    place-items: center;
    color: var(--ink-soft);
}

.admin-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar {
    display: flex;
    position: sticky;
    top: 0;
    flex-direction: column;
    height: 100vh;
    padding: 1.5rem 1.1rem 1.2rem;
    color: #eaf6f3;
    background: linear-gradient(165deg, #17383d 0%, #10272d 70%, #0d2025 100%);
}
.brand-lockup, .login-heading { display: flex; align-items: center; gap: 0.75rem; }
.brand-lockup strong { display: block; font-size: 1.04rem; letter-spacing: 0.02em; }
.brand-lockup small { display: block; margin-top: 0.18rem; color: #a9c5c2; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-mark { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; color: #17383d; background: #f3bd57; font-weight: 700; border-radius: 8px; }
.admin-nav { display: grid; gap: 0.4rem; margin-top: 3.4rem; }
.admin-nav a { padding: 0.75rem 0.85rem; border-left: 3px solid transparent; color: #b9d2cf; font-size: 0.94rem; font-weight: 600; transition: background 120ms ease, color 120ms ease, border-color 120ms ease; }
.admin-nav a:hover, .admin-nav a.active { border-left-color: #f3bd57; color: #ffffff; background: rgba(255, 255, 255, 0.09); }
.sidebar-footer { display: grid; gap: 0.45rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(222, 245, 239, 0.16); }
.admin-role { color: #f3bd57; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; }
.admin-email { overflow: hidden; color: #c1d8d4; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.link-button { padding: 0; border: 0; color: var(--teal); background: transparent; font-weight: 600; text-align: left; }
.admin-sidebar .link-button { margin-top: 0.35rem; color: #f3bd57; }
.danger-link { color: var(--coral); }

.admin-main { min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem clamp(1.2rem, 4vw, 4.5rem); border-bottom: 1px solid rgba(24, 36, 44, 0.08); background: rgba(245, 248, 247, 0.76); backdrop-filter: blur(16px); }
.admin-content { width: min(1180px, 100%); margin: 0 auto; padding: clamp(1.4rem, 4vw, 3.6rem) clamp(1.2rem, 4vw, 4.5rem) 4rem; }
.eyebrow { display: block; color: var(--teal); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; line-height: 1.4; text-transform: uppercase; }
.session-chip { padding: 0.35rem 0.65rem; border: 1px solid #b9ddd5; color: var(--teal-deep); background: var(--teal-wash); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.compact-heading { align-items: flex-start; }
.page-lede { max-width: 650px; margin-bottom: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.heading-stat { display: grid; min-width: 132px; padding: 0.8rem 1rem; border-left: 3px solid var(--amber); background: rgba(255, 255, 255, 0.62); }
.heading-stat strong { font-size: 1.65rem; line-height: 1; }
.heading-stat span { margin-top: 0.35rem; color: var(--ink-soft); font-size: 0.75rem; }
.back-link { display: inline-block; margin-bottom: 1.2rem; color: var(--teal); font-size: 0.82rem; font-weight: 700; }
.id-text { display: block; color: #829097; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.72rem; overflow-wrap: anywhere; }

.panel { border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.panel-caption { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--line); font-size: 0.83rem; font-weight: 700; letter-spacing: 0.02em; }
.product-tabs { display: flex; flex-wrap: wrap; gap: 0.55rem; padding: 0.8rem 1.15rem 0; border-bottom: 1px solid var(--line); }
.product-tab { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 2.35rem; padding: 0.45rem 0.75rem; border: 1px solid transparent; border-bottom: 0; color: var(--ink-soft); background: transparent; font-size: 0.8rem; font-weight: 700; }
.product-tab:hover, .product-tab:focus-visible { color: var(--teal-deep); background: #f7faf9; }
.product-tab.is-active { border-color: var(--line); color: var(--teal-deep); background: var(--panel); box-shadow: 0 -3px 0 var(--amber) inset; }
.product-tab-count { display: inline-grid; min-width: 1.25rem; min-height: 1.25rem; padding: 0 0.25rem; place-items: center; border-radius: 50%; color: var(--teal-deep); background: var(--teal-wash); font-size: 0.7rem; }
.muted-note { color: var(--ink-soft); font-size: 0.78rem; }
.empty-state, .empty-inline { color: var(--ink-soft); text-align: center; }
.empty-state { padding: 3rem 1rem; }
.empty-inline { padding: 1.8rem 1rem; }
.alert { margin-bottom: 1.2rem; padding: 0.8rem 1rem; border-left: 3px solid; font-size: 0.88rem; }
.alert-error { border-color: var(--coral); color: #873b34; background: var(--coral-wash); }
.status-callout { display: grid; gap: 0.35rem; margin-bottom: 1rem; padding: 0.9rem 1rem; border-left: 3px solid; font-size: 0.86rem; }
.warning-callout { border-color: var(--amber); color: #765016; background: var(--amber-wash); }
.action-divider { height: 1px; margin: 1.5rem 0; background: var(--line); }

.filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto; align-items: end; gap: 0.8rem; margin-bottom: 1.5rem; }
.filter-search, .filter-select, .field-group { display: grid; gap: 0.4rem; }
.field-group label, .field-label, .filter-bar label { color: var(--ink-soft); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; }
.field-hint { color: var(--ink-soft); font-size: 0.72rem; line-height: 1.4; }
.field-input, .table-input { width: 100%; min-height: 2.55rem; padding: 0.6rem 0.7rem; border: 1px solid #c9d8d5; color: var(--ink); background: #fbfdfc; outline: none; }
.field-input:focus, .table-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24, 124, 118, 0.12); }
.field-input:disabled, .table-input:disabled { color: #718087; background: #eef3f1; border-color: #d6e2df; cursor: not-allowed; opacity: 1; }
textarea.field-input { resize: vertical; }
.primary-button, .secondary-button, .danger-button { min-height: 2.55rem; padding: 0.6rem 0.95rem; border: 1px solid transparent; font-weight: 700; transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease; }
.primary-button:hover:not(:disabled), .secondary-button:hover:not(:disabled), .danger-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 13px rgba(23, 66, 70, 0.12); }
.primary-button { color: #ffffff; background: var(--teal); }
.primary-button:hover:not(:disabled) { background: var(--teal-deep); }
.secondary-button { border-color: #bdd0cc; color: var(--teal-deep); background: #ffffff; }
.danger-button { color: #8a3931; background: var(--coral-wash); border-color: #e9b6ae; }
.inline-button { display: inline-block; margin-top: 0.8rem; }
.wide-button { width: 100%; }

.heading-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.alert-success { border-color: var(--teal); color: var(--teal-deep); background: var(--teal-wash); }
.podcast-admin-layout { display: grid; grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.7fr); gap: 1.2rem; align-items: start; }
.podcast-admin-list-panel { position: sticky; top: 1rem; overflow: hidden; }
.podcast-admin-list { display: grid; max-height: calc(100vh - 220px); overflow-y: auto; padding: 0.65rem; }
.podcast-admin-list-item { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.65rem; align-items: center; width: 100%; padding: 0.7rem; border: 1px solid transparent; background: transparent; color: var(--ink); text-align: left; }
.podcast-admin-list-item:hover, .podcast-admin-list-item:focus-visible { border-color: var(--line); background: #fbfdfc; }
.podcast-admin-list-item.is-selected { border-color: #b9ddd5; background: var(--teal-wash); }
.podcast-admin-list-index { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; color: #17383d; background: #f3bd57; font-size: 0.75rem; font-weight: 700; }
.podcast-admin-list-copy { display: grid; min-width: 0; gap: 0.25rem; }
.podcast-admin-list-copy strong { overflow: hidden; font-size: 0.84rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.podcast-admin-list-copy span { overflow: hidden; color: var(--ink-soft); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.podcast-admin-list-state { justify-self: end; }
.podcast-admin-editor { display: grid; gap: 1.2rem; min-width: 0; }
.podcast-admin-editor-body { display: grid; gap: 1rem; padding: 1.15rem; }
.podcast-admin-editor-body > .primary-button { justify-self: start; }
.checkbox-field { display: flex; align-items: center; gap: 0.55rem; color: var(--ink-soft); font-size: 0.84rem; font-weight: 600; }
.checkbox-field input { width: 1rem; height: 1rem; accent-color: var(--teal); }
.podcast-admin-source-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; padding: 0.85rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.podcast-admin-source-grid > div { display: grid; gap: 0.25rem; min-width: 0; }
.podcast-admin-source-grid strong, .podcast-admin-source-grid a { overflow-wrap: anywhere; font-size: 0.82rem; }
.podcast-admin-source-grid a { color: var(--teal); font-weight: 700; }
.podcast-admin-audio { width: 100%; }
.podcast-admin-form-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: end; }
.podcast-admin-checkbox { min-height: 2.55rem; padding-bottom: 0.65rem; }
.podcast-material-editor { min-height: 18rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.55; }
.podcast-material-preview { display: grid; gap: 0.45rem; }
.podcast-material-preview pre { max-height: 18rem; margin: 0; padding: 0.85rem; overflow: auto; border: 1px solid var(--line); background: #f7faf9; color: var(--ink); font: inherit; line-height: 1.55; white-space: pre-wrap; }
.podcast-cue-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.podcast-cue-import { display: grid; flex: 1; min-width: 0; gap: 0.4rem; }
.podcast-cue-import .field-input { min-height: auto; padding: 0.45rem 0.55rem; }
.podcast-cue-editor-list { display: grid; gap: 0.65rem; }
.podcast-cue-editor-row { display: grid; grid-template-columns: 2rem minmax(90px, 0.7fr) minmax(90px, 0.7fr) minmax(180px, 2fr) auto; gap: 0.65rem; align-items: end; padding: 0.75rem; border: 1px solid var(--line); background: #fbfdfc; }
.podcast-cue-editor-index { align-self: center; color: var(--teal-deep); font-size: 0.8rem; font-weight: 700; text-align: center; }
.podcast-cue-editor-text { min-width: 0; }

@media (max-width: 980px) {
    .podcast-admin-layout { grid-template-columns: minmax(200px, 0.65fr) minmax(0, 1.35fr); }
    .podcast-admin-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .heading-actions { width: 100%; }
    .heading-actions button { flex: 1; }
    .podcast-admin-layout { grid-template-columns: 1fr; }
    .podcast-admin-list-panel { position: static; }
    .podcast-admin-list { max-height: 18rem; }
    .podcast-admin-form-row { grid-template-columns: 1fr; }
    .podcast-admin-checkbox { padding-bottom: 0; }
    .podcast-cue-toolbar { align-items: stretch; flex-direction: column; }
    .podcast-cue-toolbar > .secondary-button { align-self: flex-start; }
    .podcast-cue-editor-row { grid-template-columns: 2rem 1fr 1fr; }
    .podcast-cue-editor-text { grid-column: 2 / -1; }
    .podcast-cue-editor-row > .danger-link { grid-column: 2 / -1; }
}

.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.86rem; }
.member-table { table-layout: fixed; }
.member-table th:first-child, .member-table td:first-child { width: 18%; }
.member-table td:first-child > * { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table th { padding: 0.7rem 1.15rem; color: #718087; background: #f7faf9; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 0.95rem 1.15rem; border-top: 1px solid #edf2f0; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfdfc; }
.compact-table { min-width: 620px; }
.member-link { color: var(--teal); font-weight: 700; }
.member-link:hover, .back-link:hover { text-decoration: underline; }
.cell-primary, .cell-secondary { display: block; }
.cell-primary { font-weight: 600; }
.cell-secondary { margin-top: 0.2rem; color: var(--ink-soft); font-size: 0.76rem; }
.grant-mark, .source-mark, .code-mark { color: var(--teal-deep); font-weight: 700; }
.code-mark { letter-spacing: 0.08em; }
.status-badge { display: inline-flex; padding: 0.25rem 0.55rem; border: 1px solid; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: capitalize; white-space: nowrap; }
.status-active, .status-enabled, .status-completed { border-color: #a9d7cb; color: #126b61; background: var(--teal-wash); }
.status-suspended, .status-disabled, .status-canceled, .status-revoked { border-color: #e7b2aa; color: #8a3931; background: var(--coral-wash); }
.status-created, .status-pending { border-color: #eed39a; color: #795719; background: var(--amber-wash); }
.product-badge-premium { border-color: #a9d7cb; color: #126b61; background: var(--teal-wash); }
.product-badge-podcast { border-color: #eed39a; color: #795719; background: var(--amber-wash); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.8rem; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 1.2rem; }
.detail-stack { display: grid; gap: 1.2rem; }
.product-management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.product-management-panel { min-width: 0; }
.detail-panel { min-height: 100%; padding-bottom: 1.2rem; }
.detail-panel > .field-group, .detail-panel > .primary-button, .detail-panel > .danger-button, .detail-panel > .secondary-button, .status-callout, .subsection-list { margin-right: 1.15rem; margin-left: 1.15rem; }
.detail-panel > .field-group { margin-top: 1rem; }
.detail-panel > .primary-button, .detail-panel > .danger-button, .detail-panel > .secondary-button { margin-top: 1rem; }
.subsection-list { margin-top: 1.2rem; border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid #edf2f0; }
.row-end { display: grid; justify-items: end; gap: 0.35rem; }

.create-panel { margin-bottom: 1.5rem; }
.discount-form { display: grid; grid-template-columns: 1.1fr 0.75fr 0.55fr 1.5fr auto; align-items: end; gap: 0.8rem; padding: 1.15rem; }
.create-discount-button { min-width: 7rem; white-space: nowrap; }
.billing-plan-form, .billing-plan-edit-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.billing-plan-form > .field-group, .billing-plan-edit-form > .field-group { min-width: 0; }
.billing-plan-edit-form .action-cell { display: flex; grid-column: span 2; align-items: center; justify-content: flex-end; gap: 0.8rem; }
.billing-plan-edit-form .action-cell .link-button { margin-right: 0; }
.billing-plan-edit-form .action-cell .link-button { min-height: 2.55rem; padding: 0.6rem 0.2rem; display: inline-flex; align-items: center; }
.editing-row { background: #fffaf0; }
.table-input { min-width: 100px; min-height: 2.2rem; padding: 0.4rem 0.5rem; }
.wide-input { min-width: 190px; }
.action-cell { white-space: nowrap; }
.action-cell .link-button { margin-right: 0.8rem; }

.login-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); min-height: 100vh; }
.login-visual { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(2rem, 7vw, 7rem); color: #ecf8f4; background: linear-gradient(145deg, #163b40, #0d252c); }
.visual-grid { position: absolute; inset: 0; opacity: 0.42; background-image: linear-gradient(rgba(168, 223, 210, 0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(168, 223, 210, 0.13) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom right, black, transparent 78%); }
.visual-copy, .visual-stamp { position: relative; z-index: 1; }
.visual-copy { max-width: 520px; margin-top: auto; margin-bottom: auto; }
.visual-copy .eyebrow { color: #f3bd57; }
.visual-copy h1 { max-width: 470px; margin-top: 1rem; color: #ffffff; font-size: clamp(3rem, 7vw, 6.6rem); letter-spacing: -0.04em; }
.visual-copy p { max-width: 360px; color: #b8d2cd; font-size: 1.05rem; line-height: 1.65; }
.visual-stamp { align-self: flex-end; color: #f3bd57; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; }
.login-panel { display: grid; align-content: center; width: min(430px, 100%); margin: 0 auto; padding: 2.2rem; }
.login-heading { margin-bottom: 2rem; }
.stack-form { display: grid; gap: 1.2rem; }
.login-panel .muted-note { margin-top: 1.3rem; line-height: 1.5; }
.validation-message { color: var(--coral); font-size: 0.75rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
    .admin-shell { grid-template-columns: 190px minmax(0, 1fr); }
    .discount-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .billing-plan-form, .billing-plan-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .billing-plan-edit-form .action-cell { grid-column: auto; justify-content: flex-start; }
    .discount-form .plan-field { grid-column: span 2; }
}

@media (max-width: 720px) {
    .admin-shell { display: block; }
    .admin-sidebar { position: static; height: auto; padding: 1rem; }
    .admin-nav { display: flex; overflow-x: auto; margin-top: 1.2rem; }
    .admin-nav a { border-bottom: 3px solid transparent; border-left: 0; white-space: nowrap; }
    .admin-nav a:hover, .admin-nav a.active { border-bottom-color: #f3bd57; border-left: 0; }
    .sidebar-footer { grid-template-columns: 1fr auto; margin-top: 1rem; padding-top: 0.8rem; }
    .sidebar-footer .admin-role, .sidebar-footer .admin-email { grid-column: 1; }
    .sidebar-footer .link-button { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
    .admin-topbar { padding: 0.85rem 1rem; }
    .admin-content { padding: 1.5rem 1rem 2.5rem; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
    .heading-stat { min-width: 120px; }
    .filter-bar, .detail-grid, .product-management-grid { grid-template-columns: 1fr; }
    .filter-button { width: 100%; }
    .discount-form { grid-template-columns: 1fr; }
    .billing-plan-form, .billing-plan-edit-form { grid-template-columns: 1fr; }
    .billing-plan-edit-form .action-cell { grid-column: auto; }
    .discount-form .plan-field { grid-column: auto; }
    .login-shell { display: block; }
    .login-visual { min-height: 260px; padding: 1.5rem; }
    .visual-copy { margin-top: 3rem; }
    .visual-copy h1 { margin-top: 0.5rem; font-size: 3.2rem; }
    .login-panel { width: 100%; padding: 2.2rem 1.5rem; }
}

/* ==========================================================================
   Podcast Admin Lecture Management & RWD Preview
   ========================================================================== */

.podcast-admin-parse-status {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.podcast-admin-parse-status .status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
}

.podcast-admin-tabs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--line);
}

.podcast-admin-tab-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.podcast-tab-btn.is-active {
    background: var(--teal);
    color: #ffffff;
    border-color: var(--teal);
}

.podcast-admin-preview-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.85rem;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.podcast-admin-preview-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.podcast-device-switcher {
    display: flex;
    gap: 0.4rem;
}

.podcast-device-btn.is-active {
    background: var(--navy);
    color: #ffffff;
    border-color: var(--navy);
}

.podcast-admin-preview-frame {
    transition: max-width 0.3s ease;
    overflow-x: hidden;
}

.podcast-admin-preview-frame.preview-desktop {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.podcast-admin-preview-frame.preview-mobile {
    max-width: 375px;
    margin: 0.5rem auto;
    background: #ffffff;
    border: 10px solid #1e293b;
    border-radius: 36px;
    padding: 1.25rem 0.85rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.podcast-admin-raw-pre {
    margin: 0;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Include Podcast Lecture View styles in Admin */
.podcast-lecture-container { display: flex; flex-direction: column; gap: 1.5rem; width: 100%; }
.podcast-lecture-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.35rem 0.5rem; border-radius: 9999px; background: #f1f5f9; border: 1px solid #e2e8f0; }
.podcast-lecture-nav-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border-radius: 9999px; border: 1px solid transparent; background: transparent; font-size: 0.82rem; font-weight: 700; color: #1e293b; cursor: pointer; }
.podcast-lecture-nav-btn.is-active { background: #ffffff; border-color: #cbd5e1; color: #0284c7; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.podcast-nav-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 800; background: #0284c7; color: #ffffff; }

.podcast-section-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.65rem; padding: 0.75rem 1rem; border-radius: 10px; background: #f0fdfa; border-left: 4px solid #0d9488; }
.podcast-banner-kicker { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: #0d9488; }
.podcast-section-banner h3 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #134e4a; }
.podcast-banner-badge { font-size: 0.75rem; font-weight: 700; background: #ffffff; padding: 0.25rem 0.6rem; border-radius: 9999px; border: 1px solid #ccfbf1; color: #0f766e; }

.podcast-vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.85rem; }
.podcast-vocab-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 0.95rem; display: flex; flex-direction: column; gap: 0.55rem; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.podcast-vocab-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.podcast-vocab-headword { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem; }
.podcast-vocab-ruby { font-size: 1.2rem; font-weight: 800; color: #0f172a; line-height: 1.4; }
.podcast-vocab-ruby ruby rt { font-size: 0.62rem; font-weight: 600; color: #0284c7; }
.podcast-pos-badge { display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 700; padding: 0.12rem 0.45rem; border-radius: 4px; }
.pos-verb { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.pos-idiom { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.pos-collocation { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.pos-adverb { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.pos-noun { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.pos-adj { background: #fce7f3; color: #be185d; border: 1px solid #fbcfe8; }
.pos-default { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

.podcast-vocab-tools { display: flex; gap: 0.3rem; align-items: center; }
.podcast-mini-btn { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 5px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; cursor: pointer; color: #334155; }
.podcast-vocab-meaning { font-size: 0.9rem; font-weight: 700; color: #334155; line-height: 1.45; }
.podcast-vocab-example-box { background: #f8fafc; border-left: 3px solid #f59e0b; border-radius: 0 6px 6px 0; padding: 0.55rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.podcast-example-ja { font-size: 0.88rem; font-weight: 600; color: #0f172a; line-height: 1.5; display: flex; align-items: baseline; gap: 0.35rem; }
.podcast-example-icon { font-size: 0.65rem; font-weight: 800; background: #f59e0b; color: #ffffff; padding: 0.1rem 0.3rem; border-radius: 3px; flex-shrink: 0; }
.podcast-example-zh { font-size: 0.82rem; color: #64748b; line-height: 1.45; padding-left: 1.35rem; }

.podcast-grammar-list { display: flex; flex-direction: column; gap: 1rem; }
.podcast-grammar-card { background: #ffffff; border: 1px solid #e2e8f0; border-left: 4px solid #0d9488; border-radius: 10px; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.podcast-grammar-header { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; border-bottom: 1px solid #f1f5f9; padding-bottom: 0.65rem; }
.podcast-grammar-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #0d9488; color: #ffffff; font-size: 0.78rem; font-weight: 800; }
.podcast-grammar-title { margin: 0; font-size: 1.1rem; font-weight: 800; color: #0f172a; flex: 1; min-width: 160px; }
.podcast-grammar-speak-btn { width: auto; padding: 0.28rem 0.75rem; font-size: 0.78rem; font-weight: 700; border-radius: 9999px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; cursor: pointer; transition: all 0.2s ease; }
.podcast-grammar-speak-btn:hover { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.podcast-grammar-speak-btn.is-speaking { background: #e0f2fe; border-color: #38bdf8; color: #0284c7; }
.podcast-grammar-field { display: grid; grid-template-columns: 52px 1fr; gap: 0.65rem; align-items: baseline; }
.podcast-field-label { font-size: 0.72rem; font-weight: 800; color: #0d9488; background: #ccfbf1; padding: 0.15rem 0.4rem; border-radius: 3px; text-align: center; display: inline-block; }
.podcast-grammar-desc { font-size: 0.9rem; color: #1e293b; line-height: 1.6; }
.podcast-formula-chip { display: inline-block; font-family: ui-monospace, monospace; font-size: 0.84rem; font-weight: 600; padding: 0.35rem 0.7rem; border-radius: 6px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.podcast-grammar-example-box { background: #f8fafc; border-radius: 6px; padding: 0.65rem 0.85rem; display: flex; flex-direction: column; gap: 0.25rem; }
.podcast-grammar-example-box p { margin: 0; }

.podcast-quiz-banner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.podcast-quiz-score-badge { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 9999px; padding: 0.25rem 0.75rem; font-size: 0.78rem; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 0.35rem; }
.podcast-quiz-toggle-btn { background: #ffffff; border: 1px solid #0284c7; color: #0284c7; border-radius: 9999px; padding: 0.25rem 0.75rem; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.podcast-quiz-toggle-btn.is-active { background: #0284c7; color: #ffffff; }
.podcast-quiz-reset-btn { background: #f1f5f9; border: 1px solid #cbd5e1; color: #475569; border-radius: 9999px; padding: 0.25rem 0.65rem; font-size: 0.78rem; font-weight: 700; cursor: pointer; }

.podcast-quiz-category-block { margin-bottom: 1.25rem; }
.podcast-quiz-category-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.podcast-quiz-category-title h4 { margin: 0; font-size: 0.98rem; font-weight: 800; color: #0f172a; }
.podcast-category-pill { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; background: #f59e0b; color: #ffffff; font-size: 0.78rem; font-weight: 800; }
.podcast-quiz-questions-list { display: flex; flex-direction: column; gap: 0.85rem; }
.podcast-quiz-card { background: #ffffff; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.podcast-quiz-card.card-correct { border-color: #22c55e; box-shadow: 0 0 0 1px #22c55e; }
.podcast-quiz-card.card-incorrect { border-color: #ef4444; box-shadow: 0 0 0 1px #ef4444; }
.podcast-quiz-question-header { display: flex; align-items: baseline; gap: 0.5rem; }
.podcast-question-num { font-size: 0.78rem; font-weight: 800; color: #0284c7; background: #e0f2fe; padding: 0.12rem 0.45rem; border-radius: 4px; flex-shrink: 0; }
.podcast-question-text { margin: 0; font-size: 0.95rem; font-weight: 700; color: #0f172a; line-height: 1.55; flex: 1; }
.podcast-quiz-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.55rem; }
.podcast-quiz-option-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.75rem; border-radius: 8px; border: 1.5px solid #e2e8f0; background: #ffffff; color: #0f172a; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-align: left; }
.podcast-quiz-option-btn:hover:not(:disabled) { border-color: #0284c7; background: #f0f9ff; }
.podcast-opt-key { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #f1f5f9; font-size: 0.75rem; font-weight: 800; color: #475569; flex-shrink: 0; }
.podcast-opt-text { flex: 1; }
.podcast-quiz-option-btn.is-correct-pick { border-color: #16a34a !important; background: #f0fdf4 !important; color: #15803d !important; }
.podcast-quiz-option-btn.is-correct-pick .podcast-opt-key { background: #16a34a; color: #ffffff; }
.podcast-quiz-option-btn.is-wrong-pick { border-color: #dc2626 !important; background: #fef2f2 !important; color: #b91c1c !important; }
.podcast-quiz-option-btn.is-wrong-pick .podcast-opt-key { background: #dc2626; color: #ffffff; }
.podcast-quiz-option-btn.is-revealed-correct { border-color: #16a34a !important; background: #f0fdf4 !important; color: #15803d !important; border-style: dashed !important; }
.podcast-quiz-option-btn.is-revealed-correct .podcast-opt-key { background: #16a34a; color: #ffffff; }
.podcast-quiz-feedback { border-radius: 6px; padding: 0.65rem 0.85rem; font-size: 0.84rem; }
.feedback-correct { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.feedback-review { background: #fffbeb; border: 1px solid #fef3c7; color: #92400e; }
.podcast-feedback-badge { font-weight: 800; margin-right: 0.5rem; }

@media (max-width: 600px) {
    .podcast-vocab-grid { grid-template-columns: 1fr; }
    .podcast-grammar-field { grid-template-columns: 1fr; gap: 0.25rem; }
    .podcast-quiz-options { grid-template-columns: 1fr; }
}
