/* Document management — Phase 2A additions */

.content-box {
    max-width: 1000px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.content-box h1 {
    margin-top: 0;
    color: var(--fuse-blue);
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Forms inside content boxes */
.content-box label {
    display: block;
    margin: 1rem 0;
    font-weight: 500;
}

.content-box label.checkbox {
    display: flex;
    align-items: center;
    font-weight: 400;
}

.content-box label.checkbox input {
    margin-right: 0.5rem;
}

.content-box input[type=text],
.content-box input[type=file],
.content-box select,
.content-box textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-top: 0.4rem;
    border: 1px solid var(--grey-300);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.content-box input:focus,
.content-box select:focus,
.content-box textarea:focus {
    outline: 2px solid var(--fuse-blue);
    outline-offset: 1px;
}

.btn-secondary {
    background: white;
    color: var(--fuse-blue);
    border: 1px solid var(--fuse-blue);
}

.link-cancel {
    margin-left: 1rem;
    color: var(--grey-700);
}

/* Tables */
.data-table, .metadata-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th, .data-table td,
.metadata-table th, .metadata-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--grey-300);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: var(--fuse-light);
    color: var(--fuse-blue);
    font-weight: 600;
}

.metadata-table th {
    width: 180px;
    color: var(--grey-700);
    font-weight: 500;
}

.data-table a {
    color: var(--fuse-blue);
    font-weight: 500;
}

/* Status pills */
.status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-pending     { background: #FEF3C7; color: #92400E; }
.status-extracting,
.status-chunking,
.status-embedding   { background: #DBEAFE; color: #1E40AF; }
.status-complete    { background: #D1FAE5; color: #065F46; }
.status-failed      { background: #FEE2E2; color: #991B1B; }

.tag {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.4rem;
}

.tag-safety {
    background: var(--red);
    color: white;
}

.empty-state {
    text-align: center;
    color: var(--grey-700);
    padding: 3rem 1rem;
    background: var(--grey-100);
    border-radius: 6px;
}

/* Chunks display */
.chunk {
    border: 1px solid var(--grey-300);
    border-radius: 4px;
    padding: 0.75rem;
    margin: 0.5rem 0;
}

.chunk summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--fuse-blue);
}

.chunk-text {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--grey-100);
    border-radius: 4px;
    white-space: pre-wrap;
    font-size: 0.9rem;
    color: var(--grey-900);
    max-height: 300px;
    overflow-y: auto;
}

/* OCR tag and cost breakdown */
.tag-ocr {
    background: #6B46C1;
    color: white;
}

.cost-breakdown {
    color: var(--grey-700);
    font-size: 0.85rem;
}

/* Danger button for delete actions */
.btn-danger {
    background: #DC2626;
    color: white;
    border: 1px solid #DC2626;
    margin-left: 0.5rem;
}

.btn-danger:hover {
    background: #B91C1C;
    border-color: #B91C1C;
}
