/* CaniSoft arayüz dili: açık tema, #0078D4 vurgu, Segoe UI, yumuşak gölgeler */

:root {
	--blue: #0078D4;
	--blue-dark: #106ebe;
	--blue-light: #f0f8ff;
	--blue-line: #cfe4f7;

	--text: #1f1f1f;
	--muted: #666;
	--line: #e6ebf2;
	--bg-1: #f3f6fb;
	--bg-2: #e5eefc;
	--white: #fff;

	--green: #107c10;
	--amber: #c19c00;
	--red: #d13438;

	--radius: 12px;
	--shadow-sm: 0 2px 10px rgba(0, 0, 0, .08);
	--shadow-md: 0 8px 20px rgba(0, 0, 0, .08);
	--shadow-lg: 0 20px 50px rgba(0, 0, 0, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	font-family: "Segoe UI", Arial, system-ui, sans-serif;
	background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
	color: var(--text);
	line-height: 1.6;
}

/* ---------- üst menü ---------- */

.topbar {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 64px;
	padding: 0 30px;
	background: rgba(255, 255, 255, .95);
	backdrop-filter: blur(10px);
	box-shadow: var(--shadow-sm);
}

.logo {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 24px;
	font-weight: 600;
	color: var(--blue);
	text-decoration: none;
}

.logo-box {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: linear-gradient(135deg, #2b9cf0, var(--blue));
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .5px;
	box-shadow: 0 4px 10px rgba(0, 120, 212, .32);
}

nav { display: flex; align-items: center; gap: 25px; margin-left: auto; }

nav a {
	color: #333;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: color .25s;
}
nav a:hover { color: var(--blue); }

/* Sol üstteki markaya dönüş */
.back {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--blue);
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--blue-line);
	border-radius: 6px;
	transition: background .2s, border-color .2s;
}
.back:hover { background: var(--blue-light); border-color: var(--blue); }

/* ---------- sayfa düzeni ---------- */

.wrap {
	display: flex;
	flex: 1;
	flex-direction: column;
	width: 100%;
	max-width: 980px;
	margin: 0 auto;
	padding: 24px 20px 0;
}

/* ---------- sohbet penceresi ---------- */

.window {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 440px;
	overflow: hidden;
	background: rgba(255, 255, 255, .78);
	border: 1px solid rgba(255, 255, 255, .85);
	border-radius: 20px;
	box-shadow: var(--shadow-lg);
	backdrop-filter: blur(10px);
}

.window-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	background: rgba(255, 255, 255, .7);
	border-bottom: 1px solid var(--line);
}

.wdot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #d6dce5;
}

.window-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: 10px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: #333;
}

/* durum noktası */
.dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #c3ccd9;
	transition: background .2s, box-shadow .2s;
}
.dot.ready { background: var(--green); box-shadow: 0 0 0 3px rgba(16, 124, 16, .15); }
.dot.busy { background: var(--amber); box-shadow: 0 0 0 3px rgba(193, 156, 0, .15); }
.dot.dead { background: var(--red); box-shadow: 0 0 0 3px rgba(209, 52, 56, .15); }

.badge {
	margin-left: auto;
	padding: 4px 11px;
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
}
.badge.good { color: var(--blue); border-color: var(--blue-line); background: var(--blue-light); }
.badge.bad { color: #a4262c; border-color: #f3c6c6; background: #fdf3f3; }

/* ---------- durum paneli ---------- */

.panel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: #fff;
	border-bottom: 1px solid var(--line);
}

.status {
	margin-right: auto;
	font-size: 13px;
	color: var(--muted);
}

.progress {
	display: flex;
	flex-basis: 100%;
	align-items: center;
	gap: 10px;
}

.progress .bar {
	width: 0;
	max-width: 460px;
	flex: 1;
	height: 6px;
	border-radius: 99px;
	background: linear-gradient(90deg, #2b9cf0, var(--blue));
	transition: width .25s ease;
}

.progress-text {
	font-size: 12px;
	color: var(--muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- mesajlar ---------- */

.messages {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 14px;
	padding: 20px;
	overflow-y: auto;
	background: #fff;
}

.msg { display: flex; align-items: flex-start; gap: 10px; }

.msg .who {
	flex: 0 0 auto;
	width: 54px;
	padding-top: 9px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-align: right;
	text-transform: uppercase;
	color: #9aa5b5;
}

.msg .body {
	max-width: 100%;
	padding: 11px 14px;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
	background: #f7f9fc;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.msg.user .body {
	background: var(--blue);
	border-color: transparent;
	color: #fff;
}

.msg.error .body {
	background: #fdf3f3;
	border-color: #f3c6c6;
	color: #a4262c;
}

/* ---------- giriş alanı ---------- */

.composer {
	display: flex;
	gap: 10px;
	padding: 14px 18px;
	background: #fff;
	border-top: 1px solid var(--line);
}

/* fotoğraf ekle */
.attach {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--blue);
	background: #fff;
	border: 1px solid #d8e0ec;
	border-radius: 8px;
	cursor: pointer;
	transition: background .2s, border-color .2s;
}
.attach:hover { background: var(--blue-light); border-color: var(--blue-line); }
.attach svg { width: 20px; height: 20px; }
.attach.disabled { opacity: .4; pointer-events: none; }

.attach-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px;
	background: #fff;
	border-top: 1px solid var(--line);
}

.attach-preview img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.msg .body img.shot {
	display: block;
	max-width: 240px;
	max-height: 200px;
	margin-bottom: 8px;
	object-fit: cover;
	border-radius: 8px;
}

.composer input {
	flex: 1;
	min-width: 0;
	padding: 11px 14px;
	font: inherit;
	font-size: 15px;
	color: var(--text);
	background: #fff;
	border: 1px solid #d8e0ec;
	border-radius: 8px;
	outline: none;
	transition: border-color .2s, box-shadow .2s;
}
.composer input::placeholder { color: #9aa5b5; }
.composer input:focus {
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(0, 120, 212, .13);
}

/* ---------- düğmeler ---------- */

.btn {
	padding: 11px 20px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	background: #fff;
	border: 1px solid transparent;
	border-radius: 6px;
	transition: background .2s, color .2s, box-shadow .2s, opacity .2s;
}

.btn.primary {
	background: var(--blue);
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 120, 212, .25);
}
.btn.primary:not(:disabled):hover { background: var(--blue-dark); }

.btn.secondary {
	color: var(--blue);
	background: #fff;
	border-color: var(--blue);
}
.btn.secondary:not(:disabled):hover { background: var(--blue-light); }

.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- uyarılar ---------- */

.notice {
	margin: 14px 18px 0;
	padding: 10px 14px;
	font-size: 13px;
	color: #0b5394;
	background: var(--blue-light);
	border: 1px solid var(--blue-line);
	border-radius: 8px;
}

.notice.error {
	color: #a4262c;
	background: #fdf3f3;
	border-color: #f3c6c6;
}

/* ---------- alt bölüm ---------- */

.iconbtn {
	padding: 5px 11px;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	color: var(--blue);
	white-space: nowrap;
	cursor: pointer;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 6px;
	transition: background .2s, border-color .2s;
}
.iconbtn:hover { background: var(--blue-light); border-color: var(--blue-line); }

footer {
	padding: 26px;
	font-size: 13px;
	color: var(--muted);
	text-align: center;
}

/* ---------- mobil ---------- */

@media (max-width: 900px) {
	.topbar { padding: 0 18px; }
	nav { display: none; }
	.back { padding: 7px 11px; font-size: 13px; }
	.wrap { padding: 14px 14px 0; }
	.window { min-height: 62vh; border-radius: 16px; }
	.window-bar { gap: 6px; padding: 10px 12px; }
	.window-title { margin-left: 4px; }
	.messages { padding: 16px; }
	.msg .who { display: none; }
	.composer { padding: 12px; }
	.attach-preview { padding: 10px 12px; }
	.attach { width: 40px; height: 40px; }
	.status { flex-basis: 100%; }
}

@media (max-width: 520px) {
	.badge { display: none; }
	.wdot:nth-child(2),
	.wdot:nth-child(3) { display: none; }
}
