/**
 * IB Digital hub — admin.
 * The saas-design house style (white canvas, rounded cards, soft shadows, RTL) in the IB Digital palette
 * (brand summary 2026-11-22) and the brand font Plinko Fs. Colours only through the tokens below.
 */

@font-face {
	font-family: "Plinko Fs";
	src: url("/assets/plinko.woff2") format("woff2-variations"), url("/assets/plinko.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}

/* Tokens ------------------------------------------------------------------ */

.hb {
	--hb-primary: #196ba0;          /* Brand Blue */
	--hb-primary-strong: #092739;   /* Dark Background */
	--hb-primary-soft: #e8f1f8;
	--hb-accent: #eed844;           /* Brand Yellow — fills only; text on it is --hb-text */
	--hb-accent-text: #7d6800;      /* readable gold for text */
	--hb-accent-soft: #fbf6d9;      /* from Soft Yellow #e7d86f */
	--hb-success: #138a4b;
	--hb-success-soft: #e6f6ed;
	--hb-warning: #c27803;
	--hb-warning-soft: #fff6e0;
	--hb-danger: #d93f45;
	--hb-danger-soft: #fdecec;

	--hb-bg: #ffffff;
	--hb-surface: #f7f7f5;          /* Light Background */
	--hb-border: #e2e5e7;           /* Light Border */
	--hb-text: #101820;             /* Main Text */
	--hb-muted: #66717a;            /* Muted Text */
	--hb-empty-icon: #bcd3e4;

	--hb-radius: 18px;
	--hb-radius-sm: 12px;
	--hb-shadow: 0 1px 2px rgba(16, 24, 32, 0.05), 0 8px 24px rgba(16, 24, 32, 0.07);
	--hb-ring: 0 0 0 3px rgba(25, 107, 160, 0.22);

	font-family: "Plinko Fs", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-weight: 400;
	color: var(--hb-text);
	font-size: 15px;
	line-height: 1.55;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #ffffff; }
[hidden] { display: none !important; }

/* Shell --------------------------------------------------------------------- */

.hb-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 28px;
	padding: 14px 32px;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--hb-border);
}

.hb-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.hb-brand__mark {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: var(--hb-primary-strong);
	color: var(--hb-accent);
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0.5px;
}
.hb-brand__sub { color: var(--hb-muted); font-weight: 400; }

.hb-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.hb-nav__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	color: var(--hb-muted);
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}
.hb-nav__item:hover { background: var(--hb-surface); color: var(--hb-text); }
.hb-nav__item:focus-visible { outline: none; box-shadow: var(--hb-ring); }
.hb-nav__item[aria-current="page"] { background: var(--hb-primary-soft); color: var(--hb-primary-strong); }
.hb-topbar__end { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; color: var(--hb-muted); }

.hb-page { padding: 32px 32px 120px; }
.hb-page__head { margin-bottom: 24px; }
.hb-page__title { margin: 0 0 4px; font-size: 28px; font-weight: 700; line-height: 1.25; }
.hb-page__subtitle { margin: 0; color: var(--hb-muted); font-size: 15px; }

/* Auth (login / setup): one centred card -------------------------------------- */

.hb-auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--hb-surface); }
.hb-auth .hb-card { width: min(440px, 100%); margin: 0; }
.hb-auth__brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 20px; font-weight: 700; font-size: 18px; }
.hb-auth__slogan { text-align: center; color: var(--hb-muted); font-size: 12px; letter-spacing: 2px; margin-top: 18px; }

/* Tabs ---------------------------------------------------------------------- */

.hb-tabs {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	margin-bottom: 24px;
	background: var(--hb-surface);
	border: 1px solid var(--hb-border);
	border-radius: 14px;
}
.hb-tabs__item {
	padding: 8px 16px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--hb-muted);
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}
.hb-tabs__item:hover { color: var(--hb-text); }
.hb-tabs__item:focus-visible { outline: none; box-shadow: var(--hb-ring); }
.hb-tabs__item[aria-selected="true"] { background: #fff; color: var(--hb-text); box-shadow: 0 1px 3px rgba(16, 24, 32, 0.1); }

/* Cards --------------------------------------------------------------------- */

.hb-card {
	margin-bottom: 20px;
	background: var(--hb-bg);
	border: 1px solid var(--hb-border);
	border-radius: var(--hb-radius);
	box-shadow: var(--hb-shadow);
}
.hb-card__head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 26px 0; }
.hb-card__icon {
	display: grid;
	place-items: center;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--hb-primary-soft);
	color: var(--hb-primary);
}
.hb-card__title { margin: 0; font-size: 17px; font-weight: 600; }
.hb-card__desc { margin: 2px 0 0; color: var(--hb-muted); }
.hb-card__body { padding: 18px 26px 24px; }
.hb-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Fields and buttons ------------------------------------------------------------ */

.hb-field { margin-bottom: 18px; max-width: 420px; }
.hb-field label { display: block; margin-bottom: 6px; font-weight: 600; }
.hb-field__help { margin-top: 6px; color: var(--hb-muted); font-size: 13px; }
.hb-input {
	width: 100%;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--hb-border);
	border-radius: var(--hb-radius-sm);
	background: #fff;
	color: var(--hb-text);
	font: inherit;
}
.hb-input:focus { outline: none; border-color: var(--hb-primary); box-shadow: var(--hb-ring); }
.hb-input--code { letter-spacing: 6px; font-size: 20px; text-align: center; direction: ltr; max-width: 220px; }
.hb-input[dir="ltr"] { text-align: left; }

.hb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 42px;
	padding: 0 20px;
	border: 1px solid var(--hb-border);
	border-radius: 12px;
	background: #fff;
	color: var(--hb-text);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.hb-btn:hover { background: var(--hb-surface); }
.hb-btn:focus-visible { outline: none; box-shadow: var(--hb-ring); }
.hb-btn:active { transform: translateY(1px); }
.hb-btn:disabled { opacity: 0.6; cursor: default; }
.hb-btn--primary { border-color: var(--hb-primary); background: var(--hb-primary); color: #fff; }
.hb-btn--primary:hover { border-color: var(--hb-primary-strong); background: var(--hb-primary-strong); }
.hb-btn--block { width: 100%; }
.hb-btn--link { border: 0; background: none; padding: 0; min-height: 0; color: var(--hb-primary); font-weight: 500; }
.hb-btn--link:hover { background: none; color: var(--hb-primary-strong); text-decoration: underline; }
.hb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }

/* Stats --------------------------------------------------------------------- */

.hb-stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 24px; }
.hb-stat {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px;
	border: 1px solid var(--hb-border);
	border-radius: var(--hb-radius);
	background: #fff;
	box-shadow: var(--hb-shadow);
}
.hb-stat__icon {
	display: grid;
	place-items: center;
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: var(--hb-primary-soft);
	color: var(--hb-primary);
}
.hb-stat--accent .hb-stat__icon { background: var(--hb-accent-soft); color: var(--hb-accent-text); }
.hb-stat--warning .hb-stat__icon { background: var(--hb-warning-soft); color: var(--hb-warning); }
.hb-stat--success .hb-stat__icon { background: var(--hb-success-soft); color: var(--hb-success); }
.hb-stat__value { font-size: 24px; font-weight: 700; line-height: 1.15; }
.hb-stat__label { color: var(--hb-muted); font-size: 13px; }

/* Tables -------------------------------------------------------------------- */

.hb-table-wrap { overflow-x: auto; }
.hb-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.hb-table th {
	padding: 10px 14px;
	background: var(--hb-surface);
	color: var(--hb-muted);
	font-size: 12px;
	font-weight: 600;
	text-align: start;
	white-space: nowrap;
}
.hb-table th:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.hb-table th:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.hb-table td { padding: 12px 14px; border-bottom: 1px solid var(--hb-border); vertical-align: middle; }
.hb-table tr:last-child td { border-bottom: 0; }
.hb-table .hb-num { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }
.hb-ltr { direction: ltr; unicode-bidi: isolate; }

.hb-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: var(--hb-surface);
	color: var(--hb-muted);
	white-space: nowrap;
}
.hb-pill--primary { background: var(--hb-primary-soft); color: var(--hb-primary-strong); }
.hb-pill--success { background: var(--hb-success-soft); color: var(--hb-success); }
.hb-pill--danger { background: var(--hb-danger-soft); color: var(--hb-danger); }
.hb-pill--warning { background: var(--hb-warning-soft); color: var(--hb-warning); }
.hb-pill--accent { background: var(--hb-accent); color: var(--hb-text); }

/* Callouts, empty states, messages -------------------------------------------------- */

.hb-callout {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 14px 16px;
	margin-bottom: 16px;
	border-radius: var(--hb-radius-sm);
	background: var(--hb-primary-soft);
	color: var(--hb-primary-strong);
}
.hb-callout--warning { background: var(--hb-warning-soft); color: #7a4b00; }
.hb-callout--danger { background: var(--hb-danger-soft); color: #9b1c22; }
.hb-callout--success { background: var(--hb-success-soft); color: #0d5f33; }

.hb-empty { padding: 40px 20px; text-align: center; color: var(--hb-muted); }
.hb-empty svg { display: block; margin: 0 auto 10px; color: var(--hb-empty-icon); }

.hb-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; direction: ltr; }
.hb-codes code { padding: 8px; border-radius: 10px; background: var(--hb-surface); text-align: center; font-size: 15px; }
.hb-qr { display: grid; place-items: center; padding: 12px; margin: 8px 0 12px; border-radius: 14px; background: #fff; border: 1px solid var(--hb-border); width: fit-content; }
.hb-qr svg { display: block; width: 180px; height: 180px; }
.hb-secret { direction: ltr; font-family: ui-monospace, Consolas, monospace; font-size: 13px; word-break: break-all; padding: 8px 10px; background: var(--hb-surface); border-radius: 10px; }

.hb-muted { color: var(--hb-muted); }
.hb-small { font-size: 13px; }
.hb-mt { margin-top: 16px; }

@media (max-width: 720px) {
	.hb-topbar { gap: 10px; padding: 12px 16px; }
	.hb-topbar__end { margin-inline-start: 0; }
	.hb-page { padding: 20px 16px 80px; }
	.hb-card__head { padding: 18px 18px 0; }
	.hb-card__body { padding: 14px 18px 20px; }
}
