@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700&display=swap');

:root {
	--bg: #0c0f14;
	--panel: #131820;
	--line: #242c38;
	--fg: #e8ecf3;
	--muted: #8d97a8;
	--accent: #3b82f6;
	--danger: #ef4444;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: var(--bg); color: var(--fg); min-height: 100vh; }
.hidden { display: none !important; }

.login {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 2rem;
	background: radial-gradient(800px 400px at 70% 0%, rgba(59, 130, 246, 0.2), transparent), var(--bg);
}
.login-box {
	width: 100%;
	max-width: 400px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 2rem;
}
.login-box h1 { margin: 0 0 0.25rem; }
.sub { margin: 0 0 1.5rem; color: var(--muted); }
#form-login label { display: block; margin-bottom: 0.9rem; font-size: 0.85rem; color: var(--muted); }
#form-login input {
	width: 100%; margin-top: 0.35rem; padding: 0.6rem 0.75rem;
	border-radius: 10px; border: 1px solid var(--line); background: #0c0f14; color: var(--fg);
}
#form-login button {
	width: 100%; margin-top: 0.5rem; padding: 0.75rem; border: none; border-radius: 10px;
	background: var(--accent); color: #fff; font-weight: 700; cursor: pointer;
}

#view-app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
@media (max-width: 840px) {
	#view-app { grid-template-columns: 1fr; }
	.sidebar { position: sticky; top: 0; z-index: 5; }
}

.sidebar {
	border-right: 1px solid var(--line);
	padding: 1rem;
	background: #0a0d12;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.brand { font-weight: 800; letter-spacing: -0.03em; font-size: 1.2rem; }
.btn-sidebar-nav { border-color: rgba(59, 130, 246, 0.35); }
#btn-dash-home.active {
	border-color: var(--accent);
	background: rgba(59, 130, 246, 0.12);
	box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}
#show-list {
	list-style: none; padding: 0; margin: 0; flex: 1; overflow-y: auto;
}
#show-list li button {
	width: 100%; text-align: left;
	background: transparent; border: 1px solid transparent; color: var(--fg);
	padding: 0.55rem 0.65rem; border-radius: 10px; cursor: pointer; font: inherit;
}
#show-list li button:hover { background: rgba(255,255,255,0.05); }
#show-list li button.active { border-color: var(--line); background: var(--panel); }

.btn-block { width: 100%; padding: 0.55rem 0.75rem; border-radius: 10px; border: 1px solid var(--line);
	background: var(--panel); color: var(--fg); font-weight: 600; cursor: pointer; font: inherit; }
.btn-ghost { opacity: 0.8; }

.main { padding: 1.25rem 1.5rem 3rem; overflow-y: auto; }
.placeholder { color: var(--muted); margin-top: 3rem; text-align: center; }

.dash-overview { padding-bottom: 2rem; }
.dash-home-head h1 { margin: 0 0 0.35rem; font-size: 1.5rem; letter-spacing: -0.02em; }
.dash-home-head .meta { margin: 0; }
.dash-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}
.stat-card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.stat-val { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--muted); }
.dash-show-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.65rem;
	margin-top: 0.5rem;
}
.dash-show-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	text-align: left;
	padding: 0.85rem 1rem;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: #0c0f14;
	color: var(--fg);
	font: inherit;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.dash-show-card:hover {
	border-color: rgba(59, 130, 246, 0.45);
	background: rgba(59, 130, 246, 0.06);
}
.dash-show-card strong { font-size: 0.95rem; }
.dash-show-card .dash-card-id { font-size: 0.72rem; color: var(--muted); font-family: ui-monospace, monospace; word-break: break-all; }
.dash-show-card .dash-card-meta { font-size: 0.72rem; color: var(--muted); }
.inline-code {
	font-family: ui-monospace, monospace;
	font-size: 0.85em;
	background: rgba(0, 0, 0, 0.35);
	padding: 0.1rem 0.35rem;
	border-radius: 6px;
}

.editor-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--line);
}
.editor-tab {
	padding: 0.45rem 0.85rem;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: var(--panel);
	color: var(--muted);
	font: inherit;
	font-weight: 600;
	font-size: 0.82rem;
	cursor: pointer;
}
.editor-tab:hover { color: var(--fg); border-color: rgba(255, 255, 255, 0.12); }
.editor-tab.active {
	color: var(--fg);
	border-color: var(--accent);
	background: rgba(59, 130, 246, 0.1);
	box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.editor-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 0.5rem; flex-wrap: wrap; }
.editor-head h2 { margin: 0; }
.meta { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9rem; word-break: break-all; }
.head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.head-actions button {
	padding: 0.55rem 1rem; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font: inherit; font-weight: 600;
	background: var(--panel); color: var(--fg);
}
.head-actions .primary { background: var(--accent); border-color: transparent; color: #fff; }
.head-actions .danger { color: #fecaca; }
.head-actions .outline { background: transparent; }

.msg { min-height: 1.2em; font-size: 0.9rem; margin: 0 0 1rem; }
.err { color: #fecaca; }
.hint { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.75rem; line-height: 1.35; }

.card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 1rem 1.1rem;
	margin-bottom: 1rem;
}
.card h3 { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--muted); }

.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.row.tight { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.row.check { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: center; }
.row.colors { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
label { font-size: 0.8rem; color: var(--muted); display: block; }
input[type="text"], input[type="number"], select {
	width: 100%; margin-top: 0.3rem; padding: 0.45rem 0.55rem; border-radius: 8px;
	border: 1px solid var(--line); background: #0c0f14; color: var(--fg); font: inherit;
}
input[type="color"] { width: 100%; height: 36px; border: none; padding: 0; background: transparent; }

.sort-list { list-style: none; padding: 0; margin: 0 0 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.slide-item {
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 0.65rem;
	background: #0c0f14;
	cursor: grab;
}
.slide-item .grid-mini {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}
@media (max-width: 600px) { .slide-item .grid-mini { grid-template-columns: 1fr; } }
.slide-item .full { grid-column: 1 / -1; }
.slide-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.slide-head button { background: transparent; border: none; color: #f87171; cursor: pointer; font: inherit; }

.small { padding: 0.4rem 0.75rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; font: inherit; }

#quill-side { min-height: 160px; background: #fff; color: #111; border-radius: 10px; }
#quill-side .ql-toolbar { border-radius: 10px 10px 0 0; }
#quill-side .ql-container { border-radius: 0 0 10px 10px; min-height: 140px; }

.drag-handle { cursor: grab; user-select: none; font-size: 1rem; margin-right: 0.35rem; }
