/* --- Базовые переменные и шрифты --- */
:root {
	--bg-color: #f3f4f6;
	--primary: #4f46e5;
	--text: #1f2937;
	--border: #e5e7eb;
	--white: #ffffff;
}

body {
	margin: 0;
	font-family: 'Inter', sans-serif;
	background-color: var(--bg-color);
	color: var(--text);
	height: 100vh;
	overflow: hidden;
}

/* Цвет для иконки "Дополнительно" */
.side-1 .icon-box-extra {
	background: #f1f5f9;
	color: #64748b;
}
/* Блок дедлайна на листе */
.deadline-badge {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fef2f2;
 /* Легкий красный оттенок для привлечения внимания */
	border: 1px solid #fee2e2;
	color: #b91c1c;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 0.85rem;
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	margin-bottom: 1rem;
	align-self: flex-start;
}

/* Корректировка иконки "Дополнительно" */
.side-1 .icon-box:has([data-lucide="star"]) {
	background: #fef9c3;
	color: #ca8a04;
}

.side-2 .icon-box:has([data-lucide="star"]) {
	background: #fef9c3;
	color: #ca8a04;
}

/* --- ЭКРАННЫЙ ИНТЕРФЕЙС (Sidebar & Editor) --- */
.screen-layout {
	display: flex;
	height: 100vh;
}

.sidebar {
	width: 250px;
	background: var(--white);
	border-right: 1px solid var(--border);
	padding: 20px;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

.history-item {
	padding: 10px;
	border-bottom: 1px solid var(--border);
	cursor: pointer;
	transition: background 0.2s;
}

.history-item:hover {
	background: #eff6ff;
}

.h-date {
	font-weight: bold;
	font-size: 0.85rem;
	color: #6b7280;
}

.h-range {
	font-size: 0.9rem;
	margin-top: 4px;
}

.editor {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	padding: 20px 40px;
}
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.history-item:hover {
    background: #eff6ff;
}

.h-info {
    flex-grow: 1;
}

.btn-delete {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0; /* Прячем кнопку по умолчанию */
    transition: all 0.2s;
}

.history-item:hover .btn-delete {
    opacity: 1; /* Показываем при наведении на элемент списка */
    color: #f43f5e; /* Красный цвет при наведении */
}

.btn-delete:hover {
    background: #fff1f2;
}
.top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.forms-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	padding-bottom: 40px;
}

.day-card {
	background: var(--white);
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.day-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	border-bottom: 2px solid var(--bg-color);
	padding-bottom: 10px;
}

.subject-field {
	margin-bottom: 15px;
}

.subject-field label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 5px;
}

textarea {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 8px;
	resize: vertical;
}

.btn {
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
}

.btn-save {
	background: var(--primary);
	color: white;
	margin-right: 10px;
}

.btn-print {
	background: #10b981;
	color: white;
}

.btn-new {
	background: #8b5cf6;
	color: white;
	width: 100%;
	margin-top: 20px;
}

/* --- НОВЫЙ ПЕЧАТНЫЙ ШАБЛОН (A4 Landscape) --- */
.print-sheet {
	display: none;
}

@media print {
	.screen-layout, .no-print {
		display: none !important;
	}
    @	page {
		size: A4 landscape;
		margin: 0;
	}

	body {
		background: white;
		overflow: visible;
	}

	.print-sheet {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		width: 297mm;
		height: 210mm;
		background: white;
		position: relative;
	}

	.side {
		padding: 1.2rem 1.5rem !important;
 /* Уменьшили внутренние поля */
		display: flex;
		flex-direction: column;
		position: relative;
	}

	.side:last-child {
		border-right: none;
	}

    /* Шрифты для печати */
	.title-font {
		font-family: 'Lobster', cursive;
		font-size: 1.8rem !important;
 /* Было 2.8-3.0 */
		margin: 0;
		line-height: 1.1;
	}

	.handwritten {
		font-family: 'Caveat', cursive;
		font-size: 1.2rem !important;
 /* Был 1.6 - теперь текст станет мельче */
		line-height: 1.3rem !important;
	}

	.date-box {
		text-align: right;
	}

	.date-label {
		text-transform: uppercase;
		font-size: 10px;
		font-weight: 900;
		color: #94a3b8;
		letter-spacing: 0.1em;
	}

	.date-val {
		border-bottom: 1px dashed #cbd5e1;
		min-width: 100px;
		padding-top: 5px;
	}

    /* Линовка */
	.lines {
		background-image: linear-gradient(#f1f5f9 1px, transparent 1px);
		background-size: 100% 1.3rem !important;
 /* Ужали высоту строк */
		min-height: 2.6rem !important;
 /* Минимум 2 строки */
		margin-left: 35px !important;
 /* Сдвинули левее */
		padding-left: 5px;
		white-space: pre-wrap;
	}

	.subject-row {
		margin-bottom: 0.6rem !important;
 /* Уменьшили расстояние между предметами */;
	}

	.subj-header {
		display: flex;
		align-items: center;
		margin-bottom: 4px;
	}

	.icon-box {
		width: 24px !important;
		height: 24px !important;
		margin-right: 8px !important;
	}

	.icon-box i {
		width: 14px !important;
		height: 14px !important;
	}

	.subj-name {
		font-size: 0.65rem !important;
 /* Мелкий технический текст надписи предмета */;
	}

	.side-header {
		margin-bottom: 1rem !important;
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
	}
    /* Цвета для Дня 1 */
	.side-1 .title-font {
		color: #f43f5e;
	}

	.side-1 .icon-box {
		background: #fff1f2;
		color: #f43f5e;
	}

	.side-1 .subj-name {
		color: #e11d48;
	}

    /* Цвета для Дня 2 */
	.side-2 .title-font {
		color: #6366f1;
	}

	.side-2 .icon-box {
		background: #eef2ff;
		color: #6366f1;
	}

	.side-2 .subj-name {
		color: #4f46e5;
	}

	.ornament {
		position: absolute;
		opacity: 0.05;
		z-index: 0;
		pointer-events: none;
	}

	.cut-line-v {
		position: absolute;
		left: 50%;
		top: 5%;
		bottom: 5%;
		border-left: 1px dashed #cbd5e1;
		z-index: 10;
	}

	.print-footer {
		margin-top: auto;
		padding-top: 1rem;
		border-top: 1px solid #f1f5f9;
		display: flex;
		align-items: center;
		gap: 8px;
		color: #cbd5e1;
		font-size: 10px;
		font-weight: bold;
	}
}