/* =================================================================== */
/* GLOBAL LAYOUT & UTILITIES
/* =================================================================== */

/* Reserving space for the scrollbar to prevent layout shifts. */
html {
    scrollbar-gutter: stable;
}

body.modal-open {
    overflow: hidden;
}

/* Breathing room between fixed header / site footer and the Scribe shell */
#scribe-app-root,
#scribe-auth-container {
    margin-top: 1.25rem;
    margin-bottom: 2.5rem;
}

/* Shared layout tokens for shell + loading skeleton (sidebar row aligns with command panels) */
#scribe-app-root {
    --scribe-pane-inset: 20px;
    --scribe-shell-padding-top: 20px;
    --scribe-extra-header-gap: 12px;
}

/* --- Scribe initial load: global preloader must stay until scribe-app.js finishes (see runLoadingSequence) --- */
body.scribe-page-loading {
    overflow: hidden;
}

body.scribe-page-loading .preloader:not(.is-loaded) {
    z-index: 2147483000;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
}

/* Full Scribe shell skeleton (default children of #scribe-app-root; replaced when render.app() runs) */
.scribe-app-skeleton {
    display: grid;
    grid-template-columns: 118px 1fr;
    min-height: 70vh;
    width: 100%;
    padding-top: calc(75px + var(--scribe-extra-header-gap));
    box-sizing: border-box;
    background: linear-gradient(165deg, rgba(14, 16, 24, 0.98) 0%, rgba(8, 9, 14, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

.scribe-skeleton-sidebar {
    padding: var(--scribe-shell-padding-top) 16px var(--scribe-pane-inset) 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.scribe-skeleton-main {
    padding: var(--scribe-shell-padding-top) 28px var(--scribe-pane-inset) 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scribe-skeleton-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.scribe-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.scribe-skeleton-block,
.scribe-skeleton-card {
    border-radius: 10px;
    min-height: 14px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.06) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shine 1.35s ease-in-out infinite;
}

.scribe-skeleton-block--logo {
    height: 36px;
    margin-bottom: 8px;
}

.scribe-skeleton-block--title {
    flex: 1;
    min-height: 28px;
    max-width: 280px;
}

.scribe-skeleton-block--chip {
    width: 120px;
    height: 32px;
    border-radius: 999px;
}

.scribe-skeleton-card {
    min-height: 120px;
}

@media (max-width: 900px) {
    .scribe-app-skeleton {
        grid-template-columns: 1fr;
    }
    .scribe-skeleton-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* Base animation for skeleton loaders and button spinners */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes skeleton-shine {
    to {
        background-position: -200% 0;
    }
}


/* Reusable skeleton card styles */
.skeleton-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    background-color: rgba(0, 0, 0, 0.2);
}

.skeleton-card.is-skeleton {
    height: 85px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s infinite linear;
}

.skeleton-info div {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s infinite linear;
    border-radius: 4px;
}

.skeleton-info .skeleton-title {
    height: 20px;
    width: 200px;
    margin-bottom: 8px;
}

.skeleton-info .skeleton-meta {
    height: 14px;
    width: 100px;
}

.skeleton-actions .skeleton-button {
    height: 32px;
    width: 70px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.btn-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Main application grid: Sidebar | Main Content */
.scribe-app-container {
    --scribe-sidebar-w: 118px;
    display: grid;
    grid-template-columns: var(--scribe-sidebar-w) 1fr;
    height: 100vh;
    padding-top: calc(75px + var(--scribe-extra-header-gap));
    box-sizing: border-box;
}

/* --- Access Denied / Initial Loading --- */
.scribe-access-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
}

.scribe-access-box {
    max-width: 500px;
    padding: 40px;
    background-color: rgba(15, 17, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.scribe-access-box h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 15px;
}

.scribe-access-box p {
    color: #d1d5db;
}

.loading-spinner-scribe {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-left-color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

/* =================================================================== */
/* SIDEBAR NAVIGATION (Scribe rail — universe + sky theme via CSS variables)
/* =================================================================== */

.scribe-sidebar {
    /* Theme tokens (overridden in theme-earth-sky.css) */
    --scribe-nav-fg: rgba(255, 255, 255, 0.52);
    --scribe-nav-fg-active: #fff;
    --scribe-nav-accent: #5b9cf7;
    --scribe-nav-accent-soft: rgba(91, 156, 247, 0.22);
    --scribe-nav-icon-bg: rgba(255, 255, 255, 0.05);
    --scribe-nav-icon-bg-hover: rgba(255, 255, 255, 0.1);
    --scribe-nav-icon-border: rgba(255, 255, 255, 0.12);
    --scribe-nav-icon-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    --scribe-nav-rail-bg: rgba(15, 17, 26, 0.78);
    --scribe-nav-rail-edge: rgba(255, 255, 255, 0.1);

    background: var(--scribe-nav-rail-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-right: 1px solid var(--scribe-nav-rail-edge);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-top: var(--scribe-shell-padding-top);
    padding-bottom: var(--scribe-pane-inset);
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

.sidebar-nav.scribe-sidebar-nav {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

.scribe-sidebar-nav__scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.scribe-sidebar-nav__scroll::-webkit-scrollbar {
    width: 5px;
}

.scribe-sidebar-nav__scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 99px;
}

.scribe-sidebar a.scribe-nav-link.nav-link {
    color: var(--scribe-nav-fg);
}

.scribe-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 6px;
    margin: 0;
    color: var(--scribe-nav-fg);
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-align: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    transition:
        color 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.2s ease,
        box-shadow 0.22s ease;
}

.scribe-nav-link:hover {
    color: var(--scribe-nav-fg-active);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.scribe-nav-link:focus-visible {
    outline: 2px solid var(--scribe-nav-accent);
    outline-offset: 2px;
}

.scribe-nav-link:active {
    transform: scale(0.98);
}

.scribe-nav-link__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--scribe-nav-icon-bg);
    border: 1px solid var(--scribe-nav-icon-border);
    color: inherit;
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.25s ease,
        transform 0.22s ease;
}

.scribe-nav-link:hover .scribe-nav-link__icon {
    background: var(--scribe-nav-icon-bg-hover);
    transform: translateY(-1px);
    box-shadow: var(--scribe-nav-icon-shadow);
}

.scribe-nav-link.is-active {
    color: var(--scribe-nav-fg-active);
    background: linear-gradient(160deg, rgba(91, 156, 247, 0.14) 0%, rgba(91, 156, 247, 0.04) 100%);
    border-color: rgba(91, 156, 247, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.scribe-nav-link.is-active .scribe-nav-link__icon {
    background: linear-gradient(145deg, var(--scribe-nav-accent-soft), rgba(91, 156, 247, 0.08));
    border-color: var(--scribe-nav-accent);
    color: var(--scribe-nav-fg-active);
    box-shadow:
        0 0 0 1px rgba(91, 156, 247, 0.35),
        0 10px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.scribe-nav-link svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    flex-shrink: 0;
}

.scribe-nav-link__label {
    width: 100%;
    max-width: 100%;
    min-height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    hyphens: auto;
}

/* Main Content Area */
.scribe-main-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

#scribe-section-root {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* =================================================================== */
/* SHARED UI COMPONENTS
/* =================================================================== */

/* Shared column styles */
.hub-column,
.db-category-column,
.db-entry-column,
.command-panel,
.hub-widget {
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Shared header styles for columns/panels */
.hub-column-header,
.db-list-header,
.widget-header,
.panel-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.hub-column-header h3,
.db-list-header h3,
.widget-header h3,
.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

/* Generic content list styles */
.hub-column-content,
.db-category-list,
.db-entry-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.hub-column-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}

.empty-state-dark {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6b7280;
    font-style: italic;
}

.interactive-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    height: 100%;
    color: #9ca3af;
}

.empty-state-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    margin-bottom: 20px;
}

.empty-state-icon svg {
    width: 32px;
    height: 32px;
}

.interactive-empty-state h3 {
    font-size: 1.2rem;
    color: #fff;
    margin: 0 0 10px 0;
}

.interactive-empty-state p {
    margin: 0 0 20px 0;
    max-width: 300px;
}

.empty-state-action {
    background-color: transparent;
    border: 1px solid #4a5568;
    color: #a9b3c1;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.empty-state-action:hover {
    background-color: rgba(74, 144, 226, 0.1);
    border-color: #4a90e2;
    color: #fff;
}

/* Card item shared styles */
.content-item-card,
.db-item-card {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.content-item-card:hover,
.db-item-card:hover {
    background-color: rgba(74, 144, 226, 0.05);
}

.content-item-card.is-selected,
.db-item-card.is-selected {
    background-color: rgba(74, 144, 226, 0.15);
    border-color: #4a90e2;
}

.content-item-card h4 {
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-item-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: capitalize;
}

.content-item-card.is-proposal {
    border-style: dashed;
}

.support-reference-chip {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #d1fae5;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.02em;
}

.support-history-trigger-wrap {
    margin-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    padding-top: 12px;
}

.support-history-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.14) 0%, rgba(15, 17, 26, 0.9) 100%);
    color: #e0f2fe;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    text-align: left;
}

.support-history-open-btn:hover:not(:disabled) {
    border-color: rgba(147, 197, 253, 0.55);
    box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.2), 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.support-history-open-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.support-history-open-icon {
    display: flex;
    flex-shrink: 0;
    color: #93c5fd;
}

.support-history-open-label {
    flex: 1;
}

.support-history-count-badge {
    flex-shrink: 0;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.22);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #a7f3d0;
}

.support-history-trigger-hint {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: #8f9bad;
}

.support-status--resolved {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #6ee7b7;
}

/* Support reactivation history modal */
.support-reactivation-history-modal.history-modal-content {
    max-width: 520px !important;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.support-reactivation-history-header.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(30, 36, 54, 0.6) 0%, rgba(15, 17, 26, 0.2) 100%);
}

.support-reactivation-history-heading h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f9fafb;
    letter-spacing: -0.02em;
}

.support-reactivation-history-sub {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #9ca3af;
    word-break: break-all;
}

.support-reactivation-history-body.history-modal-body {
    padding: 20px 22px 24px;
    max-height: min(62vh, 420px);
    background: rgba(8, 10, 16, 0.4);
}

.support-reactivation-history-timeline.creator-history-timeline {
    border-left-color: rgba(74, 144, 226, 0.35);
    padding-left: 28px;
}

.support-reactivation-history-entry .timeline-dot {
    border-color: #60a5fa;
    background: #1e293b;
}

.support-reactivation-history-entry-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.support-reactivation-history-ref {
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: #cbd5e1;
}

.support-reactivation-history-ref-code {
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
    color: #a7f3d0;
}

.support-reactivation-history-meta-line {
    font-size: 0.78rem;
    color: #94a3b8;
}

.support-reactivation-history-empty {
    text-align: center;
    padding: 28px 16px 12px;
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.5;
}

.support-reactivation-history-empty-hint {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.support-reactivation-history-row-btn {
    display: block;
    width: calc(100% + 4px);
    margin-left: -2px;
    padding: 10px 12px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.support-reactivation-history-row-btn:hover {
    background: rgba(74, 144, 226, 0.12);
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.support-reactivation-history-row-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.45);
}

.support-reactivation-history-row-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #60a5fa;
}

.support-reactivation-history-header--detail {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 12px 16px;
}

.support-history-detail-back {
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.support-history-detail-back:hover {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(96, 165, 250, 0.4);
}

.support-reactivation-history-modal--detail.history-modal-content {
    max-width: 540px !important;
}

.support-history-detail-loading,
.support-history-detail-error {
    text-align: center;
    padding: 32px 16px;
    color: #9ca3af;
    font-size: 0.9rem;
}

.support-history-detail-error p {
    margin: 0;
}

.support-history-detail-card {
    text-align: left;
}

.support-history-detail-ref-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 10px;
}

.support-history-detail-subject {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f3f4f6;
    line-height: 1.35;
}

.support-history-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 18px;
    margin-bottom: 16px;
}

.support-history-detail-grid > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.support-history-detail-value {
    font-size: 0.85rem;
    color: #d1d5db;
    word-break: break-word;
}

.support-history-detail-mono {
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
}

.support-history-detail-preview {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.support-history-detail-preview p {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: #e5e7eb;
    line-height: 1.45;
}

.support-history-detail-msgs .support-meta-label {
    display: block;
    margin-bottom: 10px;
}

.support-history-msg-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 2px 8px 0;
}

.support-history-msg {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.support-history-msg--staff {
    border-color: rgba(74, 144, 226, 0.35);
    background: rgba(74, 144, 226, 0.1);
}

.support-history-msg-meta {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-bottom: 6px;
}

.support-history-msg-body {
    font-size: 0.85rem;
    color: #e5e7eb;
    line-height: 1.45;
    white-space: pre-wrap;
}

.support-history-msgs-empty {
    margin: 0;
    font-size: 0.82rem;
    color: #8b949e;
    font-style: italic;
    padding: 12px;
    text-align: center;
}

/* --- Support Intake (master–detail) --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.support-inbox-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 20px 28px 28px;
    gap: 20px;
    background: linear-gradient(165deg, rgba(18, 21, 32, 0.97) 0%, rgba(12, 14, 22, 0.99) 100%);
    border-radius: 12px;
    margin: 12px 16px 16px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.support-inbox-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.support-inbox-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f3f4f6;
}

.support-inbox-subtitle {
    margin: 6px 0 0;
    font-size: 0.875rem;
    color: #9ca3af;
    max-width: 36ch;
    line-height: 1.4;
}

.support-inbox-toolbar-meta {
    display: flex;
    align-items: center;
}

.support-inbox-count-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(74, 144, 226, 0.12);
    border: 1px solid rgba(74, 144, 226, 0.28);
}

.support-inbox-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #93c5fd;
    font-variant-numeric: tabular-nums;
}

.support-inbox-count-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
}

.support-inbox-search-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 240px;
    min-width: min(100%, 280px);
    max-width: 360px;
}

.support-inbox-search-hint {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #93c5fd;
    padding-left: 2px;
}

.support-inbox-search-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.support-inbox-search-wrap:focus-within {
    border-color: rgba(74, 144, 226, 0.55);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.support-inbox-search-label {
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #6b7280;
    cursor: pointer;
}

.support-inbox-search {
    flex: 1;
    min-width: 0;
    margin: 0;
    border: none;
    background: transparent;
    padding: 10px 12px 10px 0;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.support-inbox-search::placeholder {
    color: #6b7280;
}

.support-inbox-search:focus {
    outline: none;
}

.support-inbox-panes {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 16px;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.support-ticket-list-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: rgba(10, 12, 20, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.support-ticket-list-pane-header {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.support-ticket-list-inner {
    flex: 1;
    min-height: 180px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding: 8px;
}

.support-ticket-row-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.support-ticket-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 10px 12px;
    align-items: start;
    width: 100%;
    padding: 12px 12px;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.support-ticket-row:hover {
    background: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.2);
}

.support-ticket-row.is-selected {
    background: rgba(74, 144, 226, 0.18);
    border-color: rgba(74, 144, 226, 0.45);
    box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.15);
}

.support-ticket-row:active {
    transform: scale(0.99);
}

.support-ticket-row--archived {
    opacity: 0.88;
    background: rgba(255, 255, 255, 0.02);
}

.support-ticket-row--archived .support-ticket-row-title {
    color: #c6ccd6;
}

.support-ticket-archived-note {
    margin: 14px 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #9ca3af;
}

.support-ticket-row-avatar {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: start;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(145deg, rgba(74, 144, 226, 0.35), rgba(99, 102, 241, 0.25));
    color: #e0e7ff;
    flex-shrink: 0;
}

.support-ticket-row-body {
    grid-column: 2;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.support-ticket-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.support-ticket-row-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: #f3f4f6;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.support-ticket-row-meta {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-ticket-row-preview {
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.support-ticket-row-time {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    font-size: 0.68rem;
    color: #6b7280;
    white-space: nowrap;
    padding-top: 2px;
}

.support-status-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 6px;
}

.support-status-badge--large {
    font-size: 0.72rem;
    padding: 5px 12px;
    border-radius: 8px;
}

.support-status--open {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fcd34d;
}

.support-status--progress {
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #93c5fd;
}

/* ── Priority badges ─────────────────────────────────────── */
.support-priority-badge {
    flex-shrink: 0;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.3;
}
.support-priority-badge--large {
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: capitalize;
}
.support-priority--low { background: rgba(107, 114, 128, 0.2); border: 1px solid rgba(107, 114, 128, 0.35); color: #9ca3af; }
.support-priority--normal { background: rgba(59, 130, 246, 0.2); border: 1px solid rgba(59, 130, 246, 0.35); color: #93c5fd; }
.support-priority--high { background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(245, 158, 11, 0.35); color: #fcd34d; }
.support-priority--critical { background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; animation: support-priority-pulse 1.5s ease-in-out infinite; }

@keyframes support-priority-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.support-ticket-row-badges {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.support-ticket-detail-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

/* ── Tags ────────────────────────────────────────────────── */
.support-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: lowercase;
}

.support-ticket-row-tags {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.support-ticket-detail-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

/* ── CSAT Display ────────────────────────────────────────── */
.support-ticket-detail-csat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 8px;
}
.support-csat-stars {
    font-size: 1.1rem;
    color: #f59e0b;
    letter-spacing: 3px;
}
.support-csat-comment {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
}

.support-ticket-detail-pane {
    min-height: 200px;
    min-width: 0;
    background: rgba(10, 12, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.support-ticket-detail-card {
    padding: 22px 24px 28px;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
    flex: 1;
}

.support-ticket-detail-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.support-ticket-detail-subject {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #f9fafb;
    line-height: 1.35;
    max-width: 560px;
}

.support-ticket-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px 20px;
    margin-bottom: 18px;
}

.support-ticket-detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.support-meta-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.support-meta-value {
    font-size: 0.9rem;
    color: #e5e7eb;
    word-break: break-word;
}

.support-reference-chip-wrap {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.support-claim-row {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}
.support-claim-row--need {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #e5e7eb;
}
.support-claim-row--yours {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.22);
    color: #d1fae5;
    justify-content: space-between;
}
.support-claim-row--busy {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
}
.support-claim-hint {
    margin: 0;
    flex: 1;
    min-width: 140px;
}

.support-ticket-detail-message {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.support-ticket-detail-message-body {
    margin: 8px 0 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #d1d5db;
    white-space: pre-wrap;
    word-break: break-word;
}

.support-ticket-no-message {
    color: #6b7280;
    font-style: italic;
}

.support-ticket-detail-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.support-reactivate-btn.action-btn.primary {
    padding: 12px 22px;
    font-size: 0.95rem;
    border-radius: 10px;
    min-height: 48px;
    box-shadow: 0 2px 12px rgba(34, 197, 94, 0.25);
}

.support-reactivate-btn.action-btn.primary:hover:not(:disabled) {
    filter: brightness(1.06);
}

.support-ticket-detail-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 28px;
    min-height: 220px;
    color: #9ca3af;
}

.support-ticket-detail-empty-icon {
    margin-bottom: 16px;
    opacity: 0.45;
    color: #6b7280;
}

.support-ticket-detail-empty-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #d1d5db;
}

.support-ticket-detail-empty-hint {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 32ch;
}

.support-inbox-empty {
    padding: 28px 20px;
    text-align: center;
    color: #9ca3af;
}

.support-inbox-empty-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #d1d5db;
}

.support-inbox-empty-hint {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
}

.support-ticket-list-inner .support-inbox-empty--list {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 960px) {
    .support-inbox-panes {
        grid-template-columns: 1fr;
    }

    .support-ticket-list-inner {
        max-height: 42vh;
    }

    .support-ticket-detail-card {
        max-height: none;
    }
}

/* Button & Action Styles */
.action-btn,
.review-approve-btn,
.action-btn-secondary,
.claim-btn,
.quick-look-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, opacity 0.2s;
}

.action-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Pill-shaped buttons */
.review-approve-btn,
.action-btn-claim,
.action-btn-secondary,
.empty-state-action {
    border-radius: 20px;
}

/* Specific button styles */
.review-approve-btn {
    background-color: #22c55e;
    color: white;
    padding: 8px 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease-in-out;
}

.review-approve-btn:hover {
    background-color: #28da6a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.review-approve-btn.is-disabled {
    background-color: #4a5568;
    cursor: not-allowed;
    opacity: 0.7;
}

.review-approve-btn.is-disabled:hover {
    background-color: #4a5568;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.review-changes-btn,
.review-decline-btn {
    background-color: #f59e0b;
    color: #fff;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    transition: opacity 0.2s;
}

.review-panel-actions .review-decline-btn.is-final {
    background-color: #ef4444;
}

.review-panel-actions button:hover {
    opacity: 0.85;
}

.action-btn-edit {
    background-color: #4a90e2;
    color: #fff;
}

.action-btn-edit:hover {
    background-color: #63a4ec;
}

.action-btn-delete {
    background-color: #d9534f;
    color: #fff;
}

.action-btn-delete:hover {
    background-color: #e57373;
}

.action-btn-hide {
    background-color: #f0ad4e;
    color: #fff;
}

.action-btn-hide:hover {
    background-color: #ffc975;
}

/* Category actions (icon-only delete button) */
.db-category-actions .action-btn-delete {
    background-color: #a9b3c1;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'%3E%3C/polyline%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'%3E%3C/path%3E%3C/svg%3E");
    mask-size: 55%;
    mask-repeat: no-repeat;
    mask-position: center;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s;
}

.db-category-actions .action-btn-delete:hover {
    background-color: #fff;
}

.db-category-actions .action-btn-delete svg,
.db-category-actions .action-btn-delete span {
    display: none;
}

/* Tier Badges */
.tier-badge,
.tier-badge-small,
.creator-tier-badge {
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.tier-inexperienced {
    background-color: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.tier-experienced,
.tier-trusted {
    background-color: rgba(74, 144, 226, 0.2);
    color: #a9cfff;
}

.tier-trusted {
    background-color: rgba(103, 194, 58, 0.2);
    color: #a4e48c;
}

/* =================================================================== */
/* CREATOR HUB
/* =================================================================== */

.hub-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hub-tab-nav {
    display: flex;
    gap: 10px;
}

.hub-tab-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background: transparent;
    border: none;
    color: #8b949e;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.hub-tab-btn:hover {
    color: #fff;
}

.hub-tab-btn.is-active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.hub-dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "work-in-progress work-in-progress"
        "analytics activity";
    gap: 25px;
    padding: 20px 40px 40px;
    flex-grow: 1;
    overflow: auto;
}

#hub-work-in-progress-widget {
    grid-area: work-in-progress;
}

#hub-my-analytics-widget {
    grid-area: analytics;
}

#hub-my-activity-widget {
    grid-area: activity;
}

.hub-widget {
    min-height: 300px;
}

.sub-tab-nav {
    display: flex;
    gap: 8px;
}

.sub-tab-btn {
    background: transparent;
    border: 1px solid #4a5568;
    color: #a9b3c1;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sub-tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sub-tab-btn.is-active {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: #fff;
    font-weight: bold;
}

.sub-tab-count {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 6px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

.stat-card-large {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
}

.stat-card-large .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
}

.stat-card-large .stat-label {
    font-size: 0.9rem;
    color: #a9b3c1;
    margin-top: 8px;
}

.analytics-chart-container {
    position: relative;
    height: 150px;
    padding: 10px;
}

#hub-my-activity-widget .hub-column-content {
    font-family: monospace;
    font-size: 0.9rem;
    color: #a9b3c1;
}

.activity-log-item {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.time-since-claimed {
    font-style: italic;
    font-size: 0.8rem;
    color: #9ca3af;
}

.card-hover-actions {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.content-item-card:hover .card-hover-actions {
    opacity: 1;
    pointer-events: auto;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #d1d5db;
    border-radius: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: #fff;
}

.quick-action-btn svg {
    width: 18px;
    height: 18px;
}

.card-content-wrapper {
    flex-grow: 1;
}

/* --- Submission Groups --- */
.submission-group {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.submission-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.submission-group h3 {
    font-size: 0.9rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 10px 10px;
    margin: 0;
}

/* --- Creator Hub Directory --- */
.directory-controls {
    display: flex;
    gap: 15px;
    padding: 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.directory-controls input,
.directory-controls select {
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    font-size: 0.9rem;
}

.directory-controls input {
    flex-grow: 1;
}

.directory-main-view {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 350px 1fr;
    overflow: hidden;
}

#creator-list-container {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Submission History Layout --- */
.history-controls {
    padding: 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    color: #8b949e;
}

#history-list-container {
    padding: 20px 40px;
}

/* --- Contextual History & Dossier Styles --- */
.contextual-history-container {
    padding: 20px 40px;
}

.creator-history-block {
    margin-bottom: 40px;
}

.creator-history-block h3 {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.creator-history-timeline {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    color: #d1d5db;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -39px;
    top: 5px;
    width: 16px;
    height: 16px;
    background-color: #0f111a;
    border: 2px solid #4a90e2;
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.8rem;
    color: #8b949e;
    font-weight: bold;
    margin-bottom: 5px;
}

.timeline-action {
    color: #d1d5db;
}

.timeline-item.is-loading,
.timeline-item.is-error {
    color: #8b949e;
    font-style: italic;
}

/* --- Story Stats Panel Styles --- */
.story-stats-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: #4a90e2;
}

.stat-card.is-active {
    border-color: #4a90e2;
    background-color: rgba(74, 144, 226, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #a9b3c1;
    margin-top: 8px;
}

.stat-card.status-pending .stat-value {
    color: #ffd666;
}

.stat-card.status-approved .stat-value {
    color: #a4e48c;
}

.stat-card.status-draft .stat-value {
    color: #d1d5db;
}

/* --- Chapter List Back Button --- */
.hub-column-header.with-back-btn {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-to-stats-btn {
    background: none;
    border: 1px solid #4a5568;
    color: #a9b3c1;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-to-stats-btn:hover {
    background-color: #4a5568;
    color: #fff;
}


/* =================================================================== */
/* COMMAND CENTER
/* =================================================================== */

.command-center-layout {
    display: grid;
    grid-template-columns: 280px 1fr 350px;
    gap: 20px;
    flex-grow: 1; /* <-- THIS IS THE FIX */
    padding: var(--scribe-shell-padding-top) var(--scribe-pane-inset) var(--scribe-pane-inset);
    box-sizing: border-box;
    overflow: hidden; /* Add this to contain the grid */
}

.command-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.command-panel .panel-content {
    padding: 15px;
    overflow-y: auto;
    height: 100%;
}

/* Filters Panel Styles */
.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #9ca3af;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.toggle-switch-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 4px;
}

.toggle-switch-group .toggle-btn {
    flex: 1;
    padding: 8px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.toggle-switch-group .toggle-btn.is-active {
    background-color: #4a90e2;
    color: #fff;
}

.checkbox-group label {
    display: block;
    margin-bottom: 8px;
    color: #d1d5db;
    cursor: pointer;
}

.checkbox-group input {
    margin-right: 8px;
    accent-color: #4a90e2;
}

/* Submission Feed & Cards */
#submission-feed-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative; 
}

/* In scribe-styles.css */

/* --- START: ADVANCED ANIMATION STYLES --- */

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-out-up {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-15px);
    }
}

.submission-card {
    background: #1a1c29;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left-width: 5px;
    
    /* This transition will now work correctly for the FLIP effect */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.3s ease;
    
    /* The conflicting animation properties have been removed. */
}
/* ADD THIS NEW RULE */
.submission-card.is-entering {
    /* Start the card as invisible */
    opacity: 0; 
    /* Apply the entrance animation */
    animation: fade-in-up 0.4s ease-out forwards;
}
/* This class will be added by JavaScript to trigger the exit animation */
.submission-card.is-leaving {
    animation: fade-out-up 0.3s ease-out forwards;
    position: absolute; /* <-- The key to the smooth slide! */
    /* These next two lines ensure it doesn't mess up the layout as it leaves */
    left: 15px;
    right: 15px;
}

.submission-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Card Type Colors (no change here) */
.submission-card[data-type="Proposal"] { border-left-color: #8B5CF6; }
.submission-card[data-type="Chapter"] { border-left-color: #3B82F6; }
.submission-card[data-type="Database Entry"] { border-left-color: #14B8A6; }

/* --- END: ADVANCED ANIMATION STYLES --- */

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #9ca3af;
}

.card-body h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #f1f1f1;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.claim-btn {
    background-color: #4a90e2;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.claim-btn:hover {
    background-color: #5aa1f2;
}

.claim-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.quick-look-btn {
    background-color: transparent;
    color: #9ca3af;
    border: 1px solid #9ca3af;
    padding: 7px 15px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
}

/* Details Panel */
.details-content h5 {
    font-size: 0.9rem;
    color: #9ca3af;
    text-transform: uppercase;
    margin: 0 0 5px 0;
}

.details-content p {
    font-size: 0.95rem;
    color: #d1d5db;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

/* =================================================================== */
/* MODAL STYLES
/* =================================================================== */

.scheduler-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 10, 15, 0.7);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scheduler-modal-content {
    background: #0f111a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
}

.scheduler-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.scheduler-actions button {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

.schedule-cancel-btn {
    background-color: #777;
    color: #fff;
}

.schedule-confirm-btn {
    background-color: #4a90e2;
    color: #fff;
}

/* --- Feedback Modal --- */
.feedback-modal-content textarea {
    width: 100%;
    min-height: 150px;
    margin-top: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #f1f1f1;
    font-size: 1rem;
    resize: vertical;
}

/* --- Full Preview Modal --- */
.scribe-preview-modal-overlay {
    position: fixed;
    top: 75px;
    left: 80px;
    width: calc(100% - 80px);
    height: calc(100% - 75px);
    background: #0f111a;
    z-index: 6000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.scribe-preview-modal-header {
    display: flex;
    align-items: center;
    padding: 15px 40px;
    background: rgba(15, 17, 26, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 10;
}

.scribe-preview-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.scribe-preview-modal-header .review-panel-actions {
    margin-left: auto;
}

.close-preview-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #a9b3c1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 34px;
    cursor: pointer;
    margin-left: 20px;
    transition: all 0.2s;
}

.close-preview-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

.scribe-preview-modal-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Reusable article styles within the modal */
.lore-review-layout,
.scribe-preview-modal-content .lore-article {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
    align-items: start;
    flex-grow: 1;
    overflow-y: auto;
}

.scribe-preview-modal-content .lore-article {
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.lore-review-main-content,
.scribe-preview-modal-content .lore-article-content {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
}

.lore-review-main-content h4,
.scribe-preview-modal-content .lore-article-header h1 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 0.9rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.scribe-preview-modal-content .lore-article-header h1 {
    font-size: 2.8rem;
    margin: 0 0 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.lore-review-main-content p,
.scribe-preview-modal-content .lore-article-content p {
    margin-bottom: 1.5em;
}

.lore-primary-image {
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.lore-primary-image img {
    display: block;
    width: 100%;
    height: auto;
}

.infobox-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.infobox-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.infobox-item:last-child {
    border-bottom: none;
}

.infobox-key {
    color: #ccc;
    font-weight: bold;
}

.infobox-value {
    color: #fff;
    text-align: right;
}

.lore-image img {
    width: 100%;
    border-radius: 8px;
}

.lore-image figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 10px;
    font-style: italic;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.lore-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 2em auto;
    border-radius: 8px;
}

.lore-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lore-spacer {
    text-align: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 2.5em auto;
    letter-spacing: 0.5em;
}

/* =================================================================== */
/* DATABASE TOOLS
/* =================================================================== */

.db-tools-header {
    padding: 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.db-tools-header h1 {
    margin: 0;
}

.db-tools-content {
    flex-grow: 1;
    overflow-y: auto;
}

.db-tools-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    padding: 20px 40px 40px;
    align-items: flex-start;
}

.db-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
}

.db-category-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.db-category-item.is-selected {
    background-color: rgba(74, 144, 226, 0.1);
    border-color: #4a90e2;
}

.db-category-info {
    display: flex;
    flex-direction: column;
}

.db-category-info strong {
    color: #fff;
    font-size: 1rem;
}

.db-category-info span {
    color: #9ca3af;
    font-size: 0.8rem;
}

.db-category-actions {
    display: flex;
    gap: 8px;
}

.db-entry-column.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.db-entry-column .empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
    color: #777;
    font-size: 1.1rem;
}

.db-item-info {
    display: flex;
    flex-direction: column;
}

.db-item-info strong {
    font-size: 1rem;
    color: #fff;
}

.db-item-info span {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 4px;
}

.db-item-actions {
    display: flex;
    gap: 10px;
}

.db-item-actions .action-btn-secondary,
.db-item-actions .action-btn-danger {
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
}

/* =================================================================== */
/* MISC & OUTDATED (FOR DELETION)
/* =================================================================== */

/* =================================================================== */
/* SCRIBE: ACCESS & ERROR STATES
/* =================================================================== */

.scribe-access-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
}

.scribe-access-box {
    max-width: 500px;
    padding: 40px;
    background-color: rgba(15, 17, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.scribe-access-box h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 15px;
}

.scribe-access-box p {
    color: #d1d5db;
}

/* =================================================================== */
/* SCRIBE: CREATOR HUB - REVIEW PANEL & MODALS
/* =================================================================== */

.review-panel-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.review-panel-header h3 {
    margin: 0;
    font-size: 1.2rem;
    flex-grow: 1;
}

.review-panel-actions {
    display: flex;
    flex-shrink: 0;
}

.review-panel-actions button {
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    transition: opacity 0.2s;
}

.review-panel-actions button:hover {
    opacity: 0.85;
}

.review-approve-btn {
    background-color: #22c55e;
    color: white;
}

.review-changes-btn,
.review-panel-actions .review-decline-btn {
    background-color: #f59e0b;
    color: #fff;
}

.review-panel-actions .review-decline-btn.is-final {
    background-color: #ef4444;
}

.review-panel-content {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}

.review-panel-content p {
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: 1em;
}

.proposal-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 20px 0;
}

.proposal-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-size: 0.9rem;
    color: #ccc;
}

.feedback-modal-content textarea {
    width: 100%;
    min-height: 150px;
    margin-top: 15px;
}

/* In scribe-styles.css, under UTILITIES */

/* This helper class temporarily disables transitions for smooth re-positioning */
.no-transition {
    transition: none !important;
}

/* --- NEW: Scribe Details Panel Enhancements --- */

.details-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.details-content h5 {
    font-size: 0.9rem;
    color: #9ca3af;
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.details-content p {
    font-size: 0.95rem;
    color: #d1d5db;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 4px;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #8b949e;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1rem;
    font-weight: bold;
    color: #e2e8f0;
}

.stat-value.approval-count {
    color: #a4e48c; /* Green */
}

.stat-value.rejection-count {
    color: #fca5a5; /* Red */
}

/* In scribe-styles.css */

/* --- FIX: Compact Details Panel Layout --- */

/* Reduces the large space below each paragraph (e.g., under Creator and Summary) */
.details-content p {
    margin-bottom: 15px;
}

/* Adjusts the spacing around the section titles (like HISTORY & STATS) */
.details-content h5 {
    margin: 18px 0 6px 0;
}

/* Reduces the vertical gap between the rows in the stats grid */
.stat-grid {
    gap: 12px;
}

/* Reduces the padding inside each stat box to make them shorter */
.stat-item {
    padding: 8px;
}

/* --- FIX: Lock Summary Box Height to Prevent Layout Shift --- */

.details-summary {
    /* These three properties create a "line clamp" */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4; /* Show a maximum of 4 lines */
    overflow: hidden; /* Hide any text that overflows the 4 lines */

    /* Define a minimum height to reserve space even for short summaries */
    min-height: 84px; /* Adjust this value if your font size/line-height changes */
    
    /* Ensure consistent spacing */
    margin: 0 0 10px 0 !important;
}

/* In scribe-styles.css */

/* =================================================================== */
/* SCRIBE: ADMIN COMMAND CENTER (Workbench v2)
/* =================================================================== */

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-command-center {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 25px;
    padding: 25px 40px;
    height: calc(100% - 73px); /* Full height minus header */
    box-sizing: border-box;
}

.command-center-card {
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fade-in-up 0.5s ease-out forwards;
    opacity: 0; /* Start hidden for animation */
}

/* Stagger the entrance animation for a nicer effect */
.command-center-card:nth-child(1) { animation-delay: 0.1s; }
.command-center-card:nth-child(2) { animation-delay: 0.2s; }
.command-center-card:nth-child(3) { animation-delay: 0.3s; }
.command-center-card:nth-child(4) { animation-delay: 0.4s; }
.command-center-card:nth-child(5) { animation-delay: 0.5s; }
.command-center-card:nth-child(6) { animation-delay: 0.6s; }


.command-center-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.command-center-card.is-placeholder {
    align-items: center;
    justify-content: center;
    color: #4a5568;
    font-style: italic;
    background: repeating-linear-gradient(
      -45deg,
      rgba(15, 17, 26, 0.6),
      rgba(15, 17, 26, 0.6) 10px,
      rgba(20, 22, 31, 0.6) 10px,
      rgba(20, 22, 31, 0.6) 20px
    );
}
.command-center-card.is-placeholder h3 {
    color: #6b7280;
}

.command-center-card h3 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.command-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* My Workbench Card Specific Styles */
#my-workbench-card {
    cursor: pointer;
    background-size: 200% 200%;
    transition: background-position 0.8s ease-out, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Add this */
    overflow: hidden; /* Add this */
}
/* In scribe-styles.css */
/* This new rule creates the pseudo-element that will hold the background */
#my-workbench-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 10% 10%, rgba(74, 144, 226, 0.2), transparent 40%);
    animation: bg-pan 8s linear infinite;
    z-index: 0; /* Ensures it's behind the content */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.4s ease;
}

/* This rule makes the animated background visible only when the card is in live review */
#my-workbench-card.is-live-review {
    border-color: #4a90e2;
}

#my-workbench-card.is-live-review::before {
    opacity: 1;
}

@keyframes bg-pan { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

.workbench-status-text {
    font-size: 1.2rem;
    color: #d1d5db;
    margin-bottom: 8px;
}
.workbench-item-title {
    font-size: 1rem;
    color: #9ca3af;
    font-style: italic;
}
.workbench-queue-count {
    font-size: 3.5rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}
.workbench-cta {
    margin-top: 15px;
    font-weight: bold;
    color: #4a90e2;
}

/* Activity Log Card Specific Styles */
.activity-log-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}
.activity-log-item {
    font-size: 0.9rem;
    color: #a9b3c1;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.activity-log-item:last-child {
    border-bottom: none;
}
/* In scribe-styles.css */

/* =================================================================== */
/* SCRIBE: KANBAN WORKSPACE (My Claimed Work)
/* =================================================================== */

.kanban-workspace {
    display: grid;
    /* --- THIS IS THE CHANGE --- */
    grid-template-columns: minmax(300px, 1fr) 2fr 1fr; 
    gap: 20px;
    padding: 0 40px 25px;
    height: calc(100vh - 148px);
    overflow: hidden;
}

.kanban-column-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.kanban-column {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.kanban-column-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
}
.item-count {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.kanban-list {
    list-style: none;
    padding: 15px;
    margin: 0;
    overflow-y: auto;
    min-height: 100px; /* Ensures drop zone exists even when empty */
}

.kanban-card {
    background: #1a1c29;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-color: #4a90e2;
}

.kanban-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 10px;
}
.kanban-card-header svg {
    width: 16px;
    height: 16px;
}

.kanban-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #f1f1f1;
}

.kanban-card-meta {
    font-size: 0.85rem;
    color: #8b949e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Right-hand panels */
.review-canvas,
.intel-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* In scribe-styles.css */

/* =================================================================== */
/* SCRIBE: INTEL PANEL & CREATOR DOSSIER STYLES
/* =================================================================== */

.intel-panel .hub-column-content {
    padding: 20px;
}

.author-detail-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
}

.author-detail-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    color: #fff;
}

.author-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* In scribe-styles.css */

/* =================================================================== */
/* SCRIBE: DOSSIER & HISTORY MODAL
/* =================================================================== */

.dossier-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dossier-actions .action-btn-secondary {
    width: 100%;
    text-align: center;
}

.author-meta-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #8b949e;
    padding-bottom: 20px;
}

.history-modal-content {
    max-width: 600px !important;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.history-modal-body {
    overflow-y: auto;
    padding: 25px;
}
/* In scribe-styles.css */

/* =================================================================== */
/* SCRIBE: SUBMISSION BRIEFING PANEL
/* =================================================================== */

.briefing-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.briefing-title {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    font-weight: normal;
    color: #fff;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.briefing-meta.is-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px 20px;
    padding-bottom: 20px;
}

.briefing-meta div {
    display: flex;
    flex-direction: column;
}

.briefing-meta span {
    font-size: 0.8rem;
    color: #8b949e;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.briefing-meta strong {
    font-size: 1rem;
    color: #e2e8f0;
    font-weight: 500;
}

.briefing-divider {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 10px 0 20px;
}

.briefing-section h4 {
    font-size: 0.9rem;
    color: #8b949e;
    text-transform: uppercase;
    margin: 0 0 15px 0;
}

.history-snapshot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 8px 0;
}
.history-snapshot-status {
    font-weight: bold;
    text-transform: capitalize;
}
.history-snapshot-meta {
    font-size: 0.85rem;
    color: #8b949e;
}
.feedback-snippet {
    background-color: rgba(0,0,0,0.2);
    border-left: 3px solid #f59e0b;
    padding: 10px 15px;
    margin: 0;
    font-style: italic;
    color: #d1d5db;
}

.briefing-actions {
    padding-bottom: 20px; /* Space below buttons */
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 10px;
    align-items: center;
}

.briefing-actions.top-actions {
    margin-bottom: 0; /* No margin at the bottom of the actions container when at the top */
    padding-top: 0; /* No top padding when at the very top */
    border-top: none; /* No border when at the very top */
}


.briefing-actions .action-btn-secondary.is-subtle {
    margin-left: auto; /* Pushes this button to the far right */
    border-color: transparent;
    color: #8b949e;
}

.briefing-actions .action-btn-secondary.is-subtle:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #fca5a5;
}

/* NEW SUMMARY SECTION STYLES */
.briefing-summary p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #c0c0c0;
    margin: 0;
}

/* --- Urgent Submission Card Styles --- */
.submission-card.is-urgent {
    border-left: 4px solid #f59e0b; /* Adds the prominent orange highlight */
    background-color: rgba(245, 158, 11, 0.05); /* Adds a subtle background tint */
    order: -1; /* This is the key property that pins the item to the top of the list */
}

.submission-card.is-urgent:hover {
    background-color: rgba(245, 158, 11, 0.1);
}

.urgent-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: #d1d5db; 
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.urgent-icon {
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 1px;
}

.urgent-info strong {
    color: #fbbf24; /* Makes the admin's name stand out */
}

.urgent-reason {
    color: #9ca3af; /* Muted gray for the reason text */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Truncates long reasons with "..." */
    cursor: help;
    display: block;
    max-width: 250px;
}

/* --- Active Review Panel Highlight --- */
.review-canvas.is-active-review {
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.5), inset 0 0 0 2px rgba(74, 144, 226, 0.6);
    border-color: rgba(74, 144, 226, 0.8);
    transition: all 0.3s ease-in-out;
}

/* --- NEW: Live Review Indicator --- */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.4);
    padding: 8px 15px;
    border-radius: 20px; /* Pill shape */
}

.live-indicator-dot {
    width: 10px;
    height: 10px;
    background-color: #5aa1f2; /* A bright, clear blue */
    border-radius: 50%;
    /* The animation property calls our keyframe animation below */
    animation: pulse-live 1.75s infinite cubic-bezier(0.66, 0, 0, 1);
}

.live-indicator-text {
    font-size: 0.8rem;
    font-weight: bold;
    color: #a9cfff; /* A light blue to complement the dot */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* This keyframe creates the pulsing glow effect */
@keyframes pulse-live {
    0% {
        box-shadow: 0 0 0 0 rgba(90, 161, 242, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(90, 161, 242, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(90, 161, 242, 0);
    }
}

/* --- Return to Triage Modal Styles --- */
.modal-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
#mark-urgent-checkbox {
    width: 18px;
    height: 18px;
}
.urgent-reason-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
#mark-urgent-checkbox:checked + label + .urgent-reason-container {
    max-height: 200px; /* Animate to this height */
    opacity: 1;
}
.modal-textarea {
    width: 100%;
    min-height: 100px;
    margin-top: 8px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #f1f1f1;
    resize: vertical;
}

/* --- Focus Mode Review Viewer Modal --- */
.focus-mode-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #090a0f; /* Opaque background */
    z-index: 4000;
    padding-top: 75px; /* Account for main site header */
    box-sizing: border-box;
    animation: fade-in 0.4s ease-out;
}

/* --- FIX: Review Viewer Close Button Positioning --- */
.focus-mode-close-btn {
    /* The incorrect 'position: fixed' and its 'top'/'right' properties have been removed. */
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 2rem;
    line-height: 40px;
    text-align: center;
    flex-shrink: 0; /* Prevents the button from being squished */
    transition: transform 0.2s, background-color 0.2s;
}

.focus-mode-close-btn:hover {
    transform: scale(1.1) rotate(90deg); /* Added a rotation for a nice effect */
    background-color: #ef4444;
}

/* --- FIX: Focus Mode Modal Layout (Corrected) --- */

/* This is the 3-panel grid layout definition */
.focus-mode-modal .scribe-command-console-layout {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    height: 100%; /* Ensures the grid fills the modal space */
}

/* These are the styles for the individual panels inside the grid */
.focus-mode-modal .console-panel {
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Allows each panel to scroll independently */
    max-height: 100%;
}



.focus-mode-modal .kanban-column-container,
.focus-mode-modal .review-canvas,
.focus-mode-modal .intel-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure panels fill the modal height */
}

/* This styles the header inside the panels */
.focus-mode-modal .hub-column-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
 .focus-mode-modal .hub-column-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

/* Styles for the content area of the panels */
.focus-mode-modal .hub-column-content {
     padding: 20px;
     overflow-y: auto;
     flex-grow: 1;
}

/* Re-apply dossier styles within the modal context */
.focus-mode-modal .author-detail-header { text-align: center; }
.focus-mode-modal .author-avatar-large { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 10px; }
.focus-mode-modal .author-detail-header h3 { margin: 0 0 5px 0; font-size: 1.2rem; }
.focus-mode-modal .author-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 15px 0; }
.focus-mode-modal .stat-item { text-align: center; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 6px; }
.focus-mode-modal .stat-label { font-size: 0.75rem; color: #a9b3c1; display: block; }
.focus-mode-modal .stat-value { font-size: 1.2rem; font-weight: bold; color: #fff; }
.focus-mode-modal .author-meta-footer { font-size: 0.8rem; text-align: center; color: #8b949e; }
.focus-mode-modal .dossier-actions { margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, 0.1); }

/* =================================================================== */
/* SCRIBE: REVIEW VIEWER MODAL - FINAL STYLING
/* =================================================================== */

/* --- Panel Headers & Dividers --- */
.console-panel .panel-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.console-panel .panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
}
.console-panel .panel-content {
    padding: 20px;
}
.panel-divider {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8b949e;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    line-height: 0.1em;
    margin: 25px 0;
}
.panel-divider span {
    background: #1a1c29; /* Match panel background */
    padding: 0 10px;
}

/* --- Intel Panel: Creator Dossier --- */
.author-detail-header { text-align: center; }
.author-avatar-large { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 10px; }
.author-detail-header h4 { margin: 0 0 5px 0; font-size: 1.2rem; }
.author-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 15px 0; }
.stat-item { text-align: center; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 6px; }
.stat-label { font-size: 0.75rem; color: #a9b3c1; display: block; }
.stat-value { font-size: 1.2rem; font-weight: bold; color: #fff; }
.author-meta-footer { font-size: 0.8rem; text-align: center; color: #8b949e; }
.dossier-actions .action-btn-secondary { width: 100%; text-align: center; }
.history-item { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.history-item:last-child { border-bottom: none; }
.history-action { font-weight: 500; color: #e2e8f0; text-transform: capitalize; }
.history-meta { font-size: 0.8rem; color: #8b949e; }

/* --- Content Panel: Interactive Blocks --- */
.review-content-block {
    position: relative;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    transition: border-color 0.3s, background-color 0.3s;
    border-left: 3px solid transparent;
}
.review-content-block .toolbar-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ccc;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}
.review-content-block:hover .toolbar-btn {
    display: flex;
}
.review-content-block .toolbar-btn:hover {
    background-color: #f59e0b;
    color: #fff;
}
.review-content-block.is-commenting {
    border-left-color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.05);
}

/* --- Tools Panel: Feedback & Final Actions --- */
#feedback-editor-container label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #a9b3c1;
}
#feedback-textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(0,0,0,0.2);
    border: 1px solid #f59e0b;
    border-radius: 4px;
    color: #f1f1f1;
    padding: 10px;
    resize: vertical;
}
#feedback-summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.feedback-summary-item {
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 2px solid #f59e0b;
}
.feedback-summary-item:hover { background: rgba(0,0,0,0.4); }
.remove-feedback-btn { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 1.2rem; }
.remove-feedback-btn:hover { color: #ef4444; }

/* --- NEW: Holographic Shine Buttons (Corrected & Enhanced) --- */
.final-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.final-actions button {
    width: 100%;
    padding: 12px; /* Enforces consistent padding */
    font-weight: bold;
    font-size: 0.9rem; /* Enforces consistent font size */
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    overflow: hidden;
    transition: all 0.2s ease-out; /* Simplified transition */
}

/* Adds a satisfying "push" effect when a button is clicked */
.final-actions button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Holographic shine effect on hover */
.final-actions button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.final-actions button:hover::before {
    left: 100%;
}

/* Disabled state */
.final-actions button:disabled {
    background-color: rgba(74, 85, 104, 0.4);
    border-color: rgba(74, 85, 104, 0.7);
    color: #9ca3af;
    cursor: not-allowed;
}
.final-actions button:disabled:hover::before {
    left: -100%;
}

/* Specific button colors */
.final-actions .review-approve-btn {
    background-color: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.6);
}
.final-actions .review-approve-btn:hover {
    background-color: rgba(34, 197, 94, 0.4);
    border-color: #22c55e;
}
.final-actions .review-decline-btn {
    background-color: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.6);
}
.final-actions .review-decline-btn:hover {
    background-color: rgba(245, 158, 11, 0.4);
    border-color: #f59e0b;
}
.final-actions .review-decline-btn.is-final {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
}
.final-actions .review-decline-btn.is-final:hover {
    background-color: rgba(239, 68, 68, 0.4);
    border-color: #ef4444;
}
.final-actions .review-suspend-btn {
    background-color: rgba(100, 116, 139, 0.2);
    border-color: rgba(100, 116, 139, 0.6);
}
.final-actions .review-suspend-btn:hover {
    background-color: rgba(100, 116, 139, 0.4);
    border-color: #64748b;
}

/* This will style the text dividers to have lines on either side */
.panel-divider {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8b949e;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    line-height: 0.1em;
    margin: 25px 0;
}

.panel-divider span {
    background: #1a1c29; /* Match the panel background to create the line-break effect */
    padding: 0 10px;
}

/* --- FIX: Unify Final Action Button Shape --- */
.final-actions button {
    border-radius: 6px; /* A consistent rounded corner for all buttons */
}

/* --- FIX: Final Actions Button Alignment --- */
.final-actions .review-changes-btn,
.final-actions .review-decline-btn {
    margin-left: 0; /* Resets the unwanted margin */
    padding: 12px;   /* Enforces the correct, consistent padding */
}

/* =================================================================== */
/* SCRIBE: ENHANCED REVIEW VIEWER (2-COLUMN)
/* =================================================================== */

/* --- New Layout --- */
.scribe-command-console-layout.is-two-column {
    grid-template-columns: 2fr 1fr; /* Center | Right */
    height: calc(100vh - 75px - 70px); /* Full height minus main header AND modal header */
}

/* --- Modal Header --- */
.review-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
    background: rgba(15, 17, 26, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}
.viewer-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.creator-avatar-btn {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
}
.creator-avatar-btn img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    transition: transform 0.2s;
}
.creator-avatar-btn:hover img {
    transform: scale(1.1);
}
.submission-title-group h2 { margin: 0; font-size: 1.2rem; }
.submission-title-group span { font-size: 0.9rem; color: #9ca3af; }

/* --- Pop-up Dossier Modal --- */
.dossier-modal-content { max-width: 400px !important; }

/* --- Right Panel: Tools & Intel --- */
.console-panel.is-tools-intel {
    padding: 0; /* Remove padding to allow for internal scrolling */
}
.tools-intel-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tools-intel-tabs {
    display: flex;
    padding: 10px 15px;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tools-intel-tabs .tab-btn {
    flex-grow: 1;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: #9ca3af;
    border-radius: 4px;
    cursor: pointer;
}
.tools-intel-tabs .tab-btn.is-active {
    background: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}
.tools-intel-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}
.tools-intel-content .tab-content:not(.is-active) {
    display: none;
}

/* --- Intel Tab Content --- */
.primary-image-wrapper img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
}
.infobox-container { padding: 0; }
.empty-state-small { font-size: 0.9rem; color: #8b949e; text-align: center; padding: 20px 0; }

/* =================================================================== */
/* SCRIBE: ENHANCED REVIEW VIEWER V2 (Pop-up Dossier)
/* =================================================================== */

/* --- 2-Column Layout --- */
.scribe-command-console-layout.is-two-column {
    grid-template-columns: 2fr 1fr; /* Center | Right */
    height: calc(100vh - 75px - 70px); /* Full height minus main header AND modal header */
}

/* --- Modal Header --- */
.review-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
    background: rgba(15, 17, 26, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}
.viewer-header-left { display: flex; align-items: center; gap: 15px; }
.creator-avatar-btn { padding: 0; border: none; background: none; cursor: pointer; border-radius: 50%; }
.creator-avatar-btn img {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.creator-avatar-btn:hover img {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}
.submission-title-group h2 { margin: 0; font-size: 1.2rem; }
.submission-title-group span { font-size: 0.9rem; color: #9ca3af; }

/* --- Pop-up Dossier Modal --- */
#dossier-modal-container .scheduler-modal-overlay { z-index: 5001; } /* Ensure it's on top */
.dossier-modal-content { max-width: 400px !important; }

/* --- Right Panel: Action Bar with Icon Buttons --- */
.tools-intel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.final-actions.icon-actions {
    display: flex;
    gap: 10px;
}
.action-icon-btn {
    width: 40px; height: 40px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    transition: all 0.2s;
}
.action-icon-btn svg { width: 20px; height: 20px; stroke-width: 2.5; }
.action-icon-btn.approve-btn { color: #22c55e; }
.action-icon-btn.approve-btn:hover { background-color: #22c55e; color: #fff; border-color: #22c55e; }
.action-icon-btn.changes-btn { color: #f59e0b; }
.action-icon-btn.changes-btn:hover:not(:disabled) { background-color: #f59e0b; color: #fff; border-color: #f59e0b; }
.action-icon-btn.decline-btn { color: #ef4444; }
.action-icon-btn.decline-btn:hover { background-color: #ef4444; color: #fff; border-color: #ef4444; }
.action-icon-btn.suspend-btn { color: #64748b; }
.action-icon-btn.suspend-btn:hover { background-color: #64748b; color: #fff; border-color: #64748b; }
.action-icon-btn:disabled { color: #4a5568; border-color: #4a5568; cursor: not-allowed; }

/* --- Inline Feedback Box --- */
.inline-feedback-box {
    margin-top: 15px;
    padding: 15px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 6px;
}
.inline-feedback-box textarea {
    width: 100%; min-height: 80px; background: rgba(0,0,0,0.2);
    border: 1px solid #f59e0b; border-radius: 4px; color: #f1f1f1;
    padding: 10px; resize: vertical; margin-bottom: 10px;
}

/* --- FIX: Review Viewer Header Layout --- */
.review-viewer-header {
    justify-content: space-between; /* Pushes left and right content to the edges */
}

.viewer-header-right {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between action buttons and close button */
}

/* Hide the now-empty old header div in the right panel */
.tools-intel-header {
    display: none;
}

/* --- FIX: Horizontal Header Action Buttons --- */
.review-viewer-header .final-actions {
    flex-direction: row; /* Overrides the 'column' rule for the header */
}

/* --- IMPROVEMENT: Vertically Align Header Items --- */
.viewer-header-right {
    display: flex;
    align-items: center; /* This vertically centers all items */
    gap: 20px;
}

/* --- ENHANCEMENT: Advanced Feedback System --- */
.panel-divider.has-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.panel-divider.has-action span {
    border: none;
    padding: 0;
    background: none;
}
.add-feedback-link {
    background: none;
    border: none;
    color: #4a90e2;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Feedback Type Buttons */
.feedback-type-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.type-btn {
    flex: 1;
    padding: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: #a9b3c1;
}
.type-btn.is-active[data-type="suggestion"] { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.type-btn.is-active[data-type="correction"] { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.type-btn.is-active[data-type="issue"] { background: #ef4444; border-color: #ef4444; color: #fff; }

/* Color-coded summary items */
.feedback-summary-item[data-type="correction"] { border-left-color: #f59e0b; }
.feedback-summary-item[data-type="issue"] { border-left-color: #ef4444; }
.feedback-summary-item[data-type="suggestion"] { border-left-color: #3b82f6; } /* Blue */

/* General Modal Textarea Style */
.modal-textarea {
    width: 100%;
    min-height: 120px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #f1f1f1;
    font-size: 1rem;
    resize: vertical;
}

/* --- FIX: Tools & Intel Panel Header Layout --- */
.tools-intel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* In scribe-styles.css, add this snippet */
.review-content-block.has-feedback .feedback-btn {
    display: flex;
    background-color: #3b82f6; /* Blue */
    color: #fff;
}

/* In scribe-styles.css, add this snippet at the end */
.overall-notes-container {
    padding-top: 10px;
}

#overall-notes-textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #f1f1f1;
    padding: 10px;
    resize: vertical;
}
/* In scribe-styles.css, add this snippet */

/* Replaces the old .is-commenting style with new, color-coded versions */
.review-content-block.is-commenting-suggestion {
    border-left-color: #3b82f6; /* Blue */
    background-color: rgba(59, 130, 246, 0.05);
}

.review-content-block.is-commenting-correction {
    border-left-color: #f59e0b; /* Orange */
    background-color: rgba(245, 158, 11, 0.05);
}

.review-content-block.is-commenting-issue {
    border-left-color: #ef4444; /* Red */
    background-color: rgba(239, 68, 68, 0.05);
}

/* In scribe-styles.css */
@keyframes pulse-resubmit {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.kanban-card.is-resubmitted {
    border-color: #f59e0b; /* Orange border */
    animation: pulse-resubmit 2.5s infinite;
}

/* In scribe-styles.css */
.submission-card.is-escalated {
    border-left-color: #A855F7; /* Purple */
}
.submission-card.is-returned {
    border-left-color: #64748B; /* Slate Grey */
}
.card-indicator {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    margin-right: auto;
}
.card-indicator.is-escalated { background-color: #A855F7; }
.card-indicator.is-returned { background-color: #64748B; }

.card-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

/* In scribe-styles.css */
.review-content-block.has-diff {
    line-height: 1.8;
}
.diff-added {
    background-color: rgba(34, 197, 94, 0.2);
    text-decoration: none;
    padding: 2px 0;
}
.diff-removed {
    background-color: rgba(239, 68, 68, 0.2);
    text-decoration: line-through;
    padding: 2px 0;
}

/* In scribe-styles.css */

/* --- NEW: Scribe Reviewer Block Styles --- */
.lore-review-main-content, .lore-article-content {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
}

.lore-review-main-content p, .lore-article-content p {
    margin-bottom: 1.5em;
}

.lore-image img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lore-image figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #9ca3af;
    margin-top: 10px;
    font-style: italic;
    font-family: sans-serif;
}

.lore-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2em auto;
    border-radius: 8px;
}

.lore-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lore-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 2em 0;
}

.lore-layout.image-right {
    flex-direction: row-reverse;
}

.lore-layout-image {
    flex: 0 0 40%;
}

.lore-layout-image img {
    width: 100%;
    border-radius: 6px;
}

.lore-layout-text {
    flex: 1;
}

blockquote {
    border-left: 4px solid #4a90e2;
    padding-left: 20px;
    margin: 2em 0;
    font-style: italic;
    color: #c0c0c0;
}

blockquote footer {
    font-style: normal;
    font-weight: bold;
    color: #9ca3af;
    margin-top: 10px;
}

.lore-log-entry {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 15px;
    font-family: monospace;
    margin: 2em 0;
}

.log-timestamp {
    color: #f59e0b;
    margin-bottom: 8px;
}

.log-text {
    color: #d1d5db;
    white-space: pre-wrap;
}

.codex-link-card.is-readonly {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 15px;
}

.lore-spacer {
    text-align: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 2.5em auto;
    letter-spacing: 0.5em;
}

/* In scribe-styles.css */

/* --- NEW: Collapsible Kanban Column Styles --- */
.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-toggle-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.2s;
}

.kanban-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.kanban-toggle-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.kanban-content-wrapper {
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, 
                padding 0.4s ease-in-out,
                opacity 0.3s ease-in-out;
}

.kanban-column.is-collapsed .kanban-toggle-btn svg {
    transform: rotate(-90deg);
}

.kanban-column.is-collapsed .kanban-content-wrapper {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.kanban-list {
    transition: opacity 0.2s ease;
}

.kanban-column.is-collapsed .kanban-list {
    opacity: 0;
    pointer-events: none;
}

/* In scribe-styles.css */

/* --- Kanban Card Actions --- */
.kanban-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.kanban-card-actions button {
    flex-grow: 1;
    font-size: 0.8rem;
    padding: 8px 10px;
}

/* --- Comparison Viewer Modal --- */
.comparison-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 10, 15, 0.7);
    backdrop-filter: blur(8px);
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fade-in 0.3s ease;
}

.comparison-modal-content {
    width: 90%;
    max-width: 1400px;
    height: 90vh;
    background: #0f111a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.comparison-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.comparison-modal-header h2 {
    margin: 0;
}

.comparison-actions {
    display: flex;
    gap: 10px;
}

.comparison-modal-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    flex-grow: 1;
    overflow: hidden;
}

.comparison-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.version-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.version-timeline-item {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.version-timeline-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.version-timeline-item.is-selected-base {
    border-color: #ef4444; /* Red for 'base' version */
    background-color: rgba(239, 68, 68, 0.1);
}
.version-timeline-item.is-selected-compare {
    border-color: #22c55e; /* Green for 'compare' version */
    background-color: rgba(34, 197, 94, 0.1);
}

.version-label {
    font-weight: bold;
    color: #fff;
}
.version-date {
    font-size: 0.8rem;
    color: #9ca3af;
}
.original-feedback-display {
    background-color: rgba(0,0,0,0.2);
    border-left: 3px solid #f59e0b;
    padding: 10px 15px;
    font-style: italic;
    color: #d1d5db;
    font-size: 0.9rem;
}
.comparison-diff-panel {
    padding: 25px;
    overflow-y: auto;
    line-height: 1.7;
}

/* In scribe-styles.css */

/* --- Comparison Viewer 3-Pane Layout --- */
.scribe-command-console-layout.is-three-column {
    grid-template-columns: 280px 1fr 320px;
}

#comparison-timeline-panel {
    padding: 10px;
    overflow-y: auto;
}

/* --- Interactive Timeline --- */
.version-timeline-item {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    border-left-width: 4px;
}
.version-timeline-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.version-timeline-item[data-action="select-version"]:not(.is-selected-compare):hover {
    border-color: #4a90e2;
}

.version-timeline-item.is-selected-compare {
    border-color: #4a90e2; /* Blue for the active version being viewed */
    background-color: rgba(74, 144, 226, 0.1);
}
.version-label {
    font-weight: bold;
    color: #fff;
}
.version-date {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* --- Rich Diff Block Highlighting --- */
.diff-block-added .content-block {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.diff-block-removed {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 15px;
    border-radius: 6px;
    opacity: 0.6;
}
.diff-block-removed .content-block {
    text-decoration: line-through;
}

/* --- Re-use existing diff text styles --- */
.review-content-block.has-diff { line-height: 1.8; }
.diff-added { background-color: rgba(34, 197, 94, 0.2); text-decoration: none; padding: 2px 0; }
.diff-removed { background-color: rgba(239, 68, 68, 0.2); text-decoration: line-through; padding: 2px 0; }

/* --- NEW: Scribe Reviewer Block Styles --- */
.lore-review-main-content, .lore-article-content {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
}

.lore-review-main-content p, .lore-article-content p {
    margin-bottom: 1.5em;
}

.lore-image img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lore-image figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #9ca3af;
    margin-top: 10px;
    font-style: italic;
    font-family: sans-serif;
}

.lore-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2em auto;
    border-radius: 8px;
}

.lore-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lore-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 2em 0;
}

.lore-layout.image-right {
    flex-direction: row-reverse;
}

.lore-layout-image {
    flex: 0 0 40%;
}

.lore-layout-image img {
    width: 100%;
    border-radius: 6px;
}

.lore-layout-text {
    flex: 1;
}

blockquote {
    border-left: 4px solid #4a90e2;
    padding-left: 20px;
    margin: 2em 0;
    font-style: italic;
    color: #c0c0c0;
}

blockquote footer {
    font-style: normal;
    font-weight: bold;
    color: #9ca3af;
    margin-top: 10px;
}

.lore-log-entry {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 15px;
    font-family: monospace;
    margin: 2em 0;
}

.log-timestamp {
    color: #f59e0b;
    margin-bottom: 8px;
}

.log-text {
    color: #d1d5db;
    white-space: pre-wrap;
}

.codex-link-card.is-readonly {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 15px;
}

.lore-spacer {
    text-align: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 2.5em auto;
    letter-spacing: 0.5em;
}

/* In scribe-styles.css */

/* --- Comparison Viewer 3-Pane Layout --- */
.scribe-command-console-layout.is-three-column {
    grid-template-columns: 280px 1fr 320px;
}

#comparison-timeline-panel {
    padding: 10px;
    overflow-y: auto;
}

/* --- Interactive Timeline --- */
.version-timeline-item {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    border-left-width: 4px;
    margin-bottom: 10px; /* Add spacing */
}
.version-timeline-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.version-timeline-item[data-action="select-version"]:not(.is-selected-compare):hover {
    border-color: #4a90e2;
}

.version-timeline-item.is-selected-compare {
    border-color: #4a90e2; /* Blue for the active version being viewed */
    background-color: rgba(74, 144, 226, 0.1);
}
.version-label {
    font-weight: bold;
    color: #fff;
}
.version-date {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* --- Rich Diff Block Highlighting --- */
.review-content-block.diff-block-added {
    background-color: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.review-content-block.has-diff {
    line-height: 1.8;
}
.diff-added {
    background-color: rgba(34, 197, 94, 0.2);
    text-decoration: none;
    padding: 2px 0;
    border-radius: 3px;
}
.diff-removed {
    background-color: rgba(239, 68, 68, 0.2);
    text-decoration: line-through;
    padding: 2px 0;
    border-radius: 3px;
}

/* In scribe-styles.css, add this snippet */

/* Add this new rule for our "Resubmitted" status */
.status-pending-correction {
    background-color: rgba(139, 92, 246, 0.2); /* Violet background */
    color: #c4b5fd; /* Light violet text */
}

.card-status.status-pending-correction {
    border-color: #a78bfa;
}

.legend-dot.status-pending-correction {
    background-color: #a78bfa;
}

/* --- NEW: History Modal Timeline Notes --- */
.timeline-notes {
    margin-top: 8px;
    padding: 10px;
    background-color: rgba(0,0,0,0.2);
    border-left: 3px solid #8b949e;
    font-size: 0.9rem;
    color: #d1d5db;
}
/* --- NEW: Modal Stacking Fix --- */
#modal-container-secondary .scheduler-modal-overlay {
    z-index: 5001; /* Higher than the primary modal container's z-index of 5000 */
}

/* --- Post-Review UI Enhancements --- */

/* Style for the cards in the post-review feed */
.submission-card.post-review-card {
    border-left: 5px solid #E2E8F0; /* Use a neutral white/grey border */
}

.submission-card.post-review-card:hover {
    border-left-color: #4a90e2; /* Highlight blue on hover */
}

/* Re-use final-actions from the review modal for diff panel buttons */
#post-review-details-panel .final-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#post-review-details-panel .final-actions button {
    width: 100%;
    padding: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    overflow: hidden;
    transition: all 0.2s ease-out;
    border-radius: 6px;
    cursor: pointer;
}

#post-review-details-panel .final-actions button:hover {
    transform: scale(1.02);
}

#post-review-details-panel .final-actions .review-approve-btn {
    background-color: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.6);
}
#post-review-details-panel .final-actions .review-approve-btn:hover {
    background-color: rgba(34, 197, 94, 0.4);
    border-color: #22c55e;
}
#post-review-details-panel .final-actions .review-changes-btn {
    background-color: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.6);
}
#post-review-details-panel .final-actions .review-changes-btn:hover {
    background-color: rgba(245, 158, 11, 0.4);
    border-color: #f59e0b;
}

/* In scribe-styles.css */

/* --- Post-Review Card Locking --- */
.submission-card.is-locked {
    opacity: 0.6;
    background: #11131a;
    border-color: #4a5568;
    cursor: not-allowed;
}

.submission-card.is-locked:hover {
    transform: none;
    box-shadow: none;
    border-left-color: #E2E8F0;
}

.card-locked-by {
    font-size: 0.8rem;
    font-weight: bold;
    color: #fca5a5;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.history-scroll-container {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}
.history-feedback-item {
    margin-bottom: 15px;
}
.history-feedback-header {
    font-size: 0.85rem;
    color: #e2e8f0;
    margin-bottom: 5px;
}
.history-date {
    color: #8b949e;
    font-weight: normal;
    margin-left: 5px;
}

/* =================================================================== */
/* POLICY EDITOR (Admin Scribe Dashboard)
/* =================================================================== */

.policy-editor-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0;
}

.policy-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.policy-editor-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #e2e8f0;
}

.policy-version-badge {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(74, 144, 226, 0.12);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 20px;
    padding: 5px 14px;
}

.policy-version-badge strong {
    color: #4a90e2;
    font-weight: 600;
}

/* ── Tabs ── */
.policy-editor-tabs {
    display: flex;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0;
}

.policy-editor-tab {
    flex: 1;
    padding: 13px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease;
    text-align: center;
}

.policy-editor-tab:hover {
    color: rgba(255, 255, 255, 0.7);
}

.policy-editor-tab.is-active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

/* ── Editor Body (side-by-side) ── */
.policy-editor-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.policy-editor-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.policy-editor-pane:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.policy-editor-label {
    display: block;
    padding: 12px 16px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
}

/* ── Textarea ── */
.policy-editor-textarea {
    flex: 1;
    width: 100%;
    padding: 12px 16px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #c9d1d9;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    resize: none;
    outline: none;
    overflow-y: auto;
    tab-size: 4;
}

.policy-editor-textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.policy-editor-textarea:focus {
    background: rgba(0, 0, 0, 0.4);
}

/* ── Live Preview ── */
.policy-editor-preview {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.15);
}

.policy-editor-preview h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
}

.policy-editor-preview h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 20px 0 8px;
}

.policy-editor-preview h5 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #cbd5e0;
    margin: 16px 0 6px;
}

.policy-editor-preview p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.68);
    margin: 0 0 10px;
}

.policy-editor-preview ul {
    margin: 6px 0 12px 0;
    padding-left: 20px;
}

.policy-editor-preview li {
    font-size: 0.83rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3px;
}

.policy-editor-preview strong {
    color: rgba(255, 255, 255, 0.85);
}

/* ── Publish Bar ── */
.policy-publish-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
}

.policy-publish-info {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
}

.policy-publish-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .policy-editor-body {
        grid-template-columns: 1fr;
    }

    .policy-editor-pane:first-child {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .policy-editor-textarea {
        min-height: 200px;
    }

    .policy-editor-preview {
        min-height: 200px;
    }
}

@media (max-width: 640px) {
    .policy-editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px 16px 12px;
    }

    .policy-editor-tabs {
        padding: 0 12px;
    }

    .policy-editor-tab {
        font-size: 0.75rem;
        padding: 10px 6px;
    }

    .policy-publish-bar {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .policy-publish-actions {
        width: 100%;
        justify-content: flex-end;
    }
}