.cdt-dashboard {
	max-width: 1100px;
	margin: 0 auto;
}

.cdt-section {
	margin-bottom: 2.5em;
}

.cdt-section h3 {
	border-bottom: 2px solid #ddd;
	padding-bottom: 0.4em;
	margin-bottom: 0.8em;
}

.cdt-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1em;
}

.cdt-table th,
.cdt-table td {
	text-align: left;
	padding: 0.6em 0.8em;
	border-bottom: 1px solid #e2e2e2;
	vertical-align: middle;
}

.cdt-table th {
	background: #f5f5f5;
	font-weight: 600;
}

.cdt-notice {
	background: #fff3cd;
	border: 1px solid #ffe69c;
	padding: 0.8em 1em;
	border-radius: 4px;
	margin-bottom: 1.5em;
}

.cdt-message {
	padding: 0.6em 1em;
	border-radius: 4px;
	margin-bottom: 1em;
}

.cdt-message.success {
	background: #d1e7dd;
	border: 1px solid #a3cfbb;
}

.cdt-message.error {
	background: #f8d7da;
	border: 1px solid #f1aeb5;
}

.cdt-login-wrap {
	max-width: 360px;
	margin: 2em auto;
}

/* Monatsnavigation */
.cdt-month-nav {
	display: flex;
	align-items: center;
	gap: 1em;
	margin-bottom: 1em;
}

.cdt-month-label {
	font-size: 1.1em;
}

/* Grid */
.cdt-grid-wrap {
	overflow-x: auto;
	margin-bottom: 1em;
}

table.cdt-grid {
	border-collapse: collapse;
	font-size: 12px;
	min-width: 100%;
}

table.cdt-grid th,
table.cdt-grid td {
	border: 1px solid #ddd;
	text-align: center;
	padding: 4px 6px;
	white-space: nowrap;
}

table.cdt-grid .cdt-grid-name-col {
	text-align: left;
	position: sticky;
	left: 0;
	background: #fff;
	z-index: 2;
	min-width: 160px;
}

table.cdt-grid thead th {
	background: #f0f0f1;
	position: sticky;
	top: 0;
	z-index: 1;
}

table.cdt-grid thead .cdt-grid-name-col {
	z-index: 3;
}

table.cdt-grid th.cdt-weekend,
table.cdt-grid td.cdt-cell.cdt-weekend {
	background-color: #f3d9f7;
}

table.cdt-grid td.cdt-cell {
	min-width: 44px;
	height: 30px;
	font-weight: 600;
	cursor: default;
}

/* Admin-Editor: Zellen als Drop-Ziel */
.cdt-grid-wrap td.cdt-cell {
	transition: outline 0.1s ease;
}

.cdt-grid-wrap td.cdt-cell.cdt-saving {
	opacity: 0.5;
}

/* Frontend: eigene, künftige Dienste anklickbar */
table.cdt-grid td.cdt-cell.cdt-own {
	cursor: pointer;
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

table.cdt-grid td.cdt-cell.cdt-own.cdt-selected {
	outline: 3px solid #d63638;
	outline-offset: -3px;
}

table.cdt-grid td.cdt-cell.cdt-swap-target {
	cursor: pointer;
}

table.cdt-grid td.cdt-cell.cdt-colleague:hover {
	filter: brightness(0.92);
}

/* Palette (Admin-Editor) */
.cdt-palette {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 1em 0 1.5em;
	padding: 0.8em;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.cdt-palette-chip {
	display: inline-block;
	padding: 0.4em 0.8em;
	border-radius: 4px;
	font-size: 12px;
	cursor: grab;
	border: 1px solid rgba(0, 0, 0, 0.15);
	user-select: none;
}

.cdt-palette-chip:active {
	cursor: grabbing;
}

/* Aktionsleiste (Frontend Tausch/Abgabe) */
.cdt-action-bar {
	margin-top: 1em;
	padding: 1em;
	background: #eef6fc;
	border: 1px solid #b6d9ef;
	border-radius: 4px;
}

/* Auslöser-Button */
.cdt-launcher {
	margin: 1em 0;
}

.cdt-open-btn {
	font-size: 1em !important;
	padding: 0.6em 1.2em !important;
	height: auto !important;
}

/* Popup: bewusst mit position:fixed, damit die Breite des Themes/der
   Inhaltsspalte ignoriert wird und der Plan den ganzen Bildschirm nutzen kann. */
.cdt-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999;
	align-items: center;
	justify-content: center;
	padding: 2vh 2vw;
}

.cdt-modal-overlay.cdt-open {
	display: flex;
}

body.cdt-modal-open {
	overflow: hidden;
}

.cdt-modal-box {
	background: #fff;
	width: 96vw;
	max-width: 1600px;
	max-height: 92vh;
	overflow-y: auto;
	border-radius: 6px;
	padding: 1.5em 2em 2em;
	position: relative;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cdt-modal-close {
	position: sticky;
	float: right;
	top: 0;
	right: 0;
	background: #f0f0f1;
	border: 1px solid #dcdcde;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	line-height: 1;
	font-size: 20px;
	cursor: pointer;
	z-index: 2;
}

.cdt-modal-content {
	clear: both;
}

/* Kalender-Abo */
.cdt-ical-section {
	background: #f6fbf6;
	border: 1px solid #cbe6cc;
	border-radius: 4px;
	padding: 0.8em 1em;
}

.cdt-ical-url-display {
	font-family: monospace;
	font-size: 11px;
	word-break: break-all;
	background: #fff;
	border: 1px solid #ddd;
	padding: 0.4em 0.6em;
	border-radius: 3px;
}
