:root {
	--layout-edge-gap: 1.5rem;
	--site-header-height: 0px;
	--sidebar-width: 250px;
	--sidebar-collapsed-width: 72px;

	/* Neutral Base Colors */
    --bg: #f6f8fa;       
    --bg-spot: #eaeef2;   
    --surface: #ffffff;   
    --surface-soft: #f3f4f6; 
    --text: #24292f;         
    --muted: #57606a;        
    --border: #d0d7de;       
	
	/* Accent Colors */
    --accent: #0969da;       
    --accent-hover: #1a7fec;
    --accent-text: #ffffff;

	/* Status Colors */
    --danger: #cf222e;
    --flash-success-bg: #dafbe1;
    --flash-success-border: #4ac26b;
    --flash-success-text: #114e21;
    --flash-error-bg: #ffebe9;
    --flash-error-border: #ff8182;
    --flash-error-text: #4d000a;
}

body.theme-dark {
	/* Neutral Base Colors */
    --bg: #0d1117;           
    --bg-spot: #161b22;      
    --surface: #21262d;      
    --surface-soft: #30363d; 
    --text: #c9d1d9;         
    --muted: #8b949e;        
    --border: #30363d;       

	/* Accent Colors */
	--accent: #1f6feb;
	--accent-hover: #1158c7;
	--accent-text: #f0f6fc;

	/* Status Colors */
	--flash-success-bg: #12261e;
	--flash-success-border: #2ea043;
	--flash-success-text: #b7f0c2;
	--flash-error-bg: #2d1a1f;
	--flash-error-border: #f85149;
	--flash-error-text: #ffd7d5;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	color: var(--text);
	background: radial-gradient(circle at top right, var(--bg-spot), var(--bg));
}

.container {
	width: 100%;
	max-width: none;
	padding-inline: clamp(1rem, 2.5vw, 2rem);
	margin: 0 auto;
}

.app-layout {
	display: grid;
	grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
	gap: 1.25rem;
	padding: var(--layout-edge-gap) 0;
}

.content-region {
	min-width: 0;
}

.app-layout.no-sidebar {
	grid-template-columns: minmax(0, 1fr);
}

.app-layout.no-sidebar .content-region {
	max-width: 560px;
	width: 100%;
	margin: 0 auto;
}

.sidebar {
	align-self: start;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 0.8rem;
	padding: 1rem;
	position: sticky;
	top: calc(var(--site-header-height) + var(--layout-edge-gap));
	height: calc(100vh - var(--site-header-height) - var(--footer-height) - (var(--layout-edge-gap) * 2));
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: width 180ms ease, padding 180ms ease;
}

.sidebar-tree {
	flex: 1 1 auto;
	overflow-y: auto;
	min-height: 0;
}

.sidebar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	margin-bottom: 0.9rem;
}

.sidebar-title {
	margin: 0;
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
}

.sidebar-toggle {
	width: 1.9rem;
	height: 1.9rem;
	padding: 0;
	display: inline-grid;
	place-items: center;
	background: var(--surface-soft);
	border-color: var(--border);
	color: var(--muted);
}

.sidebar-toggle:hover {
	background: var(--surface);
}

.toggle-icon {
	font-size: 0.95rem;
	line-height: 1;
}

.sidebar-tree,
.sidebar-tree ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sidebar-foot {
	flex: 0 0 auto;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--border);
}

.admin-link {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	color: var(--muted);
	font-size: 0.92rem;
	font-weight: 600;
	padding: 0.25rem 0;
	transition: color 120ms ease;
	list-style: none;
	cursor: pointer;
}

.admin-link::-webkit-details-marker { display: none; }

.admin-link:hover {
	color: var(--accent);
}

.sidebar-tree > li + li {
	margin-top: 0.85rem;
}

.tree-section {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--text);
	cursor: pointer;
}

.sidebar-tree ul {
	margin-top: 0.4rem;
	padding-left: 0.9rem;
	border-left: 2px solid var(--border);
	display: grid;
	gap: 0.35rem;
}

.sidebar-tree a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	color: var(--text);
	font-size: 0.92rem;
}

.sidebar-tree > li > a {
	font-weight: 600;
}

.sidebar-tree ul a {
	color: var(--muted);
}

.sidebar-tree a:hover {
	color: var(--accent);
}

.sidebar-tree details > summary {
	list-style: none;
	position: relative;
	padding-left: 1.1rem;
}

.sidebar-tree details > summary::-webkit-details-marker {
	display: none;
}

.sidebar-tree details > summary::before {
	content: "+";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--muted);
	font-weight: 700;
	line-height: 1.2;
}

.sidebar-tree details[open] > summary::before {
	content: "-";
}

.item-icon {
	width: 1.1rem;
	height: 1.1rem;
	display: inline-flex;
	flex: 0 0 1.1rem;
	color: currentColor;
}

.item-icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.sidebar-collapsed .app-layout {
	grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.sidebar-collapsed .sidebar {
	padding: 0.75rem 0.45rem;
}

.sidebar-collapsed .sidebar-title,
.sidebar-collapsed .item-label,
.sidebar-collapsed .sidebar-tree details > summary::before,
.sidebar-collapsed .sidebar-tree ul {
	display: none;
}

.sidebar-collapsed .sidebar-head {
	justify-content: center;
	margin-bottom: 0.45rem;
}

.sidebar-collapsed .sidebar-toggle {
	width: 2.1rem;
	height: 2.1rem;
}

.sidebar-collapsed .toggle-icon {
	transform: scaleX(-1);
}

.sidebar-collapsed .sidebar-tree > li + li {
	margin-top: 0.45rem;
}

.sidebar-collapsed .sidebar-tree a,
.sidebar-collapsed .tree-section {
	justify-content: center;
	padding: 0.45rem 0;
	gap: 0;
}

.sidebar-collapsed .sidebar-foot .item-label {
	display: none;
}

.sidebar-collapsed .admin-link {
	justify-content: center;
	padding: 0.45rem 0;
	gap: 0;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 200;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.site-header .container {
	padding-inline: clamp(1.4rem, 3vw, 2.8rem);
}

.nav-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 0;
}

.brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.brand-logo {
	height: 36px;
	width: auto;
	display: block;
}

.brand-logo-dark {
	display: none;
}

body.theme-dark .brand-logo-light {
	display: none;
}

body.theme-dark .brand-logo-dark {
	display: block;
}

.top-nav {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.user-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	border-radius: 0.35rem;
	background: var(--bg-spot);
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.nav-action {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.4rem 0.6rem;
	border: none;
	border-radius: 0.4rem;
	background: transparent;
	color: var(--muted);
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 120ms ease, color 120ms ease;
}

.nav-action:hover {
	background: var(--surface-soft);
	color: var(--text);
}

.theme-icon {
	width: 1.08rem;
	height: 1.08rem;
	display: inline-grid;
	place-items: center;
	color: var(--muted);
}

.theme-icon svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.theme-icon-sun {
	display: none;
}

body.theme-dark .theme-icon-sun {
	display: block;
}

body.theme-dark .theme-icon-moon {
	display: none;
}

.theme-label {
	font-size: 0.82rem;
	font-weight: 600;
}

.hero {
	margin: 2rem 0 1rem;
}

.lead {
	color: var(--muted);
}

.main-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 0.8rem;
	padding: 1rem;
}

.form {
	display: grid;
	gap: 0.75rem;
}

input,
button {
	border-radius: 0.5rem;
	border: 1px solid var(--border);
	padding: 0.65rem 0.75rem;
	font: inherit;
}

button {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--accent-text);
	cursor: pointer;
}

button:hover {
	background: var(--accent-hover);
}

.flash-list {
	list-style: none;
	padding: 0;
	margin: 1rem 0;
	display: grid;
	gap: 0.5rem;
}

.flash {
	border-radius: 0.5rem;
	padding: 0.7rem 0.8rem;
	background: var(--flash-success-bg);
	border: 1px solid var(--flash-success-border);
	color: var(--flash-success-text);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%       { transform: translateX(-6px); }
    30%       { transform: translateX(6px); }
    45%       { transform: translateX(-4px); }
    60%       { transform: translateX(4px); }
    75%       { transform: translateX(-2px); }
    90%       { transform: translateX(2px); }
}

.flash.error {
	background: var(--flash-error-bg);
	border-color: var(--flash-error-border);
	color: var(--flash-error-text);
    animation: shake 0.45s ease;
}

@media (max-width: 840px) {
	.app-layout {
		grid-template-columns: 1fr;
	}

	.sidebar {
		position: static;
		height: auto;
	}
}

/* ── Sticky Footer ────────────────────────────────── */

:root {
	--footer-height: 2.75rem;
}

main.container {
	min-height: calc(100vh - var(--site-header-height) - var(--footer-height) - (var(--layout-edge-gap) * 2));
	padding-bottom: 0;
}

.site-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 100;
	height: var(--footer-height);
	background: var(--surface);
	border-top: 1px solid var(--border);
}

.footer-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: 100%;
}

.footer-copy {
	font-size: 0.8rem;
	color: var(--muted);
}

.footer-nav {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.footer-nav a {
	text-decoration: none;
	font-size: 0.8rem;
	color: var(--muted);
}

.footer-nav a:hover {
	color: var(--text);
	text-decoration: underline;
}

.form-hint {
	font-size: 0.8rem;
	color: var(--muted);
	margin: 0;
}

/* ── Admin sidebar sub-nav ───────────────────────── */

.admin-sub {
	list-style: none;
	margin: 0.35rem 0 0 0;
	padding-left: 0.9rem;
	border-left: 2px solid var(--border);
	display: grid;
	gap: 0.3rem;
}

.admin-sub a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	color: var(--muted);
	font-size: 0.88rem;
}

.admin-sub a:hover { color: var(--accent); }

.sidebar-collapsed .admin-sub { display: none; }

/* ── Datagrid ─────────────────────────────────────── */

.datagrid-wrap {
	width: 100%;
	overflow-x: auto;
}

.datagrid-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
	flex-wrap: wrap;
}

.datagrid-title {
	margin: 0 0 0.25rem 0;
	font-size: 1.25rem;
}

.datagrid-info {
	font-size: 0.8rem;
	color: var(--muted);
	margin: 0;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.data-table th,
.data-table td {
	padding: 0.55rem 0.75rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

.data-table thead th {
	background: var(--surface-soft);
	font-weight: 600;
	color: var(--muted);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	position: sticky;
	top: 0;
}

.data-table tbody tr:hover { 
	background: var(--bg-spot);
	transition: background 150ms ease;
}
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .empty-row td {
	text-align: center;
	color: var(--muted);
	padding: 2rem;
}

/* Sort header links */
.sort-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	text-decoration: none;
	color: inherit;
	white-space: nowrap;
}

.sort-link:hover { color: var(--accent); }

.sort-icon {
	display: inline-flex;
	flex-direction: column;
	gap: 1px;
	opacity: 0.3;
}

.sort-icon svg {
	width: 0.6rem;
	height: 0.6rem;
	fill: currentColor;
}

.sort-link.sort-asc  .sort-icon-asc,
.sort-link.sort-desc .sort-icon-desc {
	opacity: 1;
	color: var(--accent);
}

/* Pagination */
.datagrid-pagination {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.4rem;
	margin-bottom: 0.75rem;
	flex-wrap: wrap;
}

.page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	height: 2rem;
	padding: 0 0.5rem;
	border: 1px solid var(--border);
	border-radius: 0.4rem;
	background: var(--surface);
	color: var(--text);
	font-size: 0.82rem;
	text-decoration: none;
	cursor: pointer;
	transition: background 120ms, color 120ms;
}

.page-btn:hover { background: var(--surface-soft); color: var(--accent); }

.page-btn.active {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-text);
	font-weight: 600;
}

.page-btn[aria-disabled="true"] {
	opacity: 0.4;
	pointer-events: none;
}

/* Status badges */
.badge {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.badge-success { background: var(--flash-success-bg); color: var(--flash-success-text); border: 1px solid var(--flash-success-border); }
.badge-danger  { background: var(--flash-error-bg);   color: var(--flash-error-text);   border: 1px solid var(--flash-error-border); }
.badge-role,
.badge-muted   { background: var(--surface-soft); border: 1px solid var(--border); }
.badge-role    { color: var(--text); }
.badge-muted   { color: var(--muted); }

/* ── Datagrid filter form ──────────────────────────── */

.datagrid-filter {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.filter-input {
	height: 2rem;
	padding: 0 0.6rem;
	border: 1px solid var(--border);
	border-radius: 0.4rem;
	background: var(--surface);
	color: var(--text);
	font-size: 0.82rem;
	min-width: 9rem;
	max-width: 14rem;
}

.filter-input:focus {
	outline: 2px solid var(--accent);
	outline-offset: -1px;
}

.filter-btn {
	height: 2rem;
	padding: 0 0.9rem;
	background: var(--accent);
	color: var(--accent-text);
	border: none;
	border-radius: 0.4rem;
	font-size: 0.82rem;
	cursor: pointer;
	white-space: nowrap;
}

.filter-btn:hover { background: var(--accent-hover); }

.filter-reset {
	font-size: 0.8rem;
	color: var(--muted);
	text-decoration: none;
	white-space: nowrap;
}

.filter-reset:hover { color: var(--accent); text-decoration: underline; }

.filter-value-area {
	display: contents;
}

.role-checkbox-label,
.filter-checkbox-label {
	display: flex;
	align-items: center;
	cursor: pointer;
}

.filter-checkbox-label {
	gap: 0.45rem;
	font-size: 0.82rem;
	color: var(--text);
	white-space: nowrap;
	padding: 0 0.2rem;
}

.filter-checkbox {
	width: 1rem;
	height: 1rem;
	cursor: pointer;
	accent-color: var(--accent);
	flex-shrink: 0;
}

.filter-date {
	min-width: 9rem;
}

/* ── Role modal dialog ──────────────────────────── */
.role-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.role-checkbox {
    margin-right: 0.5rem;
}

/* ── Kebab Menu ────────────────────────────────────── */

.kebab-menu-container {
	position: relative;
	display: inline-block;
}

.kebab-menu-btn {
	background: none;
	border: none;
	padding: 0.4rem 0.6rem;
	cursor: pointer;
	border-radius: 0.4rem;
	font-size: 1.2rem;
	line-height: 1;
	color: var(--text);
	transition: all 0.2s;
}

.kebab-menu-btn:hover {
	background: var(--surface-soft);
}

.kebab-dropdown {
	position: fixed;
	background: var(--surface);
	border: none;
	border-radius: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 200px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
	z-index: 1001;
}

.kebab-dropdown.dropdown-bottom {
	margin-top: 0.4rem;
}

.kebab-dropdown.dropdown-top {
	margin-bottom: 0.4rem;
}

.kebab-item {
	display: block;
	padding: 0.75rem 1rem;
	color: var(--text);
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s;
}

.kebab-item:hover {
	background: var(--surface-soft);
}

.kebab-dropdown li:last-child .kebab-item {
	border-bottom: none;
}

/* ── Modal Dialog ──────────────────────────────────── */

.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	align-items: center;
	justify-content: center;
}

.modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.modal-content {
	position: relative;
	background: var(--surface);
	border-radius: 0.8rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	width: 90%;
	max-width: 400px;
	margin: auto;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
	border-bottom: 1px solid var(--border);
}

.modal-title {
	margin: 0;
	font-size: 1.25rem;
}

.modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	color: var(--muted);
	cursor: pointer;
	padding: 0;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.modal-close:hover {
	color: var(--text);
}

.modal-body {
	padding: 1.5rem;
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
	padding: 1.5rem;
	border-top: 1px solid var(--border);
}

/* ── Button Styles ────────────────────────────────── */

.btn {
	padding: 0.5rem 1rem;
	border-radius: 0.4rem;
	border: 1px solid var(--border);
	cursor: pointer;
	font-size: 1rem;
	transition: all 0.2s;
}

.btn-primary {
	background: var(--accent);
	color: var(--accent-text);
	border-color: var(--accent);
}

.btn-primary:hover {
	background: var(--accent-hover);
}

.btn-secondary {
	background: var(--surface-soft);
	color: var(--text);
}

.btn-secondary:hover {
	background: var(--bg-spot);
}

/* ── Toasts ────────────────────────────────── */

/* Container positioning */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Base styling for a toast */
.toast {
    min-width: 280px;
    max-width: 400px;
    padding: 14px 18px;
    border-radius: 6px;
    color: var(--accent-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out;
}

/* Active state for slide-in */
.toast.show {
    transform: translateX(0);
}

/* Color variants (neutral/tech tones) */
.toast.success {
	background-color: #10b981; /* Pleasant green */
    border-left: 5px solid #047857;
}

.toast.warning {
	background-color: #f59e0b; /* Warm orange */
    border-left: 5px solid #b45309;
}

.toast.danger,
.toast.error {
    background-color: #ef4444;
    border-left: 5px solid #b91c1c;
}

/* Close button */
.toast-close {
    background: none;
    border: none;
    color: currentColor;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 0 0 15px;
}

.toast-close:hover {
    opacity: 1;
}
/* ── Sticky Notes Board ───────────────────────────── */

.sticky-board-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 1.5rem 0 1.25rem;
	flex-wrap: wrap;
}

.sticky-board-title {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 700;
}

.btn-add-note {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	height: 2rem;
	padding: 0 0.9rem;
	border-radius: 0.4rem;
	border: none;
	background: var(--accent);
	color: var(--accent-text);
	font-size: 0.82rem;
	cursor: pointer;
	white-space: nowrap;
}

.btn-add-note:hover {
	background: var(--accent-hover);
}

.btn-add-note svg {
	width: 1rem;
	height: 1rem;
	fill: currentColor;
	flex: 0 0 1rem;
}

.sticky-shelf {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	padding-bottom: 3rem;
	position: relative;
}

.sticky-empty-hint {
	grid-column: 1 / -1;
	color: var(--muted);
	font-size: 0.92rem;
	text-align: center;
	padding: 3rem 1rem;
}

.sticky-empty-hint.hidden {
	display: none;
}

.sticky-note {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto 1fr auto;
	border-radius: 0.4rem;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
	min-height: 180px;
	transition: box-shadow 150ms ease, transform 150ms ease;
	position: relative;
	overflow: hidden;
}

.sticky-note:hover {
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sticky-note.dragging {
	opacity: 0.4;
	transform: scale(0.97);
}

.sticky-note.drag-over {
	box-shadow: 0 0 0 2px var(--accent), 0 6px 16px rgba(0, 0, 0, 0.18);
	transform: scale(1.02);
}

.sticky-handle {
	grid-column: 1 / -1;
	padding: 0.35rem 0.5rem 0.2rem;
	cursor: grab;
	display: flex;
	justify-content: center;
}

.sticky-handle:active {
	cursor: grabbing;
}

.sticky-handle-dots {
	display: grid;
	grid-template-columns: repeat(6, 4px);
	gap: 2px;
	opacity: 0.35;
}

.sticky-handle-dots span {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
}

.sticky-textarea {
	grid-column: 1;
	grid-row: 2;
	width: 100%;
	min-height: 120px;
	padding: 0.4rem 0.5rem 0.4rem 0.65rem;
	border: none;
	outline: none;
	resize: none;
	background: transparent;
	font-family: inherit;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #2d2d2d;
}

.sticky-textarea::placeholder {
	color: rgba(45, 45, 45, 0.28);
}

.sticky-footer {
	grid-column: 1 / -1;
	grid-row: 3;
	padding: 0.3rem 0.6rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	background: rgba(107, 114, 128, 0.2);
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.sticky-footer-meta {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	min-width: 0;
	color: rgba(45, 45, 45, 0.78);
	font-size: 0.68rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sticky-private {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	cursor: pointer;
	user-select: none;
}

.sticky-private-icon {
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #000;
}

.sticky-private-icon svg {
	width: 0.8rem;
	height: 0.8rem;
	fill: #000;
}

.sticky-private input[type="checkbox"] {
	margin: 0;
	width: 0.78rem;
	height: 0.78rem;
	accent-color: #4b5563;
}

.sticky-created-at {
	overflow: hidden;
	text-overflow: ellipsis;
}

.sticky-controls {
	grid-column: 2;
	grid-row: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.45rem;
	padding: 0.4rem 0.45rem;
	border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.sticky-save-status {
	font-size: 0.68rem;
	white-space: nowrap;
	user-select: none;
	pointer-events: none;
	opacity: 0;
	transition: opacity 200ms ease;
	color: #16a34a;
	margin-left: auto;
}

.sticky-save-status.is-saving {
	opacity: 1;
	color: rgba(45, 45, 45, 0.5);
	animation: status-pulse 1s ease-in-out infinite;
}

.sticky-save-status.is-saved {
	opacity: 1;
	color: #16a34a;
}

@keyframes status-pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0.35; }
}

.sticky-colors {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	flex-wrap: wrap;
}

.color-swatch {
	width: 1.2rem;
	height: 1.2rem;
	border-radius: 0.28rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	padding: 0;
	cursor: pointer;
	transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
	flex: 0 0 1.2rem;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.color-swatch:hover {
	transform: translateY(-1px);
	border-color: rgba(0, 0, 0, 0.25);
}

.color-swatch.active {
	border-color: rgba(0, 0, 0, 0.45);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.sticky-delete {
	width: 1.4rem;
	height: 1.4rem;
	padding: 0;
	display: inline-grid;
	place-items: center;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: rgba(45, 45, 45, 0.5);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	transition: background 120ms ease, color 120ms ease;
}

.sticky-delete:hover {
	background: rgba(0, 0, 0, 0.12);
	color: #2d2d2d;
}

.color-custom-btn {
	display: inline-block;
	width: 1.2rem;
	height: 1.2rem;
	border-radius: 0.28rem;
	background-color: rgba(107, 114, 128, 0.2);
    position: relative;
    cursor: pointer;
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
	transition: transform 120ms ease, border-color 120ms ease;
}

.color-custom-btn::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
	font-size: 0.78rem;
	color: rgba(45, 45, 45, 0.7);
}

.color-custom-btn:hover {
	transform: translateY(-1px);
	border-color: rgba(0, 0, 0, 0.25);
}

.color-custom-btn input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

@media (max-width: 600px) {
	.sticky-shelf {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	}
}
