*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
	--bg:      #1c1c1c;
	--bg2:     #252525;
	--bg3:     #2e2e2e;
	--border:  #3a3a3a;
	--border2: #484848;
	--accent:  #4e9fd4;
	--text:    #d4d4d4;
	--muted:   #6a6a6a;
	--sans:    Helvetica Neue, Helvetica, Arial, sans-serif;
}

html, body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 13px;
	font-weight: 400;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

body { padding: 36px 20px 60px; }
.container { max-width: 960px; margin: 0 auto; }

/* Header */
header {
	margin-bottom: 32px;
	border-bottom: 1px solid var(--border);
	padding-bottom: 20px;
}
.app-name {
	font-size: 10px; font-weight: 500;
	letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--muted); margin-bottom: 8px;
}
h1 { font-size: 20px; font-weight: 300; color: #e8e8e8; }
h1 strong { font-weight: 500; }
.subtitle { margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.6; }

/* Main layout */
.layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px;
	align-items: start;
	margin-bottom: 2px;
}
@media (max-width: 680px) { .layout { grid-template-columns: 1fr; } }

/* Panels */
.panel {
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: 4px;
	margin-bottom: 2px;
}
.panel:last-child { margin-bottom: 0; }

.panel-title {
	font-size: 9px; font-weight: 600;
	letter-spacing: 0.13em; text-transform: uppercase;
	color: var(--muted);
	padding: 12px 18px;
	border-bottom: 1px solid var(--border);
}

.panel-body { padding: 16px 18px; }

/* Fields */
.field { margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 13px; }
.field-pair:last-child { margin-bottom: 0; }
.field-pair .field { margin-bottom: 0; }

label {
	display: block;
	font-size: 11px; color: var(--muted);
	margin-bottom: 5px; letter-spacing: 0.01em;
}

input[type=number], select {
	width: 100%;
	background: var(--bg3);
	border: 1px solid var(--border2);
	border-radius: 3px;
	color: var(--text);
	font-family: var(--sans);
	font-size: 13px;
	padding: 7px 9px;
	outline: none;
	transition: border-color 0.1s;
	-webkit-appearance: none;
}
input[type=number]:focus, select:focus { border-color: var(--accent); }
select { cursor: pointer; }
select option { background: #2e2e2e; }
optgroup { font-style: normal; color: var(--text); }

/* Aspect ratio preview */
.preview-box {
	width: min(320px, 100%);
	height: 240px;
	margin: 0 auto;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.preview-rect {
	background: var(--accent);
	border-radius: 2px;
	min-width: 4px;
	min-height: 4px;
	transition: width 0.12s ease, height 0.12s ease;
}
.preview-label {
	margin-top: 10px;
	text-align: center;
	color: var(--muted);
	font-size: 11px;
}

/* Tables */
.table-wrap { overflow-x: auto; }

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 11px;
}
thead th {
	background: var(--bg3);
	color: var(--muted);
	font-size: 9px; font-weight: 600;
	letter-spacing: 0.10em; text-transform: uppercase;
	padding: 7px 12px;
	text-align: left;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}
tbody th {
	padding: 7px 12px;
	border-bottom: 1px solid var(--border);
	color: var(--muted);
	font-weight: 500;
	text-align: left;
	white-space: nowrap;
}
tbody td {
	padding: 7px 12px;
	border-bottom: 1px solid var(--border);
	color: var(--text);
	vertical-align: middle;
}
tbody tr:last-child th,
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover th,
tbody tr:hover td { background: rgba(255,255,255,0.02); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

footer {
	margin-top: 28px; text-align: center;
	font-size: 10px; color: #4a4a4a; letter-spacing: 0.06em;
}
footer a { color: #4a4a4a; text-decoration: none; }
footer a:hover { color: var(--accent); }
