.kb-board-root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	max-width: 1200px;
	margin: 0 auto;
}

.kb-board-title {
	font-size: 20px;
	font-weight: 700;
	color: #172b4d;
	margin: 0 0 12px;
}

.kb-board-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
	border-bottom: 1px solid #e2e6ec;
	padding-bottom: 10px;
}
.kb-board-tab {
	border: none;
	background: #eef1f5;
	color: #444;
	padding: 6px 14px;
	border-radius: 0;
	font-size: 13px;
	cursor: pointer;
}
.kb-board-tab:hover { background: #e2e6ec; }
.kb-board-tab.kb-active {
	background: #2563eb;
	color: #fff;
}
.kb-board-tab.kb-tab-dragover {
	background: #16a34a;
	color: #fff;
	box-shadow: 0 0 0 2px #16a34a55;
}

.kb-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.kb-search-input {
	flex: 1;
	min-width: 140px;
	max-width: 320px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 0;
	font-size: 14px;
}

.kb-card-board-tag {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #666;
	background: #eef1f5;
	border-radius: 0;
	padding: 2px 6px;
	margin-bottom: 6px;
}

.kb-search-results {
	margin-top: 4px;
}
.kb-search-count {
	font-size: 13px;
	color: #666;
	margin: 0 0 10px;
}
.kb-search-empty {
	font-size: 13px;
	color: #888;
	background: #f4f5f7;
	border-radius: 0;
	padding: 16px;
	text-align: center;
}
.kb-search-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.kb-card.kb-hidden { display: none; }

.kb-btn {
	border: none;
	border-radius: 0;
	padding: 8px 14px;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}
.kb-btn-primary { background: #2563eb; color: #fff; }
.kb-btn-primary:hover { background: #1d4ed8; }
.kb-btn-ghost { background: #eef1f5; color: #333; }
.kb-btn-ghost:hover { background: #e2e6ec; }
.kb-btn-danger { background: #fef2f2; color: #b91c1c; }
.kb-btn-danger:hover { background: #fee2e2; }

.kb-columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	align-items: start;
}
@media (max-width: 780px) {
	.kb-columns { grid-template-columns: 1fr; }
}

.kb-column {
	background: #f4f5f7;
	border-radius: 0;
	padding: 10px;
	min-height: 120px;
}

.kb-column-header {
	font-weight: 700;
	font-size: 13px;
	padding: 8px 10px;
	border-radius: 0;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: .03em;
	margin-bottom: 10px;
}
.kb-col-pendiente { background: #f0b429; color: #4a3200; }
.kb-col-en_progreso { background: #2563eb; color: #fff; }
.kb-col-hecho { background: #16a34a; color: #fff; }

.kb-cards {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 40px;
}

.kb-cards.kb-dragover {
	background: rgba(37, 99, 235, 0.07);
	border-radius: 0;
}

.kb-card {
	background: #fff;
	border-radius: 0;
	box-shadow: 0 1px 2px rgba(0,0,0,.12);
	padding: 10px 12px;
	cursor: grab;
	border: 1px solid #eee;
	position: relative;
}
.kb-card.kb-dragging { opacity: 0.4; }

.kb-priority-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	font-size: 7px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: 2px 6px;
	border-radius: 0;
	color: #fff;
	z-index: 2;
	cursor: pointer;
}
.kb-priority-urgente {
	background: #dc2626;
	animation: kbPriorityPulse 1.4s infinite;
}
.kb-priority-normal {
	background: #16a34a;
}
.kb-priority-standby {
	background: #eab308;
	color: #3a2e00;
}
@keyframes kbPriorityPulse {
	0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .6); }
	70% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
	100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.kb-card-image {
	width: 100%;
	max-height: 140px;
	object-fit: cover;
	border-radius: 0;
	margin-bottom: 8px;
	display: block;
}

.kb-card-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 6px;
}
.kb-card-label {
	font-size: 8px;
	font-weight: 600;
	color: #fff;
	padding: 1px 6px;
	border-radius: 0;
}

.kb-card-link-btn {
	display: inline-block;
	background: #2563eb;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-decoration: none;
	padding: 4px 10px;
	border-radius: 0;
	margin-bottom: 8px;
}
.kb-card-link-btn:hover { background: #1d4ed8; color: #fff; }

.kb-card-title {
	font-size: 16px;
	font-weight: 700;
	color: #172b4d;
	margin-bottom: 8px;
	padding-right: 52px;
	word-break: break-word;
}
.kb-card-datetime.kb-dt-morning { background: #ea580c; }
.kb-card-datetime.kb-dt-afternoon { background: #2563eb; }
.kb-card-datetime.kb-dt-night { background: #7c3aed; }
.kb-card-datetime {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .03em;
	color: #fff;
	background: #000;
	padding: 3px 8px;
	border-radius: 0;
	margin: -2px 0 10px;
}
.kb-card-title-toggle {
	cursor: pointer;
}
.kb-card-title-toggle::after {
	content: ' ▾';
	font-size: 12px;
	font-weight: 400;
	color: #999;
}

.kb-card-desc {
	display: none;
	font-size: 13px;
	font-weight: 400;
	color: #555;
	line-height: 1.4;
	background: #f7f8fa;
	border-radius: 0;
	padding: 8px 10px;
	margin: -2px 0 10px;
	word-break: break-word;
}
.kb-card-desc.kb-open {
	display: block;
}
.kb-desc-plain {
	margin: 0;
	white-space: pre-wrap;
}
.kb-desc-checklist {
	list-style: none;
	margin: 0;
	padding: 0;
}
.kb-desc-checklist li {
	margin-bottom: 6px;
}
.kb-desc-checklist li:last-child {
	margin-bottom: 0;
}
.kb-desc-check-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
}
.kb-desc-check-item input[type="checkbox"] {
	margin: 2px 0 0;
	flex-shrink: 0;
	width: 15px;
	height: 15px;
	accent-color: #16a34a;
	cursor: pointer;
}
.kb-desc-check-item input[type="checkbox"]:disabled {
	cursor: default;
}
.kb-desc-check-item.kb-checked span {
	text-decoration: line-through;
	color: #9aa0a6;
}

.kb-field-hint {
	font-size: 11px;
	color: #888;
	margin: 4px 0 0;
}
.kb-field-hint code {
	background: #f0f1f3;
	padding: 0 4px;
	border-radius: 0;
}

.kb-card-footer {
	display: flex;
	justify-content: flex-end;
}
.kb-card-avatar {
	width: 26px;
	height: 26px;
	border-radius: 0;
	object-fit: cover;
}

/* Modal */
.kb-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.45);
	z-index: 9999;
	align-items: center;
	justify-content: center;
}
.kb-modal-overlay.kb-open { display: flex; }

.kb-modal {
	background: #fff;
	border-radius: 0;
	padding: 20px;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	font-family: inherit;
}
.kb-modal h3 { margin-top: 0; }
.kb-modal label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin: 12px 0 4px;
	color: #444;
}
.kb-modal input[type="text"],
.kb-modal textarea,
.kb-modal select {
	width: 100%;
	box-sizing: border-box;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 0;
	font-size: 14px;
}

.kb-label-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.kb-label-chip {
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	padding: 4px 10px;
	border-radius: 0;
	cursor: pointer;
	opacity: .45;
	user-select: none;
}
.kb-label-chip.kb-selected { opacity: 1; box-shadow: 0 0 0 2px rgba(0,0,0,.25) inset; }

.kb-modal-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
}

.kb-image-field {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.kb-image-preview {
	width: 100%;
	max-height: 160px;
	object-fit: cover;
	border-radius: 0;
	margin-bottom: 6px;
}
.kb-image-status {
	font-size: 12px;
	color: #666;
}
.kb-btn-small {
	padding: 4px 10px;
	font-size: 12px;
}

.kb-calendar-inline {
	background: #fff;
	border-radius: 0;
	box-shadow: 0 1px 3px rgba(0,0,0,.12);
	padding: 14px;
	margin-bottom: 16px;
	max-width: 280px;
}
.kb-cal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 13px;
	color: #172b4d;
}
.kb-cal-nav {
	border: none;
	background: none;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 2px 8px;
	color: #444;
}
.kb-cal-nav:hover { color: #2563eb; }
.kb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}
.kb-cal-dow {
	font-size: 10px;
	text-align: center;
	color: #999;
	font-weight: 700;
	padding-bottom: 2px;
}
.kb-cal-day {
	border: none;
	background: #f4f5f7;
	border-radius: 0;
	font-size: 12px;
	padding: 6px 0;
	cursor: not-allowed;
	color: #bbb;
}
.kb-cal-day.kb-cal-has-tasks {
	background: #2563eb;
	color: #fff;
	cursor: pointer;
	font-weight: 600;
}
.kb-cal-day.kb-cal-has-tasks:hover { background: #1d4ed8; }
.kb-cal-day.kb-cal-active {
	background: #16a34a;
	box-shadow: 0 0 0 2px #16a34a55;
}
.kb-cal-day.kb-cal-overdue {
	background: #dc2626;
}
.kb-cal-day.kb-cal-overdue:hover { background: #b91c1c; }
.kb-cal-day.kb-cal-overdue.kb-cal-active {
	background: #dc2626;
	box-shadow: 0 0 0 2px #16a34a;
}
.kb-cal-empty {
	font-size: 12px;
	color: #666;
	margin: 4px 0 0;
}

.kb-overdue-list {
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 0;
	padding: 12px 14px;
	margin-bottom: 16px;
	max-width: 500px;
}
.kb-overdue-header {
	font-weight: 700;
	font-size: 13px;
	color: #b91c1c;
	margin-bottom: 8px;
}
.kb-overdue-items {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.kb-overdue-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-align: left;
	background: #fff;
	border: 1px solid #fecaca;
	border-radius: 0;
	padding: 6px 10px;
	cursor: pointer;
	font-size: 13px;
}
.kb-overdue-item:hover { background: #fff5f5; }
.kb-overdue-date {
	font-weight: 700;
	color: #b91c1c;
	font-size: 11px;
	text-transform: uppercase;
	white-space: nowrap;
}
.kb-overdue-title {
	flex: 1;
	color: #172b4d;
}
.kb-overdue-count {
	background: #dc2626;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border-radius: 0;
	padding: 1px 8px;
}

/* Resumen de etiquetas en el encabezado de En Progreso */
.kb-column-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 10px;
}
.kb-stage-summary {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 6px 10px;
	text-transform: none;
	letter-spacing: 0;
}
.kb-sum-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.kb-sum-circle {
	box-sizing: border-box;
	width: 26px;
	height: 26px;
	border-radius: 0;
	border: 2px solid #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	font-weight: 800;
	line-height: 1;
}
.kb-sum-pct {
	font-size: 12px;
	font-weight: 700;
}
.kb-sum-more {
	font-size: 11px;
	font-weight: 700;
	opacity: .85;
}

/* Estilo completamente cuadrado (también frente a estilos del tema) */
.kb-board-root,
.kb-board-root *,
.kb-board-root *::before,
.kb-board-root *::after {
	border-radius: 0 !important;
}

/* Botón X para borrar la búsqueda */
.kb-search-wrap {
	position: relative;
	flex: 1;
	min-width: 140px;
	max-width: 320px;
}
.kb-search-wrap .kb-search-input {
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	padding-right: 36px;
}
.kb-search-clear {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	padding: 0;
	margin: 0;
	border: 0;
	background: rgba(255, 255, 255, .9);
	color: #111;
	font-size: 18px;
	font-weight: 700;
	line-height: 24px;
	text-align: center;
	cursor: pointer;
	box-shadow: none;
}
.kb-search-clear:hover {
	background: #fff;
	color: #dc2626;
}
