:root {
	--notes-bg: #08111f;
	--notes-bg-2: #0d1728;
	--notes-panel: rgba(10, 18, 33, 0.92);
	--notes-panel-border: rgba(129, 152, 186, 0.16);
	--notes-text: #e8eefc;
	--notes-muted: #8ea0bf;
	--notes-accent: #76a9ff;
	--notes-accent-strong: #4f83ff;
	--notes-success: #34c38f;
	--notes-danger: #f87171;
}

html,
body {
	min-height: 100%;
}

body.notes-body {
	background:
		radial-gradient(circle at top left, rgba(79, 131, 255, 0.18), transparent 40%),
		radial-gradient(circle at bottom right, rgba(52, 195, 143, 0.12), transparent 35%),
		linear-gradient(180deg, var(--notes-bg), var(--notes-bg-2));
	color: var(--notes-text);
}

a {
	text-decoration: none;
}

.app-topbar {
	position: sticky;
	top: 0;
	z-index: 1030;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem 1rem;
	background: rgba(5, 11, 22, 0.78);
	backdrop-filter: blur(18px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-title-wrap {
	flex: 1;
	text-align: center;
	min-width: 0;
}

.topbar-title {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--notes-text);
}

.topbar-subtitle {
	font-size: 0.82rem;
	color: var(--notes-muted);
}

.topbar-user {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
}

.app-shell {
	display: flex;
	min-height: calc(100vh - 64px);
}

.sidebar-panel {
	width: 290px;
	flex: 0 0 290px;
	padding: 1rem 0.75rem 1rem 1rem;
}

.sidebar-inner,
.sidebar-offcanvas .offcanvas-body {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	height: 100%;
	background: rgba(10, 18, 33, 0.55);
	border: 1px solid var(--notes-panel-border);
	border-radius: 1.25rem;
	padding: 1rem;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.sidebar-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--notes-muted);
}

.sidebar-links {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.sidebar-children {
	margin-left: 0.75rem;
	padding-left: 0.5rem;
	border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-link {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.7rem 0.8rem;
	border-radius: 0.9rem;
	color: var(--notes-text);
	transition: background-color 0.16s ease, transform 0.16s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
	background: rgba(79, 131, 255, 0.16);
	transform: translateX(2px);
	color: #fff;
}

.sidebar-link .bi {
	font-size: 1rem;
	color: var(--notes-accent);
}

.sidebar-link-dot {
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 999px;
	flex: 0 0 0.6rem;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.sidebar-link-label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.main-panel {
	flex: 1;
	min-width: 0;
}

.panel,
.card-shell {
	background: var(--notes-panel);
	border: 1px solid var(--notes-panel-border);
	border-radius: 1.4rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.card-shell {
	padding: 1.25rem;
}

.section-kicker {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--notes-muted);
	margin-bottom: 0.3rem;
}

.note-list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.note-row {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 0.55rem;
	padding: 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.02);
	color: var(--notes-text);
	transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.note-row-main {
	display: flex;
	align-items: flex-start;
	gap: 0.9rem;
	color: inherit;
	flex: 1;
	min-width: 0;
	margin-right: auto;
}

.note-row-reorderable {
	align-items: center;
}

.note-row-handle {
	width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--notes-muted);
	flex: 0 0 2rem;
	touch-action: none;
}

.note-row-handle:hover {
	background: rgba(79, 131, 255, 0.18);
	color: #fff;
}

.note-row-handle .bi {
	font-size: 1rem;
}

.note-row.dragging {
	opacity: 0.55;
}

.note-row.drag-over {
	border-color: rgba(79, 131, 255, 0.55);
	background: rgba(79, 131, 255, 0.12);
}

.note-row:hover,
.note-row.active {
	background: rgba(79, 131, 255, 0.14);
	border-color: rgba(79, 131, 255, 0.32);
	transform: translateY(-1px);
	color: #fff;
}

.note-row-icon {
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 0.9rem;
	display: grid;
	place-items: center;
	background: rgba(79, 131, 255, 0.16);
	color: var(--notes-accent);
	flex: 0 0 2.4rem;
	font-size: 1rem;
}

.note-row-body {
	flex: 1;
	min-width: 0;
}

.note-row-title {
	font-weight: 700;
	font-size: 1rem;
}

.note-row-date {
	font-size: 0.8rem;
	color: var(--notes-muted);
	flex: 0 0 auto;
}

.note-row-preview {
	margin-top: 0.15rem;
	font-size: 0.92rem;
	color: #cad5e8;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.note-row-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.55rem;
	font-size: 0.78rem;
	color: var(--notes-muted);
}

.note-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-left: 3.3rem;
}

.note-row-select {
	display: inline-flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 0.35rem;
	flex: 0 0 auto;
}

.note-row-select input {
	width: 1rem;
	height: 1rem;
	margin: 0;
	accent-color: var(--notes-accent-strong);
}

.export-form {
	padding: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 1.1rem;
	background: rgba(255, 255, 255, 0.02);
}

.export-form .form-select-lg {
	min-height: 3.5rem;
}

.search-suggestions {
	margin-top: 0.6rem;
	border-radius: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(6, 12, 23, 0.96);
	overflow: hidden;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.search-suggestion {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.75rem 0.9rem;
	color: var(--notes-text);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-suggestion:last-child {
	border-bottom: 0;
}

.search-suggestion:hover {
	background: rgba(79, 131, 255, 0.12);
	color: #fff;
}

.search-suggestion-title {
	font-weight: 700;
}

.search-suggestion-meta {
	font-size: 0.8rem;
	color: var(--notes-muted);
}

.search-suggestion-preview {
	font-size: 0.85rem;
	color: #cfd8ea;
}

.editor-shell .note-body {
	min-height: 16rem;
	resize: vertical;
}

.note-option-row .form-check {
	margin-bottom: 0;
}

.note-type-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.45rem 0.7rem;
	border-radius: 999px;
	background: rgba(79, 131, 255, 0.16);
	color: #d6e4ff;
	font-size: 0.85rem;
	font-weight: 600;
}

.checklist-panel-wrapper {
	margin-top: 1rem;
}

.checklist-panel {
	padding: 1rem;
	border-radius: 1.1rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.checklist-progress-wrap {
	min-width: 7rem;
}

.checklist-progress {
	width: 100%;
	height: 0.5rem;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	overflow: hidden;
}

.checklist-list {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.checklist-item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.65rem 0.7rem;
	border-radius: 0.95rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.checklist-item.is-done .checklist-item-input {
	text-decoration: line-through;
	opacity: 0.72;
}

.checklist-toggle {
	width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--notes-accent);
	flex: 0 0 2rem;
}

.checklist-toggle .bi {
	font-size: 1.1rem;
}

.checklist-item-input {
	border-radius: 0.8rem;
}

.checklist-item-tools {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.checklist-drag-handle {
	width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.checklist-item.dragging {
	opacity: 0.55;
}

.checklist-item.drag-over {
	border-color: rgba(79, 131, 255, 0.55);
	background: rgba(79, 131, 255, 0.12);
}

.checklist-only-option[hidden] {
	display: none !important;
}

.drawing-panel-wrapper {
	margin-top: 1rem;
}

.drawing-panel {
	padding: 1rem;
	border-radius: 1.1rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.drawing-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.8rem;
}

.drawing-color {
	width: 2.8rem;
	height: 2.4rem;
	padding: 0.15rem;
}

.drawing-width {
	width: min(12rem, 100%);
	max-width: 12rem;
}

.drawing-canvas-wrap {
	width: 100%;
	height: 320px;
	border-radius: 1rem;
	overflow: hidden;
	background: #f8fbff;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.drawing-canvas {
	width: 100%;
	height: 100%;
	display: block;
	touch-action: none;
	background: #f8fbff;
}

.photo-upload-form[hidden],
.audio-upload-form[hidden],
.file-upload-form[hidden],
.photo-gallery-wrapper[hidden] {
	display: none !important;
}

.photo-upload-panel,
.photo-gallery-panel {
	padding: 1rem;
	border-radius: 1.1rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.photo-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.9rem;
}

.photo-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	padding: 0.75rem;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.photo-card.dragging {
	opacity: 0.6;
}

.photo-card.drag-over {
	border-color: rgba(79, 131, 255, 0.55);
	background: rgba(79, 131, 255, 0.12);
}

.photo-drag-handle {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	width: 2.1rem;
	height: 2.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: rgba(10, 18, 40, 0.65);
	color: var(--notes-text);
	z-index: 2;
}

.photo-thumb {
	display: block;
	overflow: hidden;
	border-radius: 0.9rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.06);
	aspect-ratio: 1 / 1;
}

.photo-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.photo-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.photo-card-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.file-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 0.9rem;
}

.file-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	padding: 0.75rem;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.file-card.dragging {
	opacity: 0.6;
}

.file-card.drag-over {
	border-color: rgba(79, 131, 255, 0.55);
	background: rgba(79, 131, 255, 0.12);
}

.file-thumb {
	display: grid;
	place-items: center;
	gap: 0.45rem;
	padding: 1rem;
	min-height: 8rem;
	border-radius: 0.9rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.06);
	color: var(--notes-text);
	text-align: center;
}

.file-thumb:hover {
	color: #fff;
	background: rgba(79, 131, 255, 0.14);
}

.file-thumb-icon {
	width: 3rem;
	height: 3rem;
	border-radius: 1rem;
	display: grid;
	place-items: center;
	background: rgba(79, 131, 255, 0.16);
	color: var(--notes-accent);
	font-size: 1.35rem;
}

.file-thumb-label {
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.file-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.file-card-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.photo-caption-input {
	border-radius: 0.85rem;
}

.audio-player-wrap audio {
	width: 100%;
	display: block;
}

.revision-panel {
	margin-top: 1rem;
	padding: 1rem;
	border-radius: 1.1rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.revision-list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.revision-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.9rem;
	padding: 0.85rem;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.revision-item-main {
	min-width: 0;
	flex: 1;
}

.revision-item-title {
	font-weight: 700;
	color: var(--notes-text);
}

.revision-item-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin-top: 0.2rem;
	font-size: 0.82rem;
	color: var(--notes-muted);
}

.revision-item-preview {
	margin-top: 0.35rem;
	font-size: 0.88rem;
	color: #cad5e8;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.revision-empty {
	padding: 1.25rem 1rem;
}

.editor-meta-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
}

.editor-action-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
}

.note-flag-btn {
	width: 2.45rem;
	height: 2.45rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-radius: 999px;
}

.note-flag-btn .bi {
	font-size: 1rem;
	line-height: 1;
}

.note-flag-btn:focus,
.note-flag-btn:active {
	box-shadow: 0 0 0 0.18rem rgba(118, 169, 255, 0.18);
}

.empty-state {
	padding: 2rem 1rem;
	text-align: center;
	color: var(--notes-muted);
}

.empty-state-icon {
	width: 4rem;
	height: 4rem;
	border-radius: 1.2rem;
	display: grid;
	place-items: center;
	margin: 0 auto 1rem;
	background: rgba(79, 131, 255, 0.15);
	color: var(--notes-accent);
	font-size: 1.4rem;
}

.empty-state-title {
	color: var(--notes-text);
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 0.25rem;
}

.empty-state-text {
	max-width: 28rem;
	margin: 0 auto;
}

.folder-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.folder-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem 0.95rem;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.folder-row-name {
	font-weight: 600;
	color: var(--notes-text);
}

.folder-dot {
	width: 0.65rem;
	height: 0.65rem;
	border-radius: 999px;
	flex: 0 0 0.65rem;
}

.folder-form .form-control,
.folder-form .form-select {
	border-radius: 0.95rem;
}

.auth-shell {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 1.5rem;
}

.auth-card {
	width: min(100%, 460px);
	padding: 1.75rem;
	border-radius: 1.5rem;
	background: rgba(10, 18, 33, 0.92);
	border: 1px solid var(--notes-panel-border);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.auth-brand {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.auth-mark {
	width: 3.15rem;
	height: 3.15rem;
	border-radius: 1rem;
	display: grid;
	place-items: center;
	color: #fff;
	background: linear-gradient(135deg, var(--notes-accent-strong), #28d3a0);
	overflow: hidden;
}

.brand-logo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.auth-title {
	font-size: 1.3rem;
	font-weight: 800;
}

.auth-subtitle {
	color: var(--notes-muted);
}

.auth-google-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border-radius: 999px;
	font-weight: 700;
}

.auth-footer {
	color: var(--notes-muted);
}

.icon-btn,
.home-btn {
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--notes-text);
	background: rgba(255, 255, 255, 0.03);
}

.home-logo {
	width: 1.65rem;
	height: 1.65rem;
	object-fit: contain;
	display: block;
}

.icon-btn:hover,
.home-btn:hover {
	color: #fff;
	background: rgba(79, 131, 255, 0.18);
}

.user-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.28rem 0.7rem 0.28rem 0.35rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.92rem;
}

.user-avatar {
	width: 1.8rem;
	height: 1.8rem;
	border-radius: 999px;
	object-fit: cover;
}

.user-avatar-fallback {
	display: grid;
	place-items: center;
	background: rgba(79, 131, 255, 0.22);
	font-size: 0.8rem;
	font-weight: 700;
}

.app-flash {
	border-radius: 1rem;
}

.fab-create {
	position: fixed;
	right: 1.15rem;
	bottom: 1.15rem;
	width: 3.35rem;
	height: 3.35rem;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--notes-success), #23a76f);
	color: #fff;
	display: grid;
	place-items: center;
	box-shadow: 0 16px 35px rgba(52, 195, 143, 0.35);
	z-index: 1040;
	font-size: 1.3rem;
}

.sidebar-offcanvas {
	background: rgba(5, 11, 22, 0.97);
	color: var(--notes-text);
}

.sidebar-offcanvas .offcanvas-header {
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 991.98px) {
	.app-shell {
		min-height: calc(100vh - 64px);
	}
}
