/* VARIABLES */
:root {
  --background-color: #ffffff;
  --foreground-color: #ffffff;
  --hover-color: #f5f5f5;
  --surface-color: #f5f5f5;
  --text-color: #1a1a1a;
  --accent-color: #000000;
  --header-color: #1B3A8C;
  --line: #e2e2e2;
  --muted: #6b6b6b;
  --danger: #b42318;
  --danger-hover: #fdf2f1;
  --qr-size: 64
}

/* MEDIA SPECIFIC SIZING */
@media (min-width: 1440px) {
	html {
		font-size: 18px;
	}
}

@media (min-width: 1920px) {
	html {
		font-size: 20px;
	}
}

@media (min-width: 2560px) {
	html {
		font-size: 22px;
	}
}

/* GLOBAL */
h1, h2, h3, nav, button, label, body {
	font-family: 'Fira Code', monospace;
}

html, body {
	margin: 0;
	height: 100%;
}

body {
	background-color: var(--background-color);
	color: var(--text-color);
}


/* CONTAINERS */
.settings-container {
	margin-left: 20%;
	margin-right: 20%;
	margin-top: 5%;
	border: 2px solid var(--accent-color);
	background-color: var(--foreground-color);
	height: 50vh;
	padding: 5%;
}

/* ── Settings page ───────────────────────────────────────────── */
.settings-page {
	margin-top: 5vh;
	padding: 2rem 1.5rem;
	max-width: 720px;
	margin-inline: auto;
	font-size: 15px;
	line-height: 1.5;
	color: var(--text-color);
}

.settings-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--line);
}

.settings-head h1 {
	margin: 0;
	font-size: 1.6rem;
}

.settings-body {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.settings-card {
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 1.25rem;
	background: var(--foreground-color);
}

.settings-card__title {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 600;
}

.settings-card__hint {
	margin: -0.5rem 0 1rem;
	font-size: .85rem;
	color: var(--muted);
}

/* Color rows */
.color-rows {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.color-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .6rem 0;
	border-bottom: 1px solid var(--line);
}

.color-row:last-child {
	border-bottom: none;
}

.color-row__label {
	font-size: .9rem;
}

.color-row__right {
	display: flex;
	align-items: center;
	gap: .75rem;
}

.color-row__right input[type="color"] {
	width: 2rem;
	height: 2rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 2px;
	cursor: pointer;
	background: none;
}

.color-row__hex {
	font-size: .8rem;
	color: var(--muted);
	font-family: 'Fira Code', monospace;
	min-width: 5ch;
	text-align: right;
}

/* Preset palettes */
.preset-list {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.preset-palette {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .4rem;
	padding: .5rem;
	background: none;
	border: 1px solid var(--line);
	border-radius: 6px;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
	width: auto;
}

.preset-palette:hover {
	border-color: #999;
	box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.preset-palette .preset-swatch {
	width: 20px;
	height: 20px;
	border-radius: 3px;
	pointer-events: none;
}

.preset-label {
	font-size: .75rem;
	color: var(--muted);
	font-family: 'Fira Code', monospace;
	pointer-events: none;
}

.documents-container {
	margin-top: 5vh;
	padding: 2rem 1.5rem;
	font-size: 15px;
	line-height: 1.5;
	color: var(--text-color);
	max-width: 1080px;
	margin-inline: auto;
}

.documents-page-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--line);
}

.documents-container h1 {
	margin: 0;
	font-size: 1.6rem;
}


.documents-card {
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 1.25rem;
	background: var(--foreground-color);
}

.documents-list {
	width: 100%;
	border-collapse: collapse;
}

.documents-list th,
.documents-list td {
	text-align: left;
	padding: .6rem .75rem;
	border-bottom: 1px solid var(--line);
	white-space: nowrap;
	vertical-align: middle;
}

.documents-list th {
	font-weight: 600;
}

.documents-list th[data-sort] {
	cursor: pointer;
	user-select: none;
}

.documents-list th[data-sort]:hover {
	background: var(--hover-color);
}

.document-forms-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
}

.document-table-wrapper {
    overflow-x: auto;
    flex: 1;
}

.documents-container .muted {
	color: var(--muted);
	margin: 0;
}

.documents-container .sort-ind {
	color: var(--muted);
	font-size: .8em;
	margin-left: .3em;
}

.documents-container tbody tr:last-child td {
	border-bottom: none;
}

.documents-container .doc-name {
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 270px;
}

.documents-container .doc-id {
	color: var(--muted);
	font-size: .8rem;
}

.documents-container .modal-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .4);
	z-index: 99;
}

.documents-container .modal {
	display: none;
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 420px;
	padding: 1.5rem;
	background: var(--foreground-color);
	color: var(--text-color);
	border: 1px solid var(--line);
	border-radius: 6px;
	z-index: 100;
}

.documents-container .modal h2 {
	font-size: 1rem;
	margin: 0 0 1rem;
}

.documents-container .modal.open,
.modal-backdrop.open {
	display: block;
}

documents-container .modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	background: red;
	color: #fff;
	border: none;
	cursor: pointer;
}

.documents-container .field {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	margin-bottom: 1rem;
}

.documents-container .field label {
	color: var(--muted);
}

.documents-container input {
	font: inherit;
	width: 100%;
	padding: .5rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--background-color);
	color: var(--text-color);
}

/* HEADER */
.header-container {
	position: fixed;
	top: 0;
	z-index: 50;
	width: 100%;
	height: 5vh;
	background-color: var(--header-color);
	display: flex;
	align-items: center;
}

.header-container button {
	width: 10em;
}

.header-logo {
	vertical-align: center;
	padding: 20px;
}

/* ENTRY PAGES */
.auth-page {
	min-height: 100vh;
	background: var(--background-color);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

.auth-banner {
	margin-bottom: 1.5rem;
	max-width: 320px;
	width: 100%;
}

.auth-banner img {
	width: 100%;
	height: auto;
	display: block;
}

.auth-card {
	background: var(--foreground-color);
	color: var(--text-color);
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0,0,0,.08);
	padding: 2rem;
	width: 100%;
	max-width: 360px;
}

.auth-card h1 {
	margin: 0 0 1.5rem;
	font-size: 1.2rem;
	text-align: center;
}

.auth-field {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	margin-bottom: 1rem;
}

.auth-field label {
	font-size: .85rem;
	color: var(--muted);
}

.auth-field input {
	font: inherit;
	padding: .5rem .6rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	width: 100%;
	box-sizing: border-box;
	background: var(--background-color);
	color: var(--text-color);
}

.auth-field input:focus {
	outline: 2px solid lightblue;
	outline-offset: 1px;
}

.auth-check-row {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin-bottom: 1rem;
	font-size: .85rem;
	color: var(--muted);
}

.auth-submit {
	width: 100%;
	margin-top: .5rem;
}

.auth-error {
	display: none;
	margin-top: .75rem;
	padding: .5rem .75rem;
	background: #fdf2f1;
	border: 1px solid var(--danger);
	border-radius: 4px;
	color: var(--danger);
	font-size: .85rem;
	text-align: center;
}

.auth-success {
	display: none;
	margin-top: .75rem;
	padding: .5rem .75rem;
	background: #d4edda;
	border: 1px solid #2d6a4f;
	border-radius: 4px;
	color: #2d6a4f;
	font-size: .85rem;
	text-align: center;
}

.auth-switch {
	margin-top: 1.25rem;
	text-align: center;
	font-size: .85rem;
	color: var(--muted);
}

.auth-switch button {
	background: none;
	border: none;
	padding: 0;
	color: var(--header-color);
	cursor: pointer;
	font: inherit;
	font-size: .85rem;
	text-decoration: underline;
	width: auto;
}

/* HOME PAGE COMPONENTS */
.home-container {
	display: flex;
	justify-content: center;
	height: 95vh;
	width: 100vw;
	overflow: auto;
}

/* DASHBOARD COMPONENTS */
.dashboard-create-project-button {
	width: 100%;
	margin: 0;
}

.dashboard-create-project-menu {
	position: absolute;
	display: none;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 50vw;
	max-width: 400px;
	box-sizing: border-box;
	padding: 1.5em;
	background: var(--foreground-color);
	color: var(--text-color);
	border: 1px solid var(--line);
	z-index: 100;
}

.dashboard-create-project-menu h1 {
	font-size: 1.1rem;
	margin: 0 0 1.5rem;
}

.dashboard-create-project-menu__close:hover {
	background: var(--hover-color);
	color: var(--text-color);
}

.dashboard-create-project-menu button[type="submit"] {
	font: inherit;
	padding: .5rem .75rem;
	background: lightblue;
	border: 1px solid #9cc7dd;
	border-radius: 4px;
	cursor: pointer;
	align-self: flex-start;
}

.dashboard-create-project-menu button[type="submit"]:hover {
	background: #a7d4e8;
}

.dashboard-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .25);
	z-index: 99;
}

.dashboard-backdrop.open {
	display: block;
}

.dashboard-empty {
	grid-column: 1 / -1;
	padding: 3rem;
	text-align: center;
	color: var(--muted);
	border: 1px dashed var(--line);
	border-radius: 6px;
	font-size: .95rem;
}

.dashboard-create-project-menu form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.dashboard-create-project-menu label {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	font-size: .85rem;
	color: var(--muted);
}

.dashboard-create-project-menu input,
.dashboard-create-project-menu textarea {
	font: inherit;
	width: 100%;
	padding: .5rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--background-color);
	color: var(--text-color);
	resize: vertical;
}

.dashboard-create-project-menu input:focus,
.dashboard-create-project-menu textarea:focus {
	outline: 2px solid lightblue;
	outline-offset: 1px;
}

.dashboard-create-project-menu__close {
	position: absolute;
	top: 0.5em;
	right: 0.5em;
	width: 1.5em;
	height: 1.5em;
	padding: 0;
	background: red;
	color: white;
	border: none;
	cursor: pointer;
}

.dashboard-container {
	width: 100%;
	max-width: 960px;
	margin-top: 5em;
	font-size: 15px;
	line-height: 1.5;
	color: var(--text-color);
	background: var(--background-color);
}

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

.dashboard-head h1 {
	font-size: 1.6rem;
	margin: 0;
}

.dashboard-project-list-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}

.dashboard-project-paper {
	border: 1px solid var(--line);
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow .15s, border-color .15s;
	display: flex;
	flex-direction: column;
}

.dashboard-project-paper:hover {
	border-color: #b0b0b0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
}

.dashboard-project-paper__img-wrap {
	width: 100%;
	height: 120px;
	background: var(--surface-color);
	overflow: hidden;
	flex-shrink: 0;
}

.dashboard-project-paper__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dashboard-project-paper__body {
	padding: .75rem 1rem;
}

.dashboard-project-paper__name {
	display: block;
	font-weight: 600;
	font-size: .95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dashboard-project-paper__desc {
	display: block;
	font-size: .8rem;
	color: var(--muted);
	margin-top: .2rem;
	/* clamp to 2 lines */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* PROJECT COMPONENTS */
.project-container {
	margin-top: 5vh;
	padding: 2rem 1.5rem;
	font-size: 15px;
	line-height: 1.5;
	color: var(--text-color);
	max-width: 920px;
	margin-inline: auto;
}

.project-muted {
	color: var(--muted);
	margin: 0;
}

.project-page-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--line);
}

.project-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

.project-span {
	grid-column: 1 / -1;
}

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

.project-card {
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 1.25rem;
	background: var(--foreground-color);
}

.project-container input, textarea {
	font: inherit;
	width: 100%;
	padding: .5rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--background-color);
	color: var(--text-color);
}

.project-container table {
	width: 100%;
	border-collapse: collapse;
}

.project-container th, td {
	text-align: left;
	padding: .6rem .75rem;
	border-bottom: 1px solid var(--line);
	white-space: nowrap;
	vertical-align: middle;
}

.project-container th {
	font-weight: 600;
}

.project-container [data-sort] {
	cursor: pointer;
	user-select: none;
}

.project-container th[data-sort]:hover {
	background: var(--hover-color);
}

.project-container .sort-ind {
	color: var(--muted);
	font-size: .8em;
	margin-left: .3em;
}

.project-container tbody tr:last-child td {
	border-bottom: none;
}

.project-container .doc-name {
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 270px;
}

.project-container .doc-id {
	color: var(--muted);
	font-size: .8rem;
}

.project-field {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	margin-bottom: 1rem;
}

.project-field label {
	color: var(--muted);
}

.project-card dd {
	margin: 0;
}

.project-card dt {
	color: var(--muted)
}

.project-card dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .5rem 1.5rem;
	margin: 0;
}

.project-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.project-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	padding: .75rem 0;
	border-top: 1px solid var(--line);
}

.project-list li:first-child {
	border-top: none;
}

.project-card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.project-card-head h2 {
	margin: 0;
}

.project-back-button {
	display: inline-block;
	margin-bottom: 1rem;
	padding: .4rem .7rem;
	background: lightblue;
	color: var(--text-color);
	text-decoration: none;
	border-radius: 4px;
}

.project-item-name {
	font-weight: 500;
}

.project-item-meta {
	color: var(--muted);
	font-size: .85rem;
}

.btn {
	font: inherit;
	padding: .4rem .7rem;
	background: var(--foreground-color);
	color: var(--text-color);
	border: 1px solid var(--line);
	border-radius: 4px;
	cursor: pointer;
}

.btn-primary {
	background: lightblue;
	border-color: #9cc7dd;
}

.btn-primary:hover {
	background: #a7d4e8;
}

btn:hover {
	background: var(--hover-color);
}

.btn-danger {
	color: var(--danger);
	border-color: #e7c3bf;
}

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


/* NOTIFICATION */
.notification-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 99;
}

.notification {
	z-index: 100;
	display: none;
	justify-content: center;
	align-items: center;
	position: absolute;
	left: 50vw;
	top: 50vh;
	transform: translate(-10em, -2.5em);
	width: 20em;
	height: 5em;
}

.notification.success {
	background-color: lightgreen;
	border: 3px solid green;
	color: darkgreen;
}

.notification.error {
	background-color: lightsalmon;
	border: 3px solid red;
	color: firebrick;
}

.notification.pending {
	background-color: lightblue;
	border: 3px solid blue;
	color: darkblue;
}

.document-create-button {
	width: 100%;
	margin: 0;
}

.document-create-menu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: var(--foreground-color);
    color: var(--text-color);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.5rem;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
}

#document-create-form {
	display: flex;
	flex-direction: column;
	gap: 1em;
}

#document-create-form label {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

#document-create-form input,
#document-create-form textarea {
	width: 100%;
	box-sizing: border-box;
}

.document-create-menu__close {
	position: absolute;
	top: 0.5em;
	right: 0.5em;
	width: 1.5em;
	height: 1.5em;
	padding: 0;
	background: red;
	color: white;
	border: none;
	cursor: pointer;
}

.back-button {
	display: inline-block;
	margin-bottom: 1rem;
	padding: .4rem .7rem;
	font: inherit;
	background: lightblue;
	color: var(--text-color);
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.tags-cell {
	white-space: normal;
}

.tag {
	display: inline-block;
	padding: .1rem .5rem;
	margin: .1rem;
	background: #eef4f8;
	border: 1px solid #d7e3ec;
	border-radius: 999px;
	font-size: .8rem;
	color: #2c5063;
	cursor: pointer;
}

.tag-field {
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--foreground-color);
}

.tag-input-row {
	display: flex;
	align-items: center;
	border-bottom: 1px solid var(--line);
}

.tag-input-row input {
	flex: 1;
	border: none;
	outline: none;
	border-radius: 4px 0 0 0;
	background: var(--foreground-color);
	color: var(--text-color);
}

.tag-input-row button {
	flex-shrink: 0;
	padding: 0 .6rem;
	height: 100%;
	background: none;
	border: none;
	border-left: 1px solid var(--line);
	cursor: pointer;
	font-size: 1.1rem;
	color: var(--muted);
	line-height: 1;
}

.tag-input-row button:hover {
	color: var(--text-color);
	background: var(--hover-color);
}

.tag-list {
	padding: .4rem;
	max-height: 120px;
	overflow-y: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.selected-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: .4rem;
	border-bottom: 1px solid var(--line);
	min-height: 2rem;
}

.tag.selected {
	opacity: 0.5;
	cursor: pointer;
}

.tag.active {
	cursor: pointer;
	outline: 2px solid #555;
	outline-offset: 1px;
}

.tag-manager-head {
	display: flex;
	align-items: center;
	margin-bottom: .75rem;
}

.tag-manager-head h2 {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
}

.tag-manager-list {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	min-height: 2rem;
}

.tag-manager-empty {
	color: var(--muted);
	font-size: .85rem;
}

.tag-deletable {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .15rem .4rem .15rem .55rem;
}

.tag-delete-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1rem;
	height: 1rem;
	padding: 0;
	background: rgba(0,0,0,.2);
	border: none;
	border-radius: 50%;
	color: white;
	font-size: .75rem;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}

.tag-delete-btn:hover {
	background: rgba(0,0,0,.45);
}

.color-input-wrap {
	width: 2rem;
	flex-shrink: 0;
}

input.color-input {
	width: 100%;
	height: 2rem;
	padding: 0;
	cursor: pointer;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: .6rem 1rem;
    border-radius: 4px;
    font: 14px/1.4 system-ui, sans-serif;
    color: #fff;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,.1);
    z-index: 999;
    opacity: 0;
    transform: translateY(.5rem);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}

.toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.toast--success { background: #1a6e3c; }
.toast--error   { background: var(--danger); }
.toast--info    { background: #1a1a1a; }

.project-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: .35rem;
}

.project-list-empty {
    list-style: none;
    color: var(--muted);
    padding: .5rem 0;
}

.options {
	display: flex;
	gap: .35rem;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .35rem;
	background: var(--foreground-color);
	border: 1px solid var(--line);
	border-radius: 4px;
	color: var(--text-color);
	cursor: pointer;
}

.icon-btn:hover {
	background: var(--hover-color);
}

.icon-btn.danger {
	color: var(--danger);
	border-color: #e7c3bf;
}

.icon-btn.danger:hover {
	background: #fdf2f1;
}

.icon-btn:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
}

.icon-btn svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Export Page */

.export-page-container {
	margin-top: 5vh;
	padding: 2rem 1.5rem;
	font-size: 15px;
	line-height: 1.5;
	color: var(--text-color);
	max-width: 1200px;
	margin-inline: auto;
}


.export-back-button {
	display: inline-block;
	padding: .4rem .7rem;
	font: inherit;
	background: lightblue;
	color: var(--text-color);
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.export-page-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	border-bottom: 1px solid var(--line);
}

.export-tag {
	display: inline-block;
	padding: .1rem .5rem;
	margin: .1rem;
	background: #eef4f8;
	border: 1px solid #d7e3ec;
	border-radius: 999px;
	font-size: .8rem;
	color: #2c5063;
}

.export-editor {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
}

.export-qr-menu {
	position: sticky;
	top: 1rem;
	align-self: flex-start;
	width: 250px;
	flex-shrink: 0;
	max-height: calc(100vh - 2rem);
	overflow: auto;
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 1rem;
	background: var(--foreground-color);
}

.export-qr-list {
	display: flex;
	flex-direction: column;
	gap: .6rem;
}

.export-qr-card {
	display: flex;
	gap: .6rem;
	align-items: flex-start;
	padding: .6rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--foreground-color);
	color: var(--text-color);
	cursor: grab;
}

.export-sheet-area {
	flex: 1;
	display: flex;
	justify-content: center;
	background: var(--surface-color);
	padding: 1.5rem;
	border-radius: 6px;
}

.export-sheet {
	position: relative;
	width: 8.5in;
	height: 11in;
	background: #ffffff;
	box-shadow: 0 1px 6px rgba(0, 0, 0, .15);
}

.menu-section h2 {
	margin: 0 0 .6rem;
	font-size: 1rem;
}

.menu-section+.menu-section {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
}

.check-row {
	display: flex;
	align-items: center;
	gap: .4rem;
	margin-bottom: .6rem;
}

.grid-dims {
	display: flex;
	gap: .75rem;
}

.grid-dims label {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	font-size: .85rem;
	color: var(--muted);
}

.grid-dims input {
	width: 4rem;
	padding: .3rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	font: inherit;
}

.qr-card:active {
	cursor: grabbing;
}

.size-options {
	display: flex;
	gap: .4rem;
}

.size-btn {
	flex: 1;
	padding: .4rem 0;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #fff;
	color: var(--muted);
	font: inherit;
	font-size: .8rem;
	cursor: pointer;
}

.size-btn:hover {
	border-color: var(--muted);
}

.size-btn[aria-pressed="true"] {
	background: var(--muted);
	border-color: var(--muted);
	color: #fff;
}

.qr-thumb {
	width: 96px;
	height: 96px;
	flex-shrink: 0;
}

.qr-meta {
	min-width: 0;
}

.qr-doc {
	font-weight: 500;
}

.qr-tags {
	margin: .2rem 0;
}

.qr-date {
	color: var(--muted);
	font-size: .8rem;
}



.grid-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	display: none;
}

.sheet-hint {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	pointer-events: none;
}

.placed-qr {
	position: absolute;
	width: var(--qr-size);
	height: var(--qr-size);
	cursor: move;
	touch-action: none;
}

.placed-qr img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
}

.placed-qr.dragging {
	opacity: .85;
}

.placed-qr__remove {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 18px;
	height: 18px;
	padding: 0;
	line-height: 1;
	border: none;
	border-radius: 50%;
	background: var(--danger);
	color: #fff;
	cursor: pointer;
	display: none;
}

.placed-qr:hover .placed-qr__remove {
	display: block;
}

.sheet-title {
	position: absolute;
	top: 24px;
	left: 24px;
	right: 24px;
	z-index: 2;
	text-align: center;
	font-size: 1.4rem;
	font-weight: 600;
	outline: none;
	cursor: text;
}

.sheet-title:empty::before {
	content: attr(data-placeholder);
	color: var(--muted);
	font-weight: 400;
}

.placed-qr__label {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	width: max-content;
	max-width: 140px;
	margin-top: 4px;
	padding: 1px 2px;
	font-size: 11px;
	line-height: 1.2;
	text-align: center;
	color: #111;
	outline: none;
	cursor: text;
}

.placed-qr__label:empty::before {
	content: attr(data-placeholder);
	color: var(--muted);
}



