:root {
	--primary-color: #ff0080;
	--primary-hover: #e60073;
	--success-color: #00c853;
	--success-hover: #00a844;
	--error-color: #ff3d3d;
	--warning-color: #ffab00;
	--bg-color: #1a1a1a;
	--bg-darker: #121212;
	--bg-sidebar: #0d0d0d;
	--card-bg: #242424;
	--text-primary: #ffffff;
	--text-secondary: #888888;
	--text-muted: #666666;
	--border-color: #333333;
	--link-color: #ff0080;
	--shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
	--radius: 4px;
	--radius-lg: 8px;
}

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

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	background-color: var(--bg-color);
	color: var(--text-primary);
	line-height: 1.6;
	min-height: 100vh;
	margin: 0;
	padding: 0;
}

/* Layout */
.app-layout {
	display: flex;
	min-height: 100vh;
}

/* Header */
.app-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 48px;
	background: var(--bg-darker);
	border-bottom: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1rem;
	z-index: 100;
}

.app-header .header-title {
	color: var(--primary-color);
	font-weight: 700;
	font-size: 1.25rem;
}

.app-header .logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--primary-color);
	font-weight: 700;
	font-size: 1.25rem;
}

.app-header .logo svg {
	width: 24px;
	height: 24px;
}

.app-header .user-info {
	margin-left: auto;
	color: var(--text-secondary);
	font-size: 0.875rem;
}

/* Sidebar */
.sidebar {
	position: fixed;
	top: 48px;
	left: 0;
	width: 220px;
	height: calc(100vh - 48px);
	background: var(--bg-sidebar);
	border-right: 1px solid var(--border-color);
	padding: 1rem 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.sidebar-section {
	margin-bottom: 1.5rem;
}

.sidebar-title {
	color: var(--text-primary);
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0.5rem 1rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.sidebar-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--link-color);
	text-decoration: none;
	padding: 0.35rem 1rem;
	font-size: 0.85rem;
	transition: background 0.15s ease;
}

.menu-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	opacity: 0.7;
}

.sidebar-link:hover .menu-icon {
	opacity: 1;
}

.sidebar-link:hover {
	background: rgba(255, 0, 128, 0.1);
}

.sidebar-link.active {
	background: rgba(255, 0, 128, 0.15);
	border-left: 3px solid var(--primary-color);
}

.sidebar-version {
	margin-top: auto;
	padding: 0.5rem 1rem;
	color: #555;
	font-size: 0.75rem;
	text-align: center;
}

.sidebar-toggle {
	position: absolute;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	background: var(--border-color);
	border: none;
	color: var(--text-secondary);
	padding: 0.25rem 0.5rem;
	border-radius: var(--radius);
	cursor: pointer;
}

/* Main Content */
.main-content {
	margin-left: 220px;
	margin-top: 48px;
	flex: 1;
	padding: 2rem;
	min-height: calc(100vh - 48px);
}

/* Warning Panel */
.warning-panel {
	position: fixed;
	top: 48px;
	right: 0;
	width: 200px;
	background: var(--bg-darker);
	border-left: 1px solid var(--border-color);
	padding: 1rem;
	height: calc(100vh - 48px);
}

.warning-panel .warning-title {
	color: var(--primary-color);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 0.5rem;
}

.warning-panel p {
	color: var(--text-secondary);
	font-size: 0.8rem;
	line-height: 1.5;
}

.container {
	max-width: 100%;
	margin: 0;
	padding: 0;
}

.page-header {
	margin-bottom: 2rem;
}

.page-header h1 {
	font-size: 1.75rem;
	font-weight: 400;
	color: var(--text-primary);
	margin-bottom: 0.5rem;
}

.page-header .subtitle {
	color: var(--text-secondary);
	font-size: 0.9rem;
}

.card {
	background: var(--card-bg);
	border-radius: var(--radius);
	border: 1px solid var(--border-color);
	padding: 1.25rem;
	margin-bottom: 1.25rem;
}

.card h2 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: var(--text-primary);
}

.card-header {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: 1rem;
}

.card-header h2 {
	margin-bottom: 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.header-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	opacity: 0.8;
}

.hidden {
	display: none !important;
}

/* Options Grid */
.options-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
}

.option-btn {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 1.25rem;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--card-bg);
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: left;
	position: relative;
}

.option-btn:hover:not(.disabled) {
	border-color: var(--primary-color);
	background: rgba(255, 0, 128, 0.05);
}

.option-btn.primary:hover:not(.disabled) {
	background: rgba(255, 0, 128, 0.1);
}

.option-btn.disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.option-btn .icon {
	font-size: 1.5rem;
	margin-bottom: 0.75rem;
}

.option-btn .title {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--link-color);
	margin-bottom: 0.35rem;
}

.option-btn .desc {
	font-size: 0.8rem;
	color: var(--text-secondary);
}

.option-btn .badge {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: var(--warning-color);
	color: #000;
	padding: 0.15rem 0.5rem;
	border-radius: var(--radius);
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
}

/* Form Elements */
.form-group {
	margin-bottom: 1rem;
	position: relative;
}

.form-group label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.5rem;
	color: var(--text-primary);
}

.form-group input,
.form-group select {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	font-size: 0.875rem;
	background: var(--bg-darker);
	color: var(--text-primary);
	transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus {
	outline: none;
	border-color: var(--primary-color);
}

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

.form-group small {
	display: block;
	margin-top: 0.25rem;
	color: var(--text-secondary);
	font-size: 0.85rem;
}

.form-group .btn-show-password {
	position: absolute;
	right: 0.5rem;
	top: 2.25rem;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.25rem;
}

.form-actions {
	display: flex;
	gap: 1rem;
	margin-top: 1.5rem;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: var(--radius);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-primary {
	background: var(--primary-color);
	color: white;
}

.btn-primary:hover:not(:disabled) {
	background: var(--primary-hover);
}

.btn-secondary {
	background: var(--border-color);
	color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
	background: #444444;
}

.btn-success {
	background: var(--success-color);
	color: #000;
}

.btn-success:hover:not(:disabled) {
	background: var(--success-hover);
}

.btn-sm {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
}

.btn-icon {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	border-radius: var(--radius);
	transition: background 0.2s ease;
}

.btn-icon:hover {
	background: var(--border-color);
}

.btn-link {
	background: none;
	border: none;
	color: var(--primary-color);
	cursor: pointer;
	text-decoration: underline;
	font-size: inherit;
}

/* Configuration Panel */
.config-content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
}

.config-content .form-actions {
	grid-column: 1 / -1;
}

/* Steps */
.step {
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--border-color);
}

.step:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.step-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	background: var(--primary-color);
	color: white;
	border-radius: 50%;
	font-weight: 600;
	font-size: 0.9rem;
}

.step-header h3 {
	font-size: 1.1rem;
	font-weight: 600;
}

.step-content {
	margin-left: 3rem;
}

/* File Upload */
.file-upload-area {
	border: 1px dashed var(--border-color);
	border-radius: var(--radius);
	padding: 2rem 1.5rem;
	text-align: center;
	transition: all 0.15s ease;
	cursor: pointer;
	background: var(--bg-darker);
}

.file-upload-area:hover,
.file-upload-area.dragover {
	border-color: var(--primary-color);
	background: rgba(255, 0, 128, 0.05);
}

.file-upload-area .upload-icon {
	font-size: 2rem;
	margin-bottom: 0.75rem;
}

.file-upload-area p {
	color: var(--text-secondary);
	margin-bottom: 0.5rem;
}

.file-upload-area small {
	color: var(--text-secondary);
	font-size: 0.8rem;
}

.file-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.6rem 0.75rem;
	background: rgba(0, 200, 83, 0.1);
	border: 1px solid rgba(0, 200, 83, 0.3);
	border-radius: var(--radius);
	margin-top: 0.75rem;
}

.file-info .file-name {
	font-weight: 500;
	color: var(--success-color);
	font-size: 0.875rem;
}

/* Preview Stats */
.preview-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.stat {
	background: var(--bg-darker);
	padding: 0.75rem;
	border-radius: var(--radius);
	text-align: center;
	border: 1px solid var(--border-color);
}

.stat-value {
	display: block;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--primary-color);
}

.stat-label {
	font-size: 0.75rem;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Table */
.table-container {
	overflow-x: auto;
	max-height: 400px;
	overflow-y: auto;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

thead {
	position: sticky;
	top: 0;
	background: var(--bg-darker);
}

th, td {
	padding: 0.6rem 0.75rem;
	text-align: left;
	border-bottom: 1px solid var(--border-color);
}

th {
	font-weight: 600;
	color: var(--text-secondary);
	text-transform: uppercase;
	font-size: 0.7rem;
	letter-spacing: 0.05em;
}

td {
	font-size: 0.8rem;
}

tbody tr:hover {
	background: rgba(255, 255, 255, 0.03);
}

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

/* Progress */
.progress-container {
	margin-top: 1rem;
}

.progress-bar {
	height: 8px;
	background: var(--border-color);
	border-radius: 9999px;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	background: var(--primary-color);
	border-radius: 9999px;
	transition: width 0.3s ease;
	width: 0%;
}

.progress-text {
	text-align: center;
	margin-top: 0.5rem;
	font-size: 0.9rem;
	color: var(--text-secondary);
}

/* Status Messages */
.status-message {
	margin-top: 1rem;
	padding: 1rem;
	border-radius: var(--radius);
	font-size: 0.9rem;
}

.status-message.success {
	background: rgba(0, 200, 83, 0.1);
	border: 1px solid rgba(0, 200, 83, 0.3);
	color: var(--success-color);
}

.status-message.error {
	background: rgba(255, 61, 61, 0.1);
	border: 1px solid rgba(255, 61, 61, 0.3);
	color: var(--error-color);
}

.status-message.info {
	background: rgba(255, 0, 128, 0.1);
	border: 1px solid rgba(255, 0, 128, 0.3);
	color: var(--primary-color);
}

/* Results */
.results-summary {
	display: flex;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.result-stat {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem 1.5rem;
	border-radius: var(--radius);
}

.result-stat.success {
	background: rgba(0, 200, 83, 0.1);
	border: 1px solid rgba(0, 200, 83, 0.3);
}

.result-stat.error {
	background: rgba(255, 61, 61, 0.1);
	border: 1px solid rgba(255, 61, 61, 0.3);
}

.result-value {
	font-size: 1.5rem;
	font-weight: 700;
}

.result-stat.success .result-value {
	color: var(--success-color);
}

.result-stat.error .result-value {
	color: var(--error-color);
}

.result-label {
	font-size: 0.9rem;
	color: var(--text-secondary);
}

/* Results Log */
.results-log {
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
}

.log-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem;
	background: var(--bg-darker);
	border-bottom: 1px solid var(--border-color);
}

.log-header h4 {
	font-size: 0.9rem;
	font-weight: 600;
}

.log-content {
	max-height: 250px;
	overflow-y: auto;
	padding: 0.75rem;
	font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
	font-size: 0.75rem;
	line-height: 1.6;
	background: var(--bg-darker);
}

.log-entry {
	padding: 0.2rem 0;
	border-bottom: 1px solid var(--border-color);
}

.log-entry:last-child {
	border-bottom: none;
}

.log-entry.success {
	color: var(--success-color);
}

.log-entry.error {
	color: var(--error-color);
}

.log-entry .timestamp {
	color: var(--text-secondary);
	margin-right: 0.5rem;
}

/* Toast Notifications */
#toast-container {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.toast {
	padding: 1rem 1.5rem;
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	animation: slideIn 0.3s ease;
	max-width: 400px;
}

.toast.success {
	background: var(--success-color);
	color: #000;
}

.toast.error {
	background: var(--error-color);
	color: #fff;
}

.toast.info {
	background: var(--primary-color);
	color: #fff;
}

@keyframes slideIn {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* Schedule Options */
.schedule-options {
	margin-bottom: 1rem;
	max-width: 300px;
}

/* Dummy Assets Grid */
.dummy-assets-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.dummy-asset-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.dummy-asset-row label {
	min-width: 100px;
	font-size: 0.875rem;
	color: var(--text-secondary);
}

.dummy-asset-row input {
	flex: 1;
	padding: 8px 12px;
	background: var(--bg-darker);
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	color: var(--text-primary);
	font-size: 0.875rem;
}

/* Saved Schedules */
.saved-schedules-section {
	border-top: 1px solid var(--border-color);
	padding-top: 15px;
}

.saved-schedules-section h4 {
	margin-bottom: 10px;
	color: var(--text-secondary);
}

.saved-schedules-list {
	max-height: none;
	overflow-y: auto;
}

.saved-schedules-section {
	margin-top: 1rem;
	padding: 1rem;
	background: rgba(255, 255, 255, 0.02);
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.saved-schedules-section .saved-schedules-list {
	max-height: 400px;
	overflow-y: auto;
}

.saved-schedule-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px;
	background: var(--bg-darker);
	border-radius: var(--radius);
	margin-bottom: 8px;
}

.schedule-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.schedule-name {
	font-weight: 500;
	color: var(--text-primary);
}

.schedule-date,
.schedule-count {
	font-size: 0.75rem;
	color: var(--text-muted);
}

.placeholder-text {
	color: var(--text-muted);
	font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
	.sidebar {
		display: none;
	}

	.main-content {
		margin-left: 0;
	}

	.warning-panel {
		display: none;
	}

	.page-header h1 {
		font-size: 1.25rem;
	}

	.options-grid {
		grid-template-columns: 1fr;
	}

	.step-content {
		margin-left: 0;
	}

	.config-content {
		grid-template-columns: 1fr;
	}

	.form-actions {
		flex-direction: column;
	}

	.results-summary {
		flex-direction: column;
	}
}

/* Week View */
.week-view {
	margin-top: 1rem;
}

.week-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding: 0.5rem;
	background: var(--bg-darker);
	border-radius: var(--radius);
}

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

.week-legend {
	display: flex;
	gap: 1.5rem;
	margin-bottom: 1rem;
	padding: 0.5rem;
	font-size: 0.8rem;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--text-secondary);
}

.legend-color {
	width: 16px;
	height: 16px;
	border-radius: var(--radius);
}

.legend-color.status-no-media {
	background: var(--error-color);
}

.legend-color.status-processing {
	background: var(--warning-color);
}

.legend-color.status-ready {
	background: var(--success-color);
}

.legend-color.status-sent {
	background: #007bff;
}

.week-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.25rem;
	min-height: 300px;
}

/* Replicator specific: 2 rows of 7 days */
#replicator-schedule-grid.week-grid {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

#replicator-schedule-grid .week-row {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.25rem;
}

.week-hint {
	text-align: center;
	color: var(--text-muted);
	font-size: 0.8rem;
	margin-top: 0.5rem;
	font-style: italic;
}

.day-column {
	background: var(--bg-darker);
	border-radius: var(--radius);
	border: 1px solid var(--border-color);
	overflow: hidden;
}

.day-header {
	background: var(--card-bg);
	padding: 0.4rem;
	text-align: center;
	border-bottom: 1px solid var(--border-color);
}

/* Replicator: centralize copy/paste buttons */
#replicator-schedule-grid .day-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
}

#replicator-schedule-grid .day-header > div {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

#replicator-schedule-grid .day-header > div:last-child {
	flex-direction: row;
	justify-content: center;
	gap: 0.24rem;
	width: auto;
}

.day-name {
	display: block;
	font-size: 0.75rem;
	color: var(--text-secondary);
	text-transform: uppercase;
}

.day-num {
	display: block;
	font-size: 1rem;
	font-weight: 600;
	color: var(--text-primary);
}

.day-entries {
	padding: 0.25rem;
	max-height: 500px;
	overflow-y: auto;
	position: relative;
}

.current-time-indicator {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: #ff0000;
	z-index: 10;
	pointer-events: none;
	box-shadow: 0 0 4px rgba(255, 0, 0, 0.6);
}

.current-time-indicator::before {
	content: '';
	position: absolute;
	left: 0;
	top: -3px;
	width: 8px;
	height: 8px;
	background: #ff0000;
	border-radius: 50%;
	box-shadow: 0 0 4px rgba(255, 0, 0, 0.8);
}

.no-entries {
	text-align: center;
	padding: 2rem 0.5rem;
	color: var(--text-muted);
	font-size: 0.8rem;
}

.entry-block {
	padding: 0.25rem 0.4rem;
	margin-bottom: 0.25rem;
	border-radius: var(--radius);
	font-size: 0.7rem;
	border-left: 2px solid transparent;
	line-height: 1.3;
}

.entry-block.clickable {
	cursor: pointer;
	transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Schedule Gap Indicator */
.schedule-gap {
	height: 3px;
	background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 50%, #fbbf24 100%);
	margin: 0.5rem 0.25rem;
	border-radius: 2px;
	box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* Schedule Entry Styles */
.schedule-entry {
	padding: 0.6rem;
	margin: 0.3rem;
	border-radius: 4px;
	cursor: pointer;
	color: white;
	font-size: 0.8rem;
	transition: transform 0.1s ease, box-shadow 0.1s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,0.3);
	overflow: hidden;
}

.schedule-entry:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.schedule-entry .entry-time {
	font-weight: 700;
	font-size: 0.85rem;
	margin-bottom: 0.3rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: rgba(255, 255, 255, 1);
	text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.schedule-entry .entry-desc {
	font-size: 0.75rem;
	margin: 0.3rem 0;
	opacity: 1;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: rgba(255, 255, 255, 0.95);
	font-weight: 500;
}

.schedule-entry .entry-duration {
	font-size: 0.7rem;
	opacity: 0.85;
	font-weight: 600;
	white-space: nowrap;
	color: rgba(255, 255, 255, 0.9);
}

.entry-block.clickable:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}

.entry-block.status-no-media {
	background: rgba(255, 61, 61, 0.15);
	border-left-color: var(--error-color);
}

.entry-block.status-processing {
	background: rgba(255, 171, 0, 0.15);
	border-left-color: var(--warning-color);
}

.entry-block.status-ready {
	background: rgba(0, 200, 83, 0.15);
	border-left-color: var(--success-color);
}

.entry-block.status-sent {
	background: rgba(0, 123, 255, 0.15);
	border-left-color: #007bff;
}

.entry-block.status-other {
	background: rgba(136, 136, 136, 0.15);
	border-left-color: var(--text-secondary);
}

.entry-time {
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 0.1rem;
	font-size: 0.7rem;
}

.entry-desc {
	color: var(--text-secondary);
	margin-bottom: 0.1rem;
	word-break: break-word;
	font-size: 0.65rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.entry-duration {
	color: var(--text-muted);
	font-size: 0.6rem;
	display: inline;
}

.entry-status {
	margin-top: 0.1rem;
	font-weight: 600;
	font-size: 0.6rem;
	display: inline;
	margin-left: 0.5rem;
}

.status-no-media .entry-status {
	color: var(--error-color);
}

.status-processing .entry-status {
	color: var(--warning-color);
}

.status-ready .entry-status {
	color: var(--success-color);
}

.status-ready.status-has-error .entry-status {
	color: var(--error-color);
}

.status-sent .entry-status {
	color: #007bff;
}

/* View Toggle Buttons */
.btn-view-toggle {
	padding: 0.35rem 0.75rem;
	font-size: 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(255, 255, 255, 0.05);
	color: rgba(255, 255, 255, 0.6);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
	font-weight: 500;
}

.btn-view-toggle:hover {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.8);
}

.btn-view-toggle.active {
	background: rgba(59, 130, 246, 0.25);
	border-color: rgba(59, 130, 246, 0.5);
	color: #60a5fa;
	font-weight: 600;
}

/* ============================================================ */
/* Time Grid View - Replicator Only                             */
/* ============================================================ */
#replicator-schedule-grid.timegrid-view {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

#replicator-schedule-grid.timegrid-view .week-row {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	overflow: hidden;
}

#replicator-schedule-grid.timegrid-view .timegrid-header-row {
	display: flex;
	flex-direction: row;
	flex-shrink: 0;
}

#replicator-schedule-grid.timegrid-view .timegrid-body-scroll {
	display: flex;
	flex-direction: row;
	max-height: 600px;
	overflow-y: auto;
	overflow-x: hidden;
}

/* Time axis column */
#replicator-schedule-grid.timegrid-view .timegrid-axis {
	min-width: 48px;
	max-width: 48px;
	background: var(--card-bg);
	border-right: 1px solid var(--border-color);
	position: relative;
	flex-shrink: 0;
}

#replicator-schedule-grid.timegrid-view .timegrid-axis-header {
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.6rem;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border-color);
}

#replicator-schedule-grid.timegrid-view .timegrid-axis-body {
	position: relative;
}

#replicator-schedule-grid.timegrid-view .timegrid-hour-label {
	position: absolute;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 0.55rem;
	color: rgba(255, 255, 255, 0.45);
	transform: translateY(-50%);
	pointer-events: none;
	z-index: 2;
}

/* Day columns in time grid - header */
#replicator-schedule-grid.timegrid-view .timegrid-day-header-col {
	flex: 1;
	min-width: 0;
	border-right: 1px solid rgba(255, 255, 255, 0.06);
}

#replicator-schedule-grid.timegrid-view .timegrid-day-header-col:last-child {
	border-right: none;
}

/* Day columns in time grid - body */
#replicator-schedule-grid.timegrid-view .timegrid-day-body-col {
	flex: 1;
	min-width: 0;
	border-right: 1px solid rgba(255, 255, 255, 0.06);
}

#replicator-schedule-grid.timegrid-view .timegrid-day-body-col:last-child {
	border-right: none;
}

#replicator-schedule-grid.timegrid-view .timegrid-day-header {
	height: 56px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: var(--card-bg);
	border-bottom: 1px solid var(--border-color);
	padding: 0.2rem;
	gap: 0.1rem;
}

#replicator-schedule-grid.timegrid-view .timegrid-day-header .tg-day-name {
	font-size: 0.6rem;
	color: var(--text-secondary);
	text-transform: uppercase;
	font-weight: 500;
}

#replicator-schedule-grid.timegrid-view .timegrid-day-header .tg-day-date {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-primary);
}

#replicator-schedule-grid.timegrid-view .timegrid-day-header .tg-day-count {
	font-size: 0.5rem;
	color: var(--text-muted);
}

#replicator-schedule-grid.timegrid-view .timegrid-day-body {
	position: relative;
	background: var(--bg-darker);
}

/* Hour grid lines */
#replicator-schedule-grid.timegrid-view .timegrid-hour-line {
	position: absolute;
	left: 0;
	right: 0;
	height: 1px;
	background: rgba(255, 255, 255, 0.04);
	pointer-events: none;
	z-index: 1;
}

#replicator-schedule-grid.timegrid-view .timegrid-hour-line.major {
	background: rgba(255, 255, 255, 0.08);
}

/* Entries positioned absolutely in the time grid */
#replicator-schedule-grid.timegrid-view .timegrid-entry {
	position: absolute;
	left: 1px;
	right: 1px;
	border-radius: 3px;
	cursor: pointer;
	color: white;
	overflow: hidden;
	z-index: 3;
	transition: opacity 0.1s ease, box-shadow 0.1s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	border-left: 2px solid rgba(255, 255, 255, 0.3);
}

#replicator-schedule-grid.timegrid-view .timegrid-entry:hover {
	opacity: 0.9;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
	z-index: 5;
}

#replicator-schedule-grid.timegrid-view .timegrid-entry.timegrid-entry-gap {
	z-index: 2;
	cursor: default;
}

#replicator-schedule-grid.timegrid-view .timegrid-entry.tg-compact {
	display: flex;
	align-items: center;
	min-height: 14px;
}

#replicator-schedule-grid.timegrid-view .timegrid-entry .tg-entry-compact {
	font-size: 0.48rem;
	font-weight: 600;
	padding: 0 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

#replicator-schedule-grid.timegrid-view .timegrid-entry .tg-entry-time {
	font-size: 0.55rem;
	font-weight: 700;
	padding: 1px 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
	line-height: 1.2;
}

#replicator-schedule-grid.timegrid-view .timegrid-entry .tg-entry-desc {
	font-size: 0.5rem;
	padding: 0 3px;
	overflow: hidden;
	opacity: 0.9;
	line-height: 1.2;
	word-break: break-all;
}

#replicator-schedule-grid.timegrid-view .timegrid-entry .tg-entry-dur {
	font-size: 0.45rem;
	padding: 0 3px 1px;
	opacity: 0.75;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2;
}

/* Gap indicator in time grid */
#replicator-schedule-grid.timegrid-view .timegrid-gap {
	position: absolute;
	left: 0;
	right: 0;
	background: repeating-linear-gradient(
		45deg,
		rgba(251, 191, 36, 0.08),
		rgba(251, 191, 36, 0.08) 4px,
		transparent 4px,
		transparent 8px
	);
	border-left: 2px solid rgba(251, 191, 36, 0.3);
	z-index: 2;
	pointer-events: none;
}

/* Modal */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

.modal-content {
	background: var(--card-bg);
	border-radius: var(--radius-lg);
	width: 90%;
	max-width: 500px;
	max-height: 90vh;
	border: 1px solid var(--border-color);
	box-shadow: var(--shadow-lg);
	display: flex;
	flex-direction: column;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
	font-size: 1rem;
	font-weight: 600;
}

.modal-body {
	padding: 1.25rem;
	overflow-y: auto;
	flex: 1;
}

.modal-footer {
	padding: 1rem 1.25rem;
	border-top: 1px solid var(--border-color);
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
}

/* Stat Warning */
.stat.stat-warning .stat-value {
	color: var(--error-color);
}

/* Info Text */
.info-text {
	color: var(--text-secondary);
	font-size: 0.875rem;
	margin-bottom: 1rem;
}

/* Input with button */
.input-with-button {
	position: relative;
}

.input-with-button input {
	padding-right: 3rem;
}

.input-with-button .btn-icon {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
}

/* Responsive Week View */
@media (max-width: 1024px) {
	.week-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 768px) {
	.week-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.week-legend {
		flex-wrap: wrap;
		gap: 0.75rem;
	}
}

@media (max-width: 480px) {
	.week-grid {
		grid-template-columns: 1fr;
	}
}


/* Upload Tabs */
.upload-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
}

.upload-tab {
	flex: 1;
	padding: 0.6rem 1rem;
	background: none;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	font-size: 0.875rem;
	transition: all 0.15s ease;
	border-bottom: 2px solid transparent;
}

.upload-tab:hover {
	color: var(--text-primary);
}

.upload-tab.active {
	color: var(--primary-color);
	border-bottom-color: var(--primary-color);
}

.tab-content {
	padding: 0.5rem 0;
}

/* File Select Area */
.file-select-area {
	position: relative;
	border: 1px dashed var(--border-color);
	border-radius: var(--radius);
	padding: 1.5rem;
	text-align: center;
	cursor: pointer;
	transition: all 0.15s ease;
	background: var(--bg-darker);
}

.file-select-area:hover {
	border-color: var(--primary-color);
	background: rgba(255, 0, 128, 0.05);
}

.file-select-area input[type="file"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.file-select-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.file-icon {
	font-size: 2rem;
}

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

.selected-file {
	color: var(--success-color);
	font-weight: 500;
	font-size: 0.875rem;
	word-break: break-all;
}

/* Upload Progress */
.upload-progress {
	margin-top: 1rem;
}

.upload-progress .progress-bar {
	height: 6px;
	background: var(--border-color);
	border-radius: 3px;
	overflow: hidden;
}

.upload-progress .progress-fill {
	height: 100%;
	background: var(--primary-color);
	transition: width 0.2s ease;
}

.upload-progress .progress-text {
	display: block;
	text-align: center;
	margin-top: 0.5rem;
	font-size: 0.8rem;
	color: var(--text-secondary);
}


/* Context Menu */
.context-menu {
	position: fixed;
	background: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	z-index: 1001;
	min-width: 160px;
	padding: 0.25rem 0;
}

.context-menu-item {
	padding: 0.5rem 1rem;
	cursor: pointer;
	font-size: 0.85rem;
	color: var(--text-primary);
	transition: background 0.1s ease;
}

.context-menu-item:hover {
	background: rgba(255, 0, 128, 0.15);
}

.context-menu-item.danger {
	color: var(--error-color);
}

.context-menu-item.danger:hover {
	background: rgba(255, 61, 61, 0.15);
}


/* Logo Image */
.logo-img {
	height: 28px;
	width: auto;
}

/* Config Warning */
.config-warning {
	color: var(--warning-color);
	margin-left: 0.5rem;
	animation: pulse 1.5s infinite;
}

.config-note {
	font-size: 0.8rem;
	color: var(--text-muted);
	font-style: italic;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

/* Optional Badge */
.optional-badge {
	font-size: 0.75rem;
	color: var(--text-muted);
	font-weight: normal;
}

/* Create Warnings */
.create-warnings {
	margin-bottom: 1rem;
	padding: 0.75rem;
	background: rgba(255, 171, 0, 0.1);
	border: 1px solid rgba(255, 171, 0, 0.3);
	border-radius: var(--radius);
	font-size: 0.85rem;
	color: var(--warning-color);
}

.create-warnings ul {
	margin: 0.5rem 0 0 1.5rem;
	padding: 0;
}

/* Delete button for saved schedules */
.btn-delete-schedule {
	background: none;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	padding: 0.25rem;
	font-size: 0.9rem;
	transition: color 0.15s ease;
}

.btn-delete-schedule:hover {
	color: var(--error-color);
}

.schedule-actions {
	display: flex;
	gap: 0.5rem;
}


/* Edit Modal */
.modal-wide {
	max-width: 600px;
}

.edit-form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

.edit-form-grid .form-group:first-child {
	grid-column: 1 / -1;
}

@media (max-width: 600px) {
	.edit-form-grid {
		grid-template-columns: 1fr;
	}
}


/* Confirm Modal */
.modal-small {
	max-width: 400px;
}

.modal-small .modal-body {
	text-align: center;
	padding: 1.5rem;
}

.modal-small .modal-body p {
	font-size: 1rem;
	color: var(--text-primary);
}

.modal-small .modal-footer {
	justify-content: center;
}


/* Save Buttons */
.save-buttons {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.save-buttons .btn {
	flex: 1;
}

/* Send Buttons */
.send-buttons {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
	align-items: center;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}


/* Password Modal */
.password-error {
	color: var(--error-color);
	font-size: 0.85rem;
	margin-top: 0.5rem;
	padding: 0.5rem;
	background: rgba(255, 61, 61, 0.1);
	border-radius: var(--radius);
}


/* Check Media Section */
.check-media-section {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding: 1rem;
	background: var(--bg-darker);
	border-radius: var(--radius);
}

.check-media-section > .btn {
	margin-bottom: 0.25rem;
}

.check-media-status {
	font-size: 0.85rem;
	color: var(--text-secondary);
}

.check-media-status.success {
	color: var(--success-color);
}

.check-media-status.error {
	color: var(--error-color);
}

/* Auto Adjust Section */
.auto-adjust-section {
	margin-top: 0.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--border-color);
	width: 100%;
}

.auto-adjust-title {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: 0.5rem;
}

/* Beta Badge */
.beta-badge {
	display: inline-block;
	background: var(--warning-color);
	color: #000;
	font-size: 0.65rem;
	font-weight: bold;
	padding: 0.15rem 0.4rem;
	border-radius: 3px;
	margin-left: 0.5rem;
	vertical-align: middle;
}

/* Replacement Jobs List */
.replacement-jobs-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1rem;
}

.replacement-job-item {
	background: var(--bg-darker);
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	padding: 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: all 0.2s;
}

.replacement-job-item:hover {
	border-color: var(--primary-color);
	background: rgba(255, 0, 128, 0.05);
}

.replacement-job-info {
	flex: 1;
}

.replacement-job-title {
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 0.25rem;
}

.replacement-job-details {
	font-size: 0.85rem;
	color: var(--text-secondary);
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.replacement-job-detail {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.replacement-job-actions {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.replacement-job-status {
	padding: 0.25rem 0.75rem;
	border-radius: var(--radius);
	font-size: 0.75rem;
	font-weight: 600;
}

.replacement-job-status.active {
	background: var(--success-color);
	color: #000;
}

.replacement-job-status.inactive {
	background: var(--text-muted);
	color: #fff;
}

.replacement-job-status.running {
	background: var(--warning-color);
	color: #000;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}

/* ============================================================================
   AI CREATOR STYLES (isolated by #ai-creator-panel or .ai-creator- prefix)
   ============================================================================ */

.ai-creator-libraries-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
}

.ai-creator-library-card {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	padding: 12px 14px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.ai-creator-library-card:hover {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.15);
}

.ai-creator-library-card.selected {
	background: rgba(102, 126, 234, 0.15);
	border-color: #667eea;
	box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.3);
}

.ai-creator-library-name {
	font-weight: 600;
	font-size: 14px;
	color: var(--text-primary);
	margin-bottom: 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ai-creator-library-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	color: var(--text-secondary);
}

.ai-creator-library-id {
	font-family: monospace;
	font-size: 11px;
	color: var(--text-muted);
}

.ai-creator-asset-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	font-size: 13px;
}

.ai-creator-asset-item:hover {
	background: rgba(255, 255, 255, 0.02);
}

.ai-creator-asset-name {
	color: var(--text-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 70%;
}

.ai-creator-asset-duration {
	color: var(--text-secondary);
	font-family: monospace;
	font-size: 12px;
}

.ai-creator-asset-more {
	padding: 8px 10px;
	color: var(--text-muted);
	font-size: 12px;
	font-style: italic;
}

#ai-creator-schedule-grid {
	overflow-x: auto;
}

#ai-creator-schedule-grid .week-row {
	display: grid;
	grid-template-columns: repeat(7, minmax(140px, 1fr));
	gap: 0.25rem;
	min-width: 980px;
}
