/* Styles of the redesigned pages, one section per page. Each section is
 * scoped to its page's class prefix (e.g. .dash-, .tmr-), so the file can load
 * on every page. Colours come from the theme tokens in themes.css, so the
 * pages follow the Palette and dark Mode.
 *
 * The Timers section is shared: the Timezones, Edit timer and Edit timezone
 * pages build on it and override parts of it, so it must stay above them. */

/* ---- Parameters (.prm-) ---- */

/* The timezone detail modal is rendered outside .prm, so it needs the colours too. */
.prm, .prm-modal {
	--prm-border: hsl(var(--border));
	--prm-card: hsl(var(--card));
	--prm-text: hsl(var(--foreground));
	--prm-muted: hsl(var(--muted-foreground));
	--prm-faint: hsl(var(--muted-foreground) / .65);
	--prm-soft: hsl(var(--muted) / .55);
	--prm-primary: hsl(var(--primary));
	--prm-primary-fg: hsl(var(--primary-foreground));
	--prm-primary-soft: hsl(var(--primary) / .1);
}
.prm {
	color: var(--prm-text);
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.prm-crumb { font-size: 14px; color: var(--prm-muted); margin-bottom: 6px; }
.prm-crumb span { color: var(--prm-text); }
.prm-h1 { font-size: 33px; font-weight: 700; line-height: 1.1; margin: 0; }
.prm-lede { font-size: 15px; color: var(--prm-muted); margin: 6px 0 0; }

.prm-card { background: color-mix(in srgb, hsl(var(--primary)) 5%, hsl(var(--card))); --prm-soft: hsl(var(--card)); border: 1px solid var(--prm-border); border-radius: 16px; box-shadow: 0 1px 2px rgba(31, 35, 51, .04); }
.prm-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin: 0; }
.prm-sub { font-size: 13px; color: var(--prm-muted); margin: 2px 0 0; }
.prm-badge { padding: 2px 8px; border-radius: 6px; background: var(--prm-soft); color: var(--prm-muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.prm-eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--prm-muted); margin-bottom: 6px; }

/* Target picker */
.prm-target { position: relative; width: 260px; max-width: 100%; }
.prm-control { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--prm-border); border-radius: 9px; background: var(--prm-card); color: var(--prm-text); font-size: 14px; text-align: left; cursor: pointer; }
.prm-control:focus, .prm-control:focus-visible { border-color: var(--prm-primary); outline: none; box-shadow: 0 0 0 3px var(--prm-primary-soft); }
.prm-control svg { width: 16px; height: 16px; flex: none; color: var(--prm-muted); }
.prm-menu { position: absolute; right: 0; left: 0; z-index: 50; margin-top: 6px; padding: 6px; max-height: 280px; overflow-y: auto; background: hsl(var(--popover)); color: hsl(var(--popover-foreground)); border: 1px solid var(--prm-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(31, 35, 51, .14); }
.prm-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 15px; cursor: pointer; }
.prm-option:hover { background: var(--prm-soft); }
.prm-menu hr { margin: 4px 0; border: 0; border-top: 1px solid var(--prm-border); }


/* Send toolbar */
.prm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 16px 16px 16px; }
.prm-toolbar-left { display: flex; align-items: center; gap: 12px; }
.prm-tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--prm-primary-soft); color: var(--prm-primary); }
.prm-tile svg { width: 16px; height: 16px; }
.prm-toolbar .prm-target { width: 225px; }
.prm-toolbar .prm-eyebrow { margin-bottom: 4px; }
.prm-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prm-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--prm-border); border-radius: 9px; background: var(--prm-card); color: var(--prm-text); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s; }
.prm-btn:hover { border-color: var(--prm-primary); }
.prm-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--prm-primary-soft); }
.prm-btn svg { width: 14px; height: 14px; }
.prm-btn-amber svg { color: #b86e00; }
.prm-btn-blue svg { color: #3b5bdb; }
.prm-btn-primary { background: var(--prm-primary); border-color: var(--prm-primary); color: var(--prm-primary-fg); font-weight: 600; box-shadow: 0 4px 12px hsl(var(--primary) / .3); }
.prm-btn-primary:hover { filter: brightness(.94); }

/* Timezone slots */
.prm-tz-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; }
.prm-tz-title { display: flex; align-items: center; gap: 12px; }
.prm-tz-controls { display: flex; align-items: flex-end; gap: 16px; }
.prm-tz-controls .prm-eyebrow { margin-bottom: 4px; }
.prm-select { height: 32px; width: 155px; max-width: 100%; padding: 0 10px; border: 1px solid var(--prm-border); border-radius: 9px; background-color: var(--prm-card); color: var(--prm-text); font-size: 14px; }
.prm-select:focus { border-color: var(--prm-primary); outline: none; box-shadow: 0 0 0 3px var(--prm-primary-soft); }
.prm-link { height: 32px; border: 0; background: none; padding: 0 4px; font-size: 13px; font-weight: 600; color: var(--prm-primary); cursor: pointer; }
.prm-link:hover { text-decoration: underline; }
.prm-tz-body { padding: 0 16px 16px; }
.prm-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
@media (max-width: 900px) { .prm-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .prm-slots { grid-template-columns: 1fr; } }
.prm-slot { display: flex; align-items: center; gap: 8px; width: 100%; height: 44px; padding: 6px; text-align: left; font: inherit; color: inherit; background: var(--prm-card); border: 1px solid var(--prm-border); border-radius: 10px; }
button.prm-slot { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.prm-slot:hover { border-color: var(--prm-primary); box-shadow: 0 2px 8px rgba(31, 35, 51, .07); }
button.prm-slot:focus-visible { outline: none; border-color: var(--prm-primary); box-shadow: 0 0 0 3px var(--prm-primary-soft); }
.prm-slot-no { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 6px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.prm-slot-name { flex: 1; min-width: 0; height: 30px; display: flex; align-items: center; padding: 0 10px; border-radius: 7px; background: var(--prm-soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prm-slot-name span { overflow: hidden; text-overflow: ellipsis; }
.prm-slot-empty .prm-slot-name { color: var(--prm-faint); }
button.prm-slot .prm-slot-name { font-weight: 600; background: var(--prm-primary-soft); color: var(--prm-primary); }
.prm-tone-blue { background: #e7efff; color: #3b5bdb; }
.prm-tone-green { background: #e3f7ef; color: #0f8a5c; }
.prm-tone-amber { background: #fff3db; color: #b86e00; }
.prm-tone-pink { background: #fde6ef; color: #c2255c; }
.prm-tone-violet { background: #eceaff; color: #5b4bd6; }

/* Timezone detail modal */
.prm-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 18, 30, .45); }
.prm-modal-panel { width: 100%; max-width: 860px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--prm-card); color: var(--prm-text); border: 1px solid var(--prm-border); border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 18, 30, .3); }
.prm-modal-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px; background: var(--prm-card); border-bottom: 1px solid var(--prm-border); }
.prm-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--prm-muted); cursor: pointer; }
.prm-close:hover { background: var(--prm-soft); color: var(--prm-text); }
.prm-modal-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; padding: 20px 22px 22px; }
@media (max-width: 720px) { .prm-modal-body { grid-template-columns: 1fr; } }
.prm-groups { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.prm-group { padding: 8px 10px; border-radius: 9px; background: var(--prm-soft); font-size: 14px; font-weight: 500; }
.prm-none { font-size: 14px; color: var(--prm-muted); font-style: italic; }
.prm-table-wrap { overflow-x: auto; background: var(--prm-card); border: 1px solid var(--prm-border); border-radius: 12px; }
.prm table.prm-table, .prm-modal table.prm-table { width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.prm-table th { padding: 9px 12px; background: var(--prm-soft); border-bottom: 1px solid var(--prm-border); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--prm-muted); text-align: left; }
.prm-table td { padding: 9px 12px; border-bottom: 1px solid var(--prm-border); }
.prm-table tbody tr:last-child td { border-bottom: 0; }
.prm-table td.prm-day { font-weight: 600; }
.prm-window { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--prm-primary-soft); color: var(--prm-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.prm-window-off { color: var(--prm-muted); }

/* ---- Timers, shared by Timezones and the edit pages (.tmr-) ---- */

.tmr {
	--tmr-border: hsl(var(--border));
	--tmr-card: hsl(var(--card));
	--tmr-text: hsl(var(--foreground));
	--tmr-muted: hsl(var(--muted-foreground));
	--tmr-faint: hsl(var(--muted-foreground) / .7);
	--tmr-soft: hsl(var(--muted) / .55);
	--tmr-primary: hsl(var(--primary));
	--tmr-primary-fg: hsl(var(--primary-foreground));
	--tmr-primary-soft: hsl(var(--primary) / .1);
	--tmr-p1: hsl(var(--primary));
	--tmr-p2: #2bb5a0;
	color: var(--tmr-text);
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.tmr-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.tmr-crumb { font-size: 14px; color: var(--tmr-muted); margin-bottom: 6px; }
.tmr-crumb span { color: var(--tmr-text); }
.tmr-h1 { font-size: 33px; font-weight: 700; line-height: 1.1; margin: 0; }
.tmr-lede { font-size: 15px; color: var(--tmr-muted); margin: 6px 0 0; }
.tmr-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--tmr-border); border-radius: 10px; background: var(--tmr-card); color: var(--tmr-text); font-size: 14px; font-weight: 500; cursor: pointer; }
.tmr-btn:hover { border-color: var(--tmr-primary); }
.tmr-btn svg { width: 14px; height: 14px; color: #0f8a5c; }

.tmr-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1024px) { .tmr-layout { grid-template-columns: 1fr; } }
.tmr-card { background: color-mix(in srgb, hsl(var(--primary)) 5%, hsl(var(--card))); --tmr-soft: hsl(var(--card)); border: 1px solid var(--tmr-border); border-radius: 16px; padding: 16px; box-shadow: 0 1px 2px rgba(31, 35, 51, .04); }

/* New timer form */
.tmr-form-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tmr-tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--tmr-primary-soft); color: var(--tmr-primary); }
.tmr-tile svg { width: 16px; height: 16px; }
.tmr-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin: 0; }
.tmr-sub { font-size: 13px; color: var(--tmr-muted); margin: 2px 0 0; }
.tmr-eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tmr-muted); margin-bottom: 6px; }
.tmr-input { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--tmr-border); border-radius: 9px; background: var(--tmr-soft); color: var(--tmr-text); font-size: 14px; }
.tmr-input:focus { border-color: var(--tmr-primary); background: var(--tmr-card); outline: none; box-shadow: 0 0 0 3px var(--tmr-primary-soft); }
.tmr-input::placeholder { color: var(--tmr-faint); }
.tmr-period { position: relative; min-width: 0; margin: 20px 0 0; padding: 14px 12px 12px; border: 1px solid var(--tmr-border); border-radius: 12px; }
.tmr-period legend { position: absolute; top: -9px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; background: color-mix(in srgb, hsl(var(--primary)) 5%, hsl(var(--card))); font-size: 13px; font-weight: 600; }
.tmr-period-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tmr-period-fields .tmr-input { min-width: 0; }
.tmr-field-label { display: block; font-size: 12px; color: var(--tmr-muted); margin-bottom: 4px; }
.tmr-period .tmr-input { background: var(--tmr-card); }
.tmr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.tmr-dot-p1 { background: var(--tmr-p1); }
.tmr-dot-p2 { background: var(--tmr-p2); }
.tmr-save { display: block; width: 100%; height: 34px; margin-top: 14px; border: 0; border-radius: 9px; background: var(--tmr-primary); color: var(--tmr-primary-fg); font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px hsl(var(--primary) / .3); }
.tmr-save:hover { filter: brightness(.94); }

/* Timer list */
.tmr-list-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tmr-count { padding: 1px 8px; border-radius: 9999px; background: var(--tmr-primary-soft); color: var(--tmr-primary); font-size: 12px; font-weight: 700; }
.tmr-legend { display: flex; gap: 6px; }
.tmr-legend span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 9999px; background: var(--tmr-soft); font-size: 12px; }
.tmr-table-wrap { overflow-x: auto; background: var(--tmr-card); border: 1px solid var(--tmr-border); border-radius: 12px; }
.tmr table.tmr-table { width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.tmr-table th { padding: 10px 12px; background: var(--tmr-soft); border-bottom: 1px solid var(--tmr-border); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tmr-muted); text-align: left; }
.tmr-table td { padding: 10px 12px; border-bottom: 1px solid var(--tmr-border); vertical-align: middle; }
.tmr-table tbody tr:last-child td { border-bottom: 0; }
.tmr-table tbody tr:hover { background: hsl(var(--muted) / .25); }
.tmr-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.tmr-sort svg { width: 11px; height: 11px; }
.tmr-sort-on { color: var(--tmr-primary); }
.tmr-name { font-weight: 600; }
.tmr-builtin { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; padding: 1px 6px; border-radius: 5px; background: var(--tmr-soft); color: var(--tmr-muted); font-size: 11px; font-weight: 600; }
.tmr-builtin svg { width: 9px; height: 9px; }
.tmr-col-bar { width: 100%; min-width: 200px; }
.tmr-hours { display: flex; justify-content: space-between; }
.tmr-track { position: relative; height: 10px; border-radius: 9999px; background: var(--tmr-soft); overflow: hidden; }
.tmr-track-closed { background: #fde6ef; }
.tmr-seg { position: absolute; top: 0; bottom: 0; border-radius: 9999px; }
.tmr-seg-p1 { background: var(--tmr-p1); opacity: .9; }
.tmr-seg-p2 { background: var(--tmr-p2); opacity: .9; }
.tmr-never { margin-top: 4px; font-size: 12px; color: #c2255c; }
.tmr-period-cell { font-weight: 600; font-variant-numeric: tabular-nums; }
.tmr-unused { color: var(--tmr-faint); font-weight: 500; }
.tmr-actions { display: flex; justify-content: flex-end; gap: 4px; }
.tmr-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--tmr-text); cursor: pointer; }
.tmr-icon-btn:hover { background: var(--tmr-soft); }
.tmr-icon-btn.tmr-danger:hover { background: #fde8ec; color: #c92a4b; }
.tmr-icon-btn[disabled] { color: var(--tmr-faint); opacity: .5; cursor: not-allowed; background: none; }
.tmr-icon-btn svg { width: 15px; height: 15px; }
.tmr-empty { padding: 28px 12px !important; text-align: center; color: var(--tmr-muted); }

/* Pager */
.tmr-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.tmr-rows { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tmr-muted); }
.tmr-rows select { width: 58px; height: 30px; padding: 0 8px; border: 1px solid var(--tmr-border); border-radius: 8px; background-color: var(--tmr-card); color: var(--tmr-text); font-size: 14px; }
.tmr-pages { display: flex; gap: 6px; }
.tmr-page { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--tmr-border); border-radius: 9px; background: var(--tmr-card); color: var(--tmr-text); font-size: 14px; font-weight: 600; cursor: pointer; }
.tmr-page:hover { border-color: var(--tmr-primary); }
.tmr-page-on { background: var(--tmr-primary); border-color: var(--tmr-primary); color: var(--tmr-primary-fg); }
.tmr-page[disabled] { color: var(--tmr-faint); cursor: not-allowed; }
.tmr-page[disabled]:hover { border-color: var(--tmr-border); }
.tmr-page svg { width: 14px; height: 14px; }

/* ---- Timezones (.tzp-) ---- */

.tzp-form-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.tzp-form-top .tmr-form-head { margin-bottom: 0; }
.tzp-form-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.tzp-form-fields .tmr-eyebrow { margin-bottom: 4px; }
.tzp-name { display: flex; align-items: center; gap: 8px; }
.tzp-name .tmr-eyebrow { margin-bottom: 0; white-space: nowrap; } /* ui-allow: Timers are not on the shared look yet */
.tzp-name .tmr-input { width: 180px; }
.tzp-select { height: 32px; width: 100%; padding: 0 8px; border: 1px solid var(--tmr-border); border-radius: 9px; background-color: var(--tmr-card); color: var(--tmr-text); font-size: 13px; }
.tzp-select:focus { border-color: var(--tmr-primary); outline: none; box-shadow: 0 0 0 3px var(--tmr-primary-soft); }
.tzp-setall { width: 112px; }
.tzp-days { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .tzp-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tzp-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tzp-day { padding: 8px 6px 8px; border: 1px solid var(--tmr-border); border-radius: 10px; background: var(--tmr-card); }
.tzp-day-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.tzp-day-short { padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, hsl(var(--primary)) 5%, hsl(var(--card))); color: var(--tmr-text); font-size: 10px; font-weight: 700; }
.tzp-day-hol { background: #fff8eb; border-color: #f6dca8; }
.tzp-day-hol .tzp-day-head { color: #b86e00; }
.tzp-day-hol .tzp-day-short { background: #ffe8bf; color: #b86e00; }
.tzp-form-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.tzp-form-foot .tmr-save { width: auto; margin-top: 0; padding: 0 18px; }

.tzp-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 480px; }
.tzp-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; max-width: 120px; padding: 3px 8px; border-radius: 9999px; font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tzp-legend .tzp-chip { min-width: 0; }
.tzp-tone-green { background: #dcf5ec; color: #0f8a5c; }
.tzp-tone-pink { background: #fde6ef; color: #c2255c; }
.tzp-tone-violet { background: #eceaff; color: #5b4bd6; }
.tzp-tone-blue { background: #e7efff; color: #3b5bdb; }
.tzp-tone-amber { background: #fff3db; color: #b86e00; }
.tzp-tone-teal { background: #dff6f3; color: #138a7a; }
.tzp-tone-indigo { background: #e9e7fd; color: #4338ca; }
.tzp-tone-grey { background: var(--tmr-soft); color: var(--tmr-muted); }
.tzp-table th.tzp-day-col, .tzp-table td.tzp-day-col { text-align: center; }
.tzp-table th.tzp-hol { color: #b86e00; }
.tzp-none { color: var(--tmr-faint); }

/* ---- Edit timer (.tme-) ---- */

.tme { width: 100%; }
.tme-head { display: flex; align-items: center; gap: 12px; }
.tme-back { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border: 1px solid var(--tmr-border); border-radius: 9px; background: var(--tmr-card); color: var(--tmr-text); }
.tme-back:hover { border-color: var(--tmr-primary); }
.tme-back svg { width: 15px; height: 15px; }
.tme .tmr-crumb { font-size: 12px; margin-bottom: 2px; }
.tme .tmr-h1 { font-size: 24px; }
.tme .tmr-input { height: 30px; }
.tme .tmr-input[readonly] { cursor: default; }

.tme-day { margin-top: 14px; padding: 10px 10px 8px; border-radius: 10px; background: var(--tmr-soft); }
.tme-day-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 12px; color: var(--tmr-muted); }
.tme-day-top b { color: var(--tmr-text); }
.tme .tmr-track { height: 14px; background: hsl(var(--border)); }
.tme-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--tmr-muted); font-variant-numeric: tabular-nums; }

.tme-periods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 480px) { .tme-periods { grid-template-columns: 1fr; } }
.tme .tmr-period { margin-top: 20px; }
.tme .tmr-period-fields { gap: 8px; }
.tme-open { display: inline-block; margin-top: 10px; padding: 2px 7px; border-radius: 9999px; font-size: 11px; font-weight: 600; }
.tme-open-p1 { background: var(--tmr-primary-soft); color: var(--tmr-primary); }
.tme-open-p2 { background: #dff6f3; color: #138a7a; }

.tme-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--tmr-border); }
.tme-foot .tmr-btn { height: 30px; text-decoration: none; }
.tme-foot .tmr-save { width: auto; height: 30px; margin-top: 0; padding: 0 16px; }

/* ---- Edit timezone (.tze-) ---- */

.tze { width: 100%; }
.tze-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .tze-top { grid-template-columns: 1fr; } }
.tze-top .tmr-eyebrow { margin-bottom: 4px; }
.tze-top .tzp-select { height: 30px; font-size: 14px; }
.tze-row { display: grid; grid-template-columns: 120px 200px minmax(0, 1fr); align-items: center; gap: 10px; }
@media (max-width: 520px) { .tze-row { grid-template-columns: 90px minmax(0, 1fr); } .tze-row .tze-bar { grid-column: 1 / -1; } }
.tze-plan-head { margin: 18px 0 6px; padding: 0 2px; }
.tze-plan-head .tmr-eyebrow { margin: 0; }
.tze-plan-head .tmr-hours { font-size: 10px; color: var(--tmr-muted); font-variant-numeric: tabular-nums; }
.tze-days { display: flex; flex-direction: column; gap: 6px; }
.tze-day { padding: 8px; border: 1px solid var(--tmr-border); border-radius: 10px; background: var(--tmr-card); }
.tze-day:nth-child(odd) { background: var(--tmr-soft); }
.tze-day-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.tze-day .tzp-select { height: 30px; font-size: 13px; }
.tze .tmr-track { height: 10px; background: hsl(var(--border)); }
.tze-hol { background: #fff8eb !important; border-color: #f6dca8; }
.tze-hol .tze-day-name { color: #b86e00; }
.tze-hol .tzp-day-short { background: #ffe8bf; color: #b86e00; }
.tze-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 11px; color: var(--tmr-text); }
.tze-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tze-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--tmr-border); }
.tze-foot .tmr-btn { height: 30px; text-decoration: none; }
.tze-foot .tmr-save { width: auto; height: 30px; margin-top: 0; padding: 0 16px; }

/* ---- Attendance locations list (.alc-) ---- */
/* Header, cards, buttons, search and count come from components.css. */

.alc { color: var(--cl-text); display: flex; flex-direction: column; gap: 18px; }

.alc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.alc-search { width: 190px; max-width: 100%; }

.alc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.alc-grid > [hidden] { display: none; }

/* Map illustration: a light grid, two roads, the geofence and its pin. */
.alc-map { position: relative; height: 138px; overflow: hidden; background-color: var(--tone-green-bg); background-image: linear-gradient(color-mix(in srgb, var(--tone-green-fg) 9%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--tone-green-fg) 9%, transparent) 1px, transparent 1px); background-size: 14px 14px; }
.alc-road { position: absolute; background: hsl(var(--card)); }
.alc-road-a { left: -10%; right: -10%; top: 56%; height: 12px; transform: rotate(-11deg); }
.alc-road-b { top: -20%; bottom: -20%; left: 63%; width: 11px; transform: rotate(12deg); }
.alc-fence { position: absolute; left: calc(50% - 64px); top: 50%; width: 98px; height: 98px; transform: translate(-50%, -50%); border: 1.5px dashed var(--cl-primary); border-radius: 9999px; background: hsl(var(--primary) / .16); }
.alc-pin { position: absolute; left: calc(50% - 64px); top: 50%; width: 22px; height: 22px; transform: translate(-50%, -85%); color: var(--cl-primary); }
.alc-pin svg { width: 22px; height: 22px; fill: currentColor; stroke: hsl(var(--card)); }
.alc-pin .alc-pin-dot { fill: hsl(var(--card)); }
.alc-radius { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 9999px; background: hsl(var(--card)); color: var(--cl-text); font-size: 11px; font-weight: 600; box-shadow: 0 1px 3px rgb(31 35 51 / .12); }
.alc-radius svg { width: 10px; height: 10px; color: var(--cl-primary); }
.alc-open { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: var(--cl-radius-xs); background: hsl(var(--card)); color: var(--cl-text); font-size: 12px; font-weight: 600; text-decoration: none; box-shadow: 0 1px 3px rgb(31 35 51 / .12); }
.alc-open:hover { color: var(--cl-primary); }
.alc-open svg { width: 10px; height: 10px; }

.alc-body { padding: 14px; }
.alc-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.alc-name { font-size: 16px; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.alc-live { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--tone-success-fg); }
.alc-live::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: var(--tone-teal-solid); }
.alc-icons { display: flex; gap: 4px; }
.alc-icons .alc-danger:hover { border-color: var(--tone-danger-fg); color: var(--tone-danger-fg); }
.alc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.alc-stat { padding: 8px 9px; border-radius: var(--cl-radius-sm); background: var(--cl-soft); }
.alc-stat span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cl-muted); }
.alc-stat b { display: block; margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.alc-stat-radius { background: var(--cl-primary-soft); }
.alc-stat-radius span { color: var(--cl-primary); }
.alc-stat-radius b { font-family: inherit; font-size: 13px; font-weight: 700; color: var(--cl-primary); }

.alc-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 260px; padding: 20px; text-align: center; text-decoration: none; color: var(--cl-text); border: 1.5px dashed var(--cl-border); border-radius: var(--cl-radius-card); transition: border-color .15s, background .15s; }
.alc-add:hover { border-color: var(--cl-primary); background: hsl(var(--primary) / .03); }
.alc-add .alc-add-icon { width: 40px; height: 40px; margin-bottom: 6px; border-radius: var(--cl-radius-inner); }
.alc-add .alc-add-icon uk-icon { width: 18px; height: 18px; }
.alc-add b { font-size: 14px; }
.alc-add p { margin: 0; max-width: 200px; font-size: 12px; color: var(--cl-muted); }
.alc-empty { grid-column: 1 / -1; padding: 28px; text-align: center; font-size: 14px; color: var(--cl-muted); }

/* ---- Attendance location form and Assign location (.atl-) ---- */

.atl { color: var(--cl-text); display: flex; flex-direction: column; gap: 16px; }
.atl-form { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
@media (max-width: 1024px) { .atl-form { grid-template-columns: 1fr; } }
.atl-fields { display: flex; flex-direction: column; gap: 18px; }
.atl-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .atl-pair { grid-template-columns: 1fr; } }
.atl-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.atl-unit { position: relative; }
.atl-unit .cl-input { padding-right: 40px; }
.atl-unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 500; color: var(--cl-faint); }
.atl-help { margin: 6px 0 0; font-size: 12px; color: var(--cl-faint); }
.atl-search-row { display: flex; gap: 8px; }
.atl-submit { display: flex; justify-content: flex-end; margin-top: 18px; }
.atl-side { display: flex; flex-direction: column; gap: 16px; }
.atl-map-wrap { position: relative; }
#atl-map { height: 260px; width: 100%; background: hsl(var(--muted)); }
.atl-map-hint { position: absolute; top: 10px; left: 10px; z-index: 500; padding: 5px 10px; border-radius: var(--cl-radius-xs); background: hsl(var(--card) / .95); color: var(--cl-text); font-size: 11px; font-weight: 500; box-shadow: 0 1px 4px rgb(0 0 0 / .12); pointer-events: none; }
.atl-preview { padding: 14px 18px; }
.atl-preview p { margin: 0; font-size: 14px; color: var(--cl-muted); }
.atl-tips { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.atl-tip { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--cl-muted); }
.atl-tip-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 9999px; }
.atl-tip-mark uk-icon, .atl-tip-mark svg { width: 11px; height: 11px; }

.atl-destination { width: 384px; max-width: 100%; }
.atl-accounts { margin-top: 18px; }
.atl-check { width: 1px; }
.atl-who { display: flex; align-items: center; gap: 10px; }
.atl-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9999px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.atl-pill-icon, .atl-pill-icon svg { width: 11px; height: 11px; }

/* ---- Attendance dashboard (.dash-) ---- */
/* Header, cards, pills and buttons come from components.css. */

.dash {
	--dash-track: hsl(var(--muted));
	--dash-soft: hsl(var(--muted) / .55);
	color: var(--cl-text);
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.dash .cl-card { --dash-track: hsl(var(--card)); min-width: 0; }
.dash-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-select { width: auto; min-width: 130px; font-size: 13px; }

/* Series colours: one per way a day can go, shared by status cards, bars,
   donut and legend. Punch exceptions take theirs from .dash-exc. */
.dash-c-present { --dash-c: var(--tone-teal-solid); }
.dash-c-late { --dash-c: var(--tone-warning-solid); }
.dash-c-noclockin { --dash-c: color-mix(in srgb, var(--tone-teal-solid) 45%, hsl(var(--card))); }
.dash-c-absent { --dash-c: var(--tone-danger-solid); }
.dash-c-leave { --dash-c: var(--tone-violet-solid); }
.dash-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--dash-c); }

.dash-overview-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dash-updated { font-size: 11px; color: var(--cl-muted); }
.dash-updated b { color: var(--cl-text); }
.dash-empty { padding: 28px 12px; text-align: center; font-size: 13px; color: var(--cl-muted); }

/* Layout: overview and exceptions, attention and departments, then the week. */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.dash-week { grid-column: 1 / -1; }
@media (max-width: 1024px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

/* Overview: donut, status cards and punctuality. */
.dash-overview { display: flex; align-items: center; gap: 22px; }
.dash-overview-main { flex: 1; min-width: 0; }
@media (max-width: 720px) { .dash-overview { flex-direction: column; align-items: stretch; } .dash-overview .dash-donut { align-self: center; } }
.dash-donut { position: relative; flex: none; width: 150px; height: 150px; }
.dash-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dash-donut .dash-track { stroke: var(--dash-track); }
.dash-donut .dash-arc { stroke: var(--dash-c); }
.dash-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dash-donut-center b { font-size: 30px; font-weight: 700; line-height: 1; }
.dash-donut-center span { font-size: 11px; color: var(--cl-muted); margin-top: 2px; }
.dash-donut-center span + span { margin-top: 0; font-size: 10px; }
.dash-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .dash-status { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-stat { padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--dash-c) 22%, transparent); background: color-mix(in srgb, var(--dash-c) 10%, hsl(var(--card))); }
.dash-stat-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: color-mix(in srgb, var(--dash-c) 75%, var(--cl-text)); }
.dash-stat-value { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.dash-stat-value b { font-size: 24px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.dash-stat-value span { font-size: 11px; color: var(--cl-muted); }
.dash-punctuality { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--dash-soft); }
.dash-punctuality-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--cl-muted); }
.dash-punctuality-head b { color: var(--cl-text); font-weight: 700; }
.dash-punctuality-value { font-size: 11px; color: var(--cl-muted); }
.dash-punctuality-value b { font-size: 15px; color: var(--tone-teal-fg); }
.dash-punctuality-bar { display: flex; height: 6px; margin-top: 8px; border-radius: 9999px; background: var(--dash-track); overflow: hidden; }
.dash-punctuality-note { margin-top: 6px; font-size: 11px; color: var(--cl-muted); }
.dash-punctuality-bar span { height: 100%; background: var(--dash-c); }

/* Punch exceptions: two tiles a row, warm when anyone is in them. */
.dash-exc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dash-exc { --dash-c: var(--tone-warning-fg); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--cl-border); }
.dash-exc-hot { background: var(--tone-warning-bg); border-color: color-mix(in srgb, var(--tone-warning-fg) 30%, transparent); }
.dash-exc-label { font-size: 11px; color: var(--cl-muted); }
.dash-exc-hot .dash-exc-label { color: var(--tone-warning-fg); }
.dash-exc-value { display: flex; align-items: baseline; gap: 5px; margin-top: 3px; }
.dash-exc-value b { font-size: 18px; font-weight: 700; line-height: 1; color: var(--cl-muted); font-variant-numeric: tabular-nums; }
.dash-exc-hot .dash-exc-value b { color: var(--tone-warning-fg); }
.dash-exc-value span { font-size: 10px; color: var(--cl-muted); }

/* Popovers: a status, exception, department or day lists its staff on hover,
   and a click pins the list open. */
.dash-tile-pop-host { position: relative; cursor: pointer; transition: border-color .15s, background .15s; }
.dash-tile-pop-host:hover, .dash-tile-pop-host.dash-pop-open { border-color: var(--dash-c, var(--cl-primary)); }
.dash-tile-pop-host:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--cl-primary-soft); }
.dash-tile-pop { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 300px; max-width: calc(100vw - 32px); padding: 10px; border: 1px solid var(--cl-border); border-radius: 12px; background: hsl(var(--card)); box-shadow: 0 10px 30px rgba(31, 35, 51, .16); cursor: default; text-align: left; }
.dash-tile-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 7px; }
.dash-tile-pop-host:hover .dash-tile-pop, .dash-tile-pop-host.dash-pop-open .dash-tile-pop { display: block; }
/* Hosts at the right of their row open their list leftwards. */
.dash-stat:nth-child(4n) .dash-tile-pop, .dash-stat:nth-child(4n+3) .dash-tile-pop, .dash-exc:nth-child(2n) .dash-tile-pop { left: auto; right: 0; }
@media (max-width: 560px) { .dash-stat:nth-child(n) .dash-tile-pop { left: 0; right: auto; } .dash-stat:nth-child(2n) .dash-tile-pop { left: auto; right: 0; } }
.dash-tile-pop-head { display: flex; align-items: center; gap: 6px; padding: 0 4px 8px; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--cl-border); }
.dash-tile-pop-head span { padding: 1px 7px; border-radius: 9999px; background: color-mix(in srgb, var(--dash-c, var(--cl-primary)) 14%, transparent); color: var(--dash-c, var(--cl-primary)); font-size: 11px; }
.dash-tile-pop-list { max-height: 280px; overflow-y: auto; }
.dash-tile-pop-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--cl-border); }
.dash-tile-pop-row:last-child { border-bottom: 0; }
.dash-tile-pop-time { flex: none; font-size: 11px; color: var(--cl-muted); font-variant-numeric: tabular-nums; }
.dash-tile-pop-empty { padding: 16px 4px 6px; margin: 0; text-align: center; font-size: 12px; color: var(--cl-muted); }
.dash-people-pop-group { display: flex; align-items: center; gap: 6px; padding: 10px 4px 2px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--cl-muted); }
.dash-people-pop-group span { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Needs attention. */
.dash-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--cl-radius-md); background: hsl(var(--border) / .6); }
.dash-tab { height: 24px; padding: 0 9px; border: 0; border-radius: var(--cl-radius-xs); background: none; color: var(--cl-muted); font-size: 11px; font-weight: 500; cursor: pointer; }
.dash-tab b { font-weight: 700; }
.dash-tab-on { background: hsl(var(--card)); color: var(--cl-text); box-shadow: 0 1px 2px rgb(31 35 51 / .1); }
.dash-people { display: flex; flex-direction: column; }
.dash-person { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 88px minmax(0, .8fr); align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--cl-border); }
.dash-person[hidden] { display: none; }
@media (max-width: 640px) { .dash-person { grid-template-columns: minmax(0, 1fr) auto; } .dash-person-dept, .dash-person-note { display: none; } }
.dash-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dash-who-text { min-width: 0; }
.dash-who-text span { display: block; font-size: 10px; color: var(--cl-muted); }
.dash-avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 9999px; font-size: 11px; font-weight: 700; }
.dash-who b { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-person-dept { font-size: 11px; color: var(--cl-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The status pills here are smaller, with a dot. */
.dash-person .cl-pill { justify-self: start; padding: 2px 8px; font-size: 10px; }
.dash-person .cl-pill::before { content: ""; width: 5px; height: 5px; border-radius: 9999px; background: currentColor; }
.dash-person-note { font-size: 10px; color: var(--cl-muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-more { margin-top: 10px; }
.dash-more uk-icon { transition: transform .15s; }

/* Departments: name and staff in, a stacked bar, the rate. */
.dash-dept-list { display: flex; flex-direction: column; }
.dash-dept-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 40px; align-items: center; gap: 10px; padding: 6px; margin: 0 -6px; border-radius: var(--cl-radius-sm); border-bottom: 1px solid var(--cl-border); }
.dash-dept-row[hidden] { display: none; }
.dash-dept-row:hover, .dash-dept-row.dash-pop-open { background: var(--cl-primary-soft); }
.dash-dept-name b { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-dept-name span { display: block; font-size: 10px; color: var(--cl-muted); }
.dash-dept-rate { font-size: 12px; font-weight: 700; text-align: right; }
.dash-rate-low { color: var(--tone-danger-fg); }
.dash-bar { display: flex; gap: 2px; height: 6px; border-radius: 9999px; background: var(--dash-track); overflow: hidden; }
.dash-bar span { display: flex; align-items: center; justify-content: center; flex: none; height: 100%; font-size: 10px; font-weight: 700; color: var(--tone-solid-text); background: var(--dash-c); overflow: hidden; }
.dash-bar-tall { height: 15px; border-radius: 5px; }

/* Last 7 days: one column a day, the bar as tall as the staff with a record. */
.dash-week .cl-card-head { align-items: flex-start; }
.dash-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--cl-muted); }
.dash-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dash-week-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.dash-week-col { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 12px; border: 1px solid transparent; }
.dash-week-col:hover, .dash-week-col.dash-pop-open { background: var(--cl-primary-soft); }
/* A day lists its staff beside its column, not below the chart: rightwards
   for the first four days, leftwards for the rest. */
.dash-week-col .dash-tile-pop { top: 0; left: calc(100% + 6px); right: auto; }
.dash-week-col:nth-child(n+5) .dash-tile-pop { left: auto; right: calc(100% + 6px); }
.dash-week-col .dash-tile-pop::before { top: 0; bottom: 0; left: -7px; right: auto; width: 7px; height: auto; }
.dash-week-col:nth-child(n+5) .dash-tile-pop::before { left: auto; right: -7px; }
.dash-week-col .dash-tile-pop-list { max-height: 230px; }
.dash-week-today { background: var(--cl-primary-soft); border-color: hsl(var(--primary) / .15); }
.dash-week-rate { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-week-muted { color: var(--cl-muted); font-weight: 600; }
.dash-week-track { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 150px; }
.dash-week-bar { display: flex; flex-direction: column-reverse; gap: 2px; width: min(56px, 70%); min-height: 3px; border-radius: 6px 6px 3px 3px; overflow: hidden; background: var(--dash-track); }
.dash-week-bar span { display: flex; align-items: center; justify-content: center; flex: none; font-size: 10px; font-weight: 700; color: var(--tone-solid-text); background: var(--dash-c); overflow: hidden; }
.dash-week-day { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.3; }
.dash-week-day b { font-size: 12px; font-weight: 700; }
.dash-week-today .dash-week-day b { color: var(--cl-primary); }
.dash-week-day span { font-size: 10px; color: var(--cl-muted); }
.dash-week-day em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--tone-teal-fg); }
.dash-week-day em.dash-week-muted { color: var(--cl-muted); }
@media (max-width: 640px) { .dash-week-cols { gap: 4px; } .dash-week-track { height: 110px; } .dash-week-day span, .dash-week-day em { font-size: 9px; } }

/* ---- Add group (.acg-) ---- */

.acg { display: flex; flex-direction: column; gap: 16px; }
.acg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 900px) { .acg-row { grid-template-columns: 1fr; } }
.acg .acg-save { width: 100%; margin-top: 12px; }
.acg-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.acg-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

/* ---- Attendance check in / out (.aci-) ---- */
/* Cards and the Cancel button come from components.css. In and out are the
   teal and danger solid Tones throughout. */

.aci {
	--aci-in: var(--tone-teal-solid);
	--aci-out: var(--tone-danger-solid);
	--aci-warn: var(--tone-warning-solid);
	color: var(--cl-text);
	max-width: 960px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.aci-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .aci-grid { grid-template-columns: minmax(0, 1fr) 280px; } }

.aci-alert { padding: 12px 14px; border-radius: var(--cl-radius-inner); font-size: .875rem; border: 1px solid currentColor; }
.aci-alert-error { background: var(--tone-danger-bg); color: var(--tone-danger-fg); }
.aci-alert-success { background: var(--tone-success-bg); color: var(--tone-success-fg); }

/* main card */
.aci .aci-main { --aci-mode: var(--aci-in); padding: 32px 24px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.aci .aci-main[data-mode="OUT"] { --aci-mode: var(--aci-out); }
.aci-date { font-size: 13px; color: var(--cl-muted); }
.aci-clock { font-size: clamp(48px, 9vw, 64px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }

.aci-toggle { display: inline-flex; gap: 4px; padding: 4px; margin-top: 22px; border-radius: 9999px; background: var(--cl-soft); border: 1px solid var(--cl-border); }
.aci-toggle button { border: 0; background: transparent; color: var(--cl-muted); font-size: 14px; font-weight: 600; padding: 9px 20px; border-radius: 9999px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.aci-toggle button[aria-pressed="true"] { background: var(--cl-text); color: hsl(var(--background)); box-shadow: 0 1px 3px rgb(0 0 0 / .2); }
.aci-toggle button:focus-visible, .aci-start:focus-visible { outline: 2px solid var(--cl-primary); outline-offset: 2px; }

.aci-stage { margin: 26px 0 18px; width: 260px; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
.aci-start {
	position: relative; width: 220px; height: 220px; margin: 20px; border-radius: 50%; border: 0; cursor: pointer;
	background: color-mix(in srgb, var(--aci-mode) 14%, hsl(var(--card)));
	color: var(--cl-text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	transition: transform .15s ease, background .15s ease;
}
.aci-start::before { content: ""; position: absolute; inset: -20px; border-radius: 50%; border: 1.5px dashed var(--cl-border); pointer-events: none; }
.aci-start:not(:disabled):hover { transform: scale(1.02); background: color-mix(in srgb, var(--aci-mode) 22%, hsl(var(--card))); }
.aci-start:not(:disabled)::before { border-color: color-mix(in srgb, var(--aci-mode) 55%, transparent); }
.aci-start:disabled { cursor: not-allowed; background: var(--cl-soft); color: var(--cl-muted); }
.aci-start svg { width: 36px; height: 36px; color: var(--aci-mode); }
.aci-start:disabled svg { color: var(--cl-muted); }
.aci-start-label { font-size: 20px; font-weight: 700; }
.aci-start-sub { font-size: 12px; color: var(--cl-muted); }

.aci-scan { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.aci-scan[hidden], .aci-scan:not([hidden]) ~ .aci-start { display: none; }
.aci-scan-ring { position: relative; width: 240px; height: 240px; border-radius: 50%; padding: 6px; }
.aci-scan-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px dashed var(--aci-mode); animation: aci-spin 6s linear infinite; }
.aci-scan-ring video { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; transform: scaleX(-1); background: hsl(var(--muted)); display: block; }
@keyframes aci-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aci-scan-ring::before { animation: none; } .aci-start, .aci-toggle button { transition: none; } }
.aci-scan-title { font-size: 14px; font-weight: 600; }

.aci-hint { font-size: 13px; color: var(--cl-muted); margin: 0; min-height: 1.4em; max-width: 380px; }
.aci-hint[data-state="error"] { color: var(--tone-danger-fg); }

.aci-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.aci-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9999px; font-size: 12.5px; font-weight: 600; background: var(--cl-soft); color: var(--cl-muted); }
.aci-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.aci-chip[data-state="ok"] { background: var(--tone-success-bg); color: var(--tone-success-fg); }
.aci-chip[data-state="error"] { background: var(--tone-danger-bg); color: var(--tone-danger-fg); }
.aci-chip[data-state="busy"] { background: var(--tone-warning-bg); color: var(--tone-warning-fg); }

.aci-unlinked { margin-top: 24px; max-width: 360px; font-size: 14px; color: var(--cl-muted); }
.aci-unlinked strong { display: block; color: var(--cl-text); font-size: 16px; margin-bottom: 6px; }

/* side cards */
.aci-side { display: flex; flex-direction: column; gap: 16px; }
.aci-who { display: flex; align-items: center; gap: 14px; }
.aci-avatar { width: 48px; height: 48px; flex: none; border-radius: var(--cl-radius-inner); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; background: var(--cl-primary); color: var(--cl-primary-fg); }
.aci-greeting { font-size: 13px; color: var(--cl-muted); }
.aci-name { font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.aci-sub { font-size: 12px; color: var(--cl-muted); margin-top: 2px; }

.aci-today h2 { font-size: 15px; font-weight: 700; margin: 0 0 14px; }
.aci-line { position: relative; display: grid; gap: 14px; }
.aci-line::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 34px; width: 1.5px; background: var(--cl-border); }
.aci-step { position: relative; display: grid; grid-template-columns: 14px 1fr; column-gap: 12px; }
.aci-step .ring { width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; background: hsl(var(--card)); margin-top: 2px; }
.aci-step-in { color: var(--aci-in); }
.aci-step-out { color: var(--aci-out); }
.aci-step-label { font-size: 13px; font-weight: 600; }
.aci-step-time { grid-column: 2; font-size: 20px; font-weight: 700; letter-spacing: .04em; color: var(--cl-text); font-variant-numeric: tabular-nums; }
.aci-step-time.empty { color: var(--cl-muted); }
.aci-foot { margin-top: 14px; font-size: 12px; color: var(--cl-muted); }
.aci-foot summary { cursor: pointer; }
.aci-punch-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.aci-punch-list li { display: flex; justify-content: space-between; font-size: 13px; color: var(--cl-text); font-variant-numeric: tabular-nums; }
.aci-punch-list .in { color: var(--aci-in); font-weight: 600; }
.aci-punch-list .out { color: var(--aci-out); font-weight: 600; }

/* ---- Attendance page (.atp-) ---- */
/* Header, cards, buttons, fields, pills, table and pager come from
   components.css; what is left here is this page's own layout. */

.atp { color: var(--cl-text); display: flex; flex-direction: column; gap: 16px; }

.atp-viewby { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.atp-viewby-left { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.atp-viewby-left .cl-label { margin: 0; }
.atp-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--cl-radius-md); background: hsl(var(--muted)); }
.atp-seg .att-seg { padding: 6px 14px; border: 0; border-radius: var(--cl-radius-xs); background: none; font-size: 14px; font-weight: 500; color: var(--cl-muted); cursor: pointer; }
.atp-seg .att-seg:hover { color: var(--cl-text); }
.atp-seg .att-seg-active { background: hsl(var(--card)); color: var(--cl-text); font-weight: 600; box-shadow: 0 1px 2px rgb(31 35 51 / .12); }
.atp-section-pick .cl-select { width: 220px; }
.atp-filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .atp-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .atp-filters { grid-template-columns: 1fr; } }
.atp-preview { margin-top: 14px; padding: 12px 14px; border-radius: var(--cl-radius-md); background: var(--cl-soft); border: 1px solid var(--cl-border); }
.atp-preview-grid { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; }
.atp-preview-grid div div:first-child { font-size: 12px; color: var(--cl-muted); }
.atp-preview-grid div div:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }

.atp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .atp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.atp-stat { padding: 12px 14px; border-radius: var(--cl-radius-md); border: 1px solid color-mix(in srgb, var(--atp-tone) 22%, transparent); background: color-mix(in srgb, var(--atp-tone) 10%, hsl(var(--card))); }
.atp-stat-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--atp-tone) 75%, var(--cl-text)); }
.atp-stat-dot { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--atp-tone); }
.atp-stat-value { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.atp-stat-value b { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.atp-stat-value span { font-size: 12px; color: var(--cl-muted); }
.atp-stat-sub { margin-top: 4px; font-size: 11px; color: var(--cl-muted); }

.atp-search { width: 220px; }

/* The records table has a two-row header: groups above, columns below. */
.atp-table th { padding: 8px 10px; }
.atp-table thead tr:first-child th { padding-top: 10px; padding-bottom: 2px; border-bottom: 0; }
.atp-table thead tr:last-child th { font-weight: 500; letter-spacing: 0; text-transform: none; }
.atp-table th.atp-group-punch { color: var(--tone-blue-fg); }
.atp-table th.atp-group-ot { color: var(--tone-pink-fg); }
.atp-table th.atp-group-hours { color: var(--tone-violet-fg); }
.atp-table .atp-sep { border-left: 1px solid var(--cl-border); }
.atp-table td { padding: 10px; }
.atp-table tr.atp-clickable { cursor: pointer; }
.atp-punch-main { font-weight: 700; font-variant-numeric: tabular-nums; }
.atp-flag { color: var(--tone-danger-fg); }
.atp-person { display: flex; align-items: center; gap: 10px; }
.atp-avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.atp-name { font-weight: 600; }
.atp-meta { font-size: 12px; color: var(--cl-muted); }
.atp-pill-icon { font-size: 12px; }

/* ---- Attendance leave (.alv-) ---- */
/* Header, cards, buttons, fields, pills and table come from components.css. */

.alv { color: var(--cl-text); display: flex; flex-direction: column; gap: 16px; }
.alv-picker { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: hsl(var(--card)); border: 1px solid var(--cl-border); border-radius: 14px; }
.alv-avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; background: var(--cl-primary-soft); color: var(--cl-primary); }
.alv-picker-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cl-muted); }
.alv-picker-meta { font-size: 13px; color: var(--cl-muted); min-height: 14px; }
.alv-picker .cl-select { width: 180px; font-weight: 600; }

/* Balance cards take a Tone (cl-tone-*): its fill, and its colour for the name and unit. */
.alv-balances { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .alv-balances { grid-template-columns: 1fr; } }
.alv-balance { padding: 16px 18px; border-radius: var(--cl-radius-card); border: 1px solid color-mix(in srgb, currentColor 15%, transparent); }
.alv-balance-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.alv-balance-name { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.alv-balance-icon { width: 28px; height: 28px; border-radius: var(--cl-radius-xs); background: hsl(var(--card)); display: flex; align-items: center; justify-content: center; }
.alv-balance-icon uk-icon, .alv-balance-icon svg { width: 14px; height: 14px; }
.alv-balance-value { display: flex; align-items: baseline; gap: 8px; }
.alv-balance-value b { font-size: 37px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--cl-text); }
.alv-balance-value span { font-size: 14px; font-weight: 500; }

.alv-main { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .alv-main { grid-template-columns: 1fr; } }
.alv-field { margin-bottom: 14px; }
.alv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alv-textarea { height: 72px; padding-top: 8px; padding-bottom: 8px; resize: vertical; }
.alv-seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; background: hsl(var(--muted)); border-radius: var(--cl-radius-md); }
.alv-seg label { cursor: pointer; }
.alv-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.alv-seg span { display: block; padding: 7px 4px; border-radius: var(--cl-radius-xs); font-size: 13px; font-weight: 500; text-align: center; color: var(--cl-muted); }
.alv-seg input:checked + span { background: var(--cl-primary); color: var(--cl-primary-fg); font-weight: 600; }
.alv-seg label:focus-within span { outline: 2px solid var(--cl-primary); outline-offset: 1px; }
.alv .alv-save { width: 100%; }

.alv-date { display: flex; align-items: center; gap: 10px; }
.alv-cal { flex: none; width: 34px; overflow: hidden; border: 1px solid var(--cl-border); border-radius: 7px; text-align: center; background: hsl(var(--card)); }
.alv-cal-m { display: block; padding: 1px 0; background: var(--cl-primary); color: var(--cl-primary-fg); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.alv-cal-d { display: block; padding: 2px 0; font-size: 15px; font-weight: 700; }
.alv-date-text { font-weight: 600; }
.alv-when { font-size: 12px; font-weight: 600; }
.alv-when-upcoming { color: var(--cl-primary); }
.alv-when-now { color: var(--tone-success-fg); }
.alv-when-past { color: var(--cl-faint); }
.alv-type .cl-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cl-table .alv-days { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.alv-reason { max-width: 220px; overflow: hidden; text-overflow: ellipsis; color: var(--cl-muted); }
.alv-actions { text-align: right; }
.alv-actions .alv-delete:hover { border-color: var(--tone-danger-fg); color: var(--tone-danger-fg); }
.alv-empty { margin: 0; padding: 28px; text-align: center; color: var(--cl-faint); font-size: 14px; }

.alv.alv-modal { display: block; border-radius: var(--cl-radius-card); }
.alv-modal .cl-card-title { margin-bottom: 4px; }
.alv-modal .cl-card-sub { margin-bottom: 16px; }
.alv-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---- Attendance settings (.ats-) ---- */
/* Header, cards, buttons and fields come from components.css. Rest days are
   the teal Tone and off days the amber one. */

.ats { color: var(--cl-text); display: flex; flex-direction: column; gap: 20px; }
.ats-seg label:focus-within, .ats-day:focus-within { outline: 2px solid var(--cl-primary); outline-offset: 2px; }

.ats ul.ats-tabs { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; margin: 0; background: hsl(var(--card)); border: 1px solid var(--cl-border); border-radius: var(--cl-radius-inner); list-style: none; }
.ats ul.ats-tabs::before { display: none; }
.ats ul.ats-tabs > li { margin: 0; padding: 0; }
.ats ul.ats-tabs > li > a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 0; border-radius: var(--cl-radius-sm); font-size: 14px; font-weight: 500; color: var(--cl-muted); text-transform: none; text-decoration: none; }
.ats ul.ats-tabs > li > a uk-icon { width: 14px; height: 14px; }
.ats ul.ats-tabs > li > a:hover { color: var(--cl-text); }
.ats ul.ats-tabs > li.uk-active > a { background: var(--cl-primary-soft); color: var(--cl-primary); }
.ats ul.ats-tabs > li > a::after, .ats ul.ats-tabs > li.uk-active > a::after { display: none; }

.ats-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ats-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ats-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .ats-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .ats-pair { grid-template-columns: 1fr; } }

.ats-modal.ats { display: block; border-radius: var(--cl-radius-card); }
.ats-modal-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.ats .ats-modal-save { width: 100%; margin-bottom: 16px; }
.ats .ats-schedules { padding: 14px; }
.ats-schedule-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ats .ats-schedule-item { padding: 6px 0; border-bottom: 1px solid var(--cl-border); }

.ats-input-time { width: 112px; font-variant-numeric: tabular-nums; }
.ats-suffix { position: relative; width: 112px; }
.ats-suffix .cl-input { padding-right: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.ats-suffix span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--cl-primary); pointer-events: none; }
.ats-schedule-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; }
.ats-inline { display: flex; gap: 8px; }
@media (max-width: 700px) { .ats-schedule-row { grid-template-columns: 1fr; } }

.ats-setting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--cl-soft); border-radius: var(--cl-radius-md); font-size: 14px; }
.ats-setting + .ats-setting { margin-top: 8px; }
.ats-setting-end { display: flex; align-items: center; gap: 12px; }

.ats-seg { display: inline-flex; padding: 3px; background: hsl(var(--card)); border: 1px solid var(--cl-border); border-radius: var(--cl-radius-md); }
.ats-seg label { cursor: pointer; border-radius: 7px; }
.ats-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ats-seg span { display: block; min-width: 40px; padding: 5px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; text-align: center; color: var(--cl-muted); transition: background .15s, color .15s; }
.ats-seg input:checked + span { background: var(--cl-primary); color: var(--cl-primary-fg); }

.ats-days { display: flex; flex-direction: column; gap: 10px; }
.ats-days-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ats-days-label { display: flex; align-items: center; gap: 6px; width: 76px; font-size: 14px; font-weight: 600; }
.ats-dot { width: 7px; height: 7px; border-radius: 50%; }
.ats-dot-rest { background: var(--tone-teal-fg); }
.ats-dot-off { background: var(--tone-amber-fg); }
.ats-day { cursor: pointer; border-radius: 9999px; }
.ats-day input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ats-day span { display: block; min-width: 44px; padding: 5px 12px; border: 1px solid var(--cl-border); border-radius: 9999px; background: hsl(var(--card)); font-size: 13px; font-weight: 500; text-align: center; color: var(--cl-muted); transition: all .15s; }
.ats-day-rest input:checked + span { background: var(--tone-teal-bg); border-color: var(--tone-teal-fg); color: var(--tone-teal-fg); font-weight: 600; }
.ats-day-off input:checked + span { background: var(--tone-amber-bg); border-color: var(--tone-amber-fg); color: var(--tone-amber-fg); font-weight: 600; }

.ats-rows { display: flex; flex-direction: column; gap: 10px; }
.ats-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.ats-row-name { display: flex; align-items: center; gap: 10px; }
.ats-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.ats-deduct { margin-top: 14px; }

/* Clocking ranges, numbered in a repeating cycle of Tones. */
.ats-range { border: 1px solid var(--cl-border); border-radius: var(--cl-radius-inner); padding: 10px; background: var(--cl-soft); }
.ats-range + .ats-range { margin-top: 8px; }
.ats-range-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ats-range-num { flex: none; width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ats-range:nth-child(5n+1) .ats-range-num { background: var(--tone-blue-bg); color: var(--tone-blue-fg); }
.ats-range:nth-child(5n+2) .ats-range-num { background: var(--tone-teal-bg); color: var(--tone-teal-fg); }
.ats-range:nth-child(5n+3) .ats-range-num { background: var(--tone-amber-bg); color: var(--tone-amber-fg); }
.ats-range:nth-child(5n+4) .ats-range-num { background: var(--tone-pink-bg); color: var(--tone-pink-fg); }
.ats-range:nth-child(5n) .ats-range-num { background: var(--tone-violet-bg); color: var(--tone-violet-fg); }
.ats-range-type { flex: 1; min-width: 0; height: var(--cl-control-sm); padding: 0 8px; border: 1px solid var(--cl-border); border-radius: var(--cl-radius-xs); background: hsl(var(--card)); font-size: 14px; color: var(--cl-text); display: flex; align-items: center; }
input.ats-range-type:focus, select.ats-range-type:focus { border-color: var(--cl-primary); outline: none; }
input.ats-range-type[readonly] { background: var(--cl-soft); }
.ats-range-note { margin: -4px 0 10px; font-size: 14px; color: var(--cl-muted); }
.ats-range-warn { margin-bottom: 10px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--tone-warning-fg) 35%, transparent); border-radius: var(--cl-radius-md); background: var(--tone-warning-bg); color: var(--tone-warning-fg); font-size: 14px; line-height: 1.45; }
.ats-range-warn ul { margin: 4px 0 0; padding-left: 18px; list-style: disc; }
.ats-range-warn-gap { margin-top: 6px; }
.ats-range-times { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cl-faint); }
.ats-range-times .cl-input { width: auto; flex: 1; min-width: 0; background: hsl(var(--card)); }
.ats-range-top .ats-remove { flex: none; border-color: transparent; background: transparent; color: var(--cl-faint); }
.ats-range-top .ats-remove:hover { background: var(--tone-danger-bg); color: var(--tone-danger-fg); }
.ats .ats-range-save { margin-top: 8px; width: 100%; }
.ats-add-range { width: 100%; margin-top: 10px; height: 38px; border: 1px dashed hsl(var(--primary) / .35); border-radius: var(--cl-radius-md); background: var(--cl-primary-soft); color: var(--cl-primary); font-size: 14px; font-weight: 600; cursor: pointer; }
.ats-add-range:hover { background: hsl(var(--primary) / .12); }
.ats-empty { font-size: 14px; color: var(--cl-faint); }
.ats-empty-ranges { margin-bottom: 4px; }

.ats-panel { margin-top: 10px; padding: 12px; background: hsl(var(--card)); border: 1px solid var(--cl-border); border-radius: var(--cl-radius-md); font-size: 14px; }
.ats-panel p { color: var(--cl-muted); margin: 0 0 10px; }
.ats-panel .ats-row + .ats-row { margin-top: 8px; }
.ats-panel-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .ats * { transition: none !important; } }

/* ---- Attendance settings, Group section (.atg-) ---- */
/* Cards, buttons, fields, pills, table and pager come from components.css. */

.atg { color: var(--cl-text); }
.atg-search { width: 220px; }
@media (max-width: 800px) { .atg-search { width: 160px; } }

.atg-table thead th * { font-size: inherit; text-transform: inherit; letter-spacing: inherit; }
/* the filter dropdown opens inside the header cell; keep its search box and buttons as typed */
.atg-table thead th .uk-drop, .atg-table thead th .uk-drop * { font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: normal; }
.atg-table tr.atg-removed td { opacity: .55; }
.atg-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.atg-avatar { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.atg-id { display: inline-block; padding: 2px 8px; border-radius: 6px; background: hsl(var(--muted)); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; color: var(--cl-text); }
.atg-dept .cl-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.atg-select { width: 140px; }

.atg-switch { position: relative; display: inline-flex; cursor: pointer; }
.atg-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.atg-switch span { width: 34px; height: 20px; border-radius: 9999px; background: hsl(var(--muted)); transition: background .15s; position: relative; }
.atg-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: hsl(var(--card)); box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .15s; }
.atg-switch input:checked + span { background: var(--tone-teal-solid); }
.atg-switch input:checked + span::after { transform: translateX(14px); }
.atg-switch input:focus-visible + span { outline: 2px solid var(--cl-primary); outline-offset: 2px; }

.atg.atg-modal { width: 1100px; max-width: 95vw; border-radius: var(--cl-radius-card); }
.atg-modal-title { margin-bottom: 14px; }
.atg-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 800px) { .atg-modal-grid { grid-template-columns: 1fr; } }
.atg-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.atg-list-title { margin-bottom: 8px; }
.atg-list { max-height: 220px; overflow-y: auto; }
.atg-list li { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--cl-border); font-size: 14px; }
.atg-list li:last-child { border-bottom: 0; }

/* Add employees to a group: one row per group, each with its own staff picker. */
.atg-employee-row { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.atg-employee-field { flex: 1; min-width: 0; }
.atg-staff { position: relative; }
.atg-staff-toggle { display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; }
.atg-staff-toggle uk-icon { width: 16px; height: 16px; color: var(--cl-muted); }
.atg-staff-menu { position: absolute; left: 0; top: 100%; z-index: 9999; width: 100%; max-height: 240px; margin-top: 4px; overflow-y: auto; background: hsl(var(--popover)); color: hsl(var(--popover-foreground)); border: 1px solid var(--cl-border); border-radius: var(--cl-radius-inner); box-shadow: var(--cl-shadow-pop); }
.atg-staff-option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; }
.atg-staff-option:hover { background: hsl(var(--muted)); }
.atg-staff-menu .atg-staff-search { width: calc(100% - 24px); margin: 6px 12px; }
.atg-row-actions { display: flex; align-items: center; justify-content: space-between; }
@media (prefers-reduced-motion: reduce) { .atg * { transition: none !important; } }

/* ---- Attendance settings, Duty Roster section (.adr-) ---- */
/* Cards, buttons, fields and the pager come from components.css. Weekends
   are washed in the amber Tone, holidays in the red one, and each schedule
   gets a colour Tone. */

.adr {
	--adr-weekend: color-mix(in srgb, var(--tone-amber-solid) 9%, hsl(var(--card)));
	--adr-holiday: color-mix(in srgb, var(--tone-red-solid) 8%, hsl(var(--card)));
	color: var(--cl-text);
}
.adr-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--cl-border); }
.adr-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.adr-select { width: 170px; }
.adr-month { display: inline-flex; align-items: center; height: var(--cl-control-sm); border: 1px solid var(--cl-border); border-radius: var(--cl-radius-sm); background: hsl(var(--card)); }
.adr-month button { width: 30px; height: 100%; border: 0; background: none; color: var(--cl-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: var(--cl-radius-sm); }
.adr-month button:hover { background: var(--cl-soft); color: var(--cl-text); }
.adr-month button svg { width: 13px; height: 13px; }
.adr-month span { min-width: 110px; text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.adr-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.adr-legend-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--cl-border); border-radius: 9999px; background: var(--cl-soft); font-size: 13px; color: var(--cl-text); }

.adr-pages { align-items: center; gap: 8px; font-size: 14px; }
.adr-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; white-space: nowrap; }
.adr-grid thead th:not(.adr-emp) { min-width: 32px; }
.adr-grid th, .adr-grid td { padding: 6px 3px; border-bottom: 1px solid var(--cl-border); text-align: center; }
.adr-grid tbody tr:last-child td { border-bottom: 0; }
.adr-grid thead th { background: var(--cl-soft); font-weight: 600; }
.adr-grid .adr-emp { position: sticky; left: 0; z-index: 2; width: 170px; min-width: 150px; padding: 8px 12px; text-align: left; background: hsl(var(--card)); border-right: 1px solid var(--cl-border); }
.adr-grid thead .adr-emp { z-index: 3; background: var(--cl-soft); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--cl-muted); }
.adr-dow { display: block; font-size: 11px; font-weight: 600; color: var(--cl-faint); }
.adr-day { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.adr-today .adr-day { background: var(--cl-primary); color: var(--cl-primary-fg); }
.adr-grid .adr-weekend { background: var(--adr-weekend); }
.adr-grid thead .adr-weekend .adr-dow { color: var(--tone-amber-fg); }
.adr-grid .adr-holiday { background: var(--adr-holiday); }
.adr-grid thead .adr-holiday .adr-dow, .adr-grid thead .adr-holiday .adr-day { color: var(--tone-red-fg); }
.adr-person { display: flex; align-items: center; gap: 8px; }
.adr-avatar { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.adr-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.adr-group { font-size: 12px; color: var(--cl-muted); }

.adr-cell { width: 24px; height: 24px; border-radius: 6px; border: 1px solid transparent; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .1s, box-shadow .1s; }
.adr-cell:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgb(31 35 51 / .15); }
.adr-cell:focus-visible { outline: 2px solid var(--cl-primary); outline-offset: 1px; }
.adr-cell-off { background: hsl(var(--card)); border-color: var(--cl-border); color: var(--cl-muted); font-size: 10px; font-weight: 600; }
.adr-cell-paid { border-color: var(--tone-success-fg); color: var(--tone-success-fg); box-shadow: inset 0 -2px 0 var(--tone-success-fg); }
.adr-cell-none { background: var(--tone-danger-bg); border: 1px dashed color-mix(in srgb, var(--tone-danger-fg) 40%, transparent); color: var(--tone-danger-fg); }
.adr-cell-holiday { background: hsl(var(--card)); border-color: color-mix(in srgb, var(--tone-red-fg) 40%, transparent); color: var(--tone-red-fg); font-weight: 700; }
.adr-swatch { width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.adr-swatch-off { background: hsl(var(--card)); border: 1px solid var(--cl-border); }
.adr-swatch-weekend { background: var(--adr-weekend); }
.adr-swatch-holiday { background: var(--adr-holiday); color: var(--tone-red-fg); }
.adr-empty { padding: 28px; text-align: center; color: var(--cl-faint); }

.adr.adr-modal { border-radius: var(--cl-radius-card); }
.adr-modal-sub { margin-bottom: 16px; }
.adr-modal .adr-field { margin-bottom: 14px; }
.adr-modal .adr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adr-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* duty cell editor */
.adr-cm-dialog { width: 520px; max-width: calc(100vw - 32px); padding: 0; border-radius: 20px; overflow: hidden; background: hsl(var(--card)); box-shadow: 0 24px 60px rgb(31 35 51 / .25); }
.adr-cm-head { position: relative; display: flex; align-items: center; gap: 14px; padding: 22px 56px 18px 22px; border-bottom: 1px solid var(--cl-border); }
.adr-cm-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.adr-cm-who { min-width: 0; }
.adr-cm-name { font-size: 20px; font-weight: 700; line-height: 1.2; margin: 0 0 6px; overflow-wrap: anywhere; }
.adr-cm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adr-cm-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 9999px; font-size: 14px; font-weight: 500; background: var(--cl-soft); color: var(--cl-text); }
.adr-cm-chip uk-icon, .adr-cm-chip svg { width: 12px; height: 12px; color: var(--cl-muted); }
.adr-cm-chip.cl-tone-violet { font-weight: 600; }
.adr-cm-chip-current { background: var(--cl-primary-soft); color: var(--cl-primary); font-weight: 600; }
.adr-cm-head .adr-cm-close { position: absolute; top: 20px; right: 18px; color: var(--cl-muted); }

.adr-cm-main { padding: 16px 22px 20px; }
.adr-cm-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--cl-radius-inner); background: hsl(var(--muted)); margin-bottom: 18px; }
.adr-cm-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; white-space: nowrap; height: 38px; border: 0; border-radius: var(--cl-radius-sm); background: transparent; color: var(--cl-muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.adr-cm-tab svg { width: 15px; height: 15px; }
.adr-cm-tab[aria-selected="true"] { background: hsl(var(--card)); color: var(--cl-text); box-shadow: 0 1px 3px rgb(31 35 51 / .12); }
.adr-cm-tab:focus-visible, .adr-cm-option:focus-within { outline: 2px solid var(--cl-primary); outline-offset: 2px; }
.adr-cm-section { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cl-muted); margin: 0 0 10px; }

.adr-cm-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.adr-cm-scroll { max-height: 300px; overflow-y: auto; padding: 2px; margin: -2px; }
.adr-cm-option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 14px; border: 1px solid var(--cl-border); border-radius: var(--cl-radius-inner); background: hsl(var(--card)); cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; }
.adr-cm-option[hidden], .adr-cm-none[hidden] { display: none; }
.adr-cm-option input { position: absolute; opacity: 0; pointer-events: none; }
.adr-cm-radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--cl-border); background: hsl(var(--card)); display: flex; align-items: center; justify-content: center; }
.adr-cm-option:has(input:checked) { border-color: var(--cl-primary); background: hsl(var(--muted)); box-shadow: var(--cl-focus-ring); }
.adr-cm-option:has(input:checked) .adr-cm-radio { border-color: var(--cl-primary); background: var(--cl-primary); box-shadow: inset 0 0 0 3.5px hsl(var(--card)); }
.adr-cm-code { flex: none; min-width: 32px; height: 32px; padding: 0 6px; border-radius: var(--cl-radius-xs); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.adr-cm-code-off { background: var(--cl-soft); color: var(--cl-text); font-size: 13px; }
.adr-cm-label { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adr-cm-label small { display: block; font-size: 11.5px; font-weight: 400; color: var(--cl-muted); overflow: hidden; text-overflow: ellipsis; }
.adr-cm-label-wrap, .adr-cm-label-wrap small { white-space: normal; }
.adr-cm-badge { flex: none; padding: 2px 9px; border-radius: 9999px; font-size: 13px; font-weight: 600; background: var(--cl-primary-soft); color: var(--cl-primary); }
.adr-cm-search { margin-bottom: 10px; }
.adr-cm-note { font-size: 14px; color: var(--cl-muted); margin: 12px 0 0; }
.adr-cm-none { padding: 18px; text-align: center; font-size: 15px; color: var(--cl-faint); }

.adr-cm-foot { display: flex; align-items: center; gap: 10px; padding: 16px 22px; background: hsl(var(--muted)); border-top: 1px solid var(--cl-border); }
.adr-cm-foot .adr-cm-spacer { flex: 1; }
@media (prefers-reduced-motion: reduce) { .adr * { transition: none !important; } }

/* ---- Reports, with the Meal time (.amr-) and Lateness (.alt-) tabs (.arp-) ---- */
/* Header, cards, buttons, fields, pills, tables and the pager come from
   components.css. An .arp-tone-<name> class picks a Tone for a KPI, its bar,
   a code or a count chip. */

.arp { color: var(--cl-text); display: flex; flex-direction: column; gap: 16px; }

.arp ul.arp-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0; background: hsl(var(--card)); border: 1px solid var(--cl-border); border-radius: var(--cl-radius-inner); list-style: none; align-self: flex-start; }
.arp ul.arp-tabs::before { display: none; }
.arp ul.arp-tabs > li { margin: 0; padding: 0; }
.arp ul.arp-tabs > li > a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 0; border-radius: var(--cl-radius-sm); font-size: 14px; font-weight: 500; color: var(--cl-muted); text-transform: none; text-decoration: none; }
.arp ul.arp-tabs > li > a:hover { color: var(--cl-text); }
.arp ul.arp-tabs > li.uk-active > a { background: var(--cl-primary-soft); color: var(--cl-primary); }
.arp ul.arp-tabs > li > a::after { display: none; }
.arp ul.arp-tabs svg { width: 15px; height: 15px; }

.arp-filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.arp-filters-head .cl-label { margin: 0; }
.arp-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.arp-note { font-size: 13px; color: var(--cl-muted); margin: 10px 0 0; }
.arp-alert { padding: 10px 14px; border-radius: var(--cl-radius-md); background: var(--tone-danger-bg); color: var(--tone-danger-fg); font-size: 14px; }

.arp-tone-green { --arp-tone-bg: var(--tone-green-bg); --arp-kpi-fg: var(--tone-green-fg); }
.arp-tone-red { --arp-tone-bg: var(--tone-red-bg); --arp-kpi-fg: var(--tone-red-fg); }
.arp-tone-violet { --arp-tone-bg: var(--tone-violet-bg); --arp-kpi-fg: var(--tone-violet-fg); }
.arp-tone-amber { --arp-tone-bg: var(--tone-amber-bg); --arp-kpi-fg: var(--tone-amber-fg); }
.arp-tone-pink { --arp-tone-bg: var(--tone-pink-bg); --arp-kpi-fg: var(--tone-pink-fg); }
.arp-tone-blue { --arp-tone-bg: var(--tone-blue-bg); --arp-kpi-fg: var(--tone-blue-fg); }
.arp-tone-grey { --arp-tone-bg: var(--tone-grey-bg); --arp-kpi-fg: var(--tone-grey-fg); }

.arp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.arp-kpi { display: block; width: 100%; text-align: left; padding: 14px 16px; background: var(--cl-card-bg); border: 1px solid var(--cl-border); border-radius: 14px; font: inherit; color: inherit; }
button.arp-kpi { cursor: pointer; transition: box-shadow .15s, border-color .15s; }
button.arp-kpi:hover { box-shadow: 0 2px 8px rgb(31 35 51 / .08); }
.arp-kpi-active { border-color: var(--arp-kpi-fg); box-shadow: 0 0 0 1px var(--arp-kpi-fg); }
.arp-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; }
.arp-kpi-value { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 8px; }
.arp-kpi-value b { font-size: 31px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.arp-kpi-value span { font-size: 13px; color: var(--cl-muted); }
.arp-kpi-sub { font-size: 13px; color: var(--cl-muted); }
.arp-kpi-alert .arp-kpi-value b, .arp-kpi-alert .arp-kpi-sub { color: var(--tone-danger-fg); }
.arp-bar { display: block; width: 100%; height: 6px; border-radius: 9999px; background: hsl(var(--muted)); overflow: hidden; }
.arp-bar span { display: block; max-width: 100%; height: 100%; border-radius: 9999px; background: var(--arp-kpi-fg); }

.arp-code { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 5px; font-size: 11px; font-weight: 700; background: var(--arp-tone-bg); color: var(--arp-kpi-fg); }
.arp-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--arp-tone-bg); color: var(--arp-kpi-fg); }

.arp-sec-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.arp-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 560px; }
.arp-legend-item { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 9999px; background: var(--cl-soft); font-size: 12px; color: var(--cl-text); }

.arp .cl-table th { padding: 9px 10px; }
.arp .cl-table td { padding: 10px; }
.arp .cl-table tfoot td { background: var(--cl-soft); font-weight: 700; border-top: 1px solid var(--cl-border); border-bottom: 0; }
.arp .cl-table .text-destructive { color: var(--tone-danger-fg); }
.arp-summary th, .arp-summary td { text-align: center !important; }
.arp-summary .arp-emp { text-align: left !important; }
.arp-summary .arp-sep { border-left: 1px solid var(--cl-border); }
.arp-summary thead tr:first-child th { padding-bottom: 2px; }
.arp-summary thead tr:last-child th { font-size: 11px; }
.arp-group { display: inline-block; padding: 2px 10px; border-radius: 9999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.arp-group-status { background: var(--cl-primary-soft); color: var(--cl-primary); }
.arp-group-work { background: var(--tone-blue-bg); color: var(--tone-blue-fg); }
.arp-group-off { background: var(--tone-amber-bg); color: var(--tone-amber-fg); }
.arp-group-rest { background: var(--tone-green-bg); color: var(--tone-green-fg); }
.arp-group-holiday { background: var(--tone-pink-bg); color: var(--tone-pink-fg); }
.arp-person { display: flex; align-items: center; gap: 10px; }
.arp-avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.arp-name { font-weight: 600; }
.arp-meta { font-size: 12px; color: var(--cl-muted); }

.arp-placeholder { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--cl-border); border-radius: 14px; background: hsl(var(--card)); color: var(--cl-muted); text-align: center; font-size: 14px; }
.arp-placeholder b { color: var(--cl-text); font-size: 16px; }
.arp-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.arp-stack { display: flex; flex-direction: column; gap: 12px; }
.arp-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.arp-stat { display: flex; align-items: center; gap: 14px; }
.arp-stat-icon { flex: none; width: 36px; height: 36px; border-radius: var(--cl-radius-md); }
.arp-stat-icon svg { width: 16px; height: 16px; }
.arp-stat-label { display: block; font-size: 14px; font-weight: 600; }
.arp-stat .arp-kpi-value { margin: 4px 0 0; }
.arp-placeholder .arp-stat-icon { margin-bottom: 4px; }
.arp-placeholder > span:last-child { max-width: 320px; }
.arp-placeholder-flat { min-height: 180px; border: 0; white-space: normal; }
.arp-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .arp-charts { grid-template-columns: 1fr; } }
.arp-chart-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cl-muted); margin-bottom: 10px; }
.arp-chart { display: flex; flex-direction: column; gap: 10px; }
.arp-chart-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 14px; }
.arp-chart-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arp-chart-track { height: 10px; border-radius: 9999px; background: hsl(var(--muted)); overflow: hidden; }
.arp-chart-bar { display: block; height: 100%; border-radius: 9999px; background: var(--arp-kpi-fg); }
.arp-chart-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .arp-split { grid-template-columns: 1fr; } }
.amr-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.amr-top-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .amr-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.amr-kpi-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.amr-icon { flex: none; width: 30px; height: 30px; border-radius: var(--cl-radius-sm); }
.amr-icon svg { width: 15px; height: 15px; }
.amr-icon-lg { width: 44px; height: 44px; border-radius: var(--cl-radius-inner); margin-bottom: 4px; }
.amr-icon-lg svg { width: 20px; height: 20px; }
.amr-search { width: 230px; }
.amr-actions { display: flex; gap: 8px; margin-top: 8px; }
.alt-amber { color: var(--tone-amber-fg) !important; }
.alt-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.alt-person { padding: 14px; background: hsl(var(--card)); border: 1px solid var(--cl-border); border-radius: var(--cl-radius-inner); }
.alt-person-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.alt-rank { font-size: 13px; font-weight: 700; color: var(--cl-faint); }
.alt-person-name { flex: 1; min-width: 0; font-size: 14px; }
.alt-total { text-align: right; }
.alt-total b { font-size: 20px; font-variant-numeric: tabular-nums; }
.alt-bar { display: block; height: 6px; border-radius: 9999px; background: hsl(var(--muted)); overflow: hidden; }
.alt-bar span { display: block; height: 100%; border-radius: 9999px; background: var(--tone-amber-solid); }
.alt-person-foot { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--cl-muted); }
.alt-person-foot b { color: var(--cl-text); }
.alt-sep { border-left: 1px solid var(--cl-border); }
.arp .cl-table .alt-num { text-align: right; }
.alt-arrow { margin: 0 6px; color: var(--cl-faint); }
.alt-late { color: var(--tone-amber-fg); font-weight: 700; }
.arp-sort-head { display: inline-flex; align-items: center; gap: 4px; }
.arp-sort { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--cl-faint); cursor: pointer; }
.arp-sort:hover, .arp-sort-on { background: var(--cl-primary-soft); color: var(--cl-primary); }
.arp-sort svg { width: 11px; height: 11px; }
@media (prefers-reduced-motion: reduce) { .arp * { transition: none !important; } }

/* ---- Reports, Employee tab (.aer-) ---- */
/* A day in the calendar takes the Tone of its result: success when clean,
   warning when flagged, danger when absent. */

.aer-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.aer-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.aer-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.aer-name { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.aer-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aer-chip { padding: 2px 8px; border-radius: 6px; background: hsl(var(--muted)); font-size: 12px; font-weight: 600; color: var(--cl-text); }
.aer-controls { display: grid; grid-template-columns: 220px 150px 150px; gap: 10px; align-items: end; }
@media (max-width: 900px) { .aer-controls { grid-template-columns: 1fr 1fr; } }
.aer-picker-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: var(--cl-control-md); padding: 0 10px; border: 1px solid var(--cl-border); border-radius: var(--cl-radius-md); background: var(--cl-soft); font-size: 14px; color: var(--cl-text); cursor: pointer; text-align: left; }
.aer-picker-btn span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.aer-cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 18px; }
@media (max-width: 900px) { .aer-cal-wrap { grid-template-columns: 1fr; } }
.aer-cal-sub { margin-bottom: 12px; }
.aer-month + .aer-month { margin-top: 18px; }
.aer-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.aer-dow { padding-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--cl-muted); text-align: center; }
.aer-day { min-height: 56px; padding: 6px 8px; border: 1px dashed var(--cl-border); border-radius: var(--cl-radius-sm); background: hsl(var(--card)); display: flex; flex-direction: column; justify-content: space-between; font-size: 13px; }
.aer-day-num { font-weight: 700; color: var(--cl-muted); }
.aer-day-note { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aer-day-blank { border: 0; background: transparent; }
.aer-day-outside { opacity: .35; }
.aer-day-clean { --aer-tone: var(--tone-success-fg); border: 1px solid color-mix(in srgb, var(--aer-tone) 25%, transparent); background: var(--tone-success-bg); }
.aer-day-flagged { --aer-tone: var(--tone-warning-fg); border: 1px solid color-mix(in srgb, var(--aer-tone) 25%, transparent); background: var(--tone-warning-bg); }
.aer-day-absent { --aer-tone: var(--tone-danger-fg); border: 1px solid color-mix(in srgb, var(--aer-tone) 25%, transparent); background: var(--tone-danger-bg); }
.aer-day-clean .aer-day-num, .aer-day-clean .aer-day-note,
.aer-day-flagged .aer-day-num, .aer-day-flagged .aer-day-note,
.aer-day-absent .aer-day-num, .aer-day-absent .aer-day-note { color: var(--aer-tone); }
.aer-day-rest { border: 1px solid var(--cl-border); background: hsl(var(--muted)); }
.aer-day-rest .aer-day-num, .aer-day-rest .aer-day-note { color: var(--cl-muted); }
.aer-side-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cl-muted); margin-bottom: 10px; }
.aer-key { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: var(--cl-radius-sm); background: var(--cl-soft); font-size: 13px; }
.aer-key + .aer-key { margin-top: 6px; }
.aer-key-name { display: flex; align-items: center; gap: 8px; }
.aer-key b { font-variant-numeric: tabular-nums; }
.aer-swatch { width: 12px; height: 12px; border-radius: 4px; }
.aer-swatch-clean { background: color-mix(in srgb, var(--tone-success-fg) 30%, var(--tone-success-bg)); }
.aer-swatch-flagged { background: color-mix(in srgb, var(--tone-warning-fg) 30%, var(--tone-warning-bg)); }
.aer-swatch-absent { background: color-mix(in srgb, var(--tone-danger-fg) 30%, var(--tone-danger-bg)); }
.aer-swatch-rest { background: hsl(var(--muted)); }
.aer-swatch-none { border: 1px dashed var(--cl-border); }

.aer-table th, .aer-table td { text-align: center !important; }
.aer-table .aer-left { text-align: left !important; }
.aer-table .aer-sep { border-left: 1px solid var(--cl-border); }
.aer-table thead tr:first-child th { padding-bottom: 2px; }
.aer-table thead tr:last-child th { font-size: 11px; }
.aer-g-punch { color: var(--tone-blue-fg) !important; }
.aer-g-ot { color: var(--tone-pink-fg) !important; }
.aer-g-hours { color: var(--tone-violet-fg) !important; }
.aer-sch { display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 6px; background: var(--tone-blue-bg); color: var(--tone-blue-fg); font-size: 13px; font-weight: 700; }
.aer-late { color: var(--tone-amber-fg); font-weight: 700; }
.aer-strong { font-weight: 700; }

/* ---- Attendance day timeline modal (.adt-) ---- */
/* attendance_day_timeline.templ. UIkit moves the modal to <body>, outside
   .atp, so it uses only the global tokens. */

.adt {
	--adt-soft: hsl(var(--muted) / .55);
	--adt-punch: var(--tone-blue-solid);
	--adt-in: var(--tone-teal-solid);
	--adt-out: var(--tone-red-solid);
	--adt-off: hsl(var(--muted-foreground) / .55);
	color: var(--cl-text);
}
.adt-dialog { width: 860px; max-width: calc(100vw - 32px); padding: 0; border-radius: 20px; overflow: hidden; background: hsl(var(--card)); box-shadow: 0 24px 60px rgba(31, 35, 51, .25); }
.adt-body { position: relative; padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.adt-close { position: absolute; top: 18px; right: 18px; width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--cl-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.adt-close:hover { background: var(--adt-soft); color: var(--cl-text); }
.adt-close svg { width: 18px; height: 18px; }
.adt-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-right: 40px; }
.adt-head .atp-avatar { width: 38px; height: 38px; font-size: 15px; }
.adt-title { margin: 0; font-size: 17px; font-weight: 700; }
.adt-sub { margin: 1px 0 0; font-size: 13px; color: var(--cl-muted); }
.adt-status { margin-left: auto; }
.adt-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .adt-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.adt-summary div { padding: 8px 10px; border-radius: 10px; background: var(--adt-soft); }
.adt-summary span { display: block; font-size: 11px; color: var(--cl-muted); }
.adt-summary b { font-size: 15px; font-variant-numeric: tabular-nums; }
.adt-notes { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--tone-amber-solid) 8%, hsl(var(--card))); font-size: 13px; }
.adt-notes .atp-flag { font-weight: 600; }
.adt-chart { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; row-gap: 6px; column-gap: 10px; }
.adt-lane-label { font-size: 11px; font-weight: 600; color: var(--cl-muted); }
.adt-lane { position: relative; border-radius: 8px; background: var(--adt-soft); }
.adt-lane-plan { height: 14px; }
.adt-lane-punch { height: 44px; margin: 20px 0; }
.adt-plan-work, .adt-plan-meal, .adt-inside { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.adt-plan-work { background: color-mix(in srgb, var(--adt-punch) 30%, transparent); }
.adt-plan-meal { background: color-mix(in srgb, var(--tone-amber-solid) 60%, transparent); }
.adt-inside { top: 18px; bottom: 18px; background: color-mix(in srgb, var(--adt-in) 35%, transparent); }
/* entries rise from the middle, exits hang below it */
.adt-mark { position: absolute; width: 1px; transform: translateX(-50%); background: var(--adt-mark); opacity: .55; --adt-mark: var(--adt-off); }
.adt-mark-in { top: 4px; bottom: 50%; --adt-mark: var(--adt-in); }
.adt-mark-out { top: 50%; bottom: 4px; --adt-mark: var(--adt-out); }
.adt-mark-off { --adt-mark: var(--adt-off); opacity: .45; }
.adt-mark:hover { opacity: 1; width: 3px; z-index: 2; }
.adt-mark::before { content: ""; position: absolute; inset: 0 -4px; }
.adt-mark-slot { width: 3px; opacity: 1; z-index: 1; }
.adt-mark-in.adt-mark-slot { top: -4px; }
.adt-mark-out.adt-mark-slot { bottom: -4px; }
.adt-mark i { position: absolute; left: 50%; transform: translateX(-50%); padding: 0 5px; border-radius: 9999px; background: var(--adt-mark); color: var(--tone-solid-text); font-size: 10px; font-style: normal; font-weight: 700; line-height: 15px; white-space: nowrap; }
.adt-mark-in i { top: -15px; }
.adt-mark-out i { bottom: -15px; }
.adt-ticks { position: relative; height: 16px; font-size: 11px; color: var(--cl-muted); font-variant-numeric: tabular-nums; }
.adt-ticks span { position: absolute; transform: translateX(-50%); }
.adt-ticks span:first-child { transform: none; }
.adt-ticks span:last-child { transform: translateX(-100%); }
.adt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--cl-muted); }
.adt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.adt-legend .adt-legend-hint { margin-left: auto; font-style: italic; }
.adt-key { width: 12px; height: 8px; border-radius: 3px; }
.adt-key-in { background: var(--adt-in); }
.adt-key-out { background: var(--adt-out); }
.adt-key-inside { background: color-mix(in srgb, var(--adt-in) 35%, transparent); }
.adt-key-work { background: color-mix(in srgb, var(--adt-punch) 30%, transparent); }
.adt-key-meal { background: color-mix(in srgb, var(--tone-amber-solid) 60%, transparent); }
.adt-key-off { background: var(--adt-off); }
.adt-list { max-height: 280px; overflow: auto; border: 1px solid var(--cl-border); border-radius: 12px; }
.adt-list .cl-table th { position: sticky; top: 0; z-index: 1; background: hsl(var(--muted)); }
.adt-row-off td { opacity: .6; }
.adt-empty { margin: 0; padding: 18px; border-radius: 12px; background: var(--adt-soft); text-align: center; font-size: 13px; color: var(--cl-muted); }

/* ---- Profile (.prf-) ---- */
/* The avatar, cards, buttons, fields and pills come from components.css. The
   page opens on a header card naming the Account (prototype variant C), so
   it has no PageHeader. */
.prf { max-width: 960px; margin: 0 auto; display: grid; gap: 20px; }
.prf-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 24px; background: linear-gradient(135deg, var(--cl-primary-soft), transparent 60%), var(--cl-card-bg); }
.prf-hero-id { flex: 1; min-width: 200px; }
.prf-name { font-size: 22px; font-weight: 700; margin: 0; }
.prf-hero-line { font-size: 14px; margin: 2px 0 10px; }
.prf-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.prf-hero-facts { display: grid; gap: 4px; margin: 0; font-size: 13px; }
.prf-hero-facts div { display: flex; gap: 6px; }
.prf-hero-facts dt { margin: 0; }
.prf-hero-facts dd { margin: 0; color: var(--cl-text); font-weight: 600; }

/* Segmented control: the tabs and the Mode switch. A link or button is a
   segment; .prf-seg-on marks the active one. */
.prf-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--cl-radius-md); background: hsl(var(--muted)); justify-self: start; }
.prf-seg > a, .prf-seg > button { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border: none; border-radius: var(--cl-radius-xs); background: transparent; font-size: 14px; color: var(--cl-muted); text-decoration: none; cursor: pointer; }
.prf-seg > a:hover, .prf-seg > button:hover { color: var(--cl-text); text-decoration: none; }
.prf-seg > .prf-seg-on, .prf-seg > .prf-seg-on:hover, html:not(.dark) .prf-seg > .prf-seg-light, html.dark .prf-seg > .prf-seg-dark { background: hsl(var(--background)); color: var(--cl-text); font-weight: 550; box-shadow: var(--cl-shadow-card); }
.prf-seg uk-icon { width: 15px; height: 15px; }

.prf-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--cl-radius-md); border: 1px solid var(--cl-border); background: var(--cl-soft); font-size: 14px; margin-bottom: 16px; }
.prf-banner > uk-icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.prf-banner-danger { border-color: var(--tone-danger-fg); background: var(--tone-danger-bg); }
.prf-banner-danger > uk-icon { color: var(--tone-danger-fg); }
.prf-banner-text { flex: 1; display: grid; gap: 2px; }
.prf-banner-text span { color: var(--cl-muted); font-size: 13px; }

.prf-details { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
@media (max-width: 760px) { .prf-details { grid-template-columns: 1fr; } }
.prf-field { margin-bottom: 16px; }
.prf-hint { margin: 6px 0 0; font-size: 13px; color: var(--cl-muted); }
.prf-email-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: var(--cl-control-md); padding: 0 10px; border: 1px solid var(--cl-border); border-radius: var(--cl-radius-md); background: var(--cl-soft); font-size: 14px; }
.prf-link { border: none; background: none; padding: 0; color: var(--cl-primary); font-size: 13px; cursor: pointer; }
.prf-link:hover { text-decoration: underline; }
.prf-admin { background: var(--cl-soft); }
.prf-admin-title { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.prf-admin-title uk-icon { width: 14px; height: 14px; }
.prf-facts { display: grid; gap: 10px; margin: 0; font-size: 13px; }
.prf-facts dt { font-size: 12px; color: var(--cl-muted); }
.prf-facts dd { margin: 0; }

.prf-modal { padding: 22px; border-radius: var(--cl-radius-card); max-width: 440px; }
.prf-modal-title { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.prf-modal-body > .prf-hint { margin: 0 0 16px; }
.prf-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.prf-modal-actions-split { justify-content: space-between; align-items: center; }
.prf-modal-actions-split > .prf-modal-actions { margin: 0; }
.prf-code { letter-spacing: .3em; font-size: 18px; }

.prf-password { max-width: 480px; }
.prf-password > .prf-hint:last-child { margin-top: 14px; }

.prf-section-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.prf-palettes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.prf-palette { border: 2px solid var(--cl-border); border-radius: var(--cl-radius-inner); padding: 12px; cursor: pointer; background: hsl(var(--card)); text-align: left; color: var(--cl-text); }
.prf-palette:hover { border-color: var(--cl-muted); }
.uk-theme-zinc .prf-palette[data-palette="uk-theme-zinc"], .uk-theme-forest .prf-palette[data-palette="uk-theme-forest"], .uk-theme-ocean .prf-palette[data-palette="uk-theme-ocean"] { border-color: var(--cl-primary); }
.prf-palette-preview { display: flex; height: 64px; margin-bottom: 10px; border-radius: var(--cl-radius-xs); overflow: hidden; border: 1px solid var(--cl-border); background: hsl(var(--background)); }
.prf-palette-rail { width: 30%; background: hsl(var(--secondary)); }
.prf-palette-page { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.prf-palette-line { display: block; height: 8px; width: 60%; border-radius: 4px; background: hsl(var(--muted)); }
.prf-palette-accent { display: block; height: 16px; width: 40%; border-radius: 5px; }
.prf-palette-name { display: flex; align-items: center; justify-content: space-between; font-weight: 550; font-size: 14px; }
.prf-palette-name uk-icon { width: 16px; height: 16px; color: var(--cl-primary); }

.prf-mode { margin-bottom: 14px; }
.prf-browser-note { display: flex; align-items: center; gap: 6px; margin: 0; }
.prf-browser-note uk-icon { width: 14px; height: 14px; }
