/* LicenseHub admin theme */
:root {
	--bg: #f4f5f7;
	--panel: #ffffff;
	--ink: #1f2733;
	--muted: #6b7585;
	--line: #e4e7ec;
	--brand: #4f46e5;
	--brand-d: #4338ca;
	--green: #047857;
	--green-bg: #d1fae5;
	--red: #b91c1c;
	--red-bg: #fee2e2;
	--amber: #92400e;
	--amber-bg: #fef3c7;
	--radius: 10px;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: var(--bg);
	color: var(--ink);
	font-size: 14px;
	line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0; }

/* App shell */
.lh-app { display: flex; min-height: 100vh; }
.lh-sidebar {
	width: 232px; background: #111827; color: #cbd5e1;
	display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.lh-brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; font-weight: 700; font-size: 17px; color: #fff; }
.lh-logo { color: #818cf8; font-size: 18px; }
.lh-nav { display: flex; flex-direction: column; padding: 8px; gap: 2px; }
.lh-nav a { color: #cbd5e1; padding: 10px 12px; border-radius: 8px; display: flex; align-items: center; gap: 10px; }
.lh-nav a span { width: 18px; text-align: center; opacity: .9; }
.lh-nav a:hover { background: #1f2937; text-decoration: none; color: #fff; }
.lh-nav a.active { background: var(--brand); color: #fff; }
.lh-sidebar-foot { margin-top: auto; padding: 16px 20px; border-top: 1px solid #1f2937; font-size: 13px; }
.lh-userline { color: #fff; margin-bottom: 4px; }
.lh-sidebar-foot a { color: #94a3b8; }

.lh-main { flex: 1; min-width: 0; }
.lh-topbar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 18px 28px; }
.lh-topbar h1 { font-size: 20px; }
.lh-content { padding: 24px 28px; max-width: 1180px; }

/* Flash */
.lh-flash { padding: 11px 15px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.lh-flash-success { background: var(--green-bg); color: var(--green); }
.lh-flash-error { background: var(--red-bg); color: var(--red); }
.lh-flash-info { background: #e0e7ff; color: var(--brand-d); }

/* Stat cards */
.lh-stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.lh-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.lh-stat-num { font-size: 28px; font-weight: 700; }
.lh-stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.lh-stat-green { border-left: 3px solid var(--green); }

/* Cards */
.lh-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; }
.lh-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lh-card-head h2 { font-size: 15px; }
.lh-card-form { max-width: 100%; }
.lh-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Tables */
.lh-table { width: 100%; border-collapse: collapse; }
.lh-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.lh-table td { padding: 11px 10px; border-bottom: 1px solid #f0f1f4; vertical-align: middle; }
.lh-table tr:last-child td { border-bottom: none; }
.lh-empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.lh-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; }
.lh-sub { color: var(--muted); font-size: 12px; }

/* Badges & tags */
.lh-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; background: #eef1f5; color: #475569; text-transform: capitalize; }
.lh-badge-green { background: var(--green-bg); color: var(--green); }
.lh-badge-red { background: var(--red-bg); color: var(--red); }
.lh-badge-amber { background: var(--amber-bg); color: var(--amber); }
.lh-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #eef2ff; color: var(--brand-d); font-size: 12px; }

/* Buttons */
.lh-btn { display: inline-block; padding: 8px 15px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 500; }
.lh-btn:hover { background: #f8fafc; text-decoration: none; }
.lh-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.lh-btn-primary:hover { background: var(--brand-d); }
.lh-btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.lh-btn-block { width: 100%; }
.lh-link-danger { background: none; border: none; color: var(--red); cursor: pointer; padding: 0; font: inherit; }
.lh-link-danger:hover { text-decoration: underline; }

.lh-actions-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.lh-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.lh-row-actions { display: flex; gap: 12px; align-items: center; }
.lh-row-actions form { display: inline; }
.lh-back { display: inline-block; margin-bottom: 14px; color: var(--muted); }

/* Forms */
.lh-field { margin-bottom: 14px; }
.lh-field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 13px; }
.lh-field input[type=text], .lh-field input[type=email], .lh-field input[type=url],
.lh-field input[type=password], .lh-field input[type=number], .lh-field input[type=date],
.lh-field select, .lh-field textarea {
	width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
}
.lh-field input:focus, .lh-field select:focus, .lh-field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #e0e7ff; }
.lh-field-row { display: flex; gap: 14px; }
.lh-field-row .lh-field { flex: 1; }
.lh-hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.lh-check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.lh-check input { width: auto; }
.lh-fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 6px 16px 2px; margin: 10px 0 16px; }
.lh-fieldset legend { font-weight: 600; padding: 0 6px; font-size: 13px; }
.lh-form-actions { display: flex; gap: 10px; margin-top: 8px; }
.lh-hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.lh-code { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow: auto; font-size: 13px; }
.lh-help { color: var(--muted); }

/* License head */
.lh-key-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.lh-key-value { font-size: 22px; font-weight: 700; letter-spacing: .04em; }
.lh-key-meta { color: var(--muted); margin-top: 4px; }

.lh-api-table td { padding: 8px 10px; }

/* Login */
.lh-login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #111827; }
.lh-login-card { background: #fff; padding: 34px 32px; border-radius: 14px; width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lh-login-brand { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.lh-login-sub { color: var(--muted); margin: 4px 0 20px; }
.lh-login-card label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 5px; }
.lh-login-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.lh-login-card button { margin-top: 20px; }

@media (max-width: 980px) {
	.lh-stat-grid { grid-template-columns: repeat(2, 1fr); }
	.lh-grid-2 { grid-template-columns: 1fr; }
	.lh-sidebar { width: 64px; }
	.lh-brand span:last-child, .lh-nav a span:last-child, .lh-sidebar-foot { display: none; }
}
