:root {
	--ink: #172138;
	--muted: #687188;
	--line: #dfe3eb;
	--canvas: #f5f6f8;
	--surface: #fff;
	--navy: #18243c;
	--navy-soft: #eef1f7;
	--accent: #e85f43;
	--accent-dark: #c84831;
	--green: #16845b;
	--green-soft: #e9f7f1;
	--red: #bf3c45;
	--red-soft: #fdecee;
	--amber: #9d650f;
	--amber-soft: #fff4dc;
	--shadow: 0 16px 50px rgb(23 33 56 / 8%);
	--radius: 16px;

	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--ink);
	background: var(--canvas);
	font-synthesis: none;
}

* {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	background: var(--canvas);
}

body {
	min-width: 320px;
	min-height: 100vh;
	margin: 0;
	background:
		radial-gradient(circle at 90% -10%, rgb(232 95 67 / 8%), transparent 32rem),
		var(--canvas);
	color: var(--ink);
	font-size: 15px;
	line-height: 1.5;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
textarea {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

:focus-visible {
	outline: 3px solid rgb(232 95 67 / 35%);
	outline-offset: 3px;
}

.site-header {
	position: sticky;
	z-index: 20;
	top: 0;
	display: grid;
	grid-template-columns: minmax(220px, 1fr) auto minmax(180px, 1fr);
	gap: 28px;
	align-items: center;
	min-height: 76px;
	padding: 0 4vw;
	border-bottom: 1px solid rgb(223 227 235 / 90%);
	background: rgb(255 255 255 / 92%);
	backdrop-filter: blur(14px);
}

.brand {
	display: inline-flex;
	gap: 12px;
	align-items: center;
	width: fit-content;
}

.brand-mark {
	display: grid;
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	place-items: center;
	border-radius: 11px;
	background: var(--navy);
	box-shadow: 0 8px 20px rgb(24 36 60 / 18%);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: -.02em;
}

.brand strong,
.brand small {
	display: block;
}

.brand strong {
	font-size: 14px;
	letter-spacing: -.01em;
}

.brand small {
	margin-top: 1px;
	color: var(--muted);
	font-size: 11px;
}

.primary-nav {
	display: flex;
	gap: 5px;
	align-items: center;
	padding: 4px;
	border-radius: 12px;
	background: #f4f5f7;
}

.primary-nav a {
	padding: 8px 14px;
	border-radius: 9px;
	color: #596279;
	font-size: 13px;
	font-weight: 650;
	transition: .18s ease;
}

.primary-nav a:hover {
	color: var(--ink);
}

.primary-nav a[aria-current="page"] {
	background: #fff;
	box-shadow: 0 3px 12px rgb(23 33 56 / 8%);
	color: var(--ink);
}

.logout-form {
	justify-self: end;
}

.page-shell {
	width: min(1220px, 92vw);
	min-height: calc(100vh - 148px);
	margin: 0 auto;
	padding: 52px 0 68px;
}

.site-footer {
	display: flex;
	justify-content: space-between;
	width: min(1220px, 92vw);
	margin: 0 auto;
	padding: 24px 0 30px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 12px;
}

.page-heading {
	max-width: 760px;
	margin-bottom: 32px;
}

.page-heading-actions {
	display: flex;
	gap: 28px;
	align-items: flex-end;
	justify-content: space-between;
	max-width: none;
}

.page-heading h1 {
	margin: 2px 0 8px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(34px, 4vw, 52px);
	font-weight: 500;
	letter-spacing: -.035em;
	line-height: 1.05;
}

.page-heading p {
	margin: 0;
	color: var(--muted);
}

.page-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.eyebrow {
	margin: 0 0 4px !important;
	color: var(--accent) !important;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 9px 16px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: var(--ink);
	font-size: 13px;
	font-weight: 750;
	line-height: 1;
	text-align: center;
	cursor: pointer;
	transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.button:hover {
	transform: translateY(-1px);
}

.button-primary {
	border-color: var(--accent);
	background: var(--accent);
	box-shadow: 0 9px 22px rgb(232 95 67 / 22%);
	color: #fff;
}

.button-primary:hover {
	border-color: var(--accent-dark);
	background: var(--accent-dark);
}

.button-secondary {
	border-color: #bac2d2;
	background: #fff;
}

.button-quiet {
	border-color: var(--line);
	background: #fff;
	color: #535d73;
}

.button-danger {
	border-color: var(--red);
	background: var(--red);
	color: #fff;
}

.button-inverse {
	border-color: #fff;
	background: #fff;
	color: var(--navy);
}

.button-block {
	width: 100%;
}

.button-small {
	min-height: 32px;
	padding: 7px 10px;
	font-size: 11px;
}

.button-meta {
	margin-left: 6px;
	color: var(--muted);
	font-size: 10px;
	font-weight: 650;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 24px;
}

.stat-card,
.panel {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
}

.stat-card {
	position: relative;
	overflow: hidden;
	padding: 24px;
}

.stat-card::after {
	position: absolute;
	top: -28px;
	right: -28px;
	width: 74px;
	height: 74px;
	border: 16px solid rgb(232 95 67 / 5%);
	border-radius: 50%;
	content: "";
}

.stat-label {
	display: block;
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
}

.stat-card strong {
	display: block;
	margin: 12px 0 2px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 38px;
	font-weight: 500;
	line-height: 1;
}

.stat-card small {
	color: #8a92a4;
}

.panel {
	overflow: hidden;
}

.panel-heading {
	display: flex;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
	padding: 22px 24px;
	border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
	margin: 0;
	font-size: 17px;
	letter-spacing: -.02em;
}

.panel-heading p {
	margin: 3px 0 0;
	color: var(--muted);
	font-size: 12px;
}

.text-link,
.table-action a,
.back-link {
	color: var(--accent-dark);
	font-size: 12px;
	font-weight: 750;
}

.table-wrap {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 15px 24px;
	border-bottom: 1px solid #eceef3;
	text-align: left;
	white-space: nowrap;
}

th {
	background: #fafbfc;
	color: #80889a;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
}

tbody tr:last-child td {
	border-bottom: 0;
}

td strong,
.table-meta {
	display: block;
}

.table-meta {
	margin-top: 3px;
	color: var(--muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 10px;
}

.table-action {
	text-align: right;
}

.status {
	display: inline-flex;
	gap: 7px;
	align-items: center;
	width: fit-content;
	padding: 5px 9px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .035em;
	white-space: nowrap;
	text-transform: uppercase;
}

.status > span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentcolor;
}

.status-active {
	background: var(--green-soft);
	color: var(--green);
}

.status-revoked {
	background: var(--red-soft);
	color: var(--red);
}

.status-expired {
	background: var(--amber-soft);
	color: var(--amber);
}

.status-neutral {
	background: #eef0f4;
	color: #687188;
}

.two-column-layout {
	display: grid;
	grid-template-columns: minmax(300px, .78fr) minmax(480px, 1.22fr);
	gap: 22px;
	align-items: start;
}

.form-panel {
	padding-bottom: 24px;
}

.stack-form {
	display: grid;
	gap: 18px;
	padding: 24px;
}

.stack-form label {
	display: grid;
	gap: 7px;
}

.stack-form label > span {
	font-size: 12px;
	font-weight: 750;
}

.stack-form label small {
	color: var(--muted);
	font-weight: 500;
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

input,
textarea {
	width: 100%;
	border: 1px solid #cfd5e1;
	border-radius: 10px;
	background: #fff;
	color: var(--ink);
	transition: border-color .18s ease, box-shadow .18s ease;
}

input {
	height: 44px;
	padding: 0 13px;
}

textarea {
	min-height: 96px;
	padding: 11px 13px;
	resize: vertical;
}

input:focus,
textarea:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 4px rgb(232 95 67 / 10%);
	outline: none;
}

.license-list {
	display: grid;
}

.license-row {
	display: grid;
	grid-template-columns: minmax(180px, 1fr) auto auto 18px;
	gap: 16px;
	align-items: center;
	padding: 17px 22px;
	border-bottom: 1px solid #eceef3;
	transition: background .16s ease;
}

.license-row:last-child {
	border-bottom: 0;
}

.license-row:hover {
	background: #fafbfc;
}

.license-main strong,
.license-main small {
	display: block;
}

.license-main small {
	margin-top: 4px;
	color: var(--muted);
	font-size: 10px;
}

.license-sites {
	color: var(--muted);
	font-size: 11px;
	font-weight: 700;
}

.row-arrow {
	color: var(--accent);
}

.flash,
.form-errors {
	margin-bottom: 22px;
	padding: 13px 16px;
	border: 1px solid #b9ddce;
	border-radius: 11px;
	background: var(--green-soft);
	color: #116b4a;
	font-size: 13px;
	font-weight: 650;
}

.form-errors {
	margin: 20px 24px 0;
	border-color: #efc2c6;
	background: var(--red-soft);
	color: #8e2831;
}

.form-errors ul {
	margin: 7px 0 0;
	padding-left: 20px;
}

.detail-heading {
	margin-top: 16px;
}

.heading-status {
	align-self: center;
}

.back-link {
	display: inline-block;
}

.secret-card {
	display: grid;
	grid-template-columns: 1fr minmax(440px, .9fr);
	gap: 28px;
	align-items: center;
	margin-bottom: 22px;
	padding: 26px;
	border-radius: var(--radius);
	background: var(--navy);
	box-shadow: 0 18px 50px rgb(24 36 60 / 22%);
	color: #fff;
}

.secret-card h2 {
	margin: 3px 0 5px;
	font-size: 20px;
}

.secret-card p:not(.eyebrow) {
	margin: 0;
	color: #bfc8db;
	font-size: 12px;
}

.copy-field {
	display: flex;
	gap: 9px;
}

.copy-field input {
	border-color: rgb(255 255 255 / 20%);
	background: rgb(255 255 255 / 8%);
	color: #fff;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
}

.detail-grid,
.account-layout {
	display: grid;
	grid-template-columns: minmax(320px, .82fr) minmax(440px, 1.18fr);
	gap: 22px;
	align-items: start;
}

.detail-list {
	margin: 0;
	padding: 7px 24px;
}

.detail-list > div {
	display: flex;
	justify-content: space-between;
	padding: 14px 0;
	border-bottom: 1px solid #eceef3;
}

.detail-list > div:last-child {
	border-bottom: 0;
}

.detail-list dt {
	color: var(--muted);
	font-size: 12px;
}

.detail-list dd {
	margin: 0;
	font-size: 12px;
	font-weight: 750;
	text-align: right;
}

code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 10px;
}

.notes-block {
	margin: 8px 24px 22px;
	padding: 14px;
	border-radius: 10px;
	background: #f5f6f8;
}

.notes-block strong,
.notes-block p {
	font-size: 12px;
}

.notes-block p {
	margin: 5px 0 0;
	color: var(--muted);
	white-space: pre-wrap;
}

.key-detail {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.danger-zone {
	display: flex;
	gap: 18px;
	align-items: center;
	justify-content: space-between;
	margin: 0 24px;
	padding: 18px 0 0;
	border-top: 1px solid var(--line);
}

.danger-zone strong {
	font-size: 12px;
}

.danger-zone p {
	margin: 2px 0 0;
	color: var(--muted);
	font-size: 10px;
}

.danger-zone form {
	flex: 0 0 auto;
}

.danger-zone-delete {
	margin-top: 18px;
	padding-bottom: 32px;
}

.danger-zone-delete .button {
	white-space: nowrap;
}

.count-pill {
	display: grid;
	min-width: 28px;
	height: 28px;
	place-items: center;
	border-radius: 999px;
	background: var(--navy-soft);
	font-size: 11px;
	font-weight: 800;
}

.activation-list {
	display: grid;
}

.activation-row {
	display: flex;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
	padding: 17px 22px;
	border-bottom: 1px solid #eceef3;
}

.activation-row:last-child {
	border-bottom: 0;
}

.activation-row strong,
.activation-row small,
.activation-row code {
	display: block;
}

.activation-row small {
	margin: 3px 0;
	color: var(--muted);
	font-size: 10px;
}

.activation-row code {
	color: #8a92a4;
}

.activation-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.empty-state {
	display: grid;
	justify-items: center;
	padding: 54px 24px;
	text-align: center;
}

.empty-icon {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 50%;
	background: var(--navy-soft);
	color: var(--navy);
	font-size: 20px;
}

.empty-state h3 {
	margin: 14px 0 4px;
	font-size: 15px;
}

.empty-state p {
	max-width: 340px;
	margin: 0;
	color: var(--muted);
	font-size: 12px;
}

.timeline {
	padding: 10px 24px;
}

.timeline-item {
	position: relative;
	display: grid;
	grid-template-columns: 18px 1fr auto;
	gap: 13px;
	align-items: start;
	padding: 15px 0;
	border-bottom: 1px solid #eceef3;
}

.timeline-item:last-child {
	border-bottom: 0;
}

.timeline-dot {
	width: 9px;
	height: 9px;
	margin-top: 6px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 3px rgb(232 95 67 / 14%);
}

.timeline-item strong {
	font-size: 12px;
}

.timeline-item p {
	margin: 2px 0 0;
	color: var(--muted);
	font-size: 10px;
}

.timeline-item p span::before {
	margin: 0 6px;
	content: "·";
}

.timeline-item time {
	color: var(--muted);
	font-size: 10px;
	white-space: nowrap;
}

.account-layout {
	grid-template-columns: .72fr 1.28fr;
}

.auth-shell {
	background:
		linear-gradient(135deg, rgb(24 36 60 / 98%), rgb(31 48 78 / 96%)),
		var(--navy);
}

.auth-main {
	display: grid;
	min-height: 100vh;
	padding: 28px;
	place-items: center;
}

.login-card {
	width: min(440px, 100%);
	padding: 38px;
	border: 1px solid rgb(255 255 255 / 12%);
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 30px 90px rgb(6 12 25 / 34%);
}

.login-brand {
	display: flex;
	gap: 16px;
	align-items: center;
}

.brand-mark-large {
	width: 54px;
	height: 54px;
	border-radius: 15px;
	font-size: 15px;
}

.login-card h1 {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 27px;
	font-weight: 500;
	letter-spacing: -.025em;
}

.login-intro {
	margin: 22px 0 2px;
	color: var(--muted);
	font-size: 13px;
}

.login-card .stack-form {
	padding: 22px 0 0;
}

.login-card .form-errors {
	margin: 20px 0 0;
}

.security-note {
	margin: 22px 0 0;
	color: #81899a;
	font-size: 10px;
	text-align: center;
}

.security-note span {
	margin-right: 5px;
	color: var(--green);
}

@media (width <= 920px) {
	.site-header {
		grid-template-columns: 1fr auto;
		gap: 14px;
		padding: 12px 4vw;
	}

	.primary-nav {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-content: center;
		overflow-x: auto;
	}

	.logout-form {
		grid-column: 2;
		grid-row: 1;
	}

	.stats-grid {
		grid-template-columns: 1fr 1fr;
	}

	.two-column-layout,
	.detail-grid,
	.account-layout {
		grid-template-columns: 1fr;
	}

	.secret-card {
		grid-template-columns: 1fr;
	}
}

@media (width <= 620px) {
	.site-header {
		position: static;
	}

	.brand small {
		display: none;
	}

	.primary-nav {
		justify-content: start;
	}

	.primary-nav a {
		padding: 8px 11px;
	}

	.page-shell {
		padding-top: 34px;
	}

	.page-heading-actions {
		align-items: flex-start;
		flex-direction: column;
	}

	.page-actions {
		justify-content: flex-start;
	}

	.stats-grid {
		grid-template-columns: 1fr;
	}

	.form-grid {
		grid-template-columns: 1fr;
	}

	.license-row {
		grid-template-columns: 1fr auto;
	}

	.license-sites,
	.row-arrow {
		display: none;
	}

	.secret-card {
		padding: 22px;
	}

	.copy-field {
		align-items: stretch;
		flex-direction: column;
	}

	.activation-row,
	.danger-zone {
		align-items: flex-start;
		flex-direction: column;
	}

	.timeline-item {
		grid-template-columns: 14px 1fr;
	}

	.timeline-item time {
		grid-column: 2;
	}

	.site-footer {
		gap: 6px;
		flex-direction: column;
	}

	.login-card {
		padding: 28px 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}
