/**
 * Admin Panel Component Styles
 * Matches document-panel-v2.jsx design reference
 */

/* ============================================================================
   PANEL LAYOUT
   ============================================================================ */

.panel-header {
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.panel-file-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.panel-file-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.panel-file-info h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px;
}

.panel-file-info p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

.panel-status-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================================================
   TABS
   ============================================================================ */

.panel-tabs {
    display: flex;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 8px;
}

.panel-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
}

.panel-tab:hover {
    color: var(--text-secondary);
}

.panel-tab--active {
    color: var(--text-primary);
}

.panel-tab--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0; /* Required for flex child to scroll properly */
}

/* When sidebar uses panel structure, disable sidebar's own scroll and padding */
.detail-modal__sidebar:has(.panel-body) {
    overflow: hidden;
    padding: 0;
    min-height: 0; /* Required for flex child to scroll properly */
    max-height: 100%; /* Constrain height for flex scrolling */
}

/* Ensure panel-body takes remaining space and scrolls properly */
.detail-modal__sidebar .panel-body {
    flex: 1 1 0;
    overflow-y: auto;
    min-height: 0;
    max-height: 100%;
}

/* ============================================================================
   UI CARD (Collapsible)
   ============================================================================ */

.ui-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: visible;
}

.ui-card__header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    text-align: left;
}

.ui-card__header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ui-card__header:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.ui-card__title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ui-card__title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ui-card__badge {
    font-size: 9px;
    padding: 2px 5px;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 4px;
    font-weight: 500;
}

.ui-card__header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ui-card__action {
    font-size: 11px;
    color: var(--accent);
    cursor: pointer;
}

.ui-card__action:hover {
    text-decoration: underline;
}

.ui-card__body {
    padding: 0 12px 12px;
}

/* ============================================================================
   STATUS DOT
   ============================================================================ */

.ui-status-dot {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ui-status-dot__indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ui-status-dot__label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ============================================================================
   PILLS
   ============================================================================ */

.ui-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ui-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid;
}

.ui-pill__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
}

.ui-pill__remove:hover {
    opacity: 1;
}

/* ============================================================================
   FIELD ROW & FIELD
   ============================================================================ */

.ui-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.ui-field-row:last-child {
    margin-bottom: 0;
}

.ui-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ui-field__label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ui-field__content {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================================================
   SELECT
   ============================================================================ */

.ui-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.ui-select:hover {
    border-color: var(--border-hover);
}

.ui-select:focus {
    outline: none;
    border-color: var(--accent);
}

.ui-select--small {
    padding: 6px 8px;
    font-size: 11px;
    padding-right: 24px;
}

/* Fix .ui-select in flex filter containers - override width: 100% */
.filters-bar .ui-select,
.entity-filters .ui-select,
.filter-bar .ui-select,
.queue-filters .ui-select,
.review-filters__row .ui-select,
.metadata-filters .ui-select,
.audit-filters .ui-select {
    width: auto;
    flex: 1;
    min-width: 130px;
    max-width: 180px;
}

/* ============================================================================
   INPUT
   ============================================================================ */

.ui-input {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.15s;
}

.ui-input:focus {
    outline: none;
    border-color: var(--accent);
}

.ui-input::placeholder {
    color: var(--text-muted);
}

.ui-input--small {
    padding: 6px 8px;
    font-size: 11px;
}

/* ============================================================================
   TEXTAREA
   ============================================================================ */

.ui-textarea {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.ui-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.ui-textarea::placeholder {
    color: var(--text-muted);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.ui-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.ui-btn__icon {
    display: flex;
    align-items: center;
}

.ui-btn--xs {
    padding: 4px 8px;
    font-size: 10px;
}

.ui-btn--sm {
    padding: 5px 10px;
    font-size: 11px;
}

.ui-btn--md {
    padding: 8px 14px;
    font-size: 12px;
}

.ui-btn--ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.ui-btn--ghost:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.ui-btn--primary {
    background: var(--accent);
    border: 1px solid var(--accent-light);
    color: #fff;
}

.ui-btn--primary:hover {
    background: var(--accent-dark);
}

.ui-btn--ai {
    background: linear-gradient(135deg, #4c1d95 0%, #1e3a8a 100%);
    border: 1px solid #6366f1;
    color: #c7d2fe;
}

.ui-btn--ai:hover {
    filter: brightness(1.1);
}

.ui-btn--danger {
    background: transparent;
    border: 1px solid #dc2626;
    color: #f87171;
}

.ui-btn--danger:hover {
    background: rgba(220, 38, 38, 0.15);
}

/* ============================================================================
   AI RESULT
   ============================================================================ */

.ui-ai-result {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
}

.ui-ai-result:last-child {
    margin-bottom: 0;
}

.ui-ai-result--approved {
    border-color: var(--success);
    background: var(--success-light);
}

.ui-ai-result--rejected {
    border-color: var(--danger);
    background: var(--danger-light);
}

.ui-ai-result__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.ui-ai-result__type {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-light);
}

.ui-ai-result__status {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
}

.ui-ai-result__status--approved {
    background: var(--success-light);
    color: var(--success-text);
}

.ui-ai-result__status--pending {
    background: var(--warning-light);
    color: var(--warning-text);
}

.ui-ai-result__status--rejected {
    background: var(--danger-light);
    color: var(--danger-text);
}

.ui-ai-result__meta {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ui-ai-result__content {
    font-family: 'IBM Plex Mono', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 8px;
    border-radius: 4px;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
}

.ui-ai-result__actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* ============================================================================
   META GRID
   ============================================================================ */

.ui-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

.ui-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ui-meta-item__label {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ui-meta-item__value {
    font-size: 12px;
    color: var(--text-secondary);
}

.ui-meta-item__value--code {
    font-family: 'IBM Plex Mono', 'Consolas', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

.ui-empty {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ============================================================================
   DIVIDER
   ============================================================================ */

.ui-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* ============================================================================
   DESCRIPTION BLOCK
   ============================================================================ */

.ui-desc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ui-desc-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ui-desc-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* ============================================================================
   ADD ROW
   ============================================================================ */

.ui-add-row {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.ui-add-row .ui-input,
.ui-add-row .ui-select {
    flex: 1;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 400px) {
    .ui-field-row {
        grid-template-columns: 1fr;
    }

    .panel-status-row {
        gap: 8px;
    }
}

/* ============================================================================
   PAGES TAB
   ============================================================================ */

.detail-pages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-pages__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-pages__title {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.detail-pages__count {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.detail-pages__extracted {
    font-size: 11px;
    color: var(--text-muted);
}

.detail-pages__filters {
    display: flex;
    gap: 8px;
    align-items: center;
}

.detail-pages__gallery {
    min-height: 200px;
}

.detail-pages__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.pagination-info {
    font-size: 11px;
    color: var(--text-muted);
}

/* Page Grid */
.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

/* Page Card */
.page-card {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.page-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.page-card--selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.3);
}

.page-card--needs-review {
    border-color: var(--warning);
}

.page-card--redacted {
    border-color: var(--danger);
}

.page-card__thumb {
    aspect-ratio: 8.5 / 11;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-card__placeholder {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-muted);
}

.page-card__info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    background: var(--bg-secondary);
}

.page-card__num {
    font-size: 9px;
    color: var(--text-muted);
}

.page-card__type {
    font-size: 12px;
}

.page-card__badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--warning);
    color: var(--warning-text);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Page type modifiers */
.page-card--photo .page-card__info {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
}

.page-card--text .page-card__info {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
}

.page-card--form .page-card__info {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(234, 88, 12, 0.1));
}

/* AI processed indicator */
.page-card--ai-processed {
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.page-card__ai {
    font-size: 10px;
    margin-left: 4px;
}

.page-card__ai--completed {
    color: var(--success);
}

.page-card__ai--pending {
    color: var(--text-muted);
}

.page-card__ai--processing {
    color: var(--info);
    animation: spin 1s linear infinite;
}

.page-card__ai--failed {
    color: var(--danger);
}

.page-card__ai--skipped {
    color: var(--text-muted);
}

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

/* ============================================================================
   PAGE DETAIL AI RESULTS
   ============================================================================ */

.page-detail__ai {
    margin-top: var(--space-2);
    padding: var(--space-2);
    background: var(--bg-hover);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.page-detail__ai label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.page-detail__ai--completed {
    border-color: rgba(34, 197, 94, 0.3);
}

.page-detail__ai--failed {
    border-color: rgba(239, 68, 68, 0.3);
}

.page-detail__ai-section {
    margin-bottom: var(--space-3);
}

.page-detail__ai-section:last-child {
    margin-bottom: 0;
}

.page-detail__ai-section h5 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.ai-field {
    font-size: var(--text-sm);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.ai-field .label {
    font-weight: 500;
    color: var(--text-secondary);
}

.ai-error {
    font-size: var(--text-xs);
    color: var(--danger);
    margin-top: var(--space-2);
}

.ai-confidence {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-color);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.ai-confidence .value {
    font-weight: 600;
    color: var(--success);
}

.entities-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.entity-group {
    display: flex;
    gap: var(--space-2);
    font-size: var(--text-xs);
}

.entity-type {
    font-weight: 600;
    color: var(--accent);
    min-width: 100px;
    text-transform: uppercase;
}

.entity-values {
    color: var(--text-primary);
    flex: 1;
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

.detail-pages__sections {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.detail-pages__sections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.detail-pages__sections-header h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.sections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-item {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
}

.section-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.section-item__type {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-item__range {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.section-item__count {
    color: var(--text-muted);
}

.section-item__title {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 6px;
}

.section-item__actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

/* ============================================================================
   MODAL OVERLAY (for pages modal)
   ============================================================================ */

/*
 * NOTE: .modal-overlay display is handled in components/modals.css
 * That file sets display:flex by default for dynamically created modals.
 * The .is-open pattern below is for legacy modals that exist in the DOM.
 */

.modal-overlay .modal {
    background: var(--bg-primary);
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content {
    padding: 20px;
}

.modal-content h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group--half {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Checkbox label */
.checkbox-label--sm {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label--sm input {
    margin: 0;
}

/* ============================================================================
   PAGE DETAIL MODAL
   ============================================================================ */

.modal-content--wide {
    max-width: 1200px !important;
    width: 95% !important;
}

.modal-overlay .modal:has(.modal-content--wide) {
    max-width: 1400px;
    max-height: 95vh;
}

.page-detail {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    min-height: 500px;
    max-height: 80vh;
}

.page-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
    flex-shrink: 0;
}

.page-detail__header h3 {
    margin: 0;
    font-size: 16px;
}

.page-detail__nav {
    display: flex;
    gap: 8px;
}

.page-detail__body {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.page-detail__preview {
    flex: 1 1 auto;
    min-width: 300px;
    background: #1a1a1a;
    border-radius: 6px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.page-detail__pdf {
    width: 100%;
    height: 100%;
    border: none;
}

.page-detail__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Page Image Viewer - for DOJ files using R2/CDN images instead of PDF iframes */
.detail-modal__page-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-secondary);
}

.detail-modal__page-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.detail-modal__page-indicator {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-modal__page-input {
    width: 50px;
    padding: 4px 6px;
    font-size: 13px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.detail-modal__page-input:focus {
    outline: none;
    border-color: var(--primary);
}

.detail-modal__image-viewer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: auto;
}

.detail-modal__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.detail-modal__image:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.page-detail__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 12px;
}

.page-detail__sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.page-detail__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-detail__meta .form-group {
    margin-bottom: 0;
}

.page-detail__meta .form-group label {
    font-size: 11px;
    margin-bottom: 2px;
}

.page-detail__meta .form-select {
    padding: 4px 8px;
    font-size: 12px;
}

.page-detail__stat {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.page-detail__stat .label {
    color: var(--text-muted);
}

.page-detail__stat .value {
    color: var(--text-primary);
    font-weight: 500;
}

.page-detail__ocr {
    flex-shrink: 0;
}

.page-detail__ocr label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: block;
}

.ocr-preview {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 8px;
    border-radius: 4px;
    white-space: pre-wrap;
    font-family: var(--font-mono);
}

.page-detail__meta .checkbox-label {
    font-size: 12px;
}

.page-detail__meta .btn {
    padding: 6px 12px;
    font-size: 12px;
}
