/* HAXD Team Hub — mobile-first, dark, matched to haxd.gr */
:root {
	--bg: #09090C;
	--surface: #141419;
	--surface-2: #1C1C23;
	--line: #2A2A33;
	--line-2: #26262E;
	--text: #F5F5F7;
	--soft: #D4D4D8;
	--muted: #A1A1AA;
	--accent: #A78BFA;
	--accent-strong: #7C3AED;
	--accent-ink: #C4B5FD;
	--accent-bg: #19142B;
	--accent-line: #4C3D7A;
	--gold: #FDB927;
	--gold-ink: #FDE68A;
	--gold-bg: #1F1A0C;
	--gold-line: #6B5212;
	--teal: #5EEAD4;
	--teal-line: #22524C;
	--green: #34D399;
	--green-line: #1F5C47;
	--red: #F87171;
	--red-line: #6B2A2A;
	--radius: 16px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.hth {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}
/* Zero-specificity default so component classes (tabs, buttons, menu) always win. */
:where(body.hth) :where(a) { color: var(--accent-ink); }
:where(body.hth) :where(a):hover { color: #DDD6FE; }
:where(body.hth) :where(button, input, select, textarea) { font: inherit; color: inherit; }
body.hth :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hth-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ gate (login) */
.hth-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.hth-gate__card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px 22px; }
.hth-gate__title { margin: 4px 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.hth-gate__link { margin: 16px 0 0; font-size: 14px; }
.hth-gate__actions { display: grid; gap: 10px; margin: 18px 0 0; }
.hth-gate form p { margin: 0 0 14px; }
.hth-gate label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.hth-gate .login-remember label { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.hth-gate input[type="text"], .hth-gate input[type="password"] { width: 100%; min-height: 48px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; }
.hth-gate input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.hth-gate .button-primary, .hth-gate input[type="submit"] { width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: var(--accent-strong); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }

/* ------------------------------------------------------------ shell */
.hth-app { min-height: 100vh; display: flex; flex-direction: column; }
.hth-loading { padding: 48px 16px; text-align: center; color: var(--muted); }
.hth-topbar {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
	background: rgba(9, 9, 12, 0.92);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line-2);
}
.hth-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.02em; color: var(--accent-ink); text-decoration: none; }
.hth-brand__logo { width: 28px; height: 28px; border-radius: 8px; flex: 0 0 28px; }
.hth-gate__brand { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 14px; font-weight: 800; color: var(--accent-ink); }
.hth-gate__brand img { width: 44px; height: 44px; border-radius: 12px; }
.hth-brand span { color: var(--muted); font-weight: 600; }
.hth-avatar { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--accent-ink); font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hth-menu { position: absolute; right: 16px; top: calc(env(safe-area-inset-top) + 58px); background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 6px; min-width: 200px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.hth-menu a, .hth-menu button { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 0 12px; border-radius: 10px; color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; }
.hth-menu a:hover, .hth-menu button:hover { background: var(--surface); color: var(--text); }
.hth-menu__who { padding: 8px 12px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 6px; }

.hth-view { width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 120px; display: flex; flex-direction: column; gap: 14px; }
.hth-view--wide { max-width: 1180px; }

.hth-tabbar {
	position: fixed; z-index: 20; bottom: 0; left: 0; right: 0;
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
	background: #0E0E12; border-top: 1px solid var(--line);
	padding: 6px 4px calc(env(safe-area-inset-bottom) + 8px);
}
@media (min-width: 800px) {
	.hth-tabbar { left: 50%; right: auto; width: 760px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; }
}
.hth-tab { position: relative; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
.hth-tab svg { width: 22px; height: 22px; }
.hth-tab[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }
.hth-tab__badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #09090C; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ------------------------------------------------------------ type */
.hth-eyebrow { margin: 0; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.hth-h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.hth-h2 { margin: 0; font-size: 17px; font-weight: 700; }
.hth-muted { color: var(--muted); }
.hth-small { font-size: 12.5px; }
.hth-row { display: flex; align-items: center; gap: 10px; }
.hth-row--between { justify-content: space-between; }
.hth-row--wrap { flex-wrap: wrap; }
.hth-stack { display: flex; flex-direction: column; gap: 8px; }
.hth-pre { white-space: pre-line; }

/* ------------------------------------------------------------ surfaces */
.hth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hth-card--accent { background: var(--accent-bg); border-color: #3B2F5C; }
.hth-card--gold { background: var(--gold-bg); border-color: var(--gold-line); }
.hth-card--tight { padding: 12px 14px; gap: 6px; }
.hth-divider { height: 1px; background: var(--line-2); border: 0; margin: 0; }

/* ------------------------------------------------------------ progress */
.hth-progress__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hth-progress__pct { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: var(--accent); }
.hth-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 12px; }
.hth-cat { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hth-cat__name { font-size: 12px; color: var(--muted); }
.hth-cat__ratio { font-size: 16px; font-weight: 700; }
.hth-bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.hth-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

/* ------------------------------------------------------------ tasks */
.hth-task { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px 6px 2px; }
.hth-task--done .hth-task__title { color: var(--muted); text-decoration: line-through; }
.hth-task--blocked { border-color: var(--gold-line); }
.hth-check { width: 44px; height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; padding: 0; cursor: pointer; }
.hth-check__box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid #71717A; display: flex; align-items: center; justify-content: center; }
.hth-check__box--on { background: var(--accent); border-color: var(--accent); }
.hth-check__box--plus { border-style: dashed; color: var(--accent-ink); font-weight: 800; font-size: 15px; }
.hth-task__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: 6px 0; text-align: left; cursor: pointer; color: inherit; }
.hth-task__title { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.hth-task__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.hth-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex: 0 0 8px; }
.hth-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 9px; border: 1px solid var(--line); color: var(--soft); white-space: nowrap; }
.hth-chip--time { color: var(--teal); border-color: var(--teal-line); }
.hth-chip--gold { color: var(--gold); border-color: var(--gold-line); }
.hth-chip--accent { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-bg); }
.hth-chip--green { color: var(--green); border-color: var(--green-line); }
.hth-chip--red { color: var(--red); border-color: var(--red-line); }
.hth-chip--plain { border-color: transparent; background: var(--surface-2); color: var(--soft); font-weight: 600; }

/* ------------------------------------------------------------ buttons */
.hth-btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; border-radius: 14px; border: 1px solid transparent; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2; }
.hth-btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.hth-btn--primary { background: var(--accent-strong); color: #fff; }
.hth-btn--primary:hover { background: #6D28D9; color: #fff; }
.hth-btn--gold { background: var(--gold); color: #09090C; }
.hth-btn--gold-outline { background: transparent; border-color: var(--gold); color: var(--gold); }
.hth-btn--ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.hth-btn--ghost:hover { border-color: #3F3F46; color: var(--text); }
.hth-btn--text { background: transparent; color: var(--soft); min-height: 44px; font-weight: 600; }
.hth-btn--danger { background: transparent; border-color: var(--red-line); color: var(--red); }
.hth-btn--sm { min-height: 40px; padding: 6px 12px; border-radius: 10px; font-size: 13px; }
.hth-btn--block { width: 100%; }
.hth-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.hth-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hth-iconbtn { width: 44px; height: 44px; flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; text-decoration: none; }
.hth-iconbtn svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------ forms */
.hth-field { display: flex; flex-direction: column; gap: 6px; }
.hth-field > label, .hth-label { font-size: 13px; font-weight: 600; }
.hth-input, .hth-select, .hth-textarea { width: 100%; min-height: 48px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; }
.hth-textarea { min-height: 84px; resize: vertical; }
.hth-input::placeholder, .hth-textarea::placeholder { color: var(--muted); }
.hth-input--ok { border-color: var(--green-line); }
.hth-hint { font-size: 12px; color: var(--muted); margin: 0; }
.hth-hint--ok { color: var(--green); font-weight: 600; }
.hth-check-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.hth-check-line input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 20px; accent-color: var(--accent); }
.hth-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.hth-seg button { min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; }
.hth-seg button[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-bg); color: #fff; }
.hth-stepper { display: flex; align-items: center; gap: 8px; }
.hth-stepper input { text-align: center; max-width: 90px; }
.hth-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hth-error { color: var(--red); font-size: 13px; font-weight: 600; margin: 0; }

/* ------------------------------------------------------------ sheet */
.hth-sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); display: flex; align-items: flex-end; justify-content: center; }
.hth-sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: #111116; border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 10px 16px calc(env(safe-area-inset-bottom) + 18px); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 700px) {
	.hth-sheet-backdrop { align-items: center; }
	.hth-sheet { border-radius: 22px; border-bottom: 1px solid var(--line); }
}
.hth-sheet__grip { width: 40px; height: 4px; border-radius: 999px; background: #3F3F46; margin: 2px auto 0; }
.hth-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hth-sheet__title { margin: 0; font-size: 19px; font-weight: 800; }

/* ------------------------------------------------------------ toast */
.hth-toasts { position: fixed; z-index: 60; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 84px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.hth-toast { pointer-events: auto; max-width: 520px; background: #F5F5F7; color: #09090C; font-weight: 600; font-size: 14px; border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.hth-toast--error { background: #FECACA; color: #450A0A; }

/* ------------------------------------------------------------ admin */
.hth-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.hth-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.hth-kpi__value { font-size: 30px; font-weight: 800; line-height: 1.15; }
.hth-kpi--gold { background: var(--gold-bg); border-color: var(--gold-line); }
.hth-kpi--gold .hth-kpi__value { color: var(--gold); }
.hth-table-wrap { overflow-x: auto; }
.hth-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.hth-table th, .hth-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.hth-table thead th { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.hth-table tbody th { font-weight: 700; }
.hth-table tr:last-child th, .hth-table tr:last-child td { border-bottom: 0; }
.hth-ratio { display: flex; flex-direction: column; gap: 6px; min-width: 84px; }
.hth-link-btn { background: none; border: 0; padding: 0; color: var(--text); font-weight: 700; cursor: pointer; text-align: left; min-height: 44px; }
.hth-list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.hth-list-item:last-child { border-bottom: 0; }
.hth-swatch { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); flex: 0 0 28px; }
.hth-weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hth-weeknav__label { font-weight: 700; text-align: center; flex: 1; }
.hth-empty { text-align: center; color: var(--muted); padding: 24px 12px; border: 1px dashed var(--line); border-radius: var(--radius); }
.hth-bubble { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.hth-bubble--manager { background: var(--accent-bg); border: 1px solid #3B2F5C; }
.hth-quote { border-left: 0; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 0; white-space: pre-line; }
.hth-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.hth-more-link { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); min-height: 72px; }
.hth-more-link:hover { border-color: var(--accent-line); color: var(--text); }
.hth-more-link strong { font-size: 15px; }
.hth-more-link span { font-size: 12.5px; color: var(--muted); }
details.hth-guide { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
details.hth-guide summary { min-height: 52px; display: flex; align-items: center; cursor: pointer; font-weight: 700; list-style: none; }
details.hth-guide summary::-webkit-details-marker { display: none; }
details.hth-guide[open] summary { border-bottom: 1px solid var(--line-2); }
details.hth-guide .hth-guide__body { padding: 12px 0 14px; white-space: pre-line; color: var(--soft); }
