/* ==========================================================================
   RS ARC Manager - Frontend Author SaaS Portal Styles
   ========================================================================== */

.rs-arc-author-dashboard {
	max-width: 1200px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #1e293b;
	line-height: 1.5;
}

/* Header & Profile Ribbon */
.rs-arc-author-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 24px 32px;
	margin-bottom: 24px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	flex-wrap: wrap;
	gap: 20px;
}

.rs-arc-author-profile {
	display: flex;
	align-items: center;
	gap: 20px;
}

.rs-arc-author-avatar img {
	border-radius: 50%;
	border: 3px solid #e0e7ff;
	display: block;
}

.rs-arc-author-meta h2 {
	margin: 0 0 4px 0;
	font-size: 24px;
	font-weight: 700;
	color: #0f172a;
}

.rs-arc-portal-pill {
	display: inline-block;
	background: #e0e7ff;
	color: #4338ca;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 9999px;
	margin-bottom: 6px;
	letter-spacing: 0.5px;
}

.rs-arc-author-subtitle {
	margin: 0;
	color: #64748b;
	font-size: 14px;
}

/* Buttons */
.rs-arc-btn-action {
	background: #4f46e5;
	color: #ffffff !important;
	border: none;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.2s ease;
	text-decoration: none;
	box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.rs-arc-btn-action:hover {
	background: #4338ca;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.rs-arc-btn-secondary {
	background: #f1f5f9;
	color: #334155 !important;
	border: 1px solid #cbd5e1;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
}

.rs-arc-btn-secondary:hover {
	background: #e2e8f0;
}

.rs-arc-btn-sm {
	padding: 6px 12px;
	font-size: 12px;
}

/* Global Metrics Ribbon */
.rs-arc-metrics-ribbon {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}

.rs-arc-metric-item {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 18px 24px;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rs-arc-metric-item .metric-val {
	font-size: 28px;
	font-weight: 800;
	color: #1e293b;
	line-height: 1.2;
}

.rs-arc-metric-item .metric-label {
	font-size: 13px;
	color: #64748b;
	margin-top: 4px;
	font-weight: 500;
}

.rs-arc-metric-item.metric-highlight {
	background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
	color: #ffffff;
	border-color: transparent;
}

.rs-arc-metric-item.metric-highlight .metric-val,
.rs-arc-metric-item.metric-highlight .metric-label {
	color: #ffffff;
}

/* Tab Navigation */
.rs-arc-tab-nav {
	display: flex;
	gap: 8px;
	border-bottom: 2px solid #e2e8f0;
	margin-bottom: 24px;
	overflow-x: auto;
}

.rs-arc-tab-btn {
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	color: #64748b;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: -2px;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.rs-arc-tab-btn:hover {
	color: #334155;
}

.rs-arc-tab-btn.active {
	color: #4f46e5;
	border-bottom-color: #4f46e5;
}

.tab-badge {
	background: #e2e8f0;
	color: #475569;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 9999px;
}

.tab-badge-alert {
	background: #ef4444;
	color: #ffffff;
}

/* Tab Content Areas */
.rs-arc-tab-content {
	display: none;
}

.rs-arc-tab-content.active {
	display: block;
}

/* Tables */
.rs-arc-campaigns-table-container {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rs-arc-author-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.rs-arc-author-table th {
	background: #f8fafc;
	color: #475569;
	font-weight: 600;
	text-align: left;
	padding: 14px 18px;
	border-bottom: 1px solid #e2e8f0;
}

.rs-arc-author-table td {
	padding: 14px 18px;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}

.rs-arc-author-table tr:last-child td {
	border-bottom: none;
}

.rs-arc-author-table tr:hover td {
	background: #f8fafc;
}

.cell-book-info .book-row-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.table-cover-thumb img {
	width: 36px;
	height: 48px;
	object-fit: cover;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sub-genre {
	font-size: 12px;
	color: #64748b;
}

/* Status Pills */
.rs-arc-status-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.rs-arc-status-pill.status-active {
	background: #dcfce7;
	color: #15803d;
}

.rs-arc-status-pill.status-paused {
	background: #fef3c7;
	color: #b45309;
}

.rs-arc-status-pill.status-expired {
	background: #fee2e2;
	color: #b91c1c;
}

.metric-badge-rate {
	background: #f1f5f9;
	color: #334155;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 13px;
}

/* Progress bar */
.rs-arc-progress-bar-wrap {
	width: 100px;
	height: 6px;
	background: #e2e8f0;
	border-radius: 9999px;
	overflow: hidden;
	margin-top: 4px;
}

.rs-arc-progress-bar-fill {
	height: 100%;
	background: #4f46e5;
	border-radius: 9999px;
}

/* Action Button Group */
.btn-group-actions {
	display: inline-flex;
	gap: 6px;
}

.btn-action-icon {
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.btn-action-icon:hover {
	background: #e2e8f0;
	transform: translateY(-1px);
}

/* Empty States */
.rs-arc-empty-state {
	background: #ffffff;
	border: 2px dashed #cbd5e1;
	border-radius: 16px;
	padding: 48px 32px;
	text-align: center;
	margin: 20px 0;
}

.rs-arc-empty-state .empty-icon {
	font-size: 48px;
	margin-bottom: 12px;
}

.rs-arc-empty-state h3 {
	margin: 0 0 8px 0;
	font-size: 20px;
	color: #0f172a;
}

.rs-arc-empty-state p {
	color: #64748b;
	margin: 0 auto 20px auto;
	max-width: 500px;
}

/* Campaign Builder Card */
.rs-arc-builder-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.builder-header {
	margin-bottom: 24px;
	border-bottom: 1px solid #e2e8f0;
	padding-bottom: 16px;
}

.builder-header h3 {
	margin: 0 0 6px 0;
	font-size: 22px;
	color: #0f172a;
}

.builder-header p {
	margin: 0;
	color: #64748b;
	font-size: 14px;
}

.form-section {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px 24px;
	margin-bottom: 24px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.section-title {
	margin: 0 0 16px 0;
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
}

.form-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.form-grid-3 {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 16px;
}

.form-group {
	margin-bottom: 16px;
}

.form-group label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #334155;
	margin-bottom: 6px;
}

.form-group small {
	display: block;
	color: #64748b;
	font-size: 12px;
	margin-top: 4px;
}

.form-control {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
	background: #ffffff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
	border-color: #4f46e5;
	outline: none;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Radio Cards */
.rs-arc-radio-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.radio-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	padding: 14px 16px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.radio-card:hover {
	border-color: #cbd5e1;
}

.radio-card input[type="radio"]:checked + .radio-card-body,
.radio-card:has(input[type="radio"]:checked) {
	border-color: #4f46e5;
	background: #f5f3ff;
}

.radio-card-body strong {
	display: block;
	font-size: 14px;
	color: #1e293b;
	margin-bottom: 4px;
}

.radio-card-body p {
	margin: 0;
	font-size: 12px;
	color: #64748b;
	line-height: 1.4;
}

/* Dropzone preview */
.upload-dropzone-box {
	text-align: center;
}

.upload-dropzone-box label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #334155;
	margin-bottom: 6px;
	text-align: left;
}

.dropzone-preview {
	border: 2px dashed #cbd5e1;
	border-radius: 10px;
	background: #ffffff;
	padding: 24px 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	min-height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dropzone-preview:hover {
	border-color: #4f46e5;
	background: #faf5ff;
}

.dropzone-prompt span {
	font-size: 28px;
	display: block;
	margin-bottom: 4px;
}

.dropzone-prompt p {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
}

.dropzone-preview.has-file {
	border-color: #10b981;
	background: #ecfdf5;
}

.dropzone-preview.has-file p {
	color: #059669;
}

/* Retail Repeater */
.retail-repeater-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.retail-link-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 12px;
	transition: border-color 0.2s ease;
}

.retail-link-row:hover {
	border-color: #cbd5e1;
}

.retail-link-row .rs-arc-retail-platform-select {
	flex: 0 0 200px;
	width: 200px;
	max-width: 220px;
	min-width: 130px;
	box-sizing: border-box;
}

.retail-link-row .rs-arc-retail-custom-name {
	flex: 0 0 170px;
	width: 170px;
	max-width: 180px;
	min-width: 110px;
	box-sizing: border-box;
}

.retail-link-row .rs-arc-retail-url {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}

.retail-link-row .btn-action-icon,
.retail-link-row .rs-arc-remove-retail-item {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fee2e2;
	color: #ef4444;
	border: 1px solid #fecaca;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	transition: all 0.2s ease;
	flex-shrink: 0;
	padding: 0;
	box-sizing: border-box;
}

.retail-link-row .btn-action-icon:hover,
.retail-link-row .rs-arc-remove-retail-item:hover {
	background: #ef4444;
	color: #ffffff;
}

/* Backlist Repeater */
.backlist-item-row {
	display: grid;
	grid-template-columns: 2fr 1fr 2fr auto;
	gap: 12px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 14px;
	margin-top: 10px;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.form-actions-bar {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 24px;
	border-top: 1px solid #e2e8f0;
	padding-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.form-grid-2,
	.form-grid-3,
	.rs-arc-radio-cards,
	.backlist-item-row {
		grid-template-columns: 1fr;
	}
	
	.rs-arc-author-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 640px) {
	.retail-link-row {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.retail-link-row .rs-arc-retail-platform-select,
	.retail-link-row .rs-arc-retail-custom-name,
	.retail-link-row .rs-arc-retail-url {
		flex: 1 1 100%;
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.retail-link-row .btn-action-icon,
	.retail-link-row .rs-arc-remove-retail-item {
		align-self: flex-end;
		width: 38px;
		height: 38px;
	}
}
