* {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

html, body {
	margin: 0;
	width: 100%;
	height: 100%;
	background: #020617;
	color: white;
	font-family: Arial, sans-serif;
	overflow: hidden;
}

body {
	padding-top: env(safe-area-inset-top);
	padding-bottom: env(safe-area-inset-bottom);
	padding-left: env(safe-area-inset-left);
	padding-right: env(safe-area-inset-right);
}

button, input, textarea, select {
	font-family: inherit;
	font-size: 16px;
}

.screen {
	display: none;
	width: 100%;
	height: 100dvh;
}

.screen.active {
	display: flex;
}

#lockScreen {
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: radial-gradient(circle at top, #1e293b, #020617 60%);
}

.lockBox {
	width: 100%;
	max-width: 420px;
	background: rgba(15, 23, 42, 0.92);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 24px;
	padding: 22px;
	box-shadow: 0 20px 70px rgba(0,0,0,0.45);
}

.lockBox h1 {
	margin: 0 0 8px;
	font-size: 31px;
}

.lockBox p {
	color: #94a3b8;
}

.small {
	font-size: 13px;
	line-height: 1.4;
}

input, textarea, select {
	width: 100%;
	border: 1px solid rgba(255,255,255,0.12);
	background: #020617;
	color: white;
	border-radius: 14px;
	padding: 14px;
	outline: none;
}

textarea {
	min-height: 120px;
	resize: none;
}

button, .bottomActions label {
	border: 0;
	border-radius: 14px;
	background: #334155;
	color: white;
	padding: 14px;
	font-weight: 700;
	text-align: center;
}

button:active, .bottomActions label:active {
	transform: scale(0.98);
}

#unlockBtn {
	width: 100%;
	margin-top: 12px;
	background: #2563eb;
}

#appScreen {
	flex-direction: column;
	background: linear-gradient(180deg, #0f172a, #020617);
}

header {
	height: 74px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: rgba(2, 6, 23, 0.82);
	border-bottom: 1px solid rgba(255,255,255,0.08);
}

header h1 {
	margin: 0;
	font-size: 28px;
}

header p {
	margin: 3px 0 0;
	color: #94a3b8;
	font-size: 13px;
}

#lockBtn {
	padding: 11px 14px;
	background: #1e293b;
}

.searchRow {
	display: grid;
	grid-template-columns: 1fr 52px;
	gap: 10px;
	padding: 12px;
}

#addBtn {
	font-size: 28px;
	line-height: 0;
	background: #2563eb;
}

nav {
	display: flex;
	gap: 8px;
	padding: 0 12px 12px;
	overflow-x: auto;
}

.filter {
	flex: 1;
	background: #1e293b;
	color: #cbd5e1;
}

.filter.active {
	background: #475569;
	color: white;
}

main {
	flex: 1;
	overflow-y: auto;
	padding: 0 12px 12px;
}

.item {
	background: rgba(30, 41, 59, 0.82);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 18px;
	padding: 15px;
	margin-bottom: 12px;
	box-shadow: 0 10px 26px rgba(0,0,0,0.22);
}

.itemTop {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.item h2 {
	margin: 0;
	font-size: 18px;
}

.badge {
	color: #cbd5e1;
	background: #0f172a;
	border-radius: 999px;
	padding: 6px 9px;
	font-size: 12px;
}

.item p {
	color: #cbd5e1;
	margin: 9px 0 0;
	overflow-wrap: anywhere;
}

.itemActions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 12px;
}

.itemActions button {
	padding: 11px;
	background: #0f172a;
}

.bottomActions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 12px;
	border-top: 1px solid rgba(255,255,255,0.08);
	background: rgba(2, 6, 23, 0.86);
}

#importFile {
	display: none;
}

.modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.72);
	padding: 14px;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.modal.active {
	display: flex;
}

.modalBox {
	width: 100%;
	max-width: 520px;
	max-height: 92dvh;
	overflow-y: auto;
	background: #0f172a;
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 22px;
	padding: 16px;
}

.modalBox h2 {
	margin: 0 0 12px;
}

label {
	display: block;
	margin: 13px 0 7px;
	color: #cbd5e1;
	font-size: 14px;
}

.modalActions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 9px;
	margin-top: 14px;
}

.danger {
	background: #7f1d1d;
}

.empty {
	text-align: center;
	color: #94a3b8;
	padding: 34px 15px;
}
