/* Evolvian licence dashboard. */

:root {
	--bg: #f6f7fb;
	--panel: #fff;
	--ink: #0f172a;
	--muted: #64748b;
	--line: #e2e8f0;
	--primary: #4f46e5;
	--ok: #16a34a;
	--warn: #d97706;
	--bad: #dc2626;
	--radius: 10px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

h1 { font-size: 1.6rem; margin: 26px 0 14px; }
h2 { font-size: 1.05rem; margin: 0 0 14px; }

a { color: var(--primary); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; }

.muted { color: var(--muted); }
.warn { color: var(--warn); font-weight: 600; }

/* Top bar */
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 18px; margin-right: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--primary); }
.topbar__end { display: flex; align-items: center; gap: 12px; }

.foot { padding: 30px 20px; font-size: .85rem; }

/* Cards */
.card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px 22px;
	margin-bottom: 22px;
}

details.card > summary { cursor: pointer; }
details.card[open] > summary { margin-bottom: 16px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }

/* Forms */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.grid__full { grid-column: 1 / -1; }

label { display: block; font-size: .88rem; font-weight: 600; }

input, select, textarea {
	width: 100%;
	margin-top: 5px;
	padding: 9px 11px;
	border: 1px solid var(--line);
	border-radius: 7px;
	font: inherit;
	font-weight: 400;
	background: #fff;
	color: var(--ink);
}

input:focus, select:focus, textarea:focus {
	outline: 2px solid rgba(79, 70, 229, .35);
	border-color: var(--primary);
}

label small { font-weight: 400; display: block; margin-top: 3px; }

.filters { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.filters input, .filters select { width: auto; min-width: 170px; margin: 0; }

/* Buttons */
.btn {
	display: inline-block;
	padding: 9px 16px;
	border: 1px solid transparent;
	border-radius: 7px;
	background: var(--primary);
	color: #fff;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--warn { background: var(--warn); }
.btn--danger { background: var(--bad); }
.btn--sm { padding: 5px 11px; font-size: .85rem; }
.btn:hover { filter: brightness(1.06); }

/* Tables */
.table { width: 100%; border-collapse: collapse; background: var(--panel); }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table--tight td, .table--tight th { padding: 6px 10px; font-size: .88rem; }

.key { background: #eef2ff; color: #3730a3; padding: 2px 7px; border-radius: 5px; letter-spacing: .5px; }
.key--big { font-size: 1.05rem; padding: 6px 12px; display: inline-block; }

/* Pills */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.pill--on { background: #dcfce7; color: #166534; }
.pill--off { background: #fee2e2; color: #991b1b; }
.pill--warn { background: #fef3c7; color: #92400e; }

/* Notices */
.notice { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; border: 1px solid; }
.notice p { margin: 4px 0; }
.notice--ok { background: #f0fdf4; border-color: #bbf7d0; }
.notice--warn { background: #fffbeb; border-color: #fde68a; }
.notice--bad { background: #fef2f2; border-color: #fecaca; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat__value { display: block; font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat__label { font-size: .82rem; color: var(--muted); }

/* Auth screens */
.auth { max-width: 420px; margin: 70px auto; }
.auth .card { display: grid; gap: 14px; }

@media (max-width: 860px) {
	.cols, .grid { grid-template-columns: 1fr; }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.topbar__inner { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 12px; }
}
