/* ── Cetak Tiket — extra styles ───────────────────────────── */
/* Cetak tiket page styles. */

:root {
	--ctk-hero-start: #1D4ED8;
	--ctk-hero-mid: #1E40AF;
	--ctk-hero-end: #1E3A8A;
	--ctk-dark: var(--kiosk-color-ink);
	--ctk-dark-soft: #1E293B;
	--ctk-dark-muted: #334155;
	--ctk-blue-soft: #DBEAFE;
	--ctk-blue-text: #94A3B8;
	--ctk-success-bg: #DCFCE7;
	--ctk-success-text: #15803D;
	--ctk-pending-bg: #FEF3C7;
	--ctk-pending-text: #B45309;
	--ctk-error-bg: #FEF2F2;
	--ctk-error-border: #FECACA;
	--ctk-key-danger-border: #F87171;
}

.ctk-search-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1;
	gap: 24px;
	padding: 32px 24px;
}

.ctk-search-card {
	width: 100%;
	/* max-width: 720px; */
	background: var(--ptk-card);
	border-radius: var(--ptk-r);
	/* box-shadow: var(--ptk-shadow); */
	/* padding: 28px 28px 24px; */
}

.ctk-search-card h2 {
	margin: 0 0 4px;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--ptk-text);
}

.ctk-search-card p {
	margin: 0 0 20px;
	font-size: 0.82rem;
	color: var(--ptk-muted);
}

.ctk-input-row {
	display: flex;
	gap: 10px;
}

.ctk-input-row input {
	flex: 1;
	height: 50px;
	padding: 0 16px;
	border: 1.5px solid #CBD5E1;
	border-radius: var(--ptk-r-sm);
	font-size: 1rem;
	font-weight: 600;
	color: var(--ptk-text);
	background: #FAFCFF;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	transition: border-color 0.15s, box-shadow 0.15s;
	outline: none;
}

.ctk-input-row input:focus {
	border-color: var(--ptk-primary);
	box-shadow: 0 0 0 3px rgba(29,78,216,0.12);
}

.ctk-input-row input::placeholder {
	text-transform: none;
	font-weight: 400;
	letter-spacing: 0;
	color: #94A3B8;
}

.ctk-hint {
	margin-top: 12px;
	font-size: 0.76rem;
	color: var(--ptk-muted);
	display: flex;
	align-items: center;
	gap: 6px;
}

.ctk-hint i { color: #93C5FD; }

.ctk-error {
	display: none;
	margin-top: 10px;
	padding: 10px 14px;
	border-radius: var(--ptk-r-sm);
	background: var(--ctk-error-bg);
	border: 1px solid var(--ctk-error-border);
	color: var(--ptk-danger);
	font-size: 0.8rem;
	font-weight: 600;
}

/* ── Ticket view ──────────────────────────────────────────── */
.ctk-ticket-wrap {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 0px 24px;
}

.ctk-js-step .ptk-step-number i {
	font-size: 0.9rem;
}

.ctk-ticket-hero {
	background: linear-gradient(135deg, var(--ctk-hero-start) 0%, var(--ctk-hero-mid) 60%, var(--ctk-hero-end) 100%);
	border-radius: var(--ptk-r);
	padding: 24px 26px;
	color: #fff;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.ctk-ticket-hero-left { flex: 1; min-width: 0; }

.ctk-ticket-eyebrow {
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(255,255,255,0.55);
	margin-bottom: 6px;
}

.ctk-ticket-route {
	font-size: 1.3rem;
	font-weight: 800;
	margin: 0 0 10px;
	line-height: 1.3;
	color: #fff;
}

.ctk-ticket-meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.ctk-ticket-meta-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(255,255,255,0.12);
	font-size: 0.78rem;
	font-weight: 600;
	color: rgba(255,255,255,0.9);
	border: 1px solid rgba(255,255,255,0.15);
}

.ctk-ticket-meta-pill i { font-size: 0.72rem; opacity: 0.75; }

.ctk-ticket-hero-right {
	text-align: right;
	flex-shrink: 0;
}

.ctk-ticket-status-badge {
	display: inline-block;
	padding: 6px 16px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: rgba(255,255,255,0.15);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.25);
	margin-bottom: 8px;
}

.ctk-ticket-status-badge.is-paid {
	background: var(--ptk-accent);
	border-color: var(--kiosk-color-primary-hover);
}

.ctk-ticket-status-badge.is-pending {
	background: var(--ptk-warning);
	border-color: var(--ctk-pending-text);
}

.ctk-ticket-code {
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	color: #fff;
}

.ctk-ticket-code small {
	display: block;
	font-size: 0.62rem;
	font-weight: 600;
	color: rgba(255,255,255,0.45);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 2px;
}

/* ── Detail grid ──────────────────────────────────────────── */
.ctk-detail-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.ctk-detail-card {
	background: var(--ptk-card);
	border: 1px solid var(--ptk-line);
	border-radius: var(--ptk-r);
	box-shadow: var(--ptk-shadow);
	padding: 16px 18px;
}

.ctk-detail-card h3 {
	margin: 0 0 12px;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ptk-muted);
	display: flex;
	align-items: center;
	gap: 6px;
}

.ctk-detail-card h3 i {
	color: var(--ptk-primary);
	font-size: 0.72rem;
}

.ctk-detail-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding: 5px 0;
	border-bottom: 1px solid #F1F5F9;
	font-size: 0.82rem;
}

.ctk-detail-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ctk-detail-row span { color: var(--ptk-muted); flex-shrink: 0; }
.ctk-detail-row strong { color: var(--ptk-text); font-weight: 700; text-align: right; }

/* Seat chips */
.ctk-seat-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.ctk-seat-chip {
	padding: 4px 12px;
	background: var(--ctk-blue-soft);
	color: var(--ptk-primary);
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.05em;
}

/* Fare breakdown card */
.ctk-fare-card {
	background: var(--ptk-card);
	border: 1px solid var(--ptk-line);
	border-radius: var(--ptk-r);
	box-shadow: var(--ptk-shadow);
	padding: 16px 18px;
}

.ctk-fare-card h3 {
	margin: 0 0 12px;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ptk-muted);
	display: flex;
	align-items: center;
	gap: 6px;
}

.ctk-fare-card h3 i { color: var(--ptk-primary); font-size: 0.72rem; }

.ctk-fare-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 7px 0;
	border-bottom: 1px solid #F1F5F9;
	font-size: 0.82rem;
}

.ctk-fare-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ctk-fare-row span { color: var(--ptk-muted); }
.ctk-fare-row strong { color: var(--ptk-text); font-weight: 700; }
.ctk-fare-row.is-total { padding-top: 10px; margin-top: 4px; border-top: 2px solid var(--ptk-line); border-bottom: 0; }
.ctk-fare-row.is-total strong { font-size: 1rem; color: var(--ptk-primary); }
.ctk-fare-row.is-discount strong { color: var(--ptk-accent); }

/* ── Summary bar ──────────────────────────────────────────── */
.ctk-summary-bar {
	background: linear-gradient(135deg, var(--ptk-primary) 0%, var(--ptk-primary-h) 100%);
	border-radius: var(--ptk-r);
	padding: 16px 20px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	color: #fff;
	flex-shrink: 0;
}

.ctk-summary-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 90px;
}

.ctk-summary-item span {
	font-size: 0.58rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255,255,255,0.48);
}

.ctk-summary-item strong {
	font-size: 0.85rem;
	font-weight: 700;
	color: #fff;
}

.ctk-summary-sep {
	width: 1px;
	height: 30px;
	background: rgba(255,255,255,0.14);
	flex-shrink: 0;
	margin: 0 2px;
}

.ctk-summary-badge-wrap { flex-shrink: 0; margin-left: auto; }

/* ── Passenger table ──────────────────────────────────────── */
.ctk-table-wrap {
	background: var(--ptk-card);
	border: 1px solid var(--ptk-line);
	border-radius: var(--ptk-r);
	box-shadow: var(--ptk-shadow);
	display: flex;
	flex-direction: column;
	flex: 1;
	overflow: hidden;
}

.ctk-table-head-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	border-bottom: 1px solid var(--ptk-line);
	background: #F8FAFC;
	flex-shrink: 0;
}

.ctk-check-all-wrap { display: flex; align-items: center; gap: 14px; }

.ctk-check-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--ptk-text);
	user-select: none;
}

.ctk-check-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--ptk-primary);
	cursor: pointer;
}

.ctk-selected-count {
	font-size: 0.74rem;
	color: var(--ptk-muted);
	font-weight: 500;
}

.ctk-table-scroll { overflow-x: auto; overflow-y: auto; flex: 1; }

.ctk-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
}

.ctk-table thead tr { background: var(--ctk-dark); }

.ctk-table thead th {
	padding: 10px 14px;
	font-size: 0.6rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255,255,255,1);
	text-align: left;
	white-space: nowrap;
}

.ctk-table tbody tr {
	border-bottom: 1px solid #F1F5F9;
	transition: background 0.1s;
	cursor: pointer;
}

.ctk-table tbody tr:last-child { border-bottom: 0; }
.ctk-table tbody tr:hover { background: #F8FAFC; }
.ctk-table tbody tr.is-checked { background: #EFF6FF; }

.ctk-table td {
	padding: 12px 14px;
	color: var(--ptk-text);
	vertical-align: middle;
}

.ctk-col-check { width: 44px; text-align: center; }
.ctk-col-no    { width: 42px; color: var(--ptk-muted); font-weight: 600; text-align: center; }
.ctk-col-seat  { width: 70px; }
.ctk-col-status { width: 110px; }

.ctk-row-check {
	width: 16px;
	height: 16px;
	accent-color: var(--ptk-primary);
	cursor: pointer;
}

.ctk-tiket-num {
	font-family: "Courier New", monospace;
	font-size: 0.77rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--ptk-primary);
}

.ctk-row-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 700;
	background: var(--ctk-success-bg);
	color: var(--ctk-success-text);
	white-space: nowrap;
}

.ctk-row-status.is-pending { background: var(--ctk-pending-bg); color: var(--ctk-pending-text); }

.ctk-table-empty {
	text-align: center;
	padding: 32px 16px !important;
	color: var(--ptk-muted);
	font-size: 0.82rem;
}

.ctk-tiket-empty {
	color: var(--ctk-blue-text);
	font-size: 0.75rem;
}

.ctk-passenger-name {
	font-weight: 600;
}

.ctk-passenger-phone {
	margin-top: 1px;
	font-size: 0.74rem;
	color: var(--ptk-muted);
}

/* ── Actions bar ──────────────────────────────────────────── */
.ctk-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 4px;
	flex-shrink: 0;
	flex-wrap: wrap;
}

/* ── Loading state ────────────────────────────────────────── */
.ctk-loading {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 48px 24px;
	color: var(--ptk-muted);
	font-size: 0.88rem;
}

.ctk-loading.is-active { display: flex; }

#ctk-loading {
	padding: 16px 24px;
}

.ctk-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #E2E8F0;
	border-top-color: var(--ptk-primary);
	border-radius: 50%;
	animation: ctk-spin 0.7s linear infinite;
}

@keyframes ctk-spin { to { transform: rotate(360deg); } }

/* ── Virtual Keyboard ────────────────────────────────────── */
.ctk-panel[data-panel="1"].is-active {
	padding: 20px 40px;
	gap: 20px;
}

.ctk-search-top {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.ctk-keyboard {
	width: 100%;
	/* max-width: 960px; */
	margin: 8px auto 0;
	display: flex;
	gap: 14px;
	align-items: stretch;
	flex-shrink: 0;
}

.ctk-kb-row {
	display: flex;
	gap: 8px;
}

.ctk-kb-alpha {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.ctk-kb-row-alpha {
	justify-content: flex-start;
}

.ctk-kb-row-actions {
	margin-top: 4px;
}

.ctk-kb-num {
	flex: 0 0 248px;
}

.ctk-kb-num-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	height: 100%;
}

.ctk-kb-key {
	flex: 1 1 0;
	min-width: 0;
	height: 56px;
	padding: 0 8px;
	border: 1.5px solid #cde8dc;
	border-radius: 12px;
	background: transparent;
	color: var(--ptk-text);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.1s, border-color 0.1s;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	outline: none;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.01);
}

.ctk-kb-key:hover  { background: var(--brd-green); border-color: #9ed9c2; color: #fff; }
.ctk-kb-key:focus,
.ctk-kb-key:focus-visible {
	border-color: #9ed9c2;
	box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.18);
}
.ctk-kb-key:active {
	background: #DBEAFE;
	border-color: #9ed9c2;
	box-shadow: 0 0 0 2px rgba(72, 187, 120, 0.12);
}

.ctk-kb-key.is-num {
	height: 72px;
	background: #fff;
	font-size: 1.15rem;
}
.ctk-kb-key.is-num:hover {
	background: var(--brd-green);
	border-color: #9ed9c2;
	color: #fff;
}
.ctk-kb-key.is-num:active {
	background: #DBEAFE;
	border-color: #9ed9c2;
}

.ctk-kb-key.is-del {
	flex: 1.2 1 0;
	background: #FEF2F2;
	border-color: #FECACA;
	color: var(--brd-red);
	font-size: 0.92rem;
}
.ctk-kb-key.is-del:focus,
.ctk-kb-key.is-del:focus-visible,
.ctk-kb-key.is-del:active {
	border-color: #FCA5A5;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.ctk-kb-key.is-clear {
	flex: 1.15 1 0;
	background: #FFF7ED;
	border-color: #FED7AA;
	color: var(--brd-amber);
	font-size: 0.86rem;
}
.ctk-kb-key.is-clear:focus,
.ctk-kb-key.is-clear:focus-visible,
.ctk-kb-key.is-clear:active {
	border-color: #FDBA74;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.ctk-kb-key-zero {
	grid-column: span 3;
}

.ctk-kb-key.is-search {
	flex: 6;
	background: var(--ctk-dark);
	border-color: var(--ctk-dark);
	border-bottom-color: #000;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	gap: 8px;
}
.ctk-kb-key.is-search:hover  { background: var(--ctk-dark-soft); border-color: var(--ctk-dark-soft); }
.ctk-kb-key.is-search:active { background: var(--ctk-dark-muted); border-bottom-width: 1px; transform: translateY(1px); }

#ctk-search-btn {
	height: 50px;
	padding: 0 22px;
	font-size: 0.88rem;
	white-space: nowrap;
}

#ctk-print-error {
	display: none;
}

#ctk-print-btn {
	background: var(--ptk-accent);
	color: #fff;
	border-color: var(--kiosk-color-primary-hover);
}

.ctk-print-row.is-total {
	font-weight: bold;
	font-size: 11px;
}

/* ── Print styles ─────────────────────────────────────────── */
@media print {
	body > *:not(.ctk-print-zone) { display: none !important; }

	.ctk-print-zone {
		display: block !important;
		position: static !important;
		width: 80mm;
		margin: 0 auto;
		font-family: "Courier New", Courier, monospace;
		font-size: 10px;
		color: #000;
		background: #fff;
	}

	.ctk-print-header {
		text-align: center;
		padding-bottom: 8px;
		border-bottom: 1px dashed #000;
		margin-bottom: 8px;
	}

	.ctk-print-header h1 {
		font-size: 13px;
		font-weight: bold;
		margin: 0 0 2px;
		text-transform: uppercase;
	}

	.ctk-print-header p { margin: 0; font-size: 9px; }

	.ctk-print-divider {
		border: none;
		border-top: 1px dashed #000;
		margin: 8px 0;
	}

	.ctk-print-row {
		display: flex;
		justify-content: space-between;
		padding: 2px 0;
		font-size: 9px;
	}

	.ctk-print-row span { color: #555; }
	.ctk-print-row strong { font-weight: bold; text-align: right; }

	.ctk-print-big {
		text-align: center;
		font-size: 16px;
		font-weight: bold;
		letter-spacing: 0.15em;
		padding: 8px 0;
	}

	.ctk-print-status {
		text-align: center;
		font-size: 9px;
		font-weight: bold;
		padding: 4px 0;
		border: 1px solid #000;
		border-radius: 4px;
		margin: 6px 0;
		text-transform: uppercase;
	}

	.ctk-print-footer {
		text-align: center;
		font-size: 8px;
		margin-top: 10px;
		padding-top: 8px;
		border-top: 1px dashed #000;
		color: #666;
	}

	/* Hide non-print elements */
	.ptk-page,
	.ptk-topbar,
	.ptk-steps,
	.no-print { display: none !important; }
}

/* Print zone hidden on screen */
.ctk-print-zone { display: none; }

@media (max-width: 1100px) {
	.ctk-detail-grid {
		grid-template-columns: 1fr;
	}

	.ctk-keyboard {
		flex-direction: column;
	}

	.ctk-kb-num {
		flex: 0 0 auto;
	}

	.ctk-kb-num-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.ctk-kb-key.is-num {
		height: 60px;
	}

	.ctk-kb-key-zero {
		grid-column: span 1;
	}
}

@media (max-width: 680px) {
	.ctk-kb-row {
		gap: 6px;
	}

	.ctk-kb-key {
		height: 48px;
		font-size: 0.9rem;
		padding: 0 6px;
	}

	.ctk-kb-key.is-num {
		height: 52px;
		font-size: 1rem;
	}

	.ctk-kb-key.is-clear,
	.ctk-kb-key.is-del {
		font-size: 0.8rem;
	}
}
