:root {
	--fcs-primary: #4f46e5;
}
.fcs-dashboard { max-width: 900px; margin: 0 auto; font-family: inherit; font-size: 16px; }
.fcs-wallet-card {
	background: linear-gradient(135deg, var(--fcs-primary), #111827);
	color: #fff;
	border-radius: 16px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.fcs-wallet-label { font-size: 14px; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }
.fcs-wallet-balance { font-size: 36px; font-weight: 700; margin: 6px 0 14px; }
.fcs-btn {
	display: inline-block;
	background: var(--fcs-primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 11px 20px;
	cursor: pointer;
	text-decoration: none;
	font-size: 16px;
}
.fcs-btn-light { background: rgba(255,255,255,0.15); }
.fcs-btn-sm { padding: 7px 14px; font-size: 15px; }
.fcs-upload-box { background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.fcs-price-note { color: #6b7280; font-size: 15px; }
.fcs-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.fcs-table th, .fcs-table td { text-align: left; padding: 12px 12px; border-bottom: 1px solid #e5e7eb; font-size: 16px; }
.fcs-amount-pos { color: #15803d; font-weight: 600; }
.fcs-amount-neg { color: #b91c1c; font-weight: 600; }
.fcs-status { padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.fcs-status-new { background: #e0e7ff; color: #3730a3; }
.fcs-status-assigned { background: #fef3c7; color: #92400e; }
.fcs-status-checking { background: #fef3c7; color: #92400e; }
.fcs-status-completed { background: #d1fae5; color: #065f46; }
.fcs-status-forwarded { background: #dbeafe; color: #1e40af; }
.fcs-status-failed { background: #fee2e2; color: #991b1b; }
.fcs-stats-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.fcs-stat-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 20px; min-width: 140px; }
.fcs-stat-num { font-size: 28px; font-weight: 700; }
.fcs-stat-label { font-size: 14px; color: #6b7280; }
.fcs-upload-msg { margin-top: 10px; padding: 10px; border-radius: 8px; font-size: 15px; }
.fcs-upload-msg.success { background: #d1fae5; color: #065f46; }
.fcs-upload-msg.error { background: #fee2e2; color: #991b1b; }

/* Reset stray theme influence inside the dashboard (page builders love to
   apply global img/svg sizing rules that blow icons up to full width). */
.fcs-dashboard svg { max-width: none !important; width: auto; height: auto; vertical-align: middle; }
.fcs-dashboard *, .fcs-dashboard *::before, .fcs-dashboard *::after { box-sizing: border-box; }

.fcs-active-files-table td { vertical-align: middle; }
.fcs-filename-cell { max-width: 170px; overflow-wrap: break-word; font-weight: 500; font-size: 16px; }

/* Preview / download / claim icon buttons */
.fcs-icon-btn {
	display: inline-flex !important; align-items: center; justify-content: center;
	width: 38px !important; height: 38px !important; border-radius: 8px;
	background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb;
	cursor: pointer; text-decoration: none; padding: 0; flex-shrink: 0;
	transition: background .15s ease, border-color .15s ease;
}
.fcs-icon-btn:hover { background: #e5e7eb; }
.fcs-icon-btn svg { width: 19px !important; height: 19px !important; }
.fcs-inline-icon { width: 16px !important; height: 16px !important; display: inline-block; vertical-align: -3px; margin-right: 4px; }

/* One compact, professional action toolbar per file row.
 * All actions (preview, download, upload similarity, upload AI report)
 * sit on a single line. On very narrow screens the row scrolls
 * horizontally instead of wrapping to a second line. */
.fcs-file-toolbar {
	display: flex !important;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	overflow-x: auto;
	max-width: 100%;
	padding-bottom: 2px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.fcs-file-toolbar > a,
.fcs-file-toolbar > form { flex-shrink: 0; }

.fcs-report-pill { margin: 0; }
.fcs-icon-upload {
	position: relative;
	display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
	background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 999px;
	padding: 5px 14px 5px 5px; font-size: 14.5px; font-weight: 600; color: #4338ca;
	transition: background .15s ease, border-color .15s ease;
	white-space: nowrap;
}
.fcs-icon-upload:hover { background: #e0e7ff; }
.fcs-icon-upload-img {
	width: 26px !important; height: 26px !important; object-fit: cover;
	border-radius: 6px; flex-shrink: 0; display: block;
}
.fcs-icon-upload-check {
	width: 15px !important; height: 15px !important; flex-shrink: 0; color: #059669;
}
.fcs-icon-upload input[type="file"] {
	position: absolute; inset: 0; width: 100%; height: 100%;
	opacity: 0; cursor: pointer;
}
.fcs-report-pill.fcs-pill-done .fcs-icon-upload {
	background: #d1fae5; border-color: #a7f3d0; color: #065f46;
}
.fcs-report-pill.fcs-uploading .fcs-icon-upload {
	opacity: .6; pointer-events: none;
}
.fcs-report-pill.fcs-uploading .fcs-icon-upload::after {
	content: '…'; margin-left: 2px;
}

/* Claim button */
.fcs-claim-btn { display: inline-flex; align-items: center; }
.fcs-claim-btn.fcs-btn-loading { opacity: .65; pointer-events: none; }

/* Live countdown timer */
.fcs-timer {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 15px; font-weight: 600; color: #374151;
	background: #f3f4f6; border-radius: 999px; padding: 5px 12px 7px;
	white-space: nowrap;
	position: relative;
}
.fcs-timer-warning { background: #fef3c7; color: #92400e; }
.fcs-timer-expired { background: #fee2e2; color: #991b1b; }

/* Thin shrinking bar under the countdown text so the checker can see,
 * at a glance, that the timer is actually running (not just numbers). */
.fcs-timer-bar {
	display: block; position: absolute; left: 10px; right: 10px; bottom: 3px;
	height: 2px; background: rgba(0,0,0,0.08); border-radius: 2px; overflow: hidden;
}
.fcs-timer-bar-fill {
	display: block; height: 100%; width: 100%;
	background: #9ca3af; transition: width 1s linear;
}
.fcs-timer-warning .fcs-timer-bar-fill { background: #d97706; }
.fcs-timer-expired .fcs-timer-bar-fill { background: #dc2626; width: 0 !important; }

/* "My Active Files" heading + Bulk Upload toggle share one line */
.fcs-section-heading-row {
	display: flex; align-items: center; justify-content: space-between;
	flex-wrap: wrap; gap: 10px; margin-bottom: 4px;
}
.fcs-section-heading-row h3 { margin: 0; }
.fcs-bulk-toggle-btn {
	appearance: none; -webkit-appearance: none;
	font-family: inherit; margin: 0;
}
.fcs-bulk-toggle-btn svg { width: 16px !important; height: 16px !important; flex-shrink: 0; }

/* Bulk upload panel */
.fcs-bulk-upload { margin-bottom: 16px; }
.fcs-bulk-panel { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; margin-top: 10px; }
.fcs-hint { font-size: 14.5px; color: #6b7280; margin: 0 0 12px; }
.fcs-bulk-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fcs-bulk-row select { padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 7px; font-size: 15px; }
.fcs-bulk-msg { margin-top: 10px; font-size: 14.5px; color: #374151; }

/* Slightly larger type on wider (desktop) screens, on top of the mobile
 * baseline above, so text stays comfortably readable on PC too. */
@media (min-width: 768px) {
	.fcs-dashboard { font-size: 17px; }
	.fcs-table th, .fcs-table td { font-size: 17px; }
	.fcs-filename-cell { font-size: 17px; }
	.fcs-status { font-size: 14.5px; }
	.fcs-icon-upload { font-size: 15px; }
	.fcs-timer { font-size: 15.5px; }
	.fcs-wallet-balance { font-size: 40px; }
	.fcs-stat-num { font-size: 30px; }
}

/* Client: separate Similarity / AI report downloads */
.fcs-report-links { display: flex; flex-wrap: wrap; gap: 6px; }
.fcs-report-btn {
	display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
	font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; border: 1px solid transparent;
}
.fcs-report-btn-similarity { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.fcs-report-btn-similarity:hover { background: #e0e7ff; }
.fcs-report-btn-ai { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.fcs-report-btn-ai:hover { background: #d1fae5; }
.fcs-report-btn-pending { background: #f3f4f6; border-color: #e5e7eb; color: #9ca3af; font-weight: 500; }
.fcs-pill-done .fcs-icon-upload-check { display: inline-block; }

/* "AI Report not available" — client-facing chip + tooltip with reason */
.fcs-report-btn-unavailable {
	background: #fff7ed; border-color: #fed7aa; color: #9a3412; font-weight: 600;
	display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.3;
	cursor: help;
}
.fcs-report-btn-reason {
	display: block; font-size: 12px; font-weight: 500; color: #c2410c; margin-top: 1px;
}

/* Checker: "AI not available?" toggle + reason form — sits below the
 * toolbar row (not inside it) so the popup form is never clipped by the
 * toolbar's horizontal scroll area. */
.fcs-ai-na-row { margin-top: 8px; }
.fcs-ai-na-toggle { display: inline-block; position: relative; }
.fcs-ai-na-link {
	list-style: none; cursor: pointer; font-size: 13.5px; font-weight: 600;
	color: #b45309; white-space: nowrap; padding: 6px 10px; border-radius: 999px;
	background: #fffbeb; border: 1px solid #fde68a; display: inline-block;
}
.fcs-ai-na-toggle summary::-webkit-details-marker { display: none; }
.fcs-ai-na-toggle summary::marker { content: ''; display: none; }
.fcs-ai-na-toggle[open] .fcs-ai-na-link { background: #fef3c7; }
.fcs-ai-na-toggle form.fcs-ai-unavailable-form {
	position: relative; z-index: 5; margin-top: 8px;
	background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.08);
	padding: 12px; display: flex; flex-direction: column; gap: 8px; max-width: 280px;
}
.fcs-ai-unavailable-form select,
.fcs-ai-unavailable-form input[type="text"] {
	width: 100%; padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 7px; font-size: 14px;
}
.fcs-ai-na-msg { font-size: 13px; color: #b91c1c; }
.fcs-ai-na-msg.error { color: #b91c1c; }
.fcs-ai-na-badge {
	display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px;
	background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13.5px; font-weight: 600;
	cursor: help; white-space: nowrap;
}

/* Refunded status */
.fcs-status-refunded { background: #f3f4f6; color: #4b5563; }

/* Collapsible "folder" for long lists (Wallet History etc.) — closed by
 * default so the dashboard doesn't dump a huge repetitive list on screen;
 * tap to open. Uses native <details>/<summary>, no JS needed. */
.fcs-folder {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	margin-bottom: 24px;
	overflow: hidden;
	display: block;
}
.fcs-folder-summary {
	display: flex !important; align-items: center; justify-content: space-between;
	gap: 10px; padding: 14px 16px; cursor: pointer;
	list-style: none; user-select: none;
}
.fcs-folder-summary::-webkit-details-marker { display: none; }
.fcs-folder-summary::marker { content: ''; display: none; }
.fcs-folder-summary-left { display: flex !important; align-items: center; gap: 10px; }
.fcs-folder-summary h3 { margin: 0; font-size: 17px; }
.fcs-folder-icon-badge {
	display: inline-flex !important; align-items: center; justify-content: center;
	width: 34px !important; height: 34px !important; flex: 0 0 34px;
	border-radius: 9px; background: #eef2ff; flex-shrink: 0;
}
.fcs-folder-icon {
	width: 18px !important; height: 18px !important; max-width: 18px !important; max-height: 18px !important;
	color: var(--fcs-primary); flex-shrink: 0; display: block;
}
.fcs-folder-count {
	background: #eef2ff; color: #4338ca; font-size: 13px; font-weight: 700;
	border-radius: 999px; padding: 2px 10px; line-height: 1.5;
}
.fcs-folder-chevron {
	width: 16px !important; height: 16px !important; max-width: 16px !important; max-height: 16px !important;
	color: #6b7280; flex-shrink: 0; display: block;
	transition: transform .2s ease;
}
.fcs-folder[open] .fcs-folder-chevron { transform: rotate(180deg); }
.fcs-folder-body {
	padding: 0 16px 8px;
	border-top: 1px solid #e5e7eb;
	max-height: 420px;
	overflow-y: auto;
}
.fcs-folder-body .fcs-table { margin-bottom: 0; }
.fcs-folder-body .fcs-table thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.fcs-folder-subheading {
	margin: 16px 0 4px; font-size: 14.5px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .04em; color: #6b7280;
}
.fcs-folder-subheading:first-child { margin-top: 12px; }
.fcs-folder-body .fcs-table + .fcs-folder-subheading { margin-top: 18px; }
.fcs-checker-history-folder .fcs-folder-body { max-height: 520px; }

/* Checker: Available File Pool as rows (file name + Claim File) */
.fcs-pool-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.fcs-pool-row {
	display: flex; align-items: center; gap: 12px;
	background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px;
}
.fcs-pool-icon {
	flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
	background: #eef2ff; color: #4338ca; display: inline-flex; align-items: center; justify-content: center;
}
.fcs-pool-icon svg { width: 22px !important; height: 22px !important; }
.fcs-pool-info { flex: 1 1 auto; min-width: 0; }
.fcs-pool-name {
	font-weight: 600; font-size: 16px; color: #111827;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fcs-pool-meta { font-size: 13.5px; color: #6b7280; margin-top: 2px; }
.fcs-pool-row .fcs-claim-btn { flex: 0 0 auto; white-space: nowrap; }
.fcs-pool-empty { padding: 18px; text-align: center; color: #6b7280; background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 12px; }
@media (max-width: 480px) {
	.fcs-pool-row { padding: 10px; gap: 10px; }
	.fcs-pool-icon { width: 34px; height: 34px; }
	.fcs-pool-name { font-size: 15px; }
}

.fcs-ai-na-client-note { margin-top: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.4; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px; }

/* Visible delete buttons (fcs-btn-light is white-on-white outside the wallet card). */
.fcs-btn.fcs-btn-danger { background: #dc2626; color: #fff; border: 0; }
.fcs-btn.fcs-btn-danger:hover { background: #b91c1c; }
.fcs-btn.fcs-btn-danger:disabled { opacity: .6; }
.fcs-client-dashboard .fcs-file-list { overflow-x: auto; -webkit-overflow-scrolling: touch; }


/* ---- Report options (client upload form + checker view) ---- */
.fcs-options-box { margin: 14px 0 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 0; }
.fcs-options-summary { cursor: pointer; padding: 12px 14px; font-weight: 600; color: #374151; font-size: 15px; }
.fcs-options-box[open] .fcs-options-summary { border-bottom: 1px solid #e5e7eb; }
.fcs-options-grid { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 12px 14px 4px; }
.fcs-opt-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px; font-size: 15px; line-height: 1.35; cursor: pointer; }
.fcs-opt-check input[type=checkbox] { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; }
.fcs-opt-small { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px; }
.fcs-opt-small-label { font-size: 15px; width: 100%; }
.fcs-opt-small select, .fcs-opt-small input[type=number] { padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; }
.fcs-opt-small input[type=number] { width: 90px; }
.fcs-opt-note { display: block; width: calc(100% - 28px); margin: 6px 14px 14px; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; box-sizing: border-box; }
.fcs-filters { margin-top: 8px; padding: 8px 10px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; font-size: 13px; line-height: 1.4; color: #312e81; }
.fcs-filters-none { background: #f3f4f6; border-color: #e5e7eb; color: #6b7280; }
.fcs-filters-title { font-weight: 700; margin-bottom: 4px; }
.fcs-filter-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.fcs-filter-chips li { margin: 0; padding: 2px 8px; background: #fff; border: 1px solid #c7d2fe; border-radius: 999px; font-size: 12.5px; }
.fcs-filter-note { margin-top: 6px; color: #1f2937; white-space: pre-wrap; }
@media (min-width: 640px) { .fcs-options-grid { grid-template-columns: 1fr 1fr; } }

/* Pass to other */
.fcs-btn.fcs-btn-pass { margin-top: 8px; background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; }
.fcs-btn.fcs-btn-pass:hover { background: #ffedd5; }
.fcs-btn.fcs-btn-pass:disabled { opacity: .6; }

/* ---- New-file alerts (checker) ---- */
.fcs-alert-bar { margin: 0 0 20px; padding: 12px 14px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; }
.fcs-alert-bar.fcs-alert-off { background: #f3f4f6; border-color: #e5e7eb; }
.fcs-alert-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: #16a34a; color: #fff; border: 0; border-radius: 999px; font-size: 15px; font-weight: 600; cursor: pointer; }
.fcs-alert-off .fcs-alert-toggle { background: #6b7280; }
.fcs-alert-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.fcs-alert-off .fcs-alert-opts { opacity: .55; }
.fcs-alert-field { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: #374151; }
.fcs-alert-field select { padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; background: #fff; }
.fcs-alert-field input[type=range] { width: 110px; }
.fcs-alert-hint { margin-top: 10px; font-size: 12.5px; line-height: 1.4; color: #6b7280; }
.fcs-toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; gap: 2px; max-width: 92vw; padding: 12px 18px; background: #111827; color: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.3); font-size: 15px; cursor: pointer; }
.fcs-toast strong { color: #86efac; }
.fcs-toast span { word-break: break-word; }
