/* Premium Glassmorphism Design System - DocuMerge */
:root {
    /* Palette inspired by macOS liquid glass */
    --primary-hue: 248;
    --primary-color: hsl(var(--primary-hue), 92%, 72%);
    --primary-dark: hsl(var(--primary-hue), 92%, 52%);
    --primary-light: hsl(var(--primary-hue), 95%, 88%);
    --accent-color: hsl(318, 96%, 74%);

    --success-color: #4ade80;
    --error-color: #fb7185;
    --warning-color: #facc15;

    --bg-color: #050810;
    --bg-gradient:
        radial-gradient(circle at 15% 20%, rgba(78, 111, 241, 0.35), transparent 55%),
        radial-gradient(circle at 85% 15%, rgba(238, 99, 213, 0.25), transparent 60%),
        linear-gradient(180deg, #050810 0%, #0a0f1f 60%, #080b16 100%);

    --glass-surface: rgba(14, 18, 32, 0.65);
    --glass-highlight: rgba(255, 255, 255, 0.18);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-border-strong: 1px solid rgba(255, 255, 255, 0.25);
    --glass-blur: blur(36px) saturate(180%);
    --glass-shadow: 0 25px 65px rgba(2, 6, 23, 0.55);
    --glass-inner: inset 0 1px rgba(255, 255, 255, 0.05);

    --text-primary: #f5f7ff;
    --text-secondary: rgba(226, 232, 240, 0.75);
    --text-inverse: #050810;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wizard-container {
    width: min(1100px, 92vw);
    margin: 0 auto;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-xl);
    border: var(--glass-border);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: var(--glass-shadow);
    padding: 2.5rem;
}

.wizard-shell {
    flex: 1;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar-component {
    width: 260px;
    background: rgba(15, 23, 42, 0.85);
    border-right: var(--glass-border);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

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

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-nav .nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--text-primary);
    font-weight: 600;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.sidebar-footer {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.sidebar-footer .btn-logout {
    width: 100%;
    justify-content: flex-start;
    gap: 0.75rem;
}

.requests-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.metrics-grid--requests {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.requests-chart-card,
.requests-table-card {
    background: rgba(15, 23, 42, 0.7);
    border-radius: var(--radius-lg);
    border: var(--glass-border);
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.requests-table-wrapper {
    margin-top: 1rem;
    overflow-x: auto;
}

.requests-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.requests-table th,
.requests-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.requests-table th {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.requests-table td {
    color: var(--text-primary);
}

.requests-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 1.5rem 0;
}

.scheduler-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.metrics-grid--scheduler {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.scheduler-chart-card,
.scheduler-table-card {
    background: rgba(15, 23, 42, 0.7);
    border-radius: var(--radius-lg);
    border: var(--glass-border);
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.scheduler-table-wrapper {
    margin-top: 1rem;
    overflow-x: auto;
}

.scheduler-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.scheduler-table th,
.scheduler-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.scheduler-table th {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.scheduler-table td {
    color: var(--text-primary);
}

.scheduler-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 1.5rem 0;
}

.scheduler-status {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.scheduler-status--running {
    background: rgba(45, 212, 191, 0.2);
    color: #14b8a6;
}

.scheduler-status--success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.scheduler-status--failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.scheduler-status--pending {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.queries-section,
.business-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.metrics-grid--queries,
.metrics-grid--business {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.queries-chart-card,
.queries-table-card,
.queries-recommendations-card,
.business-chart-card,
.business-table-card {
    background: rgba(15, 23, 42, 0.7);
    border-radius: var(--radius-lg);
    border: var(--glass-border);
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.queries-table-wrapper,
.business-table-wrapper {
    margin-top: 1rem;
    overflow-x: auto;
}

.queries-table,
.business-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.queries-table th,
.queries-table td,
.business-table th,
.business-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.queries-table th,
.business-table th {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.queries-table td,
.business-table td {
    color: var(--text-primary);
}

.queries-empty,
.business-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 1.5rem 0;
}

.queries-recommendations-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.queries-recommendation {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: rgba(30, 41, 59, 0.6);
}

.queries-recommendation .recommendation-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.business-card .metric-card-value i {
    margin-right: 0.5rem;
}

[hidden] {
    display: none !important;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #c084fc, #e879f9);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Glass Cards */
.glass-panel,
.wizard-container,
.upload-component {
    background: rgba(30, 41, 59, 0.7);
    /* Darker semi-transparent for contrast */
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

/* Inputs */
.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

/* Custom Select */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

/* Upload Area Beautification */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    margin-top: 2rem;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    transform: scale(1.01);
}

.upload-icon {
    margin-bottom: 1.5rem;
    font-size: 4rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.file-input-hidden {
    display: none;
}

.upload-header h3 {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}

.upload-header i,
.category-selector label i {
    color: var(--primary-light);
}

.upload-header p,
.category-selector label {
    color: var(--text-secondary);
}

.category-selector label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.upload-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.upload-content p {
    color: rgba(226, 232, 240, 0.7);
    margin-bottom: 1rem;
}

.wizard-footer {
    margin-top: 3rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.wizard-footer .btn-logout {
    flex: 0 0 auto;
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    justify-content: center;
}

.processing-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - 220px);
}

.processing-card {
    width: min(900px, 92vw);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    border: var(--glass-border);
    background: rgba(15, 23, 42, 0.65);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.processing-header h3 {
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.processing-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.progress-bar {
    width: 100%;
    height: 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.9), rgba(236, 72, 153, 0.9));
    transition: width 0.3s ease;
}

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

.processing-steps {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.processing-step {
    flex: 1;
    text-align: center;
    opacity: 0.45;
    transition: opacity var(--transition-fast);
}

.processing-step.completed {
    opacity: 1;
    color: var(--text-primary);
}

.processing-step-icon {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.processing-step.completed .processing-step-icon {
    color: var(--primary-color);
}

.processing-step-label {
    font-size: 0.9rem;
}

.results-component {
    width: min(700px, 90vw);
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-header h3 {
    color: var(--success-color);
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.results-header p {
    color: var(--text-secondary);
}

.results-summary {
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(74, 222, 128, 0.3);
    background: rgba(22, 163, 74, 0.08);
}

.results-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success-color);
    display: block;
}

.results-count-label {
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-compact {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.review-page {
    padding: 2rem 0;
}

.review-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.review-title {
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.review-subtitle {
    color: var(--text-secondary);
}

.summary-box {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.summary-metrics {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1rem;
}

.summary-metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.summary-metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-practice {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.summary-practice-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    cursor: text;
    outline: none;
    border: 2px solid transparent;
}

.summary-practice-name:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.summary-practice-name:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.summary-practice-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.documents-section {
    margin-bottom: 2rem;
}

.section-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header--warning {
    color: #f59e0b;
}

.section-header--danger {
    color: #ef4444;
}

.document-list {
    border-radius: 12px;
    overflow: hidden;
}

.documents-warning {
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.documents-danger {
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.documents-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.review-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.document-item {
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.75rem;
}

.drag-handle {
    color: var(--text-secondary);
    cursor: grab;
    padding: 0.25rem;
    margin-top: 0.25rem;
}

.document-empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.file-icon {
    flex-shrink: 0;
    margin-top: 0.25rem;
    cursor: pointer;
}

.file-icon-indicator {
    font-size: 1.5rem;
}

.file-icon-indicator--pdf {
    color: #ef4444;
}

.file-icon-indicator--image {
    color: #f59e0b;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-date-display {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.file-meta-label {
    color: var(--text-secondary);
}

.file-name-input {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-weight: 500;
    width: 100%;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: text;
}

.file-date-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
}

.file-name-link {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-quality-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.file-quality-badge--error {
    background: #ef444420;
    color: #ef4444;
}

.file-quality-badge--warning {
    background: #f59e0b20;
    color: #f59e0b;
}

.file-quality-badge--success {
    background: #22c55e20;
    color: #22c55e;
}

.duplicate-info {
    background: rgba(245, 158, 11, 0.15);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin-top: 0.35rem;
    font-size: 0.7rem;
}

.duplicate-info-title {
    color: #f59e0b;
}

.duplicate-info-highlight {
    color: var(--text-primary);
}

.duplicate-info-meta {
    color: #f59e0b;
    margin-top: 0.15rem;
}

.excluded-info {
    background: rgba(239, 68, 68, 0.15);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin-top: 0.35rem;
    font-size: 0.7rem;
}

.excluded-info-title {
    color: #ef4444;
}

.excluded-info-highlight {
    color: var(--text-primary);
}

.document-action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.document-action-btn--delete i {
    color: #ef4444;
}

.document-action-btn--restore {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
}

.document-action-btn--restore.duplicates {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #f59e0b;
}

.document-action-btn--restore.excluded {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.document-action-btn--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.file-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.file-status-badge--locked {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.document-position {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 2rem;
    text-align: right;
    margin-top: 0.25rem;
}

.save-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

.upload-area h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.wizard-container,
.metric-card {
    animation: fadeIn 0.6s ease-out;
}

/* Update: Large Action Buttons */
.action-btn-lg {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
}

.action-btn-lg.exclude {
    color: #f87171;
    /* red-400 */
}

.action-btn-lg.exclude:hover {
    background: rgba(248, 113, 113, 0.2);
    transform: scale(1.1);
}

.action-btn-lg.include {
    color: #4ade80;
    /* green-400 */
}

.action-btn-lg.include:hover {
    background: rgba(74, 222, 128, 0.2);
    transform: scale(1.1);
}

/* Quality Badges & Tooltips */
.quality-badge {
    position: relative;
    cursor: help;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quality-badge.high {
    color: #4ade80;
}

.quality-badge.medium {
    color: #facc15;
}

.quality-badge.low {
    color: #f87171;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
    margin-bottom: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.tooltip:hover::after {
    opacity: 1;
}

/* Modal Removed Styles Cleanup is implicit as we removed HTML */

/* Review Component Inputs */
.date-input,
.date-input-text,
.amount-input {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.date-input-text {
    width: 7rem;
}

.date-input:hover,
.date-input-text:hover,
.amount-input:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.date-input:focus,
.date-input-text:focus,
.amount-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.amount-input {
    width: 5rem;
}


.field-commit-flash {
    animation: field-commit-pulse 0.9s ease;
}

@keyframes field-commit-pulse {
    0% {
        border-color: rgba(34, 197, 94, 1);
        box-shadow: 0 0 6px rgba(34, 197, 94, 0.75);
    }

    50% {
        border-color: rgba(34, 197, 94, 0.4);
        box-shadow: 0 0 4px rgba(34, 197, 94, 0.35);
    }

    100% {
        border-color: inherit;
        box-shadow: none;
    }
}

/* Category Badge */
.category-badge {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: capitalize;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* File Item Improvements */
.file-item .file-info {
    overflow: hidden;
}

.file-item input[type="text"] {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 500;
    width: 100%;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.file-item input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

/* Quality Badge Tooltip */
.quality-badge {
    position: relative;
    cursor: help;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.quality-badge.low {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.quality-badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.quality-badge.high {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.quality-badge.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10000;
    margin-bottom: 0.5rem;
    max-width: 300px;
    white-space: pre-wrap;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.quality-badge.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    z-index: 10001;
}

/* Document List Item Styles */
.document-item {
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.75rem;
    transition: background 0.2s ease;
}

.document-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.document-item:last-child {
    border-bottom: none;
}

.document-item .drag-handle {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.document-item:hover .drag-handle {
    opacity: 1;
}

.document-item .file-name:hover {
    color: var(--primary);
    text-decoration: underline;
}

.document-item .action-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.document-item .action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.document-item .delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.document-item .restore-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

.document-item .file-amount-row {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.document-item .file-amount-row--editable {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.document-item .file-amount-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.document-item .file-amount-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
}

.document-item .file-amount-input.input-error {
    border-color: rgba(239, 68, 68, 0.6);
}

.document-item .file-amount-value {
    color: var(--text-primary);
}

.document-item .file-amount-row--hint {
    font-style: italic;
}
/* Status and Fallback Overrides (moved to end for priority) */
.document-item .file-amount-input.field-saving { border: 1px solid rgba(250, 204, 21, 0.9) !important; box-shadow: 0 0 6px rgba(250, 204, 21, 0.5) !important; }
.document-item .file-amount-input.field-error,
.document-item .file-date-input.field-error { border: 1px solid rgba(248, 113, 113, 1) !important; box-shadow: 0 0 6px rgba(248, 113, 113, 0.65) !important; }
.document-item .file-amount-input.field-success,
.document-item .file-date-input.field-success { border: 1px solid rgba(74, 222, 128, 1) !important; box-shadow: 0 0 6px rgba(74, 222, 128, 0.6) !important; }
.document-item .file-amount-input--fallback,
.document-item .file-date-input--fallback { border: 1px dashed rgba(250, 255, 120, 0.9) !important; box-shadow: 0 0 8px rgba(250, 255, 120, 0.35) !important; }
