* { box-sizing: border-box; }
html, body {
	margin: 0;
	height: 100%;
	background: #0f1115;
	color: #e6e8eb;
	font: 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body { display: flex; flex-direction: column; }

/* Tab strip */
#tabstrip {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 8px 0;
	background: #121620;
	flex: 0 0 auto;
}
#tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
#tabs::-webkit-scrollbar { display: none; }
.tab {
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: 200px;
	min-width: 110px;
	padding: 7px 8px 7px 12px;
	border-radius: 9px 9px 0 0;
	background: #1a1e28;
	color: #aeb6c2;
	cursor: pointer;
	user-select: none;
	font-size: 13px;
}
.tab.active { background: #171a21; color: #fff; }
.tab-title { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-close {
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	color: inherit;
	opacity: 0.6;
	font-size: 15px;
	line-height: 1;
	border-radius: 5px;
	width: 18px;
	height: 18px;
	cursor: pointer;
}
.tab-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }
#newtab {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 7px;
	background: #1a1e28;
	color: #cbd2dc;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
#newtab:hover { background: #232838; }

/* Toolbar */
#bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
	background: #171a21;
	border-bottom: 1px solid #262b34;
	flex: 0 0 auto;
}
.nav {
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 7px;
	background: #232833;
	color: #cbd2dc;
	font-size: 15px;
	cursor: pointer;
}
.nav:hover:not(:disabled) { background: #2c323e; }
.nav:disabled { opacity: 0.35; cursor: default; }

#form { flex: 1 1 auto; }
#address {
	width: 100%;
	height: 30px;
	padding: 0 12px;
	border: 1px solid #2b313c;
	border-radius: 8px;
	background: #0c0e13;
	color: #e6e8eb;
	outline: none;
}
#address:focus { border-color: #3b82f6; }

/* Stage + frames */
#stage { position: relative; flex: 1 1 auto; min-height: 0; }
.view {
	display: none;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #fff;
}

#home {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}
.home-inner { max-width: 460px; padding: 24px; }
.home-inner h1 { font-size: 22px; margin: 0 0 6px; }
.home-inner p { color: #9aa3b0; margin: 0 0 18px; }
#shortcuts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
#shortcuts button {
	border: 1px solid #2b313c;
	background: #1a1e26;
	color: #d7dce3;
	padding: 8px 14px;
	border-radius: 8px;
	cursor: pointer;
}
#shortcuts button:hover { background: #232a35; border-color: #3b82f6; }
#err { color: #f87171; margin-top: 14px; min-height: 18px; }
