* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: #0f1115;
	color: #e6e8eb;
}
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid #22262f;
}
.brand { font-weight: 600; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	padding: 20px;
	max-width: 1200px;
	margin: 0 auto;
}
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.panel {
	background: #161a22;
	border: 1px solid #22262f;
	border-radius: 12px;
	padding: 18px;
}
.panel-header h1 { margin: 0 0 4px; font-size: 20px; }
.muted { color: #8a8f98; font-size: 13px; }
.muted.small { font-size: 12px; }
.address-card { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.address-row { display: flex; gap: 8px; }
.address-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.address-input, .text-input, .select-input {
	flex: 1;
	background: #0f1115;
	border: 1px solid #2a2f3a;
	color: #e6e8eb;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 14px;
}
.select-input { flex: 0 0 auto; max-width: 220px; }
.btn {
	border: none;
	border-radius: 8px;
	padding: 10px 14px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
}
.btn-primary { background: #4f8cff; color: #0b0d12; }
.btn-secondary { background: #262b36; color: #e6e8eb; }
.btn-ghost { background: transparent; color: #c8cbd2; border: 1px solid #2a2f3a; }
.btn:disabled { opacity: 0.6; cursor: default; }
.hint { font-size: 12px; color: #6f7580; line-height: 1.5; margin: 0; }
.hint code { background: #1d2129; padding: 1px 5px; border-radius: 4px; }
.status-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #565c66; display: inline-block; }
.status-dot.active { background: #35d07f; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; gap: 8px; }
.toolbar-actions { display: flex; align-items: center; gap: 14px; }
.toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.inbox-list { list-style: none; margin: 14px 0 0; padding: 0; max-height: 420px; overflow-y: auto; }
.inbox-empty { padding: 20px 4px; text-align: center; }
.inbox-item { padding: 10px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; }
.inbox-item:hover { background: #1d2129; }
.inbox-item.selected { background: #1d2937; }
.inbox-item-subject { font-size: 14px; font-weight: 500; }
.inbox-item-meta { font-size: 12px; color: #8a8f98; margin-top: 2px; }
.viewer-panel { min-height: 300px; }
.viewer-empty { padding: 60px 10px; text-align: center; }
.viewer-content.hidden, .viewer-empty.hidden, .overlay.hidden, .toast.hidden, .debug-log.hidden { display: none; }
.viewer-meta { display: flex; gap: 14px; color: #8a8f98; font-size: 12px; margin: 4px 0 12px; }
.viewer-frame { width: 100%; min-height: 320px; border: 1px solid #22262f; border-radius: 8px; background: #fff; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 20; }
.dialog { background: #161a22; border: 1px solid #22262f; border-radius: 12px; width: 420px; max-width: 92vw; max-height: 86vh; overflow-y: auto; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #22262f; }
.dialog-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.debug-toggle { margin-top: 6px; align-self: flex-start; }
.debug-log { background: #0b0d12; border: 1px solid #22262f; border-radius: 8px; padding: 10px; font-size: 11px; max-height: 220px; overflow-y: auto; white-space: pre-wrap; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1d2129; border: 1px solid #2a2f3a; color: #e6e8eb; padding: 10px 16px; border-radius: 8px; font-size: 13px; z-index: 30; max-width: 90vw; }
