/* ============================================================
   ForgeOS — per-app styles
   Add styles for new apps at the bottom of this file.
   ============================================================ */

/* ---------- Terminal ---------- */

.term {
	display: flex;
	flex-direction: column;
	height: 100%;
	font-family: var(--font-mono);
	font-size: 13px;
	line-height: 1.55;
	background: #0a0d12;
	cursor: text;
}

.term-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 12px 14px 4px;
	scrollbar-width: thin;
	scrollbar-color: var(--line) transparent;
}

.term-line {
	white-space: pre-wrap;
	word-break: break-word;
	color: var(--text);
}

.term-line.dim {
	color: var(--text-dim);
}

.term-line.ember {
	color: var(--ember-soft);
}

.term-line.ok {
	color: var(--ok);
}

.term-line.err {
	color: var(--err);
}

.term-line.info {
	color: var(--info);
}

.term-input-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 14px 12px;
}

.term-prompt {
	color: var(--ember);
	white-space: nowrap;
	user-select: none;
}

.term-prompt.forge-mode {
	color: var(--ember-soft);
}

.term-input {
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 13px;
	caret-color: var(--ember);
}

/* ---------- Files ---------- */

.files {
	display: flex;
	height: 100%;
	font-size: 13px;
}

.files-tree {
	width: 180px;
	flex-shrink: 0;
	border-right: 1px solid var(--line-soft);
	padding: 10px 6px;
	overflow-y: auto;
}

.files-entry {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 6px 9px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--text);
	font-size: 12.5px;
	font-family: var(--font-mono);
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.files-entry:hover {
	background: rgba(255, 255, 255, 0.05);
}

.files-entry.selected {
	background: rgba(255, 122, 31, 0.14);
	color: var(--ember-soft);
}

.files-entry .glyph {
	color: var(--ember);
	flex-shrink: 0;
}

.files-entry.dir .glyph {
	color: var(--ember-soft);
}

.files-view {
	flex: 1;
	min-width: 0;
	padding: 14px 16px;
	overflow: auto;
	font-family: var(--font-mono);
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--text-dim);
	white-space: pre-wrap;
}

.files-view .placeholder {
	color: var(--text-dim);
	opacity: 0.6;
	font-family: var(--font-ui);
}

/* ---------- iframe apps (Magellan, Chess) ---------- */

.iframe-app {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.iframe-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 10px;
	border-bottom: 1px solid var(--line-soft);
	background: var(--steel);
	font-size: 11.5px;
	color: var(--text-dim);
}

.iframe-bar .url {
	flex: 1;
	font-family: var(--font-mono);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.iframe-bar a {
	color: var(--ember-soft);
	text-decoration: none;
	white-space: nowrap;
}

.iframe-bar a:hover {
	text-decoration: underline;
}

.iframe-app .frame-wrap {
	flex: 1;
	min-height: 0;
}

/* ---------- About ---------- */

.about {
	padding: 26px 28px;
	max-width: 560px;
}

.about h1 {
	font-family: var(--font-display);
	font-size: 26px;
	letter-spacing: 0.1em;
	margin: 0 0 4px;
}

.about h1 span {
	color: var(--ember);
}

.about .version {
	font-family: var(--font-mono);
	font-size: 11.5px;
	color: var(--text-dim);
	margin-bottom: 18px;
}

.about p {
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--text-dim);
	margin: 0 0 12px;
}

.about strong {
	color: var(--text);
}

.about a {
	color: var(--ember-soft);
}

.about .hint {
	margin-top: 18px;
	padding: 10px 12px;
	border: 1px dashed var(--line);
	border-radius: 7px;
	font-family: var(--font-mono);
	font-size: 11.5px;
	color: var(--text-dim);
}

.about .hint code {
	color: var(--ember-soft);
}

/* ---------- Vault ---------- */

.vault {
	display: grid;
	place-items: center;
	height: 100%;
	padding: 24px;
	text-align: center;
}

.vault-inner h2 {
	font-family: var(--font-display);
	letter-spacing: 0.12em;
	color: var(--ember);
	margin: 0 0 10px;
	text-shadow: 0 0 18px var(--ember-glow);
}

.vault-inner p {
	color: var(--text-dim);
	font-size: 13px;
	line-height: 1.7;
	margin: 0 0 8px;
}

.vault-inner code {
	font-family: var(--font-mono);
	color: var(--ember-soft);
}
