.pl-page {
	padding-bottom: 24px;
}

.pl-app {
	display: flex;
	flex-direction: column;
}

/* ——— неделя в стиле карты ИИ (karta-ege) ——— */
.pl-app .ii-karta-week {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	margin-bottom: 0;
	overflow: hidden;
	background: #fff;
}

.pl-app .ii-karta-week__head {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px 16px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.pl-week-nav {
	flex-shrink: 0;
	margin-top: 2px;
}

.pl-app .ii-karta-week__titles {
	flex: 1;
	min-width: 0;
	text-align: center;
}

.pl-app .ii-karta-week__title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.3;
}

.pl-app .ii-karta-week__goal {
	margin: 4px 0 0;
	font-size: .85rem;
	color: #64748b;
	line-height: 1.35;
}

.pl-week-progress {
	padding: 10px 16px 12px;
	background: #fff;
	border-bottom: 1px solid #e2e8f0;
}

.pl-week-summary__progress-wrap {
	margin-top: 0;
}

.pl-week-summary__progress {
	position: relative;
	height: 6px;
	background: #f9f9f9;
	border: 1px solid #dde4ea;
	border-radius: 4px;
	overflow: hidden;
}

.pl-week-summary__progress-bar {
	height: 100%;
	width: 0;
	background: #006089;
	border-radius: 0;
	transition: width 0.35s ease;
}

.pl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 14px;
	font: inherit;
	font-size: 13px;
	line-height: 1.2;
	border-radius: 6px;
	cursor: pointer;
	border: 2px solid #006089;
	background: #f9fafa;
	color: #006089;
	transition: background .15s, color .15s, border-color .15s, opacity .15s;
}

.pl-btn:hover:not(:disabled) {
	background: #006089;
	color: #ffeded;
}

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

.pl-btn-primary {
	background: #006089;
	color: #fff;
}

.pl-btn-primary:hover:not(:disabled) {
	background: #004d6b;
	border-color: #004d6b;
	color: #fff;
}

.pl-btn-soft {
	border-color: #cbd5e1;
	color: #475569;
	background: #fff;
}

.pl-btn-soft:hover:not(:disabled) {
	background: #f8fafc;
	border-color: #94a3b8;
	color: #334155;
}

.pl-btn-icon {
	min-width: 40px;
	padding-left: 10px;
	padding-right: 10px;
	font-size: 16px;
}

.pl-board {
	display: flex;
	flex-direction: column;
}

.pl-app .ii-karta-days {
	display: grid;
	gap: 0;
	border-top: 1px solid #e2e8f0;
}

.pl-board-weekdays.ii-karta-days {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pl-board-weekends {
	border-top: 1px solid #e2e8f0;
	background: #f8fafc;
}

.pl-board-weekends__label {
	padding: 8px 16px;
	font-size: .72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #94a3b8;
	border-bottom: 1px solid #e2e8f0;
}

.pl-board-weekends__grid.ii-karta-days {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pl-board-weekdays .ii-karta-day {
	min-height: 220px;
}

.pl-board-weekends__grid .ii-karta-day {
	min-height: 180px;
	border-bottom: 0;
}

.pl-board-mobile {
	display: none;
	border-top: 1px solid #e2e8f0;
}

.pl-app .ii-karta-day {
	padding: 10px;
	border-right: 1px solid #f1f5f9;
	border-bottom: 1px solid #f1f5f9;
	min-height: 80px;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.pl-app .ii-karta-day:last-child {
	border-right: 0;
}

.pl-app .ii-karta-day--rest {
	background: #fafafa;
	opacity: .75;
}

.pl-day--weekend {
	background: #fafafa;
}

.pl-day--today {
	background: rgba(0, 96, 137, 0.09);
	box-shadow: inset 0 0 0 2px rgba(0, 96, 137, 0.28);
}

.pl-day--today.ii-karta-day--rest {
	background: rgba(0, 96, 137, 0.07);
	opacity: 1;
}

.pl-day--today .ii-karta-day__name {
	color: #006089;
}

.pl-app .ii-karta-day__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 6px;
	margin-bottom: 6px;
}

.pl-app .ii-karta-day__name {
	font-size: .85rem;
	font-weight: 700;
	color: #334155;
}

.pl-app .ii-karta-day__hours {
	font-size: .75rem;
	color: #006089;
	font-weight: 600;
	white-space: nowrap;
}

.pl-app .ii-karta-day__rest {
	font-size: .7rem;
	color: #94a3b8;
	white-space: nowrap;
}

.pl-day__zones {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-height: 40px;
}

.pl-dropzone {
	display: flex;
	flex-direction: column;
	min-height: 24px;
	border-radius: 6px;
	transition: background .15s, outline-color .15s;
}

.pl-dropzone.is-drag-over {
	background: rgba(0, 96, 137, 0.08);
	outline: 1px dashed #006089;
	outline-offset: -1px;
}

.pl-app .ii-karta-sessions {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .75rem;
	width: 100%;
}

.pl-day__done-label {
	margin-top: 4px;
	padding-top: 6px;
	border-top: 1px solid #f1f5f9;
	font-size: .68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #94a3b8;
}

.pl-task {
	position: relative;
	margin-bottom: 6px;
	padding: 2px 24px 2px 0;
	cursor: grab;
	list-style: none;
}

.pl-task:last-child {
	margin-bottom: 0;
}

.pl-task:active {
	cursor: grabbing;
}

.pl-task.is-dragging {
	opacity: .45;
}

.pl-task--done {
	cursor: default;
	opacity: .85;
}

.pl-task--done .ii-karta-session__title,
.pl-task--done .pl-task__title {
	text-decoration: line-through;
	color: #94a3b8;
}

.pl-app .ii-karta-session__title {
	display: block;
	font-weight: 400;
	color: #334155;
	line-height: 1.35;
	word-break: break-word;
}

.pl-app .ii-karta-session__what {
	display: block;
	font-weight: 700;
	color: #475569;
	margin-top: 1px;
}

.pl-app .ii-karta-session__vol {
	display: block;
	color: #94a3b8;
	font-size: .7rem;
	margin-top: 1px;
}

.pl-task__actions {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	gap: 2px;
	padding: 2px;
	border-radius: 6px;
	background: #f1f5f9;
	opacity: 0;
	transition: opacity .15s;
}

.pl-task:hover .pl-task__actions,
.pl-task:focus-within .pl-task__actions {
	opacity: 1;
}

.pl-task__btn {
	width: 22px;
	height: 22px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #64748b;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.pl-task__btn:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.pl-task__btn--check.is-on {
	color: #006089;
}

.pl-task__btn--delete:hover {
	background: #fee2e2;
	color: #b91c1c;
}

.pl-day__add {
	margin-top: auto;
	padding-top: 8px;
}

.pl-day__add-btn {
	width: 100%;
	border: 1px dashed #cbd5e1;
	border-radius: 6px;
	background: transparent;
	color: #64748b;
	font: inherit;
	font-size: .72rem;
	padding: 5px 8px;
	cursor: pointer;
}

.pl-day__add-btn:hover {
	border-color: #006089;
	color: #006089;
	background: rgba(0, 96, 137, 0.04);
}

.pl-mobile-day {
	border-bottom: 1px solid #e2e8f0;
	background: #fff;
}

.pl-mobile-day:last-child {
	border-bottom: 0;
}

.pl-mobile-day__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	font-size: .85rem;
}

.pl-mobile-day__summary::-webkit-details-marker {
	display: none;
}

.pl-mobile-day__meta {
	font-size: .8rem;
	font-weight: 500;
	color: #64748b;
}

.pl-mobile-day__body {
	padding: 0 12px 12px;
}

.pl-mobile-day--today > .pl-mobile-day__summary {
	background: rgba(0, 96, 137, 0.1);
	color: #006089;
	box-shadow: inset 0 0 0 2px rgba(0, 96, 137, 0.22);
}

.pl-modal {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.pl-modal.hidden {
	display: none;
}

.pl-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
}

.pl-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow: auto;
	margin: 0;
}

.pl-modal__title {
	margin: 0 0 14px;
	font-size: 1.1rem;
}

.pl-form-field {
	margin-bottom: 14px;
}

.pl-form-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: .9rem;
}

.pl-form-field textarea,
.pl-form-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d7de;
	border-radius: 8px;
	font: inherit;
	font-size: inherit;
	line-height: 1.4;
	box-sizing: border-box;
	background: #fff;
}

.pl-form-field textarea {
	resize: vertical;
	min-height: 72px;
}

.pl-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.pl-day-picks {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pl-day-pick {
	font-size: .85rem;
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	cursor: pointer;
	user-select: none;
	background: #fff;
	color: #475569;
	transition: background .15s, border-color .15s, color .15s;
}

.pl-day-pick input {
	display: none;
}

.pl-day-pick--on {
	background: #006089;
	border-color: #006089;
	color: #fff;
	font-weight: 600;
}

.pl-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.ii-plan .pl-modal__actions button {
	margin-top: 0;
}

.ii-plan .pl-modal__actions button[type="button"] {
	display: inline-block;
	padding: 4px 14px;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	color: #006089;
	background: #f9fafa;
	border: 2px solid #006089;
	border-radius: 4px;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ii-plan .pl-modal__actions button[type="button"]:hover:not(:disabled) {
	background: #006089;
	color: #ffeded;
}

.pl-week-progress .pl-status {
	margin: 8px 0 0;
}

.pl-status {
	margin: 0 0 12px;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: .85rem;
}

.pl-status--error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
}

.pl-status.hidden {
	display: none;
}

@media (max-width: 900px) {
	.pl-board {
		display: none;
	}

	.pl-board-mobile {
		display: block;
	}
}

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

	.pl-app .ii-karta-week__head {
		flex-wrap: wrap;
		justify-content: center;
	}

	.pl-app .ii-karta-week__titles {
		flex-basis: 100%;
		order: 1;
	}

	.pl-week-nav {
		order: 2;
	}

	.pl-task__actions {
		opacity: 1;
	}
}

@media (hover: none) {
	.pl-task {
		cursor: default;
	}
}
