/* Tekne yönetim paneli — kullanıcı dostu düzen */
.tpanel-page {
	--tp-accent: #3b82f6;
	--tp-accent-dim: rgba(59, 130, 246, 0.2);
	--tp-surface: #1e293b;
	--tp-surface2: #0f172a;
	--tp-border: #334155;
	--tp-text: #e2e8f0;
	--tp-muted: #94a3b8;
	min-height: 100vh;
	background: var(--tp-surface2);
	color: var(--tp-text);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Erişilebilirlik */
.tpanel-skip {
	position: absolute;
	left: -9999px;
	top: 12px;
	z-index: 100001;
	padding: 10px 16px;
	background: #fff;
	color: #0f172a;
	font-weight: 700;
	border-radius: 8px;
}

.tpanel-skip:focus {
	left: 12px;
	outline: 2px solid var(--tp-accent);
	outline-offset: 2px;
}

.tpanel-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Yapışkan üst çubuk */
.tpanel-appbar {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(15, 23, 42, 0.92);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--tp-border);
	padding: 10px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
	padding-top: max(10px, env(safe-area-inset-top));
}

.tpanel-appbar-row {
	max-width: 960px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.tpanel-appbar-brand {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.tpanel-appbar-title {
	font-size: 1.05rem;
	font-weight: 800;
	color: #fff;
	letter-spacing: -0.02em;
}

.tpanel-badge {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--tp-accent-dim);
	color: #93c5fd;
	border: 1px solid rgba(59, 130, 246, 0.35);
}

.tpanel-badge.is-live {
	background: rgba(34, 197, 94, 0.15);
	color: #86efac;
	border-color: rgba(34, 197, 94, 0.4);
}

.tpanel-appbar-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tpanel-link-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: var(--tp-muted);
	border: 1px solid var(--tp-border);
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tpanel-link-btn:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.06);
	border-color: #475569;
}

.tpanel-link-btn--accent {
	color: #93c5fd;
	border-color: rgba(59, 130, 246, 0.45);
}

.tpanel-link-btn--accent:hover {
	background: rgba(59, 130, 246, 0.12);
	color: #bfdbfe;
}

.tpanel-link-btn:focus-visible {
	outline: 2px solid var(--tp-accent);
	outline-offset: 2px;
}

/* Bölüm kısayolları */
.tpanel-jump {
	max-width: 960px;
	margin: 10px auto 0;
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 4px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.tpanel-jump a {
	flex: 0 0 auto;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--tp-muted);
	text-decoration: none;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid transparent;
	white-space: nowrap;
}

.tpanel-jump a:hover {
	color: #e2e8f0;
	background: rgba(255, 255, 255, 0.08);
}

.tpanel-jump a:focus-visible {
	outline: 2px solid var(--tp-accent);
	outline-offset: 2px;
}

.tpanel-main {
	scroll-margin-top: 120px;
}

.tpanel-wrap {
	max-width: 960px;
	margin: 0 auto;
	padding: 20px 18px 40px;
}

/* Bilgi kutusu */
.tpanel-callout {
	background: var(--tp-surface);
	border: 1px solid var(--tp-border);
	border-radius: 12px;
	margin-bottom: 20px;
	overflow: hidden;
}

.tpanel-callout summary {
	cursor: pointer;
	padding: 14px 16px;
	font-weight: 700;
	font-size: 14px;
	color: #cbd5e1;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
}

.tpanel-callout summary::-webkit-details-marker {
	display: none;
}

.tpanel-callout summary::before {
	content: '▸';
	font-size: 12px;
	opacity: 0.7;
	transition: transform 0.2s ease;
}

.tpanel-callout[open] summary::before {
	transform: rotate(90deg);
}

.tpanel-callout p {
	margin: 0;
	padding: 0 16px 16px;
	font-size: 13px;
	line-height: 1.65;
	color: var(--tp-muted);
}

.tpanel-callout a {
	color: #93c5fd;
}

.tpanel-callout code {
	background: rgba(0, 0, 0, 0.25);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
}

/* Kartlar */
.tpanel-card {
	background: var(--tp-surface);
	border: 1px solid var(--tp-border);
	border-radius: 14px;
	padding: 20px 18px;
	margin-bottom: 20px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	scroll-margin-top: 100px;
}

.tpanel-card--actions {
	background: linear-gradient(180deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 0.98) 100%);
	border-color: rgba(59, 130, 246, 0.25);
}

.tpanel-card--price {
	border-left: 4px solid #3b82f6;
	box-shadow: 0 4px 28px rgba(37, 99, 235, 0.12);
}

.tpanel-card-head {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin-bottom: 18px;
}

.tpanel-step {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: linear-gradient(135deg, #2563eb, #3b82f6);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
}

.tpanel-card-head h2 {
	font-size: 1.12rem;
	margin: 0 0 6px;
	color: #f8fafc;
	background: none;
	-webkit-text-fill-color: currentColor;
}

.tpanel-card-desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: var(--tp-muted);
	max-width: 640px;
}

.tpanel-req {
	color: #f87171;
	font-weight: 700;
}

.tpanel-opt {
	font-weight: 500;
	color: #64748b;
	font-size: 12px;
}

/* Alanlar + ızgara */
.tpanel-field {
	margin-bottom: 16px;
}

.tpanel-field-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 20px;
}

@media (min-width: 720px) {
	.tpanel-field-grid {
		grid-template-columns: 1fr 1fr;
	}

	.tpanel-field--full {
		grid-column: 1 / -1;
	}
}

.tpanel-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #cbd5e1;
	margin-bottom: 8px;
}

.tpanel-field input[type='text'],
.tpanel-field textarea,
.tpanel-field select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	min-height: 44px;
	border-radius: 10px;
	border: 1px solid #475569;
	background: var(--tp-surface2);
	color: #f1f5f9;
	font-size: 15px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.tpanel-field textarea {
	min-height: 100px;
	resize: vertical;
	font-family: inherit;
	line-height: 1.5;
}

.tpanel-textarea--tall {
	min-height: 120px;
}

.tpanel-field input:focus-visible,
.tpanel-field textarea:focus-visible,
.tpanel-field select:focus-visible {
	outline: none;
	border-color: var(--tp-accent);
	box-shadow: 0 0 0 3px var(--tp-accent-dim);
}

.tpanel-field small {
	display: block;
	margin-top: 8px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.45;
}

.tpanel-small-hint {
	display: block;
	margin-top: 8px;
	font-size: 12px;
	color: var(--tp-muted);
	line-height: 1.45;
}

.tpanel-field input[type='file'] {
	width: 100%;
	max-width: 100%;
	padding: 10px 0;
	font-size: 14px;
	color: var(--tp-text);
}

/* Araç çubuğu (kart içi) */
.tpanel-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	margin-bottom: 16px;
}

.tpanel-toolbar--card {
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--tp-border);
}

.tpanel-toolbar-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 200px;
	min-width: 0;
}

.tpanel-toolbar-field label {
	font-weight: 600;
	color: #cbd5e1;
	font-size: 13px;
}

.tpanel-toolbar select,
.tpanel-field select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
}

/* Tablolar */
.tpanel-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.tpanel-table th,
.tpanel-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--tp-border);
	vertical-align: middle;
}

.tpanel-table thead th {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--tp-muted);
	background: rgba(0, 0, 0, 0.2);
}

.tpanel-table tbody tr:hover {
	background: rgba(255, 255, 255, 0.03);
}

.tpanel-th-actions {
	width: 88px;
}

.tpanel-table input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	min-height: 40px;
	border-radius: 8px;
	border: 1px solid #475569;
	background: var(--tp-surface2);
	color: #f1f5f9;
	font-size: 14px;
}

.tpanel-table input:focus-visible {
	outline: none;
	border-color: var(--tp-accent);
	box-shadow: 0 0 0 2px var(--tp-accent-dim);
}

.tpanel-table-scroll {
	overflow-x: auto;
	margin-top: 4px;
	border-radius: 10px;
	border: 1px solid var(--tp-border);
	-webkit-overflow-scrolling: touch;
}

.tpanel-boat-list code {
	font-size: 12px;
	background: rgba(0, 0, 0, 0.25);
	padding: 2px 6px;
	border-radius: 4px;
}

.tpanel-actions-cell {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.tpanel-price-preview {
	cursor: pointer;
	max-width: 200px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--tp-text);
}

.tpanel-price-preview:hover {
	color: var(--tp-accent);
}

.tpanel-muted {
	color: var(--tp-muted);
	font-style: italic;
}

/* Şablon çubuğu */
.tpanel-template-bar {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--tp-border);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

@media (min-width: 640px) {
	.tpanel-template-bar {
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
	}
}

.tpanel-template-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #64748b;
	flex-shrink: 0;
}

.tpanel-template-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Düğmeler */
.tpanel-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	min-height: 44px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	border: none;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.2s, opacity 0.2s;
}

.tpanel-btn:active {
	transform: scale(0.98);
}

.tpanel-btn:focus-visible {
	outline: 2px solid var(--tp-accent);
	outline-offset: 2px;
}

.tpanel-btn--sm {
	padding: 8px 14px;
	min-height: 38px;
	font-size: 13px;
}

.tpanel-btn--lg {
	padding: 14px 28px;
	font-size: 16px;
	min-height: 48px;
}

.tpanel-btn--primary {
	background: linear-gradient(135deg, #2563eb, #3b82f6);
	color: #fff;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.tpanel-btn--primary:hover {
	filter: brightness(1.05);
}

.tpanel-btn--danger {
	background: #7f1d1d;
	color: #fecaca;
}

.tpanel-btn--danger:hover {
	background: #991b1b;
}

.tpanel-btn--ghost {
	background: transparent;
	color: #93c5fd;
	border: 1px solid rgba(59, 130, 246, 0.5);
}

.tpanel-btn--ghost:hover {
	background: rgba(59, 130, 246, 0.1);
}

.tpanel-btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
}

.tpanel-btn-row--actions {
	margin-top: 0;
}

.tpanel-hint-keys {
	margin: 12px 0 0;
	font-size: 12px;
	color: #64748b;
}

.tpanel-hint-keys kbd {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--tp-border);
	font-size: 11px;
	font-family: inherit;
}

.tpanel-links {
	margin-top: 24px;
	font-size: 14px;
	text-align: center;
	color: var(--tp-muted);
}

.tpanel-links a {
	color: #60a5fa;
}

.tpanel-msg {
	margin-top: 14px;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
	display: none;
}

.tpanel-msg.is-ok {
	display: block;
	background: #14532d;
	color: #bbf7d0;
	border: 1px solid rgba(34, 197, 94, 0.35);
}

.tpanel-msg.is-err {
	display: block;
	background: #7f1d1d;
	color: #fecaca;
	border: 1px solid rgba(248, 113, 113, 0.35);
}

/* Bölüm blokları (sol/sağ) */
.tpanel-section-block {
	border: 1px solid var(--tp-border);
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 14px;
	background: rgba(15, 23, 42, 0.45);
}

.tpanel-section-block h3 {
	margin: 0 0 12px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #64748b;
	background: none;
	-webkit-text-fill-color: currentColor;
}

.tpanel-section-title-input {
	width: 100%;
	margin-bottom: 12px;
	padding: 12px 14px;
	min-height: 44px;
	border-radius: 10px;
	border: 1px solid #475569;
	background: var(--tp-surface2);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
}

.tpanel-section-title-input:focus-visible {
	outline: none;
	border-color: var(--tp-accent);
	box-shadow: 0 0 0 3px var(--tp-accent-dim);
}

.tpanel-section-block .tpanel-btn {
	margin-top: 8px;
	margin-right: 8px;
}

/* Sabit Kaydet (mobil) */
.tpanel-fab {
	position: fixed;
	bottom: max(18px, env(safe-area-inset-bottom));
	right: max(18px, env(safe-area-inset-right));
	z-index: 99998;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 22px;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	font-weight: 800;
	font-size: 15px;
	color: #fff;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
	transition: transform 0.2s, box-shadow 0.2s;
}

.tpanel-fab:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(37, 99, 235, 0.5);
}

.tpanel-fab:focus-visible {
	outline: 3px solid #93c5fd;
	outline-offset: 3px;
}

.tpanel-fab-icon {
	font-size: 18px;
	line-height: 1;
}

@media (min-width: 900px) {
	.tpanel-fab {
		display: none;
	}
}

/* Toast */
.tpanel-toast {
	position: fixed;
	bottom: calc(88px + env(safe-area-inset-bottom, 0px));
	right: 18px;
	left: auto;
	max-width: min(420px, calc(100vw - 36px));
	padding: 14px 18px;
	border-radius: 12px;
	background: #14532d;
	color: #ecfdf5;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
	z-index: 99999;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
}

.tpanel-toast.is-err {
	background: #7f1d1d;
	color: #fef2f2;
}

.tpanel-toast.is-in {
	opacity: 1;
	transform: translateY(0);
}

@media (min-width: 900px) {
	.tpanel-toast {
		bottom: 22px;
	}
}

@media (max-width: 600px) {
	.tpanel-toast {
		right: 12px;
		left: 12px;
		max-width: none;
	}
}

/* Ana görsel + galeri silme */
.tpanel-input-row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 10px;
}

.tpanel-input-row input {
	flex: 1 1 200px;
	min-width: 0;
}

.tpanel-input-row .tpanel-btn {
	flex: 0 0 auto;
	align-self: stretch;
}

.tpanel-gallery-toolbar {
	margin-top: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.tpanel-gal-hint {
	margin-top: 8px !important;
}

.tpanel-gal-list {
	margin-top: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tpanel-gal-empty {
	margin: 0;
	padding: 12px 14px;
	font-size: 13px;
	color: #64748b;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	border: 1px dashed var(--tp-border);
}

.tpanel-gal-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--tp-border);
	background: rgba(15, 23, 42, 0.55);
}

.tpanel-gal-item code {
	font-size: 12px;
	word-break: break-all;
	color: #cbd5e1;
	flex: 1 1 160px;
	min-width: 0;
}

.tpanel-gal-item .tpanel-btn {
	flex-shrink: 0;
}

/* Kayıtlı tekneler — Satılık / Tükendi hızlı seçim */
.tpanel-qs-cell {
	vertical-align: middle;
	min-width: 0;
}

.tpanel-status-seg {
	display: inline-flex;
	flex-wrap: wrap;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--tp-border);
	background: rgba(0, 0, 0, 0.15);
}

.tpanel-st {
	margin: 0;
	padding: 8px 14px;
	font-size: 12px;
	font-weight: 700;
	border: none;
	background: transparent;
	color: var(--tp-muted);
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	font-family: inherit;
}

.tpanel-st + .tpanel-st {
	box-shadow: -1px 0 0 var(--tp-border);
}

.tpanel-st:hover:not(:disabled):not(.is-on) {
	background: rgba(255, 255, 255, 0.06);
	color: #e2e8f0;
}

.tpanel-st.is-on {
	background: linear-gradient(135deg, #2563eb, #3b82f6);
	color: #fff;
	cursor: default;
}

.tpanel-st:disabled {
	opacity: 0.65;
	cursor: wait;
}

@media (max-width: 520px) {
	.tpanel-st {
		padding: 8px 10px;
		font-size: 11px;
	}
}
