/* GITECHY – front-end portal. Brand colours come from Settings → Branding (CSS variables). */
/* Elements toggled with the "hidden" attribute stay hidden even when a layout class sets display (grid/flex). */
.gitechy-portal [hidden], .gitechy-app [hidden] { display: none !important; }
.gitechy-portal {
	--gitechy-primary: #0b5cab; --gitechy-accent: #f39c12; --gitechy-text: #222; --gitechy-font: inherit;
	--gitechy-border: #dde3ea; --gitechy-muted: #6b7684; --gitechy-bg: #f5f7fa; --gitechy-radius: 10px;
	font-family: var(--gitechy-font); color: var(--gitechy-text); background: var(--gitechy-bg);
	border-radius: var(--gitechy-radius); overflow: hidden; max-width: 1280px; margin: 24px auto 64px; box-sizing: border-box; /* room above/below so it never touches the theme header/footer */
	font-size: 15px; line-height: 1.5;
}
.gitechy-portal *, .gitechy-portal *::before, .gitechy-portal *::after { box-sizing: border-box; }
.gitechy-portal a { color: var(--gitechy-primary); }
.gitechy-portal h2 { margin: 0; font-size: 1.5em; line-height: 1.25; }
.gitechy-portal h3 { margin: 0 0 12px; font-size: 1.1em; }
.gitechy-portal .gitechy-muted { color: var(--gitechy-muted); }
.gitechy-portal .gitechy-text-error { color: #c62828; }

/* Top bar & navigation */
.gitechy-portal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--gitechy-primary); color: #fff; flex-wrap: wrap; }
.gitechy-portal-brand { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; font-weight: 700; font-size: 1.1em; }
.gitechy-portal-brand img { max-height: 38px; max-width: 150px; background: #fff; border-radius: 6px; padding: 3px; }
.gitechy-portal-user { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gitechy-portal-user a { color: #fff !important; opacity: .9; font-size: .9em; }
.gitechy-portal-avatar-link { display: inline-flex; border-radius: 50%; }
.gitechy-portal-top .gitechy-portal-avatar { border: 2px solid rgba(255,255,255,.6); }
.gitechy-portal-top .gitechy-avatar-initial { background: rgba(255,255,255,.2); color: #fff; }
.gitechy-portal-who { display: flex; flex-direction: column; line-height: 1.2; }
.gitechy-portal-who small { opacity: .8; }
.gitechy-portal-nav { display: flex; gap: 4px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--gitechy-border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gitechy-portal-nav a { padding: 14px 14px 12px; text-decoration: none; color: var(--gitechy-text) !important; border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; }
.gitechy-portal-nav a:hover { color: var(--gitechy-primary) !important; }
.gitechy-portal-nav a.is-active { border-bottom-color: var(--gitechy-primary); color: var(--gitechy-primary) !important; }
.gitechy-portal-nav a.gitechy-nav-cta { color: var(--gitechy-accent) !important; }
.gitechy-portal-main { padding: 20px; }
@media (max-width: 640px) { .gitechy-portal-main { padding: 12px; } .gitechy-portal-who { display: none; } .gitechy-portal { margin: 12px auto 40px; } }

.gitechy-portal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.gitechy-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gitechy-portal-section { margin-top: 24px; }
.gitechy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gitechy-row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.gitechy-inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.gitechy-stack { display: flex; flex-direction: column; gap: 8px; }
.gitechy-stack .gitechy-inline, .gitechy-stack .gitechy-btn { width: 100%; }
.gitechy-empty-state { padding: 30px; text-align: center; color: var(--gitechy-muted); background: #fff; border: 1px dashed var(--gitechy-border); border-radius: var(--gitechy-radius); }

/* Buttons (also used outside .gitechy-form) */
.gitechy-portal .gitechy-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; font-size: 15px; font-weight: 600; line-height: 1.2; border-radius: 6px; border: 1px solid var(--gitechy-primary); cursor: pointer; text-decoration: none; }
.gitechy-portal .gitechy-btn-primary { background: var(--gitechy-primary); color: #fff !important; }
.gitechy-portal .gitechy-btn-secondary { background: #fff; color: var(--gitechy-primary) !important; }
.gitechy-portal .gitechy-btn-danger { background: #fff; color: #c62828 !important; border-color: #e3a3a3; }
.gitechy-portal .gitechy-btn-block { width: 100%; }
.gitechy-portal .gitechy-btn:hover { filter: brightness(.95); }

/* Cards */
.gitechy-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.gitechy-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: #fff; border: 1px solid var(--gitechy-border); border-left: 4px solid var(--gitechy-primary); border-radius: var(--gitechy-radius); text-decoration: none; color: var(--gitechy-text) !important; transition: box-shadow .15s; }
.gitechy-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.gitechy-card-n { font-size: 1.9em; font-weight: 700; line-height: 1.1; }
.gitechy-card-l { color: var(--gitechy-muted); font-size: .9em; }
.gitechy-portal-card { background: #fff; border: 1px solid var(--gitechy-border); border-radius: var(--gitechy-radius); padding: 18px; margin-bottom: 16px; }

/* Layout: main + sidebar */
.gitechy-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .gitechy-split { grid-template-columns: 1fr; } }
.gitechy-paper { background: #fff; border: 1px solid var(--gitechy-border); border-radius: var(--gitechy-radius); overflow: hidden; }
.gitechy-frame { display: block; width: 100%; min-height: 600px; border: 0; }

/* Definition lists */
.gitechy-dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.gitechy-dl-wide { grid-template-columns: 160px 1fr; }
.gitechy-dl dt { color: var(--gitechy-muted); font-size: .9em; }
.gitechy-dl dd { margin: 0; word-break: break-word; }
@media (max-width: 640px) { .gitechy-dl, .gitechy-dl-wide { grid-template-columns: 1fr; } .gitechy-dl dd { margin-bottom: 8px; } }

/* Filters */
.gitechy-filters-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--gitechy-border); border-radius: var(--gitechy-radius); margin-bottom: 12px; }
.gitechy-filters-bar .gitechy-grow { flex: 1 1 240px; }
.gitechy-portal input[type=text], .gitechy-portal input[type=search], .gitechy-portal input[type=email], .gitechy-portal input[type=tel], .gitechy-portal input[type=number],
.gitechy-portal input[type=password], .gitechy-portal input[type=date], .gitechy-portal select, .gitechy-portal textarea {
	padding: 9px 11px; font-size: 16px; border: 1px solid var(--gitechy-border); border-radius: 6px; background: #fff; color: inherit; font-family: inherit; max-width: 100%;
}
.gitechy-portal input:focus, .gitechy-portal select:focus, .gitechy-portal textarea:focus { outline: 2px solid var(--gitechy-primary); outline-offset: 0; }

/* Tables → cards on phones */
.gitechy-ptable { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--gitechy-border); border-radius: var(--gitechy-radius); overflow: hidden; }
.gitechy-ptable th { text-align: left; font-size: .8em; text-transform: uppercase; letter-spacing: .4px; color: var(--gitechy-muted); background: #f8fafc; padding: 10px 12px; border-bottom: 1px solid var(--gitechy-border); }
.gitechy-ptable td { padding: 11px 12px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
.gitechy-ptable tr:last-child td { border-bottom: 0; }
.gitechy-ptable tbody tr:hover { background: #fafcff; }
@media (max-width: 720px) {
	.gitechy-ptable, .gitechy-ptable tbody, .gitechy-ptable tr, .gitechy-ptable td { display: block; width: 100%; }
	.gitechy-ptable thead { display: none; }
	.gitechy-ptable tr { border-bottom: 1px solid var(--gitechy-border); padding: 8px 0; }
	.gitechy-ptable td { border: 0; padding: 4px 12px; display: flex; gap: 10px; }
	.gitechy-ptable td::before { content: attr(data-label); flex: 0 0 100px; color: var(--gitechy-muted); font-size: .85em; }
}
.gitechy-pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }

/* Forms */
.gitechy-portal-form label { display: block; font-weight: 600; font-size: .9em; margin-bottom: 4px; }
.gitechy-portal-form label.gitechy-choice { display: inline-flex; align-items: center; gap: 8px; font-weight: normal; }
.gitechy-portal-form p { margin: 0 0 14px; }
.gitechy-portal-form input:not([type=checkbox]):not([type=radio]), .gitechy-portal-form select, .gitechy-portal-form textarea { width: 100%; }
.gitechy-portal-form .gitechy-row input { width: auto; flex: 0 1 200px; }
.gitechy-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.gitechy-span-2 { grid-column: span 2; }
@media (max-width: 640px) { .gitechy-form-grid { grid-template-columns: 1fr; } .gitechy-span-2 { grid-column: span 1; } }
.gitechy-portal .req { color: #c62828; }
.gitechy-danger-zone { margin-top: 8px; text-align: right; }
.gitechy-email-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gitechy-border); }
.gitechy-email-box label { display: block; font-size: .9em; margin-bottom: 6px; }
.gitechy-email-box input { width: 100%; margin-bottom: 8px; }

/* Timeline / history */
.gitechy-timeline, .gitechy-history { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.gitechy-timeline li, .gitechy-history li { padding: 8px 0 8px 12px; border-left: 3px solid var(--gitechy-border); margin-bottom: 4px; font-size: .92em; }

/* Status badges (shared with the form stylesheet) */
.gitechy-portal .gitechy-status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75em; font-weight: 600; background: #eee; vertical-align: middle; }
.gitechy-portal .gitechy-status-completed { background: #e3f6e8; color: #1c7c3a; }
.gitechy-portal .gitechy-status-draft { background: #fff5e0; color: #8a5a00; }
.gitechy-portal .gitechy-status-pending { background: #e8f0fe; color: #1a4fa0; }
.gitechy-portal .gitechy-status-void { background: #fdeaea; color: #b3261e; }

/* Notices */
.gitechy-portal .gitechy-notice { margin: 0 0 16px; padding: 10px 14px; border-radius: 6px; border-left: 4px solid; background: #eef4fb; }
.gitechy-portal .gitechy-notice-success { background: #e3f6e8; border-color: #1c7c3a; }
.gitechy-portal .gitechy-notice-warning { background: #fff5e0; border-color: var(--gitechy-accent); }
.gitechy-portal .gitechy-notice-error { background: #fdeaea; border-color: #c62828; }

/* The report form inside the portal */
.gitechy-portal .gitechy-form { max-width: none; margin: 0; }

/* Login */
.gitechy-portal-login { background: transparent; max-width: 420px; padding: 30px 0; margin-bottom: 64px; }
.gitechy-portal-login .gitechy-portal-card { padding: 28px; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.gitechy-portal-login .gitechy-portal-form { text-align: left; margin-top: 16px; }
.gitechy-login-logo { max-height: 64px; max-width: 220px; margin-bottom: 10px; }

/* Row actions in report tables */
.gitechy-ptable .gitechy-row-actions { white-space: nowrap; text-align: right; }
.gitechy-ptable .gitechy-row-actions a { margin-left: 10px; font-size: .9em; }
@media (max-width: 720px) { .gitechy-ptable td.gitechy-row-actions::before { display: none; } .gitechy-ptable .gitechy-row-actions { text-align: left; padding-top: 8px; } .gitechy-ptable .gitechy-row-actions a { margin: 0 14px 0 0; } }

/* If someone uses the browser's own Print on a report page, print only the report. */
@media print {
	.gitechy-portal-top, .gitechy-portal-nav, .gitechy-portal-head .gitechy-head-actions, .gitechy-split-side, .gitechy-notice { display: none !important; }
	.gitechy-portal { margin: 0; background: #fff; border-radius: 0; }
	.gitechy-portal-main { padding: 0; }
	.gitechy-split { display: block; }
	.gitechy-paper { border: 0; }
}
.gitechy-portal .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Profile pictures */
.gitechy-portal .gitechy-avatar, .gitechy-portal .gitechy-portal-avatar, .gitechy-portal .gitechy-avatar-large { border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: inline-flex; }
.gitechy-portal .gitechy-avatar-initial { align-items: center; justify-content: center; font-weight: 700; background: #e3e9f1; color: var(--gitechy-primary); line-height: 1; }
.gitechy-portal .gitechy-avatar-large { width: 120px; height: 120px; margin: 4px auto 14px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.gitechy-avatar-card { text-align: center; }
.gitechy-avatar-card .gitechy-avatar-large { display: flex; }
.gitechy-avatar-card .gitechy-portal-form label.gitechy-file-btn { display: inline-flex; font-size: 15px; margin: 0 0 8px; cursor: pointer; }
.gitechy-avatar-card .gitechy-busy { opacity: .6; pointer-events: none; }
.gitechy-portal .gitechy-visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.gitechy-portal .gitechy-link-btn { background: none; border: 0; padding: 0; color: #c62828; text-decoration: underline; cursor: pointer; font-size: .9em; }
.gitechy-person { display: flex; align-items: center; gap: 10px; }

/* Access levels (Team & permissions) */
.gitechy-portal .gitechy-level { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78em; font-weight: 700; background: #eef1f5; color: #50575e; white-space: nowrap; }
.gitechy-portal .gitechy-level-technician { background: #e8f0fe; color: #1a4fa0; }
.gitechy-portal .gitechy-level-staff { background: #fff5e0; color: #8a5a00; }
.gitechy-portal .gitechy-level-admin { background: #fdeaea; color: #b3261e; }
.gitechy-level-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 16px; margin: 0 0 16px; padding: 12px 14px; background: #fff; border: 1px solid var(--gitechy-border); border-radius: var(--gitechy-radius); }
.gitechy-level-legend small { color: var(--gitechy-muted); display: block; margin-top: 2px; }
.gitechy-level-form select { min-width: 150px; }

/* ---------- Time sheet ---------- */
.gitechy-clock { border-left: 6px solid #9aa6b5; }
.gitechy-clock.is-in { border-left-color: #1c7c3a; background: linear-gradient(90deg, #f1fbf4, #fff 40%); }
.gitechy-clock-status { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.gitechy-clock-status > div:first-of-type { flex: 1 1 220px; }
.gitechy-clock-dot { width: 14px; height: 14px; border-radius: 50%; background: #9aa6b5; flex: 0 0 auto; display: inline-block; }
.gitechy-clock.is-in .gitechy-clock-dot, .gitechy-clock-dot.is-live { background: #1c7c3a; box-shadow: 0 0 0 0 rgba(28,124,58,.5); animation: gitechy-pulse 2s infinite; }
@keyframes gitechy-pulse { 0% { box-shadow: 0 0 0 0 rgba(28,124,58,.5); } 70% { box-shadow: 0 0 0 10px rgba(28,124,58,0); } 100% { box-shadow: 0 0 0 0 rgba(28,124,58,0); } }
.gitechy-clock-label { font-size: .85em; text-transform: uppercase; letter-spacing: .5px; color: var(--gitechy-muted); }
.gitechy-clock-client { font-size: 1.35em; font-weight: 700; }
.gitechy-clock-timer { font-size: 2.2em; font-weight: 700; font-variant-numeric: tabular-nums; color: #1c7c3a; }
.gitechy-portal .gitechy-btn-big { padding: 14px 26px; font-size: 18px; }
.gitechy-clock-form .gitechy-btn-big { min-width: 200px; }
.gitechy-portal .gitechy-clock .gitechy-btn-danger { background: #c62828; color: #fff !important; border-color: #c62828; }
.gitechy-gps-msg { margin: 8px 0; color: var(--gitechy-muted); }
.gitechy-gps-msg.is-error { color: #c62828; font-weight: 600; }
.gitechy-switch { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--gitechy-border); }
.gitechy-switch summary { cursor: pointer; color: var(--gitechy-primary); font-weight: 600; }
.gitechy-switch form { margin-top: 10px; }

/* Client autocomplete */
.gitechy-client-ac { position: relative; margin-bottom: 14px; }
.gitechy-client-ac input[type=text] { width: 100%; }
.gitechy-ac-list { position: absolute; z-index: 30; left: 0; right: 0; margin: 2px 0 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid var(--gitechy-border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 280px; overflow: auto; }
.gitechy-ac-list li { padding: 9px 12px; cursor: pointer; }
.gitechy-ac-list li small { display: block; color: var(--gitechy-muted); }
.gitechy-ac-list li:hover, .gitechy-ac-list li.active { background: #eef4fb; }
.gitechy-ac-list li.gitechy-ac-empty { color: var(--gitechy-muted); cursor: default; }

/* Day navigation, small tables */
.gitechy-day-nav { margin: 8px 0 12px; }
.gitechy-day-nav .gitechy-inline { gap: 10px; }
.gitechy-mini-table { width: 100%; border-collapse: collapse; }
.gitechy-mini-table td { padding: 6px 0; border-bottom: 1px solid #eef1f5; }
.gitechy-mini-table td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gitechy-mini-table tr.gitechy-total td { border-bottom: 0; border-top: 2px solid var(--gitechy-border); font-weight: 700; padding-top: 8px; }
.gitechy-mini-table tr.is-current td { font-weight: 700; }

/* Entry badges */
.gitechy-ts-badge { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 99px; font-size: .75em; font-weight: 700; background: #eef1f5; color: #50575e; }
.gitechy-ts-badge-open { background: #e3f6e8; color: #1c7c3a; }
.gitechy-ts-badge-auto, .gitechy-ts-badge-far { background: #fff5e0; color: #8a5a00; }
.gitechy-ts-badge-edited { background: #e8f0fe; color: #1a4fa0; }
.gitechy-time-table tr.gitechy-ts-auto td { background: #fffaf0; }
.gitechy-gps-link { font-size: .85em; }

/* Staff: who is in now, totals */
.gitechy-now-grid, .gitechy-totals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.gitechy-now { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--gitechy-border); border-left: 4px solid #1c7c3a; border-radius: 8px; }
.gitechy-totals-person { padding: 10px 12px; border: 1px solid var(--gitechy-border); border-radius: 8px; }
.gitechy-day-head h3 { margin: 0; }
.gitechy-clock-mini { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gitechy-text) !important; flex-wrap: wrap; }
.gitechy-clock-mini > span:nth-child(2) { flex: 1 1 220px; }

/* =====================================================================
 * Mobile app experience
 * =================================================================== */
.gitechy-bottom-nav, .gitechy-more-sheet { display: none; }

/* Full-screen app layout (no theme header/footer) */
body.gitechy-app { margin: 0; background: var(--gitechy-bg, #f5f7fa); }
body.gitechy-app .gitechy-portal { margin: 0 auto; min-height: 100vh; min-height: 100dvh; border-radius: 0; max-width: none; }
body.gitechy-app .gitechy-portal-main { max-width: 1280px; margin: 0 auto; }
body.gitechy-app .gitechy-portal-login { margin: 0 auto; padding: 8vh 16px; min-height: auto; }
body.gitechy-app .gitechy-portal-top { padding-top: calc(12px + env(safe-area-inset-top)); }

@media (max-width: 782px) {
	.gitechy-portal { font-size: 16px; margin: 0 auto 24px; border-radius: 0; }
	body:has(.gitechy-bottom-nav) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); } /* theme layout: keep the footer above the tab bar */
	body.gitechy-app:has(.gitechy-bottom-nav) { padding-bottom: 0; }
	body.gitechy-app .gitechy-portal { margin: 0; }

	/* Compact sticky top bar: logo + avatar (account/logout move to "More"). */
	.gitechy-portal-top { position: sticky; top: 0; z-index: 50; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); flex-wrap: nowrap; }
	.gitechy-portal-brand span { font-size: .95em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55vw; }
	.gitechy-portal-user > a:not(.gitechy-portal-avatar-link):not(.gitechy-bell) { display: none; }
	.gitechy-portal-nav { display: none; }

	/* Bottom tab bar */
	.gitechy-bottom-nav {
		display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
		background: #fff; border-top: 1px solid var(--gitechy-border); box-shadow: 0 -2px 12px rgba(0,0,0,.06);
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
	}
	.gitechy-bottom-nav a, .gitechy-bottom-nav button {
		flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
		min-height: 52px; padding: 4px 2px; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600;
		color: var(--gitechy-muted) !important; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
	}
	.gitechy-bottom-nav .is-active { color: var(--gitechy-primary) !important; }
	.gitechy-bottom-nav .gitechy-bottom-cta svg { width: 44px; height: 44px; padding: 10px; margin-top: -18px; border-radius: 50%; background: var(--gitechy-primary); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
	.gitechy-bottom-nav .gitechy-bottom-cta { color: var(--gitechy-primary) !important; }
	.gitechy-portal-main { padding: 14px 12px calc(96px + env(safe-area-inset-bottom)); }

	/* "More" sheet */
	.gitechy-more-sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 70; }
	.gitechy-more-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
	.gitechy-more-panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; padding: 10px 10px calc(16px + env(safe-area-inset-bottom)); max-height: 80vh; overflow: auto; animation: gitechy-up .18s ease-out; }
	@keyframes gitechy-up { from { transform: translateY(30px); opacity: .5; } to { transform: none; opacity: 1; } }
	.gitechy-more-user { display: flex; align-items: center; gap: 12px; padding: 10px 8px 14px; border-bottom: 1px solid var(--gitechy-border); margin-bottom: 6px; }
	.gitechy-more-panel > a { display: block; padding: 15px 12px; border-radius: 10px; text-decoration: none; color: var(--gitechy-text) !important; font-weight: 600; }
	.gitechy-more-panel > a.is-active { background: #eef4fb; color: var(--gitechy-primary) !important; }
	.gitechy-more-panel > a.gitechy-more-logout { color: #c62828 !important; }

	/* The report form's sticky buttons sit above the tab bar. */
	.gitechy-portal .gitechy-actions { bottom: calc(64px + env(safe-area-inset-bottom)); }

	/* Headings + actions */
	.gitechy-portal h2 { font-size: 1.3em; }
	.gitechy-portal-head { align-items: stretch; }
	.gitechy-head-actions { width: 100%; }
	.gitechy-head-actions .gitechy-btn, .gitechy-head-actions .gitechy-inline { flex: 1 1 auto; }
	.gitechy-portal .gitechy-btn { min-height: 46px; }

	/* Filters: tidy 2-column grid */
	.gitechy-filters-bar { display: grid; grid-template-columns: 1fr 1fr; }
	.gitechy-filters-bar > input[type=search], .gitechy-filters-bar > .gitechy-grow, .gitechy-filters-bar > button, .gitechy-filters-bar > a { grid-column: span 2; }
	.gitechy-filters-bar label { display: flex; flex-direction: column; font-size: .8em; color: var(--gitechy-muted); }
	.gitechy-filters-bar select, .gitechy-filters-bar input { width: 100%; }

	/* Cards & tables */
	.gitechy-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
	.gitechy-card { padding: 12px 14px; }
	.gitechy-card-n { font-size: 1.6em; }
	.gitechy-ptable tr { padding: 10px 0; }
	.gitechy-ptable .gitechy-row-actions a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--gitechy-border); border-radius: 8px; margin: 4px 6px 0 0; text-decoration: none; }

	/* Time sheet */
	.gitechy-clock-timer { font-size: 1.8em; width: 100%; }
	.gitechy-clock-form .gitechy-btn-big, .gitechy-clock-form .gitechy-row .gitechy-btn { width: 100%; }
	.gitechy-day-nav .gitechy-inline { flex-wrap: wrap; justify-content: center; }

	/* Report preview: no side-by-side */
	.gitechy-frame { min-height: 70vh; }
}

/* =====================================================================
 * Tickets
 * =================================================================== */
.gitechy-tk-status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75em; font-weight: 700; background: #eef1f5; color: #50575e; white-space: nowrap; }
.gitechy-tk-status-new { background: #e8f0fe; color: #1a4fa0; }
.gitechy-tk-status-open { background: #e0f2f1; color: #00695c; }
.gitechy-tk-status-in_progress { background: #ede7f6; color: #5e35b1; }
.gitechy-tk-status-waiting { background: #fff5e0; color: #8a5a00; }
.gitechy-tk-status-resolved { background: #e3f6e8; color: #1c7c3a; }
.gitechy-tk-status-closed { background: #eef1f5; color: #6b7684; }
.gitechy-tk-prio { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .75em; font-weight: 700; border: 1px solid currentColor; }
.gitechy-tk-prio-low { color: #6b7684; }
.gitechy-tk-prio-normal { color: #1a4fa0; }
.gitechy-tk-prio-high { color: #d97706; }
.gitechy-tk-prio-urgent { color: #fff; background: #c62828; border-color: #c62828; }
.gitechy-tk-overdue { display: inline-block; margin-top: 3px; color: #c62828; font-weight: 700; font-size: .8em; }
.gitechy-ptable tr.gitechy-tk-unread td:first-child { box-shadow: inset 4px 0 0 var(--gitechy-accent); }
.gitechy-ptable tr.gitechy-tk-unread strong { font-weight: 800; }
.gitechy-tk-meta { margin: -8px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--gitechy-muted); }
.gitechy-card-alert { border-left-color: var(--gitechy-accent) !important; }
.gitechy-badge-dot { position: absolute; transform: translate(12px, -18px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #c62828; color: #fff; font-size: 10px; font-style: normal; line-height: 18px; text-align: center; }
.gitechy-bottom-nav a { position: relative; }

/* Queue tabs */
.gitechy-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.gitechy-tabs a { padding: 8px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--gitechy-border); text-decoration: none; color: var(--gitechy-text) !important; font-weight: 600; font-size: .9em; }
.gitechy-tabs a.is-active { background: var(--gitechy-primary); border-color: var(--gitechy-primary); color: #fff !important; }
.gitechy-tabs a.gitechy-tab-alert:not(.is-active) { color: #c62828 !important; }

/* Conversation */
.gitechy-thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.gitechy-msg { background: #fff; border: 1px solid var(--gitechy-border); border-radius: 12px; padding: 12px 14px; max-width: 92%; }
.gitechy-msg-client { align-self: flex-start; border-top-left-radius: 4px; }
.gitechy-msg-staff { align-self: flex-end; background: #f1f6fd; border-color: #d3e3f8; border-top-right-radius: 4px; }
.gitechy-msg.is-internal { background: #fffbea; border: 1px dashed #e0b84c; align-self: stretch; max-width: none; }
.gitechy-msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.gitechy-msg-head small { color: var(--gitechy-muted); margin-left: auto; }
.gitechy-msg-role { font-size: .72em; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--gitechy-primary); color: #fff; }
.gitechy-msg-role.is-internal { background: #e0b84c; color: #4a3800; }
.gitechy-msg-body { white-space: normal; word-break: break-word; line-height: 1.55; }
.gitechy-msg-system { align-self: center; font-size: .82em; color: var(--gitechy-muted); background: #eef1f5; padding: 4px 12px; border-radius: 99px; text-align: center; }
.gitechy-msg-system.is-internal { background: #fff5e0; }
.gitechy-msg-system small { opacity: .8; margin-left: 6px; }
.gitechy-msg-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gitechy-file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--gitechy-border); border-radius: 8px; background: #fff; text-decoration: none; font-size: .85em; max-width: 240px; }
.gitechy-file-chip img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.gitechy-file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitechy-reply.is-internal { background: #fffbea; border-color: #e0b84c; }
.gitechy-reply textarea { width: 100%; }
.gitechy-canned { max-width: 260px; }

/* Rating */
.gitechy-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; margin-bottom: 8px; }
.gitechy-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gitechy-stars label { font-size: 32px; color: #d0d5dd; cursor: pointer; line-height: 1; }
.gitechy-stars input:checked ~ label, .gitechy-stars label:hover, .gitechy-stars label:hover ~ label { color: #f5a623; }
.gitechy-stars-static { font-size: 22px; color: #f5a623; letter-spacing: 2px; }

/* Groups / approvals */
.gitechy-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; margin-top: 8px; }
.gitechy-approve-row { display: grid; grid-template-columns: 1fr minmax(180px, 280px) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gitechy-border); }
.gitechy-approve-row:last-child { border-bottom: 0; }
@media (max-width: 720px) { .gitechy-approve-row { grid-template-columns: 1fr; } }
.gitechy-login-alt { margin-top: 16px; }
.gitechy-portal .gitechy-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
details.gitechy-portal-card > summary { cursor: pointer; }

/* Desktop: when the app layout is used on all devices, keep the portal centred like a card. */
@media (min-width: 783px) {
	body.gitechy-app .gitechy-portal { max-width: 1280px; margin: 24px auto; min-height: calc(100vh - 48px); min-height: calc(100dvh - 48px); border-radius: var(--gitechy-radius); }
	body.gitechy-app .gitechy-portal-login { margin: 8vh auto; }
}

/* =====================================================================
 * Desktop grouped menu with drop-downs
 * =================================================================== */
.gitechy-portal { overflow: visible; }                    /* let drop-downs extend over the content */
.gitechy-portal-top { border-radius: var(--gitechy-radius) var(--gitechy-radius) 0 0; }
.gitechy-menu { overflow: visible; position: relative; z-index: 40; align-items: stretch; flex-wrap: wrap; }
.gitechy-menu .gitechy-menu-link { display: inline-flex; align-items: center; gap: 6px; }
.gitechy-menu-item { position: relative; display: flex; align-items: stretch; }
.gitechy-menu-item > .gitechy-menu-link { padding-right: 4px; }
.gitechy-menu-item.is-active > .gitechy-menu-link { border-bottom-color: var(--gitechy-primary); color: var(--gitechy-primary) !important; }
.gitechy-menu-caret { border: 0; background: none; padding: 0 10px 0 2px; cursor: pointer; color: var(--gitechy-muted); border-bottom: 3px solid transparent; display: inline-flex; align-items: center; }
.gitechy-menu-item.is-active > .gitechy-menu-caret { color: var(--gitechy-primary); border-bottom-color: var(--gitechy-primary); }
.gitechy-menu-caret svg { transition: transform .15s; }
.gitechy-menu-item.is-open > .gitechy-menu-caret svg { transform: rotate(180deg); }
.gitechy-submenu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 210px; padding: 6px;
	background: #fff; border: 1px solid var(--gitechy-border); border-radius: 10px; box-shadow: 0 12px 28px rgba(0,0,0,.12);
}
.gitechy-menu-item.is-open > .gitechy-submenu, .gitechy-menu-item:focus-within > .gitechy-submenu { display: block; }
@media (hover: hover) and (pointer: fine) { .gitechy-menu-item:hover > .gitechy-submenu { display: block; } }
.gitechy-submenu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--gitechy-text) !important; font-weight: 600; white-space: nowrap; }
.gitechy-submenu a:hover, .gitechy-submenu a.is-active { background: #eef4fb; color: var(--gitechy-primary) !important; }
.gitechy-nav-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--gitechy-accent); color: #fff; font-size: 11px; line-height: 20px; text-align: center; font-weight: 700; }

/* =====================================================================
 * Dashboard cards
 * =================================================================== */
.gitechy-dash-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gitechy-dash-cards .gitechy-card { position: relative; min-height: 128px; padding: 18px; gap: 6px; justify-content: flex-end; }
.gitechy-card-icon { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #eef4fb; color: var(--gitechy-primary); }
.gitechy-dash-cards .gitechy-card-n { font-size: 2.1em; }
.gitechy-card-sub { font-size: .82em; color: var(--gitechy-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitechy-card.is-alert { border-left-color: #c62828; }
.gitechy-card.is-alert .gitechy-card-icon { background: #fdeaea; color: #c62828; }
.gitechy-card.is-alert .gitechy-card-n { color: #c62828; }
.gitechy-card.is-live { border-left-color: #1c7c3a; background: linear-gradient(135deg, #f1fbf4, #fff 60%); }
.gitechy-card.is-live .gitechy-card-icon { background: #e3f6e8; color: #1c7c3a; }
.gitechy-card.is-live .gitechy-card-n { color: #1c7c3a; font-variant-numeric: tabular-nums; }
.gitechy-card.is-muted .gitechy-card-n { color: var(--gitechy-muted); font-size: 1.6em; }
.gitechy-card.is-action { border: 2px dashed var(--gitechy-primary); border-left-width: 2px; background: #f7faff; }
.gitechy-card.is-action .gitechy-card-n { color: var(--gitechy-primary); }
@media (max-width: 782px) {
	.gitechy-dash-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
	.gitechy-dash-cards .gitechy-card { min-height: 112px; padding: 14px; }
	.gitechy-dash-cards .gitechy-card-n { font-size: 1.7em; }
	.gitechy-card-icon { width: 34px; height: 34px; top: 10px; right: 10px; }
	.gitechy-card-icon svg { width: 18px; height: 18px; }
}

/* =====================================================================
 * Footer credit
 * =================================================================== */
/* Discreet: small, light, no underline – becomes slightly clearer on hover. */
.gitechy-powered { text-align: center; font-size: 11px; letter-spacing: .2px; color: var(--gitechy-muted, #6b7684); opacity: .6; padding: 22px 0 4px; clear: both; transition: opacity .2s; }
.gitechy-powered:hover { opacity: .9; }
.gitechy-portal .gitechy-powered a, .gitechy-powered a { color: inherit !important; font-weight: 500; text-decoration: none !important; border: 0; box-shadow: none; }
.gitechy-powered a:hover, .gitechy-powered a:focus { color: var(--gitechy-primary) !important; text-decoration: none !important; }
.gitechy-portal-login .gitechy-powered { padding-top: 14px; }
.gitechy-portal-nav .gitechy-submenu a { border-bottom: 0 !important; padding: 10px 12px; }


/* =====================================================================
 * Notifications bell
 * =================================================================== */
.gitechy-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: #fff !important; opacity: 1 !important; }
.gitechy-bell:hover, .gitechy-bell.is-active { background: rgba(255,255,255,.15); }
.gitechy-bell em { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e53935; color: #fff; font-size: 10px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--gitechy-primary); }
.gitechy-notif-list { display: flex; flex-direction: column; gap: 6px; }
.gitechy-notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: #fff; border: 1px solid var(--gitechy-border); border-radius: 10px; text-decoration: none; color: var(--gitechy-text) !important; }
.gitechy-notif.is-unread { border-left: 4px solid var(--gitechy-primary); background: #f7faff; }
.gitechy-notif-icon { font-size: 20px; line-height: 1.2; }
.gitechy-notif-text { flex: 1 1 auto; }
.gitechy-notif-text span { color: var(--gitechy-muted); font-size: .92em; }
.gitechy-push-status { font-weight: 600; }
.gitechy-copy-row { display: flex; gap: 8px; }
.gitechy-copy-row input { flex: 1 1 auto; font-size: 13px !important; font-family: monospace; }
.gitechy-howto { margin-top: 10px; }
.gitechy-howto summary { cursor: pointer; color: var(--gitechy-primary); font-weight: 600; }
.gitechy-howto li { margin: 6px 0; }

/* =====================================================================
 * Tasks
 * =================================================================== */
.gitechy-task-group h3 { margin-bottom: 8px; }
.gitechy-task-group-overdue h3 { color: #c62828; }
.gitechy-task-list { display: flex; flex-direction: column; gap: 6px; }
.gitechy-task { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 1px solid var(--gitechy-border); border-radius: 10px; }
.gitechy-task.is-overdue { border-left: 4px solid #c62828; }
.gitechy-task-prio-high:not(.is-overdue) { border-left: 4px solid #d97706; }
.gitechy-task-in_progress { background: #f6f3fd; }
.gitechy-task-done { opacity: .65; }
.gitechy-task-done .gitechy-task-main strong { text-decoration: line-through; }
.gitechy-task-check, .gitechy-task-progress { margin: 0; }
.gitechy-check { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; border: 2px solid #9aa6b5; background: #fff; color: #fff; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.gitechy-check:hover { border-color: #1c7c3a; }
.gitechy-task-done .gitechy-check { background: #1c7c3a; border-color: #1c7c3a; }
.gitechy-check.is-disabled { cursor: default; }
.gitechy-task-main { flex: 1 1 auto; min-width: 0; text-decoration: none; color: var(--gitechy-text) !important; }
.gitechy-task-main strong { display: block; }
.gitechy-task-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .85em; color: var(--gitechy-muted); margin-top: 2px; }
.gitechy-chip { border: 1px solid var(--gitechy-border); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: .85em; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--gitechy-primary); }
.gitechy-chip.is-on { background: #ede7f6; border-color: #c9b8ef; color: #5e35b1; }
@media (max-width: 782px) {
	.gitechy-task { flex-wrap: wrap; }
	.gitechy-task-progress { margin-left: 40px; }
	.gitechy-check { width: 32px; height: 32px; flex-basis: 32px; }
}

/* =====================================================================
 * Calendar
 * =================================================================== */
.gitechy-cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.gitechy-cal-title { font-size: 1.15em; margin-left: 6px; }
.gitechy-cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--gitechy-border); gap: 1px; border: 1px solid var(--gitechy-border); border-radius: 10px; overflow: hidden; }
.gitechy-cal-dow { background: #f8fafc; padding: 8px; font-size: .8em; font-weight: 700; text-transform: uppercase; color: var(--gitechy-muted); text-align: center; }
.gitechy-cal-day { background: #fff; min-height: 110px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gitechy-cal-day.is-other { background: #fafbfc; }
.gitechy-cal-day.is-other .gitechy-cal-daynum span { opacity: .45; }
.gitechy-cal-day.is-today { box-shadow: inset 0 0 0 2px var(--gitechy-primary); }
.gitechy-cal-daynum { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .9em; }
.gitechy-cal-add { opacity: 0; text-decoration: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eef4fb; font-weight: 700; }
.gitechy-cal-day:hover .gitechy-cal-add, .gitechy-cal-week td:hover .gitechy-cal-add { opacity: 1; }
@media (hover: none) { .gitechy-cal-add { opacity: .7; } }
.gitechy-cal-task { display: block; padding: 3px 6px; border-radius: 5px; font-size: .78em; line-height: 1.3; text-decoration: none; color: #fff !important; background: var(--c, #6b7684); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitechy-cal-task.gitechy-cal-done { opacity: .5; text-decoration: line-through; }
.gitechy-cal-task.gitechy-cal-in_progress { box-shadow: inset 3px 0 0 rgba(255,255,255,.8); }
.gitechy-cal-task.is-overdue { outline: 2px solid #c62828; outline-offset: -2px; }
.gitechy-cal-more { font-size: .78em; font-weight: 600; text-decoration: none; }
.gitechy-cal-week-wrap { overflow-x: auto; border: 1px solid var(--gitechy-border); border-radius: 10px; background: #fff; }
.gitechy-cal-week { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.gitechy-cal-week th, .gitechy-cal-week td { border: 1px solid #eef1f5; padding: 6px; vertical-align: top; }
.gitechy-cal-week thead th { background: #f8fafc; font-size: .82em; text-transform: uppercase; color: var(--gitechy-muted); }
.gitechy-cal-week tbody th { width: 150px; text-align: left; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gitechy-cal-week td { height: 64px; }
.gitechy-cal-week td > * + * { margin-top: 3px; }
.gitechy-cal-week .is-today { background: #f4f8ff; }
.gitechy-cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.gitechy-cal-legend { margin-top: 8px; font-size: .85em; }
@media (max-width: 782px) {
	.gitechy-cal-day { min-height: 74px; padding: 3px; }
	.gitechy-cal-task { font-size: 0; height: 8px; padding: 0; border-radius: 4px; } /* dots on phones: tap the day's week view for details */
	.gitechy-cal-dow { font-size: .7em; padding: 6px 2px; }
}
.gitechy-sync-status { margin: 12px 0 4px; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--gitechy-border); border-radius: 8px; }
.gitechy-sync-status p { margin: 4px 0; }
.gitechy-ok-text { color: #1c7c3a; font-weight: 600; }
.gitechy-howto ol { padding-left: 20px; }
.gitechy-howto ol li { margin: 6px 0; }


/* =====================================================================
 * Footer always at the bottom ("sticky footer")
 * The portal is a full-height column: header · menu · content (grows) · credit.
 * =================================================================== */
.gitechy-portal { display: flex; flex-direction: column; min-height: 80vh; }
body.gitechy-app .gitechy-portal { min-height: 100vh; min-height: 100dvh; }
.gitechy-portal > .gitechy-portal-main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
.gitechy-portal > .gitechy-powered { margin-top: auto; padding: 14px 12px 16px; }

/* Login / registration: card centred vertically, credit at the bottom. */
.gitechy-portal.gitechy-portal-login { min-height: 80vh; padding-top: 0; padding-bottom: 0; }
body.gitechy-app .gitechy-portal.gitechy-portal-login { min-height: 100vh; min-height: 100dvh; margin-top: 0; margin-bottom: 0; padding: 0 16px; box-sizing: border-box; }
.gitechy-portal-login > .gitechy-portal-card { margin-top: auto; margin-bottom: auto; }
.gitechy-portal-login > .gitechy-powered { margin-top: 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

@media (min-width: 783px) {
	body.gitechy-app .gitechy-portal.gitechy-portal-login { padding: 0 16px; }
}

@media (max-width: 782px) {
	/* Content no longer needs room for the tab bar – the portal itself keeps the credit above it. */
	.gitechy-portal-main { padding-bottom: 14px; }
	body.gitechy-app .gitechy-portal:not(.gitechy-portal-login) { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
	/* Theme layout: body already gets bottom padding for the tab bar (see above). */
	.gitechy-portal > .gitechy-powered { padding-bottom: 12px; }
}

/* =====================================================================
 * Analytics
 * =================================================================== */
.gitechy-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.gitechy-kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: #fff; border: 1px solid var(--gitechy-border); border-radius: var(--gitechy-radius); }
.gitechy-kpi-v { font-size: 1.7em; font-weight: 700; line-height: 1.15; color: #0b0b0b; font-variant-numeric: tabular-nums; }
.gitechy-kpi-l { color: #52514e; font-size: .9em; }
.gitechy-kpi-s { color: #6b7684; font-size: .8em; }
.gitechy-kpi.is-warn { border-left: 4px solid #d97706; }
.gitechy-chart h4 { margin: 0 0 10px; font-size: 1em; }
.gitechy-chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.gitechy-chart-grid .gitechy-portal-card { margin-bottom: 0; }
.gitechy-chart-box { width: 100%; }
.gitechy-chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.gitechy-chart-tick { font-size: 11px; fill: #6b7684; }
.gitechy-chart-end { font-size: 12px; font-weight: 700; fill: #0b0b0b; }
.gitechy-chart-hit { fill: transparent; cursor: crosshair; }
.gitechy-chart-hit:hover { fill: rgba(11, 11, 11, .04); }
.gitechy-chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 6px; font-size: .9em; color: #52514e; }
.gitechy-chart-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.gitechy-chart-table { margin-top: 8px; font-size: .85em; }
.gitechy-chart-table summary { cursor: pointer; color: var(--gitechy-primary); }
.gitechy-chart-table table { margin-top: 6px; max-width: 420px; }
.gitechy-bars { display: flex; flex-direction: column; gap: 2px; }
.gitechy-bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; min-height: 28px; }
.gitechy-bar-label { font-size: .88em; color: #0b0b0b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitechy-bar-track { height: 16px; display: block; }
.gitechy-bar { display: block; height: 16px; border-radius: 0 4px 4px 0; min-width: 2px; }
.gitechy-bar-value { font-size: .85em; font-weight: 600; color: #52514e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gitechy-custom-range[hidden] { display: none !important; }

/* =====================================================================
 * Recurring / misc
 * =================================================================== */
.gitechy-ptable tr.gitechy-row-muted td { opacity: .55; }

/* =====================================================================
 * Quotes
 * =================================================================== */
.gitechy-q-status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75em; font-weight: 700; background: #eef1f5; color: #50575e; }
.gitechy-q-sent { background: #e8f0fe; color: #1a4fa0; }
.gitechy-q-accepted { background: #e3f6e8; color: #1c7c3a; }
.gitechy-q-declined { background: #fdeaea; color: #b3261e; }
.gitechy-q-expired { background: #fff5e0; color: #8a5a00; }
.gitechy-qitems { width: 100%; border-collapse: collapse; }
.gitechy-qitems th { text-align: left; font-size: .8em; color: var(--gitechy-muted); padding: 6px 4px; border-bottom: 1px solid var(--gitechy-border); }
.gitechy-qitems td { padding: 4px; vertical-align: middle; }
.gitechy-qitems td:nth-child(1) { width: 52%; }
.gitechy-qitems td:nth-child(2) { width: 12%; }
.gitechy-qitems td:nth-child(3) { width: 18%; }
.gitechy-qitems td input { width: 100%; }
.gitechy-qline { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gitechy-qadd { margin: 6px 0 12px; color: var(--gitechy-primary) !important; text-decoration: none !important; font-weight: 600; }
.gitechy-qtotals { margin-left: auto; max-width: 340px; display: flex; flex-direction: column; gap: 6px; }
.gitechy-qtotals > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gitechy-qtotals strong { font-variant-numeric: tabular-nums; }
.gitechy-qgrand { border-top: 2px solid var(--gitechy-primary); padding-top: 6px; font-size: 1.15em; }
@media (max-width: 640px) {
	.gitechy-qitems thead { display: none; }
	.gitechy-qitems tr { display: grid; grid-template-columns: 1fr 70px 100px 30px; gap: 4px; padding: 6px 0; border-bottom: 1px solid #eef1f5; }
	.gitechy-qitems td:nth-child(1) { grid-column: 1 / -1; width: auto; }
	.gitechy-qitems td { width: auto !important; }
}
.gitechy-quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .gitechy-quote-layout { grid-template-columns: 1fr; } }
.gitechy-quote-decision { position: sticky; top: 16px; }
.gitechy-quote-total { display: flex; flex-direction: column; margin-bottom: 12px; }
.gitechy-quote-total strong { font-size: 2em; color: var(--gitechy-primary); }
.gitechy-quote-sig { position: relative; margin-bottom: 12px; }
.gitechy-quote-sig canvas { display: block; width: 100%; height: 160px; border: 1px dashed #9aa6b5; border-radius: 8px; background: #fff; touch-action: none; }
.gitechy-quote-sig [data-sig-clear] { position: absolute; top: 6px; right: 10px; color: var(--gitechy-primary); }
.gitechy-quote-decline { margin-top: 14px; }
.gitechy-quote-decline summary { cursor: pointer; color: var(--gitechy-muted); }
.gitechy-quote-public { max-width: 1180px; }

/* =====================================================================
 * Knowledge base
 * =================================================================== */
.gitechy-kb-search { display: flex; gap: 8px; margin-bottom: 14px; }
.gitechy-kb-search input[type=search] { flex: 1 1 auto; font-size: 17px !important; padding: 12px 14px !important; border-radius: 10px !important; }
.gitechy-kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.gitechy-kb-item { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: #fff; border: 1px solid var(--gitechy-border); border-radius: var(--gitechy-radius); text-decoration: none; color: var(--gitechy-text) !important; }
.gitechy-kb-item:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.gitechy-kb-item small { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gitechy-kb-cat { display: inline-block; padding: 1px 8px; border-radius: 99px; background: #eef4fb; color: var(--gitechy-primary); font-size: .8em; font-weight: 600; }
.gitechy-kb-article { line-height: 1.7; }
.gitechy-kb-body img { max-width: 100%; height: auto; border-radius: 6px; }
.gitechy-kb-body h3 { margin-top: 1.2em; }
.gitechy-kb-body code { background: #f1f3f6; padding: 1px 5px; border-radius: 4px; }
.gitechy-kb-vote { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--gitechy-border); }
.gitechy-kb-links { margin: 0; padding-left: 18px; }
.gitechy-kb-links li { margin: 6px 0; }
.gitechy-kb-suggest { padding: 12px 14px; background: #fffbea; border: 1px solid #f0d98a; border-radius: 8px; margin-bottom: 14px; }
.gitechy-kb-suggest ul { margin: 6px 0 0; padding-left: 20px; }

/* =====================================================================
 * Activity log
 * =================================================================== */
.gitechy-audit-type { display: inline-block; padding: 1px 8px; border-radius: 4px; background: #eef1f5; font-size: .78em; font-weight: 600; color: #50575e; }
.gitechy-audit tr.gitechy-audit-failed td, .gitechy-audit tr.gitechy-audit-deleted td { background: #fffafa; }
.gitechy-audit td:nth-child(4) { word-break: break-word; }

/* =====================================================================
 * Remote support (RustDesk)
 * =================================================================== */
.gitechy-rs-status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75em; font-weight: 700; background: #eef1f5; color: #50575e; white-space: nowrap; }
.gitechy-rs-requested { background: #fff5e0; color: #8a5a00; }
.gitechy-rs-active { background: #e3f6e8; color: #1c7c3a; }
.gitechy-rs-cancelled { background: #f6e7e7; color: #8a2424; }
.gitechy-rs-open { border-left: 4px solid #1c7c3a; }
.gitechy-rs-id { font-family: monospace; font-size: 1.5em; font-weight: 700; letter-spacing: .04em; margin: 4px 0; }
.gitechy-rs-end { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gitechy-rs-end input { flex: 1 1 220px; }
.gitechy-rs-item { padding: 10px 0; border-bottom: 1px solid var(--gitechy-border); }
.gitechy-rs-item:last-of-type { border-bottom: 0; }
.gitechy-portal-card.gitechy-rs-item { padding: 16px; border-bottom: 1px solid var(--gitechy-border); }
.gitechy-rs-item.is-requested { border-left: 4px solid #e6a100; padding-left: 12px; }
.gitechy-rs-item .gitechy-row { margin-top: 8px; flex-wrap: wrap; }
.gitechy-rs-note { margin: 6px 0; padding: 6px 10px; background: #f6f7f9; border-radius: 6px; font-size: .9em; }
.gitechy-rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.gitechy-rs-devices { list-style: none; margin: 8px 0; padding: 0; }
.gitechy-rs-devices li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gitechy-border); }
.gitechy-rs-devices li:last-child { border-bottom: 0; }
.gitechy-rs-devices code, .gitechy-rs-item code, .gitechy-ptable code { font-size: .95em; letter-spacing: .03em; }
.gitechy-rs-quick { margin-top: 10px; }
.gitechy-rs-quick summary { cursor: pointer; color: var(--gitechy-primary, #0b5cab); font-size: .92em; }
.gitechy-rs-quick form { margin-top: 10px; }
.gitechy-rs-add input[name="name"] { margin-bottom: 8px; width: 100%; }
.gitechy-rs-howto ol { padding-left: 1.3em; }
.gitechy-rs-howto li { margin-bottom: 12px; }
.gitechy-rs-howto li .gitechy-btn { margin-top: 6px; }
.gitechy-rs-downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.gitechy-rs-downloads .gitechy-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 0; }
.gitechy-rs-downloads .gitechy-btn svg { flex: 0 0 auto; }
.gitechy-rs-dl-other { font-size: .92em; }
@media (max-width: 720px) { .gitechy-rs-downloads .gitechy-btn { flex: 1 1 100%; justify-content: center; } }
.gitechy-rs-server p { margin: 8px 0; }
.gitechy-rs-server label { display: block; font-size: .85em; font-weight: 600; }
.gitechy-ptable .gitechy-row-actions .gitechy-inline { margin-left: 8px; }

/* Bulk selection (tickets, remote sessions) */
.gitechy-bulk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.gitechy-bulk-bar .gitechy-btn[disabled] { opacity: .45; cursor: not-allowed; }
.gitechy-ptable .gitechy-col-check { width: 34px; text-align: center; }
.gitechy-ptable .gitechy-col-check input { width: 18px; height: 18px; margin: 0; }
@media (max-width: 720px) { .gitechy-ptable td.gitechy-col-check { text-align: left; } .gitechy-ptable td.gitechy-col-check::before { display: none; } }

/* =====================================================================
 * Billing: invoices, contracts, payments
 * =================================================================== */
.gitechy-inv-status, .gitechy-k-status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75em; font-weight: 700; background: #eef1f5; color: #50575e; white-space: nowrap; }
.gitechy-inv-sent, .gitechy-inv-partial { background: #fff5e0; color: #8a5a00; }
.gitechy-inv-paid, .gitechy-k-active { background: #e3f6e8; color: #1c7c3a; }
.gitechy-inv-overdue { background: #fdecea; color: #b3261e; }
.gitechy-inv-void, .gitechy-k-ended { background: #eef1f5; color: #6b7684; text-decoration: line-through; }
.gitechy-k-ended { text-decoration: none; }
.gitechy-k-paused { background: #fff5e0; color: #8a5a00; }
a.gitechy-kpi { text-decoration: none; color: inherit; }
a.gitechy-kpi:hover { border-color: var(--gitechy-primary); }
.gitechy-kpi-v-sm { font-size: 1.05em; }
.gitechy-usage { display: block; height: 8px; border-radius: 99px; background: #e6eaf0; overflow: hidden; margin: 6px 0; }
.gitechy-usage span { display: block; height: 100%; background: var(--gitechy-primary); border-radius: 99px; }
.gitechy-usage.is-warn span { background: #d97706; }
.gitechy-usage.is-over span { background: #c62828; }
.gitechy-btn.gitechy-btn-sm { padding: 4px 12px; min-height: 0; font-size: .85em; }
.gitechy-inv-methods form { margin: 0 0 8px; }
.gitechy-inv-methods .gitechy-pay-paypal { background: #ffc439; border-color: #ffc439; color: #111; font-weight: 700; }
.gitechy-inv-secure { font-size: .8em; }
.gitechy-inv-instructions { margin-top: 12px; padding: 10px 12px; background: #f6f7f9; border-radius: 8px; font-size: .9em; }
.gitechy-inv-instructions p { margin: 4px 0 0; }
.gitechy-mini-table td.gitechy-num, .gitechy-num { text-align: right; white-space: nowrap; }
.gitechy-bulk-bar .gitechy-row { gap: 8px; flex-wrap: wrap; }
.gitechy-ptable tfoot td { border-top: 2px solid var(--gitechy-border); padding-top: 8px; }
@media (max-width: 720px) { .gitechy-ptable tfoot td:empty { display: none; } }

/* Products & subscriptions */
.gitechy-pp { margin-bottom: 8px; }
.gitechy-pp select { max-width: 100%; }
.gitechy-sub-active { background: #e3f6e8; color: #1c7c3a; }
.gitechy-sub-paused { background: #fff5e0; color: #8a5a00; }
.gitechy-sub-cancelled, .gitechy-sub-ended { background: #eef1f5; color: #6b7684; }
.gitechy-sub-public { max-width: 560px; margin: 0 auto; }
.gitechy-sub-public .gitechy-quote-total { margin: 12px 0; }
.gitechy-cp-subs { margin-bottom: 18px; }

/* Inventory */
.gitechy-units { margin-top: 4px; font-size: .85em; }
.gitechy-units summary { cursor: pointer; color: var(--gitechy-muted); }
.gitechy-units textarea { width: 100%; margin-top: 4px; font-family: monospace; font-size: 12px; }
.gitechy-inv-low td:first-child { border-left: 3px solid #d97706; }
.gitechy-parts textarea { width: 100%; font-family: monospace; font-size: 12px; }
.gitechy-cp-equipment summary { cursor: pointer; }
.gitechy-cp-equipment table { margin-top: 10px; }

/* Client assets */
.gitechy-asset-fields { margin: 0; }
.gitechy-asset-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gitechy-asset-cards .gitechy-dl { margin-top: 8px; }
.gitechy-industry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; }

/* ---- Projects & boards ---- */
.gitechy-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gitechy-portal a.gitechy-board-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: #fff; border: 1px solid var(--gitechy-border); border-top: 4px solid var(--gitechy-board, var(--gitechy-primary)); border-radius: var(--gitechy-radius); color: var(--gitechy-text); text-decoration: none; }
.gitechy-portal a.gitechy-board-tile:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.gitechy-board-progress { display: block; height: 6px; background: #e8edf3; border-radius: 99px; overflow: hidden; margin: 4px 0; }
.gitechy-board-progress i { display: block; height: 100%; background: var(--gitechy-board, var(--gitechy-primary)); border-radius: 99px; }
.gitechy-board-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.gitechy-board-flag { font-size: .78em; padding: 2px 8px; border-radius: 99px; background: #f0f3f7; color: var(--gitechy-muted); }
.gitechy-board-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--gitechy-board, var(--gitechy-primary)); vertical-align: middle; }
.gitechy-board-desc { margin: 6px 0 0; color: var(--gitechy-muted); max-width: 70ch; }
.gitechy-portal .gitechy-card-late { color: #c62828; font-weight: 700; }
.gitechy-view-switch { display: inline-flex; border: 1px solid var(--gitechy-border); border-radius: 8px; overflow: hidden; }
.gitechy-view-switch a { padding: 7px 12px; text-decoration: none; font-weight: 600; background: #fff; }
.gitechy-view-switch a.is-active { background: var(--gitechy-primary); color: #fff !important; }

.gitechy-kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; -webkit-overflow-scrolling: touch; }
.gitechy-kcol { flex: 0 0 272px; background: #eef2f6; border-radius: var(--gitechy-radius); display: flex; flex-direction: column; max-height: 78vh; }
.gitechy-kcol > header { padding: 10px 12px 6px; display: flex; gap: 8px; align-items: center; }
.gitechy-kcol.is-done-stage > header { color: #2e7d32; }
.gitechy-kcount { font-size: .8em; color: var(--gitechy-muted); background: #fff; border-radius: 99px; padding: 0 8px; }
.gitechy-kcards { padding: 4px 8px 8px; min-height: 48px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; border-radius: 8px; }
.gitechy-kcards.is-over { background: rgba(11,92,171,.08); outline: 2px dashed rgba(11,92,171,.35); outline-offset: -4px; }
.gitechy-kcard { background: #fff; border-radius: 8px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08); border-left: 3px solid transparent; }
.gitechy-kanban[data-kanban] .gitechy-kcard { cursor: grab; }
.gitechy-kcard.is-dragging { opacity: .5; }
.gitechy-kcard.is-done .gitechy-ktitle { text-decoration: line-through; color: var(--gitechy-muted) !important; }

.gitechy-portal .gitechy-ktitle { display: block; font-weight: 600; color: var(--gitechy-text); text-decoration: none; word-break: break-word; }
.gitechy-portal .gitechy-ktitle:hover { color: var(--gitechy-primary); }
.gitechy-klabels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.gitechy-klabels span, .gitechy-klabel { display: inline-block; font-size: .72em; font-weight: 700; color: #fff; padding: 1px 8px; border-radius: 99px; }
.gitechy-kmeta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: .8em; color: var(--gitechy-muted); }
.gitechy-kprio { color: #c62828; font-weight: 700; }
.gitechy-kpeople { display: flex; justify-content: flex-end; gap: 4px; margin-top: 6px; }
.gitechy-kpeople span { width: 26px; height: 26px; border-radius: 50%; background: var(--gitechy-primary); color: #fff; font-size: .7em; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.gitechy-kadd { margin: 0; padding: 0 8px 10px; }
.gitechy-kadd input { width: 100%; box-sizing: border-box; border: 1px dashed #b9c4d0; background: transparent; border-radius: 8px; padding: 8px 10px; }
.gitechy-kadd input:focus { background: #fff; border-style: solid; }
@media (max-width: 640px) { .gitechy-kcol { flex-basis: 84vw; max-height: none; } .gitechy-kanban { scroll-snap-type: x mandatory; } .gitechy-kcol { scroll-snap-align: start; } }

.gitechy-color-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.gitechy-color-pick label { width: 28px; height: 28px; border-radius: 50%; background: var(--gitechy-board); cursor: pointer; position: relative; }
.gitechy-color-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gitechy-color-pick label:has(input:checked) { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gitechy-board); }
.gitechy-color-pick label:has(input:focus-visible) { outline: 2px solid var(--gitechy-text); outline-offset: 3px; }
.gitechy-stage-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.gitechy-stage-row input[type=number] { width: 56px; }
.gitechy-checklist { list-style: none; margin: 8px 0 12px; padding: 0; }
.gitechy-checklist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid #f0f3f7; }
.gitechy-checklist li.is-done span { text-decoration: line-through; color: var(--gitechy-muted); }
.gitechy-check-toggle { background: none; border: 0; padding: 0 4px 0 0; font-size: 1.3em; cursor: pointer; color: var(--gitechy-primary); line-height: 1; }
.gitechy-time-add .gitechy-row label { display: flex; flex-direction: column; font-size: .85em; gap: 2px; }
.gitechy-time-add .gitechy-row input { width: 100%; max-width: 140px; }
.gitechy-time-list { list-style: none; margin: 10px 0 0; padding: 0; font-size: .9em; }
.gitechy-time-list li { padding: 6px 0; border-top: 1px solid #f0f3f7; }
.gitechy-portal label.gitechy-choice { display: inline-flex; align-items: center; gap: 8px; font-weight: normal; }

/* Two-column pages follow the portal's own width (themes with a narrow content column), not just the screen. */
.gitechy-portal-main { container-type: inline-size; }
@container (max-width: 760px) { .gitechy-split { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 520px) { .gitechy-form-grid { grid-template-columns: minmax(0, 1fr); } .gitechy-form-grid .gitechy-span-2 { grid-column: span 1; } }
.gitechy-time-add .gitechy-row input { flex: 0 0 auto; }
/* Board colour: header band and stage columns. */
.gitechy-board-head { border-left: 8px solid var(--gitechy-board, var(--gitechy-primary)); background: color-mix(in srgb, var(--gitechy-board, var(--gitechy-primary)) 12%, #fff); padding: 14px 16px; border-radius: var(--gitechy-radius); }
.gitechy-board-head h2 { color: var(--gitechy-board, var(--gitechy-primary)); }
.gitechy-board-head .gitechy-board-dot { display: none; }
.gitechy-kanban .gitechy-kcol { background: color-mix(in srgb, var(--gitechy-board, var(--gitechy-primary)) 14%, #f4f6f9); overflow: hidden; }
.gitechy-kanban .gitechy-kcol > header { background: var(--gitechy-board, var(--gitechy-primary)); color: #fff; padding: 10px 12px; margin-bottom: 6px; }
.gitechy-kanban .gitechy-kcol > header .gitechy-kcount { background: #fff; color: var(--gitechy-board, var(--gitechy-primary)); font-weight: 700; }
.gitechy-kanban .gitechy-kcol.is-done-stage > header { background: #2e7d32; color: #fff; }
.gitechy-kanban .gitechy-kcol.is-done-stage { background: color-mix(in srgb, #2e7d32 12%, #f4f6f9); }
.gitechy-kanban .gitechy-kcol.is-done-stage > header .gitechy-kcount { color: #2e7d32; }

.gitechy-portal a.gitechy-board-tile { border-top-width: 8px; background: linear-gradient(color-mix(in srgb, var(--gitechy-board, var(--gitechy-primary)) 10%, #fff), #fff 70%); }
.gitechy-portal a.gitechy-board-tile strong { color: var(--gitechy-board, var(--gitechy-primary)); font-size: 1.1em; }
.gitechy-portal .gitechy-notice-info { background: #e8f1fb; border-color: var(--gitechy-primary); }
/* Staff role with view-only access to this page. */
.gitechy-portal-main[data-readonly] .gitechy-danger-zone, .gitechy-portal-main[data-readonly] .gitechy-kadd, .gitechy-portal-main[data-readonly] .gitechy-bulk-bar { display: none !important; }
.gitechy-portal-main[data-readonly] form[method=post] :disabled { opacity: .65; cursor: not-allowed; }
/* Staff roles */
.gitechy-staff-role { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.gitechy-table-scroll { overflow-x: auto; }
.gitechy-role-matrix th, .gitechy-role-matrix td { text-align: center; white-space: nowrap; }
.gitechy-role-matrix tbody th { text-align: left; }
.gitechy-perm-grid tr.is-off, .gitechy-role-matrix tr.is-off { opacity: .55; }
.gitechy-perm-badge { display: inline-block; min-width: 44px; padding: 2px 8px; border-radius: 99px; font-size: .8em; font-weight: 700; color: var(--gitechy-muted); }
.gitechy-perm-badge.gitechy-perm-view { background: #e8f1fb; color: #0b5cab; }
.gitechy-perm-badge.gitechy-perm-manage { background: #e3f6e8; color: #1c7c3a; }
.gitechy-perm-opt { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: normal; }
.gitechy-role-descs p { margin: 4px 0; }

/* Board cards: clearly in the board's colour. Priority shows as a badge; urgent cards get a red ring. */
.gitechy-kanban .gitechy-kcard { border: 1px solid color-mix(in srgb, var(--gitechy-board, var(--gitechy-primary)) 35%, #fff); border-left: 7px solid var(--gitechy-board, var(--gitechy-primary)); background: color-mix(in srgb, var(--gitechy-board, var(--gitechy-primary)) 11%, #fff); box-shadow: 0 2px 4px color-mix(in srgb, var(--gitechy-board, var(--gitechy-primary)) 25%, transparent); }
.gitechy-kanban .gitechy-kcard:hover { background: color-mix(in srgb, var(--gitechy-board, var(--gitechy-primary)) 18%, #fff); }
.gitechy-kanban .gitechy-kcard .gitechy-ktitle { color: color-mix(in srgb, var(--gitechy-board, var(--gitechy-primary)) 70%, #000); }
.gitechy-kanban .gitechy-kcard .gitechy-kpeople span { background: var(--gitechy-board, var(--gitechy-primary)); }
.gitechy-kanban .gitechy-kcard.is-done { background: #f3f5f7; border-left-color: #2e7d32; opacity: .85; }
.gitechy-kprio { background: #ef6c00; color: #fff !important; border-radius: 4px; padding: 0 6px; }
.gitechy-kcard.gitechy-kprio-urgent .gitechy-kprio { background: #c62828; }
.gitechy-kanban .gitechy-kcard.gitechy-kprio-urgent { box-shadow: 0 0 0 2px #c62828; }
/* Menu: headings inside drop-downs, Manual level badge. */
.gitechy-submenu .gitechy-submenu-head { display: block; padding: 8px 14px 2px; font-size: .72em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gitechy-muted); }
.gitechy-submenu .gitechy-submenu-head:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--gitechy-border); padding-top: 10px; }
.gitechy-portal .gitechy-level-manual { background: #ede7f6; color: #5e35b1; }

/* ---- Project materials ---- */
.gitechy-mat-chip { display: inline-block; margin: 1px 2px; padding: 1px 8px; border-radius: 99px; background: #eef2f6; font-size: .8em; white-space: nowrap; }
.gitechy-mat-table tr.is-missing td:first-child { box-shadow: inset 4px 0 0 #ef6c00; }
.gitechy-mat-table tr.is-done td:first-child { box-shadow: inset 4px 0 0 #2e7d32; }
.gitechy-mat-need input { width: 80px; }
.gitechy-mat-act { display: inline-block; font-size: .72em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; background: #eef2f6; color: var(--gitechy-muted); }
.gitechy-mat-act-install { background: #e3f6e8; color: #1c7c3a; }
.gitechy-mat-act-deliver { background: #e8f1fb; color: #0b5cab; }
.gitechy-mat-act-reserve { background: #fff5e0; color: #8a5a00; }
.gitechy-mat-act-return { background: #ede7f6; color: #5e35b1; }
.gitechy-portal .gitechy-link-plain { color: var(--gitechy-primary); }
.gitechy-proj-loc { border-top: 1px solid var(--gitechy-border); padding: 8px 0; }
.gitechy-proj-loc.is-off { opacity: .6; }
.gitechy-proj-loc input[type=text] { width: 100%; margin-bottom: 4px; box-sizing: border-box; }
@container (max-width: 760px) { .gitechy-split-mat > .gitechy-split-side { order: -1; } }
@media (max-width: 960px) { .gitechy-split-mat > .gitechy-split-side { order: -1; } }
/* Client branches */
.gitechy-branch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; align-items: end; padding: 10px 0; border-top: 1px solid var(--gitechy-border); }
.gitechy-branch-row label span { display: block; font-size: .8em; font-weight: 600; color: var(--gitechy-muted); }
.gitechy-branch-row input[type=text], .gitechy-branch-row input[type=email], .gitechy-branch-row input[type=tel] { width: 100%; box-sizing: border-box; }
.gitechy-branch-tag { display: inline-block; font-size: .78em; padding: 1px 8px; border-radius: 99px; background: #ede7f6; color: #5e35b1; white-space: nowrap; }

/* Install as an app / app icon */
.gitechy-install-app { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.gitechy-install-app p { margin: 4px 0 0; }
.gitechy-app-icon { border-radius: 22%; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); flex: 0 0 auto; background: #fff; }
.gitechy-app-icon-round { border-radius: 50%; }
.gitechy-app-icon-preview { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 10px 0; }
.gitechy-install ol, .gitechy-install ul { margin: 6px 0 6px 20px; padding: 0; }
.gitechy-install li { margin: 3px 0; }
.gitechy-app-icon-card .gitechy-portal-form label.gitechy-file-btn { display: inline-flex; font-size: 15px; margin: 0 0 8px; cursor: pointer; }
.gitechy-app-icon-card .gitechy-busy { opacity: .6; pointer-events: none; }
