/* 3task Doorman admin. System fonts only, no external requests. */
.threedoor {
	--td-a: #0f766e;
	--td-b: #2563eb;
	--td-c: #4f46e5;
	--td-ink: #111827;
	--td-muted: #6b7280;
	--td-line: #e5e7eb;
	--td-card: #fff;
	--td-green: #059669;
	--td-orange: #d97706;
	--td-red: #dc2626;
	--td-violet: #7c3aed;
	--td-blue: #2563eb;
	max-width: 1280px;
	color: var(--td-ink);
}
.threedoor .threedoor-icon { vertical-align: -4px; flex: none; }

.threedoor-head {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	margin: 16px 0 0; padding: 20px 24px; border-radius: 14px; color: #fff;
	background: linear-gradient(120deg, var(--td-a), var(--td-b) 55%, var(--td-c));
	box-shadow: 0 6px 20px rgba(37, 99, 235, .18);
}
.threedoor-head-left { display: flex; align-items: center; gap: 14px; }
.threedoor-head-icon {
	display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px;
	background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
}
.threedoor-head-title { font-size: 21px; font-weight: 700; line-height: 1.2; }
.threedoor-version { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .2); vertical-align: 3px; }
.threedoor-head-sub { opacity: .9; margin-top: 3px; }
.threedoor-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.threedoor-status { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: rgba(0, 0, 0, .18); }
.threedoor-status.is-learning { background: rgba(255, 255, 255, .92); color: var(--td-a); }
.threedoor-head-btn {
	display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px;
	color: #fff; text-decoration: none; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
}
.threedoor-head-btn:hover, .threedoor-head-btn:focus { color: #fff; background: rgba(255, 255, 255, .24); }

.threedoor-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 16px 0; border-bottom: 1px solid var(--td-line); }
.threedoor-tab {
	display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; margin-bottom: -1px;
	color: var(--td-muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent;
}
.threedoor-tab:hover { color: var(--td-b); }
.threedoor-tab.is-active { color: var(--td-b); border-bottom-color: var(--td-b); }

.threedoor-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.threedoor-kpi {
	display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
	padding: 16px 18px; background: var(--td-card); border: 1px solid var(--td-line); border-radius: 12px; border-top: 4px solid var(--td-blue);
}
.threedoor-kpi .threedoor-icon { grid-row: 1 / 3; color: var(--td-blue); }
.threedoor-kpi strong { font-size: 26px; line-height: 1.1; }
.threedoor-kpi span { color: var(--td-muted); }
.threedoor-kpi.kpi-green { border-top-color: var(--td-green); } .threedoor-kpi.kpi-green .threedoor-icon { color: var(--td-green); }
.threedoor-kpi.kpi-orange { border-top-color: var(--td-orange); } .threedoor-kpi.kpi-orange .threedoor-icon { color: var(--td-orange); }
.threedoor-kpi.kpi-red { border-top-color: var(--td-red); } .threedoor-kpi.kpi-red .threedoor-icon { color: var(--td-red); }
.threedoor-kpi.kpi-violet { border-top-color: var(--td-violet); } .threedoor-kpi.kpi-violet .threedoor-icon { color: var(--td-violet); }

.threedoor-card { background: var(--td-card); border: 1px solid var(--td-line); border-radius: 12px; padding: 18px 22px; margin-bottom: 16px; }
.threedoor-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; }
.threedoor-card.is-warning { border-color: #fcd34d; background: #fffbeb; }
.threedoor-card.is-warning h2 { color: #92400e; }
.threedoor-card.is-info { border-color: #bfdbfe; background: #eff6ff; }
.threedoor-muted { color: var(--td-muted); }
.threedoor-warn { color: #92400e; display: flex; gap: 6px; align-items: flex-start; }

.threedoor-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.threedoor-door label {
	display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 6px 10px; height: 100%; box-sizing: border-box;
	padding: 14px; border: 1px solid var(--td-line); border-left: 4px solid var(--td-muted); border-radius: 10px; cursor: pointer;
}
.threedoor-door input { margin-top: 3px; }
.threedoor-door-text strong { display: block; margin-bottom: 3px; }
.threedoor-door-text span { color: var(--td-muted); font-size: 13px; }
.threedoor-door label { grid-template-rows: 1fr auto; }
.threedoor-door .threedoor-pill { grid-column: 2; justify-self: start; align-self: end; }
.threedoor-door.is-closed label { border-left-color: var(--td-green); }
.threedoor-door.is-risk label { border-left-color: var(--td-orange); background: #fffaf0; }

.threedoor-pill, .threedoor-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #f3f4f6; color: #374151; }
.is-closed > label .threedoor-pill, .threedoor-badge.is-closed { background: #d1fae5; color: #065f46; }
.is-risk > label .threedoor-pill { background: #fef3c7; color: #92400e; }
.threedoor-badge.is-open { background: #e0e7ff; color: #3730a3; }
.threedoor-badge.is-ai { background: #ede9fe; color: #5b21b6; }

.threedoor-table-wrap { overflow-x: auto; }
.threedoor-table td, .threedoor-table th { vertical-align: middle; }
.threedoor-table code { white-space: nowrap; }

.threedoor-modes { display: grid; gap: 8px; margin: 6px 0 14px; }
.threedoor-modes label span { color: var(--td-muted); }
.threedoor-modes.is-inline { display: flex; flex-wrap: wrap; gap: 18px; }
.threedoor-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.threedoor-two label { display: grid; gap: 6px; }
.threedoor-two textarea { width: 100%; font-family: Consolas, Monaco, monospace; font-size: 13px; }
.threedoor-role { border: 1px solid var(--td-line); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.threedoor-role summary { cursor: pointer; display: flex; gap: 10px; align-items: center; }
.threedoor-role form { margin-top: 12px; }
.threedoor-inline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.threedoor-pre { background: #f9fafb; border: 1px solid var(--td-line); border-radius: 8px; padding: 12px; overflow-x: auto; }
.threedoor-confirm { display: block; margin: 8px 0 12px; }
.threedoor-list li { margin-bottom: 6px; }
.threedoor-doorstate { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 12px 0 0; padding: 0; list-style: none; }
.threedoor-doorstate li { margin: 0; }
.threedoor-foot { color: var(--td-muted); margin-top: 20px; }

@media (max-width: 1100px) {
	.threedoor-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.threedoor-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
	.threedoor-kpis, .threedoor-doors, .threedoor-two { grid-template-columns: 1fr; }
}

/* Thank-you card */
.threedoor-danke {
	position: relative;
	padding: 16px 48px 14px 20px;
	margin: 0 0 20px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-left: 4px solid var(--td-b);
	border-radius: 8px;
	color: var(--td-ink);
}
.threedoor-danke h2 { margin: 0 0 8px; font-size: 16px; line-height: 1.4; }
.threedoor-danke p { margin: 0 0 8px; }
.threedoor-danke .threedoor-danke-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 8px; }
.threedoor-danke .description { margin: 0; }
.threedoor-danke-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #50575e;
}
.threedoor-danke-close:focus-visible { outline: 2px solid var(--td-b); outline-offset: 2px; }

/* Wide screens: text left, the four choices in their own column on the right. */
@media (min-width: 960px) {
	.threedoor-danke { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); column-gap: 32px; }
	.threedoor-danke > h2,
	.threedoor-danke > p { grid-column: 1; }
	.threedoor-danke > .threedoor-danke-buttons { grid-column: 2; grid-row: 1 / span 5; flex-direction: column; align-items: stretch; justify-content: center; margin: 0; }
	.threedoor-danke > .threedoor-danke-buttons .button { text-align: center; }
}
