/**
 * WxDigitals Lisans — panel ve müşteri portalı arayüzü.
 *
 * Koyu, sakin bir zemin üzerine yumuşak yüzeyler. Vurgu rengi yalnızca eylem
 * çağrısı yapan öğelerde kullanılır; geri kalanı gri tonlarında kalır ki uzun
 * süre bakılan bir yönetim ekranı yorucu olmasın.
 */

:root {
	--bg: #0d1117;
	--bg-soft: #11161d;
	--surface: #161b23;
	--surface-2: #1c222b;
	--line: #242c37;
	--line-soft: #1d242e;
	--text: #e8edf3;
	--muted: #8b97a6;
	--faint: #5d6875;

	--accent: #3b82f6;
	--accent-2: #60a5fa;
	--accent-soft: rgba(59, 130, 246, 0.12);

	--ok: #22c55e;
	--ok-soft: rgba(34, 197, 94, 0.12);
	--warn: #f59e0b;
	--warn-soft: rgba(245, 158, 11, 0.12);
	--err: #ef4444;
	--err-soft: rgba(239, 68, 68, 0.12);

	--radius: 14px;
	--radius-sm: 9px;
	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -16px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background:
		radial-gradient(1100px 520px at 15% -10%, rgba(59, 130, 246, .10), transparent 60%),
		radial-gradient(900px 420px at 95% 0%, rgba(96, 165, 250, .06), transparent 55%),
		var(--bg);
	background-attachment: fixed;
	color: var(--text);
	font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 30px 20px 72px;
}

/* ---- Başlıklar ---------------------------------------------------------- */

h1 {
	font-size: 1.45rem;
	font-weight: 650;
	letter-spacing: -.015em;
	margin: 0;
}

h2 {
	font-size: .8125rem;
	font-weight: 650;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 16px;
}

/* ---- Üst çubuk ve sekmeler ---------------------------------------------- */

.bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.tabs {
	display: flex;
	gap: 3px;
	flex-wrap: wrap;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 4px;
}

.tabs a {
	color: var(--muted);
	text-decoration: none;
	padding: 8px 15px;
	border-radius: 8px;
	font-size: .875rem;
	font-weight: 500;
	transition: background .15s, color .15s;
}

.tabs a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }

.tabs a.now {
	background: linear-gradient(180deg, var(--accent), #2f6fd0);
	color: #fff;
	font-weight: 600;
	box-shadow: 0 1px 6px rgba(59, 130, 246, .35);
}

/* ---- Kartlar ------------------------------------------------------------ */

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 22px 24px;
	margin-bottom: 20px;
}

table.card { padding: 0; overflow: hidden; }

/* ---- Özet şeridi -------------------------------------------------------- */

.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
	margin-bottom: 22px;
}

.stat {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px 18px;
}

.stat b {
	display: block;
	font-size: 1.7rem;
	font-weight: 650;
	letter-spacing: -.02em;
	line-height: 1.15;
}

.stat span {
	color: var(--muted);
	font-size: .75rem;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.stat.is-warn b { color: var(--warn); }
.stat.is-ok b { color: var(--ok); }

/* ---- Form öğeleri ------------------------------------------------------- */

label {
	display: block;
	font-size: .8125rem;
	color: var(--muted);
	margin-bottom: 14px;
	font-weight: 500;
}

input, select, textarea {
	width: 100%;
	margin-top: 6px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	color: var(--text);
	font: inherit;
	font-size: .9375rem;
	padding: 10px 12px;
	min-height: 44px;
	transition: border-color .15s, box-shadow .15s;
}

input::placeholder { color: var(--faint); }

input:focus, select:focus, textarea:focus {
	border-color: var(--accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--accent-soft);
}

input[type="file"] { padding: 9px 12px; }
input[type="checkbox"] { width: auto; min-height: 0; margin: 0; accent-color: var(--accent); }

.grid {
	display: grid;
	gap: 0 18px;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

label.inline {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--text);
	font-size: .9375rem;
}

/* ---- Düğmeler ----------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	background: linear-gradient(180deg, var(--accent), #2f6fd0);
	border: 0;
	border-radius: var(--radius-sm);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: .9375rem;
	font-weight: 600;
	min-height: 44px;
	padding: 11px 22px;
	text-decoration: none;
	box-shadow: 0 1px 6px rgba(59, 130, 246, .3);
	transition: filter .15s, transform .08s;
}

.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }

.btn.ghost {
	background: none;
	border: 1px solid var(--line);
	color: var(--muted);
	box-shadow: none;
	font-weight: 500;
}

.btn.ghost:hover { color: var(--text); border-color: var(--faint); filter: none; }

.link {
	background: none;
	border: 0;
	color: var(--accent-2);
	cursor: pointer;
	font: inherit;
	font-size: .8125rem;
	padding: 0;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.link:hover { border-bottom-color: currentColor; }

/* ---- Tablolar ----------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; }

th, td {
	border-bottom: 1px solid var(--line-soft);
	padding: 13px 18px;
	text-align: left;
	vertical-align: top;
	font-size: .875rem;
}

thead th {
	background: var(--surface-2);
	color: var(--muted);
	font-size: .6875rem;
	font-weight: 650;
	letter-spacing: .09em;
	text-transform: uppercase;
	white-space: nowrap;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .015); }

table.plain { margin: 0; }
table.plain td { border-bottom: 1px solid var(--line-soft); padding: 9px 0; }
table.plain tr:last-child td { border-bottom: 0; }

/* ---- Küçük öğeler ------------------------------------------------------- */

code {
	background: rgba(255, 255, 255, .05);
	border: 1px solid var(--line-soft);
	border-radius: 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .8125rem;
	padding: 2px 7px;
	white-space: nowrap;
}

code.big {
	display: inline-block;
	font-size: 1rem;
	letter-spacing: .06em;
	padding: 8px 14px;
	background: var(--accent-soft);
	border-color: rgba(59, 130, 246, .3);
	color: #cfe1ff;
}

small { color: var(--muted); font-size: .78rem; }

.muted { color: var(--muted); font-size: .8125rem; margin: 0 0 12px; }

.tag {
	border-radius: 999px;
	display: inline-block;
	font-size: .6875rem;
	font-weight: 650;
	letter-spacing: .03em;
	padding: 3px 10px;
	text-transform: uppercase;
}

.tag.ok { background: var(--ok-soft); color: #4ade80; border: 1px solid rgba(34, 197, 94, .3); }
.tag.err { background: var(--err-soft); color: #f87171; border: 1px solid rgba(239, 68, 68, .3); }
.tag.warn { background: var(--warn-soft); color: #fbbf24; border: 1px solid rgba(245, 158, 11, .3); }
/* Geliştirme/staging kurulumu — kurulum hakkından düşmediğini belli eder. */
.tag.dev { background: rgba(99, 102, 241, .16); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, .35); }

.alert {
	border-radius: 12px;
	margin: 0 0 18px;
	padding: 13px 17px;
	font-size: .9rem;
	border: 1px solid transparent;
}

.alert.ok { background: var(--ok-soft); border-color: rgba(34, 197, 94, .3); }
.alert.err { background: var(--err-soft); border-color: rgba(239, 68, 68, .3); }
.alert.info { background: var(--accent-soft); border-color: rgba(59, 130, 246, .3); font-size: .8125rem; color: var(--muted); }

.empty {
	color: var(--faint);
	padding: 34px 18px;
	text-align: center;
	font-size: .875rem;
}

/* ---- Kurulum satırları -------------------------------------------------- */

.dom {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 7px;
	padding: 6px 10px;
	background: var(--bg-soft);
	border: 1px solid var(--line-soft);
	border-radius: 8px;
}

.dom span { font-size: .8125rem; }

/* ---- Filtre ve sayfalama ------------------------------------------------ */

.filter {
	display: flex;
	gap: 11px;
	flex-wrap: wrap;
	align-items: center;
	padding: 16px 20px;
}

.filter input[type=search] { flex: 1 1 260px; margin-top: 0; }
.filter select { width: auto; min-width: 165px; margin-top: 0; }

select.mini {
	width: auto;
	min-height: 26px;
	padding: 2px 6px;
	font-size: .6875rem;
	margin-top: 0;
	border-radius: 6px;
}

.pager { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 24px; }

.pager a {
	color: var(--muted);
	text-decoration: none;
	padding: 7px 13px;
	border: 1px solid var(--line);
	border-radius: 8px;
	font-size: .8125rem;
	background: var(--surface);
}

.pager a:hover { color: var(--text); border-color: var(--faint); }

.pager a.now {
	background: linear-gradient(180deg, var(--accent), #2f6fd0);
	border-color: transparent;
	color: #fff;
	font-weight: 600;
}

/* ---- Giriş ekranı ------------------------------------------------------- */

.login-wrap {
	min-height: 78vh;
	display: grid;
	place-items: center;
}

.login {
	width: 100%;
	max-width: 400px;
	padding: 32px;
	margin: 0;
}

.login h1 { margin-bottom: 6px; font-size: 1.3rem; }
.login .muted { margin-bottom: 22px; }
.login .btn { width: 100%; margin-top: 4px; }

.brand {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-bottom: 18px;
}

.brand i {
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: linear-gradient(140deg, var(--accent), #7c3aed);
	display: grid;
	place-items: center;
	font-style: normal;
	font-weight: 700;
	color: #fff;
	font-size: .8125rem;
	letter-spacing: .02em;
	box-shadow: 0 2px 10px rgba(59, 130, 246, .35);
}

/* ---- Dar ekran ---------------------------------------------------------- */

@media (max-width: 720px) {
	.wrap { padding: 20px 14px 48px; }

	.card { padding: 18px 16px; }

	th, td { padding: 11px 13px; }

	/* Geniş tablolar sayfayı taşırmasın, kendi içinde kaysın. */
	table.card { display: block; overflow-x: auto; }
	table.card .dom { white-space: normal; }

	.tabs { width: 100%; }
	.tabs a { flex: 1; text-align: center; padding: 8px 6px; font-size: .8125rem; }

	.filter .btn, .filter select, .filter input { width: 100%; }

	.stat b { font-size: 1.45rem; }
}

/* ---- Sayfa başlığı ------------------------------------------------------ */

.head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.head .brand { margin-bottom: 0; }
.head h1 { font-size: 1.3rem; line-height: 1.2; }
.head .muted { font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }

.nav-row { margin-bottom: 24px; display: inline-flex; }

@media (max-width: 720px) {
	.nav-row { display: flex; width: 100%; }
}
